(usagi-users 04083) Re: mip6d portability issues
Romain KUNTZ <[email protected]> Sat, 15 Nov 2008 16:09:47 +0100
| Newsgroups | gmane.linux.ipv6.usagi.users |
|---|---|
| Message-ID | <[email protected]> |
Hi Jozsef, On 2008/11/07, at 2:20, Jozsef Kovacs wrote: > nd_opt_hdr is not a packed struct (defined in netinet/icmp6.h) and > it's not guaranteed that the length of the struct (two uint8_t > fields) will be 2 bytes on every architecture, thereby dropping a > completely valid RA packet. In my case on an arm device the size of > the struct was 4bytes. We think this is a header file bug: structures should be packed in order to avoid such issues. We will investigate that on our side in order to check if a change in the header file is possible. That would avoid to implement workarounds in the userland code. > By fixing this the daemon worked correctly, but there still might be > some hidden bugs caused by sizeof(struct) checks. Do you mean that you have just added a "packed" attribute to the structure in the header file? Or modified the userland code? Please send us a patch of your fix if you don't mind. Regards, -- Romain KUNTZ [email protected] LSIIT - Networks and Protocols Team http://clarinet.u-strasbg.fr/~kuntz/