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/torture/nbt/register.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/torture/nbt/register.c') diff --git a/source4/torture/nbt/register.c b/source4/torture/nbt/register.c index 40b8a587fe..e9b98663a5 100644 --- a/source4/torture/nbt/register.c +++ b/source4/torture/nbt/register.c @@ -49,7 +49,7 @@ static BOOL nbt_register_own(TALLOC_CTX *mem_ctx, struct nbt_name *name, NTSTATUS status; struct nbt_name_socket *nbtsock = nbt_name_socket_init(mem_ctx, NULL); BOOL ret = True; - const char *myaddress = iface_n_ip(0); + const char *myaddress = iface_best_ip(address); socket_listen(nbtsock->sock, myaddress, 0, 0, 0); @@ -114,7 +114,7 @@ static BOOL nbt_refresh_own(TALLOC_CTX *mem_ctx, struct nbt_name *name, NTSTATUS status; struct nbt_name_socket *nbtsock = nbt_name_socket_init(mem_ctx, NULL); BOOL ret = True; - const char *myaddress = iface_n_ip(0); + const char *myaddress = iface_best_ip(address); socket_listen(nbtsock->sock, myaddress, 0, 0, 0); -- cgit