summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-02-11 10:37:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:43 -0500
commit5e9c09ef25f5f4996f77a5e48e765c32831cea36 (patch)
tree367fc30fbbed3e82676a307be2db272ecee663f3
parentc8ca613e935b44488435a269957a68b48d2af90f (diff)
downloadsamba-5e9c09ef25f5f4996f77a5e48e765c32831cea36.tar.gz
samba-5e9c09ef25f5f4996f77a5e48e765c32831cea36.tar.bz2
samba-5e9c09ef25f5f4996f77a5e48e765c32831cea36.zip
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)
-rw-r--r--source4/torture/nbt/wins.c22
1 files changed, 22 insertions, 0 deletions
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);