[Ns-bugs] [Bug 1102] IPv4 header doesn't handle correctly the fragment offset field
code@nsnam.ece.gatech.edu
code at nsnam.ece.gatech.edu
Sat Apr 23 04:44:16 PDT 2011
http://www.nsnam.org/bugzilla/show_bug.cgi?id=1102
Tommaso Pecorella <tommaso.pecorella at unifi.it> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
--- Comment #3 from Tommaso Pecorella <tommaso.pecorella at unifi.it> 2011-04-23 07:44:15 EDT ---
Not *exactly" the same issue, but very close.
In the Ipv4Header the fragment offset is defined as:
uint16_t m_fragmentOffset : 13;
The two accessors
void SetFragmentOffset (uint16_t offset);
and
uint16_t GetFragmentOffset (void) const;
"simply" do an access to that. There are also two asserts to ensure that it is
13-bits long, and they're both wrong as they check for 14 bits. DOH.
HOWEVER Serialize and Deserialize do "think" that m_fragmentOffset is measured
in bytes.
*** something wrong somewhere ***
Solution 1: apply my previous patch.
Solution 2: m_fragmentOffset becomes a "plain" uint16_t and we remove the
asserts (wrong in any case, should had checked against 0x1fff).
Solution 2 is the less intrusive as it restores the inner logic.
--
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Ns-bugs
mailing list