summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-10-12 11:37:03 +0200
committerGünther Deschner <gd@samba.org>2007-10-12 11:37:03 +0200
commit862a7e6cb1628cdfd3b062cacc3014e90bdf0efa (patch)
treee79479853bd67a4808a03644eb245743f3aea224
parent9d29664b337e2b76d1672eb78717e067aa0e1d2e (diff)
downloadsamba-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)
-rw-r--r--source3/utils/net_dns.c10
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;