inetAddressUtil: save ifr_addr before query of IFFLAGS
Save before later calls clobber the buffer (was corrupting sin_family).
This commit is contained in:
@@ -338,6 +338,9 @@ int discoverInterfaces(IfaceNodeVector &list, SOCKET socket, const osiSockAddr *
|
||||
}
|
||||
}
|
||||
|
||||
ifaceNode node;
|
||||
node.ifaceAddr.sa = pIfreqList->ifr_addr;
|
||||
|
||||
status = socket_ioctl ( socket, SIOCGIFFLAGS, pIfreqList );
|
||||
if ( status ) {
|
||||
errlogPrintf ("discoverInterfaces(): net intf flags fetch for \"%s\" failed\n", pIfreqList->ifr_name);
|
||||
@@ -362,9 +365,6 @@ int discoverInterfaces(IfaceNodeVector &list, SOCKET socket, const osiSockAddr *
|
||||
}
|
||||
}
|
||||
|
||||
ifaceNode node;
|
||||
node.ifaceAddr.sa = pIfreqList->ifr_addr;
|
||||
|
||||
/*
|
||||
* If this is an interface that supports
|
||||
* broadcast fetch the broadcast address.
|
||||
|
||||
Reference in New Issue
Block a user