summaryrefslogtreecommitdiff
path: root/source4/nbt_server
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-12-22 20:35:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:47:39 -0500
commitf76ee31ccf40a19ade72cb0f83b356456e645e47 (patch)
tree5d208929adfedd2002cb2b0cef0dc1e9f4f06c67 /source4/nbt_server
parent36d7778784528fda8a7f75d645293b4dc57945a6 (diff)
downloadsamba-f76ee31ccf40a19ade72cb0f83b356456e645e47.tar.gz
samba-f76ee31ccf40a19ade72cb0f83b356456e645e47.tar.bz2
samba-f76ee31ccf40a19ade72cb0f83b356456e645e47.zip
r12437: if the client gives us an unicast name query with recursion_desired,
it's a wins server request, even if it's a name of one of our interfaces metze (This used to be commit 33c1d4a078a16ad45a3957f4d053b089a76f9935)
Diffstat (limited to 'source4/nbt_server')
-rw-r--r--source4/nbt_server/query.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/source4/nbt_server/query.c b/source4/nbt_server/query.c
index 1d8a610750..f71d7b99ed 100644
--- a/source4/nbt_server/query.c
+++ b/source4/nbt_server/query.c
@@ -54,6 +54,12 @@ 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) {
@@ -62,13 +68,6 @@ void nbtd_request_query(struct nbt_name_socket *nbtsock,
return;
}
- /* if the name does not exist, then redirect to WINS
- server if recursion has been asked for */
- 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;