mirror of
https://github.com/samba-team/samba.git
synced 2025-02-04 17:47:26 +03:00
Not all implementations of struct ifaddrs define ifa_broadaddr.
E.g. the definition of libreplace doesn't. :-o Michael (This used to be commit 25341602ec8752e19ab993872dc2f6c4762785ff)
This commit is contained in:
parent
5c6db777e4
commit
e033fdbde2
@ -236,19 +236,9 @@ static int _get_interfaces(struct iface_struct *ifaces, int max_interfaces)
|
|||||||
memcpy(&ifaces[total].netmask, ifptr->ifa_netmask, copy_size);
|
memcpy(&ifaces[total].netmask, ifptr->ifa_netmask, copy_size);
|
||||||
|
|
||||||
if (ifaces[total].flags & (IFF_BROADCAST|IFF_LOOPBACK)) {
|
if (ifaces[total].flags & (IFF_BROADCAST|IFF_LOOPBACK)) {
|
||||||
if (ifptr->ifa_broadaddr) {
|
make_bcast(&ifaces[total].bcast,
|
||||||
memcpy(&ifaces[total].bcast,
|
&ifaces[total].ip,
|
||||||
ifptr->ifa_broadaddr,
|
&ifaces[total].netmask);
|
||||||
copy_size);
|
|
||||||
} else {
|
|
||||||
/* For some reason ifptr->ifa_broadaddr
|
|
||||||
* is null. Make one from ifa_addr and
|
|
||||||
* ifa_netmask.
|
|
||||||
*/
|
|
||||||
make_bcast(&ifaces[total].bcast,
|
|
||||||
&ifaces[total].ip,
|
|
||||||
&ifaces[total].netmask);
|
|
||||||
}
|
|
||||||
} else if ((ifaces[total].flags & IFF_POINTOPOINT) &&
|
} else if ((ifaces[total].flags & IFF_POINTOPOINT) &&
|
||||||
ifptr->ifa_dstaddr ) {
|
ifptr->ifa_dstaddr ) {
|
||||||
memcpy(&ifaces[total].bcast,
|
memcpy(&ifaces[total].bcast,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user