summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/interface.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/lib/interface.c b/source3/lib/interface.c
index eb0af9ef34..2e7c2706a0 100644
--- a/source3/lib/interface.c
+++ b/source3/lib/interface.c
@@ -131,15 +131,18 @@ int iface_count(void)
}
/****************************************************************************
- How many interfaces do we have (v4 only) ?
+ How many non-loopback IPv4 interfaces do we have ?
**************************************************************************/
-int iface_count_v4(void)
+int iface_count_v4_nl(void)
{
int ret = 0;
struct interface *i;
for (i=local_interfaces;i;i=i->next) {
+ if (is_loopback_addr(&i->ip)) {
+ continue;
+ }
if (i->ip.ss_family == AF_INET) {
ret++;
}