diff options
author | Stefan Metzmacher <metze@samba.org> | 2005-12-30 12:43:11 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:49:03 -0500 |
commit | ab8cd4470c392e04e458eed378b857db00e97f13 (patch) | |
tree | 168399569b03e164a9b3b28d2ac4e7e69cae0ca1 /source4/nbt_server/query.c | |
parent | 805f5d861fe84ff9bc53f974d667434b7d4c60d8 (diff) | |
download | samba-ab8cd4470c392e04e458eed378b857db00e97f13.tar.gz samba-ab8cd4470c392e04e458eed378b857db00e97f13.tar.bz2 samba-ab8cd4470c392e04e458eed378b857db00e97f13.zip |
r12607: fix the build
metze
(This used to be commit 5cc955bf5400a415e462853cff47a69ef206a548)
Diffstat (limited to 'source4/nbt_server/query.c')
-rw-r--r-- | source4/nbt_server/query.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/source4/nbt_server/query.c b/source4/nbt_server/query.c index f71d7b99ed..39300f6e01 100644 --- a/source4/nbt_server/query.c +++ b/source4/nbt_server/query.c @@ -24,7 +24,7 @@ #include "dlinklist.h" #include "system/network.h" #include "nbt_server/nbt_server.h" - +#include "nbt_server/wins/winsserver.h" /* answer a name query @@ -54,25 +54,30 @@ void nbtd_request_query(struct nbt_name_socket *nbtsock, /* see if we have the requested name on this interface */ name = &packet->questions[0].name; - if (!(packet->operation & NBT_FLAG_BROADCAST) && - (packet->operation & NBT_FLAG_RECURSION_DESIRED)) { - nbtd_winsserver_request(nbtsock, packet, src); - return; - } - iname = nbtd_find_iname(iface, name, 0); - if (iname == NULL) { /* don't send negative replies to broadcast queries */ if (packet->operation & NBT_FLAG_BROADCAST) { return; } + if (packet->operation & NBT_FLAG_RECURSION_DESIRED) { + nbtd_winsserver_request(nbtsock, packet, src); + return; + } + /* otherwise send a negative reply */ nbtd_negative_name_query_reply(nbtsock, packet, src); return; } + if (!(packet->operation & NBT_FLAG_BROADCAST) && + (packet->operation & NBT_FLAG_RECURSION_DESIRED) && + (iname->nb_flags & NBT_NM_GROUP)) { + nbtd_winsserver_request(nbtsock, packet, src); + return; + } + /* if the name is not yet active and its a broadcast query then ignore it for now */ if (!(iname->nb_flags & NBT_NM_ACTIVE) && |