summaryrefslogtreecommitdiff
path: root/source4/nbt_server/winswack.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-02-15 11:14:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:10:43 -0500
commit39713c703daa75becef7ae30da6930d80216e29c (patch)
treef63e4d9b245a2327be0999f06e22b2f3bfc06c80 /source4/nbt_server/winswack.c
parent6d17fc3b3e09b15c4a0fa4595ca8d60f426f0243 (diff)
downloadsamba-39713c703daa75becef7ae30da6930d80216e29c.tar.gz
samba-39713c703daa75becef7ae30da6930d80216e29c.tar.bz2
samba-39713c703daa75becef7ae30da6930d80216e29c.zip
r5408: - added testing for the behaviour of the special 0x1c name
- added WINS server support for the 0x1c name (This used to be commit 1558a545285ae0432c70e0a3e2b132a5132e7b3b)
Diffstat (limited to 'source4/nbt_server/winswack.c')
-rw-r--r--source4/nbt_server/winswack.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/source4/nbt_server/winswack.c b/source4/nbt_server/winswack.c
index a15f0a7d06..190b1cdec7 100644
--- a/source4/nbt_server/winswack.c
+++ b/source4/nbt_server/winswack.c
@@ -173,11 +173,6 @@ void wins_register_wack(struct nbt_name_socket *nbtsock,
state->src_address = talloc_strdup(state, src_address);
if (state->src_address == NULL) goto failed;
- /* send a WACK to the client, specifying the maximum time it could
- take to check with the owner, plus some slack */
- ttl = 5 + 4 * str_list_length(rec->addresses);
- nbtd_wack_reply(nbtsock, packet, src_address, src_port, ttl);
-
/* setup a name query to the first address */
state->query.in.name = *rec->name;
state->query.in.dest_addr = state->owner_addresses[0];
@@ -186,6 +181,17 @@ void wins_register_wack(struct nbt_name_socket *nbtsock,
state->query.in.timeout = 1;
state->query.in.retries = 2;
+ /* the LOGON type is a nasty hack */
+ if (rec->name->type == NBT_NAME_LOGON) {
+ wins_wack_allow(state);
+ return;
+ }
+
+ /* send a WACK to the client, specifying the maximum time it could
+ take to check with the owner, plus some slack */
+ ttl = 5 + 4 * str_list_length(rec->addresses);
+ nbtd_wack_reply(nbtsock, packet, src_address, src_port, ttl);
+
req = nbt_name_query_send(nbtsock, &state->query);
if (req == NULL) goto failed;