* Changed the _SIZEOF_ADDR_IFREQ() macro such that it can be used how we are
using it - hopefully, that is actually correct (it's adopted from FreeBSD). * Fixed bug that cut off the sockaddr_dl reported by the system, so that DHCP wouldn't work anymore (and ifconfig wouldn't show the actual MAC address anymore). * Changed the listing code to actually pad to ifreq size, and leave the length of the sockaddr untouched. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37941 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -94,8 +94,11 @@ struct ifconf {
|
||||
};
|
||||
};
|
||||
|
||||
/* Macro that returns the size of a single address within a SIOCGIFCONF buffer;
|
||||
it looks like this because of compatibility with other platforms. */
|
||||
#define _SIZEOF_ADDR_IFREQ(request) \
|
||||
(sizeof((request).ifr_name) + (request).ifr_addr.sa_len)
|
||||
(IF_NAMESIZE + (request).ifr_addr.sa_len > (int)sizeof(ifreq) \
|
||||
? IF_NAMESIZE + (request).ifr_addr.sa_len : sizeof(ifreq))
|
||||
|
||||
|
||||
/* POSIX definitions follow */
|
||||
|
||||
Reference in New Issue
Block a user