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>
This commit is contained in:
gallatin 2002-01-27 20:39:01 +00:00
parent 7e26e18582
commit 7e0bbcf238

View File

@ -679,6 +679,7 @@ again:
}
len += dlen;
}
len = ALIGN(len);
if (cp == 0 && w != NULL && !second_time) {
register struct walkarg *rw = w;