Bugzilla – Full Text Bug Listing |
Summary: | Multi-octet fields in Wi-Fi headers have wrong endianness | ||
---|---|---|---|
Product: | ns-3 | Reporter: | Dean Armstrong <deanarm> |
Component: | wifi | Assignee: | Nicola Baldo <nicola> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | deanarm, ns-bugs |
Priority: | P5 | Keywords: | bug |
Version: | ns-3-dev | ||
Hardware: | All | ||
OS: | All | ||
Attachments: | First attempt at a patch for this bug in the wifi module |
Description
Dean Armstrong
2010-08-09 14:19:05 UTC
Created attachment 967 [details]
First attempt at a patch for this bug in the wifi module
I confirm this bug. It can be reproduced by running examples/wireless/wifi-wired-bridging, opening wifi-wired-bridging-0-2.pcap, and then looking at the timestamp field in beacon frames. For example, the first timestamp is read by wireshark as 0x0090010000000000, but it should actually be read as 0x0000000000019000. Note that not all wifi headers are affected: for example wifi-mac-headers.cc are already using WriteHtolsb and ReadLsbtoh. Dean, thanks for the good work, as usual! The patch is ok for me; if you think no further work is needed to fix this, you have my +1 to commit. (In reply to comment #2) > For example, the first timestamp I actually meant the timestamp of the second beacon frame in the trace. (In reply to comment #2) > ...if you think no further work is needed to fix this, you have my +1 to > commit. In comment #1 I noted that: > ...FlameHeader does similar conversions for the Protocol and Sequence > Number fields. I'm not familiar enough with FLAME to know whether this is > wrong, but I suspect that it is. I haven't addressed this in the attached > patch. Who knows about FLAME? Can someone comment on whether a change is needed there, too? (In reply to comment #4) > Who knows about FLAME? Can someone comment on whether a change is needed there, > too? In the absence of information on FLAME I'm going to assume the current endianness is correct. I've thus pushed the fix for the wifi module, and the associated updates to regression traces. The relevant changesets are 6602:0aae670ceff3, 6603:cbbc605cbe5b, and 6604:81c69049bdab on ns-3-dev, and 130:1b0a4ffea208 on ns-3-dev-ref-traces. |