diff options
author | gallatin <gallatin@FreeBSD.org> | 2002-01-27 20:39:01 +0000 |
---|---|---|
committer | gallatin <gallatin@FreeBSD.org> | 2002-01-27 20:39:01 +0000 |
commit | 7e0bbcf238961e33bf2325f435a32d3c58f6f450 (patch) | |
tree | b8b36bd66f1c7cb8cbf1a91df44a6f5b943a1e72 | |
parent | 7e26e18582964ec5bb216ce4d68c1ce441d375d8 (diff) | |
download | FreeBSD-src-7e0bbcf238961e33bf2325f435a32d3c58f6f450.zip FreeBSD-src-7e0bbcf238961e33bf2325f435a32d3c58f6f450.tar.gz |
Prevent the kernel from generating an unaligned sysctl data buffer on
64-bit platforms. The unaligned access is caused by struct ifa_msghdr
not being a multiple of 8-bytes in size. If an interface has an odd
number of addresses, this causes the next interface to generate an
unaligned access in the user-level app walking the interfaces (ifconfig).
Submitted by: Bernd Walter <ticso@cicely8.cicely.de>
-rw-r--r-- | sys/net/rtsock.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 3ad9ee6..2a08540 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -679,6 +679,7 @@ again: } len += dlen; } + len = ALIGN(len); if (cp == 0 && w != NULL && !second_time) { register struct walkarg *rw = w; |