summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/nbt/wins.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/source4/torture/nbt/wins.c b/source4/torture/nbt/wins.c
index 0fd8602a35..9258f3b517 100644
--- a/source4/torture/nbt/wins.c
+++ b/source4/torture/nbt/wins.c
@@ -111,7 +111,7 @@ static BOOL nbt_test_wins_name(TALLOC_CTX *mem_ctx, const char *address,
CHECK_STRING(io.out.wins_server, address);
CHECK_VALUE(io.out.rcode, 0);
- if (nb_flags & NBT_NM_GROUP) {
+ if (name->type != NBT_NAME_MASTER && nb_flags & NBT_NM_GROUP) {
printf("Try to register as non-group\n");
io.in.nb_flags &= ~NBT_NM_GROUP;
status = nbt_name_register_wins(nbtsock, mem_ctx, &io);
@@ -132,6 +132,14 @@ static BOOL nbt_test_wins_name(TALLOC_CTX *mem_ctx, const char *address,
query.in.retries = 0;
status = nbt_name_query(nbtsock, mem_ctx, &query);
+ if (name->type == NBT_NAME_MASTER) {
+ if (!NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)) {
+ printf("Bad response from %s for name query - %s\n",
+ address, nt_errstr(status));
+ return False;
+ }
+ return ret;
+ }
if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
printf("No response from %s for name query\n", address);
return False;
@@ -287,6 +295,11 @@ static BOOL nbt_test_wins(TALLOC_CTX *mem_ctx, const char *address)
name.scope = NULL;
ret &= nbt_test_wins_name(mem_ctx, address, &name, NBT_NODE_H);
+ name.type = NBT_NAME_MASTER;
+ ret &= nbt_test_wins_name(mem_ctx, address, &name, NBT_NODE_H);
+
+ ret &= nbt_test_wins_name(mem_ctx, address, &name, NBT_NODE_H | NBT_NM_GROUP);
+
name.scope = "example";
name.type = 0x72;
ret &= nbt_test_wins_name(mem_ctx, address, &name, NBT_NODE_H);