From 77cdd7c0ff182f77b1edb032f8d8cd172bdff7ce Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 2 Feb 2005 10:29:50 +0000 Subject: r5171: added support for "bind interfaces only" in nbtd. The solution was to bind twice on each interface, once using the broadcast address and once using the specific IP. We then only listen on the wildcard address if we don't have "bind interface only" set. This also happens to simplify the code that finds the right interface for an incoming request. (This used to be commit b3edf17281c5d82abb40dab817bf2de43f9f6c3f) --- source4/nbt_server/query.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source4/nbt_server/query.c') diff --git a/source4/nbt_server/query.c b/source4/nbt_server/query.c index 2d2e75d51e..6dab18cfbe 100644 --- a/source4/nbt_server/query.c +++ b/source4/nbt_server/query.c @@ -81,9 +81,10 @@ void nbt_request_query(struct nbt_name_socket *nbtsock, struct nbt_name_packet *packet, const char *src_address, int src_port) { - struct nbt_interface *iface; struct nbt_iface_name *iname; struct nbt_name *name; + struct nbt_interface *iface = talloc_get_type(nbtsock->incoming.private, + struct nbt_interface); /* see if its a node status query */ if (packet->qdcount == 1 && @@ -99,9 +100,6 @@ void nbt_request_query(struct nbt_name_socket *nbtsock, return; } - /* find the interface for this query */ - iface = nbt_iface_find(nbtsock, src_address); - NBT_ASSERT_PACKET(packet, src_address, packet->qdcount == 1); NBT_ASSERT_PACKET(packet, src_address, packet->questions[0].question_type == NBT_QTYPE_NETBIOS); NBT_ASSERT_PACKET(packet, src_address, packet->questions[0].question_class == NBT_QCLASS_IP); -- cgit