Subject: routing socket alignment issue
To: None <firstname.lastname@example.org>
From: None <email@example.com>
Date: 09/02/1999 00:46:13
As noted in PR#8179 and #8305, there's 64bit alignment issue in
routing socket. This has been invisible until IPv6 merge because
all sockaddr_* structure are sized as multiple of 8 bytes.
sockaddr_in6 comes as exception and raises alignment issue.
From what I've looked, many of exisitng programs do like:
rtm = (struct rt_msghdr *)next;
sin = (struct sockaddr_in6 *)(rtm + 1);
sdl = (struct sockaddr_dl *)(sin + 1);
while sys/net/rtsock.c uses ALIGN(). I feel that sys/net/rtsock.c
should avoid use of ALIGN() for compatibility with existing codebase,
but I'm not 100% sure.
Is there any standard document on this? If not, I'll change
sys/net/rtsock.c to generate packed structures (not ALIGN'ed) on
routing socket reads.