From 5e9c09ef25f5f4996f77a5e48e765c32831cea36 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 11 Feb 2005 10:37:59 +0000 Subject: r5333: weird, w2k3 always sends a positive name release response, even for names that have never been registered. I wonder if there is some reason? (This used to be commit dbef4fd5c3ae06e22fa6120a57edc0d2988a49a1) --- source4/torture/nbt/wins.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'source4') diff --git a/source4/torture/nbt/wins.c b/source4/torture/nbt/wins.c index 27b50dd204..3b5338147b 100644 --- a/source4/torture/nbt/wins.c +++ b/source4/torture/nbt/wins.c @@ -71,6 +71,28 @@ static BOOL nbt_test_wins_name(TALLOC_CTX *mem_ctx, const char *address, printf("scope is %s\n", name->scope); } + printf("release the name\n"); + release.in.name = *name; + release.in.dest_addr = address; + release.in.address = myaddress; + release.in.nb_flags = NBT_NODE_H; + release.in.broadcast = False; + release.in.timeout = 3; + release.in.retries = 0; + + status = nbt_name_release(nbtsock, mem_ctx, &release); + if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) { + printf("No response from %s for name release\n", address); + return False; + } + if (!NT_STATUS_IS_OK(status)) { + printf("Bad response from %s for name query - %s\n", + address, nt_errstr(status)); + return False; + } + CHECK_VALUE(release.out.rcode, 0); + + printf("register the name\n"); io.in.name = *name; io.in.wins_servers = str_list_make(mem_ctx, address, NULL); io.in.addresses = str_list_make(mem_ctx, myaddress, NULL); -- cgit