From 4c7c38e930805b84789cfb2472776d6939fc23f6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 16 Feb 2005 01:48:11 +0000 Subject: 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) --- source4/nbt_server/nbt_server.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4/nbt_server/nbt_server.c') 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"); -- cgit