summaryrefslogtreecommitdiff
path: root/source4/torture/nbt
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-04-30 10:14:54 +0200
committerStefan Metzmacher <metze@samba.org>2011-04-30 12:45:01 +0200
commitb83223476c7b6b9aea4efe01d923f009a09cd7d0 (patch)
tree192d784a528b0e79b5818642634643f70c8b39ba /source4/torture/nbt
parent9d738adcf854fb2e01892298d3c350a1ee06bbd0 (diff)
downloadsamba-b83223476c7b6b9aea4efe01d923f009a09cd7d0.tar.gz
samba-b83223476c7b6b9aea4efe01d923f009a09cd7d0.tar.bz2
samba-b83223476c7b6b9aea4efe01d923f009a09cd7d0.zip
s4:torture/nbt/winsreplication: ignore incoming broadcast messages
This will hopefully fix the flakey behavior of the samba4.nbt.winsreplication.owned test. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Sat Apr 30 12:45:01 CEST 2011 on sn-devel-104
Diffstat (limited to 'source4/torture/nbt')
-rw-r--r--source4/torture/nbt/winsreplication.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/source4/torture/nbt/winsreplication.c b/source4/torture/nbt/winsreplication.c
index 071c19f6f0..e30bfdd852 100644
--- a/source4/torture/nbt/winsreplication.c
+++ b/source4/torture/nbt/winsreplication.c
@@ -9764,6 +9764,17 @@ static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket
{
struct test_conflict_owned_active_vs_replica_struct *rec =
(struct test_conflict_owned_active_vs_replica_struct *)nbtsock->incoming.private_data;
+ struct nbt_name *name = &req_packet->questions[0].name;
+
+ if (req_packet->operation & NBT_FLAG_BROADCAST) {
+ torture_comment(rec->tctx,
+ "%s: incoming packet name[%s] flags[0x%08X] from[%s]\n",
+ __location__,
+ nbt_name_string(rec->tctx, name),
+ req_packet->operation,
+ src->addr);
+ return;
+ }
rec->defend.ret = false;
@@ -9775,8 +9786,14 @@ static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket
test_conflict_owned_active_vs_replica_handler_release(nbtsock, req_packet, src);
break;
default:
- printf("%s: unexpected incoming packet\n", __location__);
- return;
+ torture_comment(rec->tctx,
+ "%s: unexpected packet name[%s] flags[0x%08X] from[%s]\n",
+ __location__,
+ nbt_name_string(rec->tctx, name),
+ req_packet->operation,
+ src->addr);
+ _NBT_ASSERT((req_packet->operation & NBT_OPCODE), NBT_OPCODE_QUERY);
+ break;
}
}