summaryrefslogtreecommitdiff
path: root/source4/nbt_server/query.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-31 04:15:58 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:24 -0500
commitaa985bdee09e222f9f3f1f49e1cc20e0760c6f32 (patch)
tree06a1196ade27f619759e53e23fb3fbe9c83121d0 /source4/nbt_server/query.c
parent5e6082b4b0e8d47d8634cf1b0c5bb460d0b6dbd1 (diff)
downloadsamba-aa985bdee09e222f9f3f1f49e1cc20e0760c6f32.tar.gz
samba-aa985bdee09e222f9f3f1f49e1cc20e0760c6f32.tar.bz2
samba-aa985bdee09e222f9f3f1f49e1cc20e0760c6f32.zip
r5118: added support for node status replies in nbtd. nmblookup -S now works against Samba4.
Also added support for the '*' wildcard name (This used to be commit 2dd7ccf72444db668fa970c3a95de1448baea224)
Diffstat (limited to 'source4/nbt_server/query.c')
-rw-r--r--source4/nbt_server/query.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/source4/nbt_server/query.c b/source4/nbt_server/query.c
index c962a691c6..859a9c7f26 100644
--- a/source4/nbt_server/query.c
+++ b/source4/nbt_server/query.c
@@ -25,15 +25,6 @@
#include "system/network.h"
#include "nbt_server/nbt_server.h"
-/* check a condition on an incoming packet */
-#define NBT_ASSERT_PACKET(packet, src_address, test) do { \
- if (!(test)) { \
- nbt_bad_packet(packet, src_address, #test); \
- return; \
- } \
-} while (0)
-
-
/*
send a name query reply
*/
@@ -92,6 +83,13 @@ void nbt_request_query(struct nbt_name_socket *nbtsock,
struct nbt_iface_name *iname;
struct nbt_name *name;
+ /* see if its a node status query */
+ if (packet->qdcount == 1 &&
+ packet->questions[0].question_type == NBT_QTYPE_STATUS) {
+ nbt_query_status(nbtsock, packet, src_address, src_port);
+ return;
+ }
+
/* if its a WINS query then direct to our WINS server */
if ((packet->operation & NBT_FLAG_RECURSION_DESIRED) &&
!(packet->operation & NBT_FLAG_BROADCAST)) {