summaryrefslogtreecommitdiffstats
path: root/sys/net/rtsock.c
diff options
context:
space:
mode:
authorgallatin <gallatin@FreeBSD.org>2002-01-27 20:39:01 +0000
committergallatin <gallatin@FreeBSD.org>2002-01-27 20:39:01 +0000
commit7e0bbcf238961e33bf2325f435a32d3c58f6f450 (patch)
treeb8b36bd66f1c7cb8cbf1a91df44a6f5b943a1e72 /sys/net/rtsock.c
parent7e26e18582964ec5bb216ce4d68c1ce441d375d8 (diff)
downloadFreeBSD-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>
Diffstat (limited to 'sys/net/rtsock.c')
-rw-r--r--sys/net/rtsock.c1
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;
OpenPOWER on IntegriCloud