From 9d9d7a7cfdcd437add3b0f1c2ec614184573c761 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 16 May 2011 16:08:48 -0700 Subject: is_my_ipaddr() should recognise loopback addresses as ours. Autobuild-User: Jeremy Allison Autobuild-Date: Tue May 17 20:05:42 CEST 2011 on sn-devel-104 --- source3/lib/util_sock.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3') 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); -- cgit