diff options
author | Günther Deschner <gd@samba.org> | 2007-10-12 11:37:03 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2007-10-12 11:37:03 +0200 |
commit | 862a7e6cb1628cdfd3b062cacc3014e90bdf0efa (patch) | |
tree | e79479853bd67a4808a03644eb245743f3aea224 /source3 | |
parent | 9d29664b337e2b76d1672eb78717e067aa0e1d2e (diff) | |
download | samba-862a7e6cb1628cdfd3b062cacc3014e90bdf0efa.tar.gz samba-862a7e6cb1628cdfd3b062cacc3014e90bdf0efa.tar.bz2 samba-862a7e6cb1628cdfd3b062cacc3014e90bdf0efa.zip |
Fix the build WITH_DNS_UPDATES.
Jeremy, please have a look.
Guenther
(This used to be commit 4dfda879a3ad44be7008702b9fbefe3858436118)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/net_dns.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/utils/net_dns.c b/source3/utils/net_dns.c index 716192b057..8b82a96892 100644 --- a/source3/utils/net_dns.c +++ b/source3/utils/net_dns.c @@ -157,8 +157,14 @@ int get_my_ip_address( struct in_addr **ips ) } for ( i=0; i<n; i++ ) { - if (!is_loopback_ip_v4(nics[i].iface_addr.ip.s_addr)) { - memcpy( &list[count++], &nics[i].iface_addr.ip, sizeof( struct in_addr ) ); + if ((nics[i].ip.ss_family == AF_INET)) { + struct in_addr ifip; + + ifip = ((const struct sockaddr_in *)&nics[i].ip)->sin_addr; + + if (!is_loopback_ip_v4(ifip)) { + memcpy(&list[count++], &ifip, sizeof(struct in_addr)); + } } } *ips = list; |