diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-02-15 11:14:04 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:10:43 -0500 |
commit | 39713c703daa75becef7ae30da6930d80216e29c (patch) | |
tree | f63e4d9b245a2327be0999f06e22b2f3bfc06c80 /source4/torture/nbt | |
parent | 6d17fc3b3e09b15c4a0fa4595ca8d60f426f0243 (diff) | |
download | samba-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/torture/nbt')
-rw-r--r-- | source4/torture/nbt/wins.c | 13 | ||||
-rw-r--r-- | source4/torture/nbt/winsbench.c | 2 |
2 files changed, 11 insertions, 4 deletions
diff --git a/source4/torture/nbt/wins.c b/source4/torture/nbt/wins.c index 9258f3b517..3f8b361a93 100644 --- a/source4/torture/nbt/wins.c +++ b/source4/torture/nbt/wins.c @@ -111,7 +111,9 @@ 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 (name->type != NBT_NAME_MASTER && nb_flags & NBT_NM_GROUP) { + if (name->type != NBT_NAME_MASTER && + name->type != NBT_NAME_LOGON && + (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); @@ -152,7 +154,8 @@ static BOOL nbt_test_wins_name(TALLOC_CTX *mem_ctx, const char *address, CHECK_NAME(query.out.name, *name); CHECK_VALUE(query.out.num_addrs, 1); - if (nb_flags & NBT_NM_GROUP) { + if (name->type != NBT_NAME_LOGON && + (nb_flags & NBT_NM_GROUP)) { CHECK_STRING(query.out.reply_addrs[0], "255.255.255.255"); } else { CHECK_STRING(query.out.reply_addrs[0], myaddress); @@ -258,7 +261,8 @@ static BOOL nbt_test_wins_name(TALLOC_CTX *mem_ctx, const char *address, printf("query the name to make sure its gone\n"); query.in.name = *name; status = nbt_name_query(nbtsock, mem_ctx, &query); - if (nb_flags & NBT_NM_GROUP) { + if (name->type != NBT_NAME_LOGON && + (nb_flags & NBT_NM_GROUP)) { if (!NT_STATUS_IS_OK(status)) { printf("ERROR: Name query failed after group release - %s\n", nt_errstr(status)); @@ -300,6 +304,9 @@ static BOOL nbt_test_wins(TALLOC_CTX *mem_ctx, const char *address) ret &= nbt_test_wins_name(mem_ctx, address, &name, NBT_NODE_H | NBT_NM_GROUP); + name.type = NBT_NAME_LOGON; + 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); diff --git a/source4/torture/nbt/winsbench.c b/source4/torture/nbt/winsbench.c index 4c0934a0ed..f6a6283dd2 100644 --- a/source4/torture/nbt/winsbench.c +++ b/source4/torture/nbt/winsbench.c @@ -120,7 +120,7 @@ static void release_handler(struct nbt_name_request *req) } /* - generate a registration + generate a name release */ static void generate_release(struct nbt_name_socket *nbtsock, struct wins_state *state, int idx) { |