summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-05-16 16:08:48 -0700
committerJeremy Allison <jra@samba.org>2011-05-17 20:05:42 +0200
commit9d9d7a7cfdcd437add3b0f1c2ec614184573c761 (patch)
tree23df71fd6812d36d9d12968d774a1797abfec98f /source3
parentd25370fb477dd733fae6c1ee1a67e32a78236779 (diff)
downloadsamba-9d9d7a7cfdcd437add3b0f1c2ec614184573c761.tar.gz
samba-9d9d7a7cfdcd437add3b0f1c2ec614184573c761.tar.bz2
samba-9d9d7a7cfdcd437add3b0f1c2ec614184573c761.zip
is_my_ipaddr() should recognise loopback addresses as ours.
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue May 17 20:05:42 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/util_sock.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index 371b8c08b8..5d20d74404 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -1321,13 +1321,13 @@ static bool is_my_ipaddr(const char *ipaddr_str)
return false;
}
- if (ismyaddr((struct sockaddr *)&ss)) {
- return true;
+ if (is_zero_addr(&ss)) {
+ return false;
}
- if (is_zero_addr(&ss) ||
- is_loopback_addr((struct sockaddr *)&ss)) {
- return false;
+ if (ismyaddr((struct sockaddr *)&ss) ||
+ is_loopback_addr((struct sockaddr *)&ss)) {
+ return true;
}
n = get_interfaces(talloc_tos(), &nics);