summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/nmbd/nmbd_subnetdb.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source3/nmbd/nmbd_subnetdb.c b/source3/nmbd/nmbd_subnetdb.c
index 6c6e7adbb8..146b6cbdfe 100644
--- a/source3/nmbd/nmbd_subnetdb.c
+++ b/source3/nmbd/nmbd_subnetdb.c
@@ -233,12 +233,17 @@ BOOL create_subnets(void)
struct in_addr unicast_ip, ipzero;
extern struct in_addr loopback_ip;
- if(num_interfaces == 0)
- {
- DEBUG(0,("create_subnets: No local interfaces !\n"));
- return False;
+ if(num_interfaces == 0) {
+ DEBUG(0,("create_subnets: No local interfaces !\n"));
+ DEBUG(0,("create_subnets: Waiting for an interface to appear ...\n"));
+ while (iface_count() == 0) {
+ sleep(5);
+ load_interfaces();
+ }
}
+ num_interfaces = iface_count();
+
/*
* Create subnets from all the local interfaces and thread them onto
* the linked list.