[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(usagi-users 04083) Re: mip6d portability issues
- To: usagi-users@xxxxxxxxxxxxxxxxx
- Subject: (usagi-users 04083) Re: mip6d portability issues
- From: Romain KUNTZ <kuntz@xxxxxxxxxxxxxxxxxx>
- Date: Sat, 15 Nov 2008 16:09:47 +0100
- Cc: Jozsef Kovacs <jozsef.kovacs@xxxxxxxxx>
- In-reply-to: <491397C4.7090808@xxxxxxxxx>
- References: <491397C4.7090808@xxxxxxxxx>
- Reply-to: usagi-users@xxxxxxxxxxxxxxxxx
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
kuntz@xxxxxxxxxxxxxxxxxx
LSIIT - Networks and Protocols Team
http://clarinet.u-strasbg.fr/~kuntz/