Bug 1260 - checksum of the UDP fragmented packets are never calculated.
checksum of the UDP fragmented packets are never calculated.
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: internet
ns-3-dev
All All
: P5 normal
Assigned To: George Riley
:
: 1281 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-09 09:40 UTC by Frederic Urbani
Modified: 2011-10-18 18:22 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Urbani 2011-09-09 09:40:11 UTC
All in title.

My Patch:

diff -r e52db23c9c8b src/internet/model/ipv4-l3-protocol.cc
--- a/src/internet/model/ipv4-l3-protocol.cc	Thu Sep 08 18:24:47 2011 -0700
+++ b/src/internet/model/ipv4-l3-protocol.cc	Fri Sep 09 15:36:53 2011 +0200
@@ -1170,6 +1170,11 @@
 
       NS_LOG_LOGIC ("Fragment check - " << fragmentHeader.GetFragmentOffset ()  );
 
+      if (Node::ChecksumEnabled ())
+        {
+          fragmentHeader.EnableChecksum ();
+        }
+
       NS_LOG_LOGIC ("New fragment Header " << fragmentHeader);
       fragment->AddHeader (fragmentHeader);
Comment 1 Frederic Urbani 2011-09-09 09:55:47 UTC
or perhaps :

diff -r e52db23c9c8b src/internet/model/ipv4-l3-protocol.cc
--- a/src/internet/model/ipv4-l3-protocol.cc	Thu Sep 08 18:24:47 2011 -0700
+++ b/src/internet/model/ipv4-l3-protocol.cc	Fri Sep 09 15:54:55 2011 +0200
@@ -1170,6 +1170,11 @@
 
       NS_LOG_LOGIC ("Fragment check - " << fragmentHeader.GetFragmentOffset ()  );
 
+      if ( ipv4Header.IsChecksumOk() )
+        {
+          fragmentHeader.EnableChecksum ();
+        }
+
       NS_LOG_LOGIC ("New fragment Header " << fragmentHeader);
       fragment->AddHeader (fragmentHeader);
Comment 2 John Abraham 2011-10-18 18:20:57 UTC
*** Bug 1281 has been marked as a duplicate of this bug. ***
Comment 3 John Abraham 2011-10-18 18:22:03 UTC
changeset 7562	be2b2c3c480c