Unaligned references in /usr/src/sys/netinet6/in6.h

Marc Lörner marc.loerner at hob.de
Tue Jun 3 11:46:27 UTC 2008


Hello,

within testing on a ia64-platform I spotted unaligned references in the 
macros:
IN6_IS_ADDR_UNSPECIFIED(a), IN6_IS_ADDR_LOOPBACK(a), 
IN6_IS_ADDR_V4COMPAT(a) and IN6_IS_ADDR_V4MAPPED(a)

It's not always true that the s6_addr array is aligned to 4-byte and this 
causes some trouble at least with ia64-platforms.

After changing from u_int32_t to u_int8_t accesses the unalignment faults seem 
to be gone.

Regards,
Marc

P.S.: On replies please CC me because I'm not on the list.


More information about the freebsd-net mailing list