summaryrefslogtreecommitdiff
path: root/source4/nbt_server/query.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/nbt_server/query.c')
-rw-r--r--source4/nbt_server/query.c6
1 files changed, 2 insertions, 4 deletions
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);