summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-06-19 00:21:38 +0000
committerAndrew Tridgell <tridge@samba.org>2002-06-19 00:21:38 +0000
commit31cac044a35d926ee310282c791ed24913f48b2e (patch)
treeb5b2a1879377eafa081de6ffa656f179b1edcbef /source3/nmbd
parenta60e37096d6576dcf749237df99e7c2c96359834 (diff)
downloadsamba-31cac044a35d926ee310282c791ed24913f48b2e.tar.gz
samba-31cac044a35d926ee310282c791ed24913f48b2e.tar.bz2
samba-31cac044a35d926ee310282c791ed24913f48b2e.zip
when nmbd starts up it is possible that dhcp hasn't started the local
interfaces yet. Instead of giving up, nmbd will now wait for some interfaces to appear (This used to be commit 612ae5313250aec80c94782d55cbf755dd4a9a4f)
Diffstat (limited to 'source3/nmbd')
-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.