diff options
author | Karolin Seeger <kseeger@samba.org> | 2008-08-27 10:38:35 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2008-08-27 10:38:35 +0200 |
commit | 42f7808a92c3b73ffc7f967e9157a970c2316e9b (patch) | |
tree | 5159e53e5a42bf60f6ebb8a9d5b6525ca79c6140 /source/nmbd | |
parent | 0682464774e2bdc838e08bdf77b22e6df16980bc (diff) | |
download | samba-42f7808a92c3b73ffc7f967e9157a970c2316e9b.tar.gz |
Revert "Fix bug 5697 nmbd spins in reload_interfaces when only loopback has an IPv4 address"
This reverts commit 435c10268bb6987ab7e8206cd6c45bd9961c5632.
Diffstat (limited to 'source/nmbd')
-rw-r--r-- | source/nmbd/nmbd.c | 4 | ||||
-rw-r--r-- | source/nmbd/nmbd_subnetdb.c | 11 |
2 files changed, 7 insertions, 8 deletions
diff --git a/source/nmbd/nmbd.c b/source/nmbd/nmbd.c index b72be2b482d..af4acc84d07 100644 --- a/source/nmbd/nmbd.c +++ b/source/nmbd/nmbd.c @@ -293,8 +293,8 @@ static void reload_interfaces(time_t t) BlockSignals(false, SIGTERM); - /* We only count IPv4, non-loopback interfaces here. */ - while (iface_count_v4_nl() == 0 && !got_sig_term) { + /* We only count IPv4 interfaces here. */ + while (iface_count_v4() == 0 && !got_sig_term) { sleep(5); load_interfaces(); } diff --git a/source/nmbd/nmbd_subnetdb.c b/source/nmbd/nmbd_subnetdb.c index 225def52cce..a4422d27d57 100644 --- a/source/nmbd/nmbd_subnetdb.c +++ b/source/nmbd/nmbd_subnetdb.c @@ -195,20 +195,19 @@ struct subnet_record *make_normal_subnet(const struct interface *iface) bool create_subnets(void) { /* We only count IPv4 interfaces whilst we're waiting. */ - int num_interfaces; + int num_interfaces = iface_count_v4(); int i; struct in_addr unicast_ip, ipzero; try_interfaces_again: - /* Only count IPv4, non-loopback interfaces. */ - if (iface_count_v4_nl() == 0) { - DEBUG(0,("create_subnets: No local IPv4 non-loopback interfaces !\n")); + if (iface_count_v4() == 0) { + DEBUG(0,("create_subnets: No local interfaces !\n")); DEBUG(0,("create_subnets: Waiting for an interface to appear ...\n")); } - /* We only count IPv4, non-loopback interfaces here. */ - while (iface_count_v4_nl() == 0) { + /* We only count IPv4 interfaces here. */ + while (iface_count_v4() == 0) { void (*saved_handler)(int); /* |