Checksum for Ipv4RawSocket
authorDaniel L. <nikkipui@gmail.com>
Mon, 15 Oct 2012 17:35:09 -0400
changeset 9110 9ae62bcda73e
parent 9109 a09a1899429d
child 9111 e153cd03f531
Checksum for Ipv4RawSocket
src/internet/model/ipv4-l3-protocol.cc
--- a/src/internet/model/ipv4-l3-protocol.cc	Thu Oct 11 12:21:17 2012 -0700
+++ b/src/internet/model/ipv4-l3-protocol.cc	Mon Oct 15 17:35:09 2012 -0400
@@ -532,6 +532,10 @@
                                 Ptr<Ipv4Route> route)
 {
   NS_LOG_FUNCTION (this << packet << ipHeader << route);
+  if (Node::ChecksumEnabled ())
+    {
+      ipHeader.EnableChecksum ();
+    }
   SendRealOut (route, packet, ipHeader);
 }