diff options
author | Michael Adam <obnox@samba.org> | 2008-02-22 10:43:42 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-02-22 10:43:42 +0100 |
commit | e033fdbde2c30d68590dc6bdf82aac2034287678 (patch) | |
tree | 6fbeb10307333ee2e19e66d36a755647cb63079c /source3 | |
parent | 5c6db777e4eadd031105623adeca10c1896a164d (diff) | |
download | samba-e033fdbde2c30d68590dc6bdf82aac2034287678.tar.gz samba-e033fdbde2c30d68590dc6bdf82aac2034287678.tar.bz2 samba-e033fdbde2c30d68590dc6bdf82aac2034287678.zip |
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)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/interfaces.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/source3/lib/interfaces.c b/source3/lib/interfaces.c index 8925958e95..dd857ae672 100644 --- a/source3/lib/interfaces.c +++ b/source3/lib/interfaces.c @@ -236,19 +236,9 @@ static int _get_interfaces(struct iface_struct *ifaces, int max_interfaces) memcpy(&ifaces[total].netmask, ifptr->ifa_netmask, copy_size); if (ifaces[total].flags & (IFF_BROADCAST|IFF_LOOPBACK)) { - if (ifptr->ifa_broadaddr) { - memcpy(&ifaces[total].bcast, - ifptr->ifa_broadaddr, - 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); - } + make_bcast(&ifaces[total].bcast, + &ifaces[total].ip, + &ifaces[total].netmask); } else if ((ifaces[total].flags & IFF_POINTOPOINT) && ifptr->ifa_dstaddr ) { memcpy(&ifaces[total].bcast, |