From 31cac044a35d926ee310282c791ed24913f48b2e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 19 Jun 2002 00:21:38 +0000 Subject: 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) --- source3/nmbd/nmbd_subnetdb.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'source3/nmbd') 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. -- cgit