diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-02-16 01:48:11 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:10:43 -0500 |
commit | 4c7c38e930805b84789cfb2472776d6939fc23f6 (patch) | |
tree | 4f7174c83760be60d1b65cd654a624b7b1b19c7c /source4/nbt_server | |
parent | e284054f655a430769fb02e4927256495338ff66 (diff) | |
download | samba-4c7c38e930805b84789cfb2472776d6939fc23f6.tar.gz samba-4c7c38e930805b84789cfb2472776d6939fc23f6.tar.bz2 samba-4c7c38e930805b84789cfb2472776d6939fc23f6.zip |
r5411: make network interface selection a bit saner
- if we have no configured network interfaces, then don't start nbtd (when I add dynamic
interface loading this will change to a delay until a network interface comes up)
- choose the best interface by netmask for torture tests that need a
specific IP (such as the WINS test). Added iface_best_ip() for that.
- if specific interfaces are chosen in smb.conf, then keep that ordering, and
default to the first one listed
(This used to be commit 4d08c114079ef6d1d10a96195046fe43631aefa2)
Diffstat (limited to 'source4/nbt_server')
-rw-r--r-- | source4/nbt_server/nbt_server.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/nbt_server/nbt_server.c b/source4/nbt_server/nbt_server.c index d939482d2f..2c76152160 100644 --- a/source4/nbt_server/nbt_server.c +++ b/source4/nbt_server/nbt_server.c @@ -34,6 +34,11 @@ static void nbtd_task_init(struct task_server *task) struct nbtd_server *nbtsrv; NTSTATUS status; + if (iface_count() == 0) { + task_terminate(task, "nbtd: no network interfaces configured"); + return; + } + nbtsrv = talloc(task, struct nbtd_server); if (nbtsrv == NULL) { task_terminate(task, "nbtd: out of memory"); |