diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-02-05 16:39:28 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-02-05 16:39:28 +0100 |
commit | 6d139ca4680abcbda5110f2f0886aa038ff62088 (patch) | |
tree | 7d61db40fb058bcbf08ccd8e0dadc365b819371b /source3/lib/interface.c | |
parent | 4a9b3052caeb8bb144803b49dcfae82395172bc3 (diff) | |
parent | afa960cbbcd609123d710c301e7a9a070c1fed70 (diff) | |
download | samba-6d139ca4680abcbda5110f2f0886aa038ff62088.tar.gz samba-6d139ca4680abcbda5110f2f0886aa038ff62088.tar.bz2 samba-6d139ca4680abcbda5110f2f0886aa038ff62088.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Conflicts:
librpc/ndr.pc.in
Diffstat (limited to 'source3/lib/interface.c')
-rw-r--r-- | source3/lib/interface.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/lib/interface.c b/source3/lib/interface.c index 48fa4d32a9..b32ccb9c56 100644 --- a/source3/lib/interface.c +++ b/source3/lib/interface.c @@ -151,7 +151,8 @@ int iface_count_v4_nl(void) } /**************************************************************************** - Return a pointer to the in_addr of the first IPv4 interface. + Return a pointer to the in_addr of the first IPv4 interface that's + not 0.0.0.0. **************************************************************************/ const struct in_addr *first_ipv4_iface(void) @@ -159,7 +160,9 @@ const struct in_addr *first_ipv4_iface(void) struct interface *i; for (i=local_interfaces;i ;i=i->next) { - if (i->ip.ss_family == AF_INET) { + if ((i->ip.ss_family == AF_INET) && + (!is_zero_ip_v4(((struct sockaddr_in *)&i->ip)->sin_addr))) + { break; } } |