Bug 1441 - IPv4 header length field is ignored in Ipv4Header
IPv4 header length field is ignored in Ipv4Header
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: internet
ns-3.13
All All
: P5 normal
Assigned To: George Riley
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-30 10:01 UTC by Thomas Geithner
Modified: 2012-05-30 12:52 UTC (History)
2 users (show)

See Also:


Attachments
patch for IPv4 header length handling (1.03 KB, patch)
2012-05-30 10:01 UTC, Thomas Geithner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Geithner 2012-05-30 10:01:19 UTC
Created attachment 1407 [details]
patch for IPv4 header length handling

The IPv4 header length field is ignored which causes errors in emulation mode (TAP NetDevice) when the packet contains an options field and is parsed in ns-3 (patch that solves the problem is attached).

Example: IGMP packet generated by a Linux host (header length = 24):

...
Internet Protocol Version 4, Src: 0.0.0.0 (0.0.0.0), Dst: 224.0.0.1 (224.0.0.1)
    Version: 4
    Header length: 24 bytes
    Differentiated Services Field: 0xc0 (DSCP 0x30: Class Selector 6; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
        1100 00.. = Differentiated Services Codepoint: Class Selector 6 (0x30)
        .... ..00 = Explicit Congestion Notification: Not-ECT (Not ECN-Capable Transport) (0x00)
    Total Length: 32
    Identification: 0x0000 (0)
    Flags: 0x02 (Don't Fragment)
        0... .... = Reserved bit: Not set
        .1.. .... = Don't fragment: Set
        ..0. .... = More fragments: Not set
    Fragment offset: 0
    Time to live: 1
    Protocol: IGMP (2)
    Header checksum: 0x0417 [correct]
        [Good: True]
        [Bad: False]
    Source: 0.0.0.0 (0.0.0.0)
    Destination: 224.0.0.1 (224.0.0.1)
    Options: (4 bytes)
        Router Alert: Every router examines packet
Internet Group Management Protocol
    [IGMP Version: 2]
    Type: Membership Query (0x11)
    Max Response Time: 10,0 sec (0x64)
    Header checksum: 0xee9b [correct]
    Multicast Address: 0.0.0.0 (0.0.0.0)
Comment 1 Tom Henderson 2012-05-30 12:52:19 UTC
fixed in changeset: b425987e55df