2 Unix SMB/CIFS implementation.
4 WINS replication testing
6 Copyright (C) Andrew Tridgell 2005
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #include "libcli/nbt/libnbt.h"
25 #include "libcli/wrepl/winsrepl.h"
26 #include "lib/events/events.h"
27 #include "lib/socket/socket.h"
28 #include "system/time.h"
30 #define CHECK_STATUS(status, correct) do { \
31 if (!NT_STATUS_EQUAL(status, correct)) { \
32 printf("(%s) Incorrect status %s - should be %s\n", \
33 __location__, nt_errstr(status), nt_errstr(correct)); \
38 #define CHECK_VALUE(v, correct) do { \
39 if ((v) != (correct)) { \
40 printf("(%s) Incorrect value %s=%d - should be %d\n", \
41 __location__, #v, v, correct); \
46 #define CHECK_VALUE_UINT64(v, correct) do { \
47 if ((v) != (correct)) { \
48 printf("(%s) Incorrect value %s=%llu - should be %llu\n", \
49 __location__, #v, v, correct); \
54 #define CHECK_VALUE_STRING(v, correct) do { \
55 if ( ((!v) && (correct)) || \
56 ((v) && (!correct)) || \
57 ((v) && (correct) && strcmp(v,correct) != 0)) { \
58 printf("(%s) Incorrect value %s='%s' - should be '%s'\n", \
59 __location__, #v, v, correct); \
64 #define _NBT_NAME(n,t,s) {\
70 static const char *wrepl_name_type_string(enum wrepl_name_type type)
73 case WREPL_TYPE_UNIQUE: return "UNIQUE";
74 case WREPL_TYPE_GROUP: return "GROUP";
75 case WREPL_TYPE_SGROUP: return "SGROUP";
76 case WREPL_TYPE_MHOMED: return "MHOMED";
78 return "UNKNOWN_TYPE";
81 static const char *wrepl_name_state_string(enum wrepl_name_state state)
84 case WREPL_STATE_ACTIVE: return "ACTIVE";
85 case WREPL_STATE_RELEASED: return "RELEASED";
86 case WREPL_STATE_TOMBSTONE: return "TOMBSTONE";
87 case WREPL_STATE_RESERVED: return "RESERVED";
89 return "UNKNOWN_STATE";
93 test how assoc_ctx's are only usable on the connection
96 static BOOL test_assoc_ctx1(TALLOC_CTX *mem_ctx, const char *address)
99 struct wrepl_request *req;
100 struct wrepl_socket *wrepl_socket1;
101 struct wrepl_associate associate1;
102 struct wrepl_socket *wrepl_socket2;
103 struct wrepl_associate associate2;
104 struct wrepl_pull_table pull_table;
105 struct wrepl_packet *rep_packet;
106 struct wrepl_associate_stop assoc_stop;
109 if (!lp_parm_bool(-1, "torture", "dangerous", False)) {
110 printf("winsrepl: cross connection assoc_ctx usage disabled - enable dangerous tests to use\n");
114 printf("Test if assoc_ctx is only valid on the conection it was created on\n");
116 wrepl_socket1 = wrepl_socket_init(mem_ctx, NULL);
117 wrepl_socket2 = wrepl_socket_init(mem_ctx, NULL);
119 printf("Setup 2 wrepl connections\n");
120 status = wrepl_connect(wrepl_socket1, NULL, address);
121 CHECK_STATUS(status, NT_STATUS_OK);
123 status = wrepl_connect(wrepl_socket2, NULL, address);
124 CHECK_STATUS(status, NT_STATUS_OK);
126 printf("Send a start association request (conn1)\n");
127 status = wrepl_associate(wrepl_socket1, &associate1);
128 CHECK_STATUS(status, NT_STATUS_OK);
130 printf("association context (conn1): 0x%x\n", associate1.out.assoc_ctx);
132 printf("Send a start association request (conn2)\n");
133 status = wrepl_associate(wrepl_socket2, &associate2);
134 CHECK_STATUS(status, NT_STATUS_OK);
136 printf("association context (conn2): 0x%x\n", associate2.out.assoc_ctx);
138 printf("Send a replication table query, with assoc 1 (conn2), the anwser should be on conn1\n");
139 pull_table.in.assoc_ctx = associate1.out.assoc_ctx;
140 req = wrepl_pull_table_send(wrepl_socket2, &pull_table);
141 req->send_only = True;
142 status = wrepl_request_recv(req, mem_ctx, &rep_packet);
143 CHECK_STATUS(status, NT_STATUS_OK);
145 printf("Send a association request (conn2), to make sure the last request was ignored\n");
146 status = wrepl_associate(wrepl_socket2, &associate2);
147 CHECK_STATUS(status, NT_STATUS_OK);
149 printf("Send a replication table query, with invalid assoc (conn1), receive answer from conn2\n");
150 pull_table.in.assoc_ctx = 0;
151 req = wrepl_pull_table_send(wrepl_socket1, &pull_table);
152 status = wrepl_request_recv(req, mem_ctx, &rep_packet);
153 CHECK_STATUS(status, NT_STATUS_OK);
155 printf("Send a association request (conn1), to make sure the last request was handled correct\n");
156 status = wrepl_associate(wrepl_socket1, &associate2);
157 CHECK_STATUS(status, NT_STATUS_OK);
159 assoc_stop.in.assoc_ctx = associate1.out.assoc_ctx;
160 assoc_stop.in.reason = 4;
161 printf("Send a association stop request (conn1), reson: %u\n", assoc_stop.in.reason);
162 status = wrepl_associate_stop(wrepl_socket1, &assoc_stop);
163 CHECK_STATUS(status, NT_STATUS_END_OF_FILE);
165 assoc_stop.in.assoc_ctx = associate2.out.assoc_ctx;
166 assoc_stop.in.reason = 0;
167 printf("Send a association stop request (conn2), reson: %u\n", assoc_stop.in.reason);
168 status = wrepl_associate_stop(wrepl_socket2, &assoc_stop);
169 CHECK_STATUS(status, NT_STATUS_OK);
172 printf("Close 2 wrepl connections\n");
173 talloc_free(wrepl_socket1);
174 talloc_free(wrepl_socket2);
179 test if we always get back the same assoc_ctx
181 static BOOL test_assoc_ctx2(TALLOC_CTX *mem_ctx, const char *address)
184 struct wrepl_socket *wrepl_socket;
185 struct wrepl_associate associate;
189 printf("Test if we always get back the same assoc_ctx\n");
191 wrepl_socket = wrepl_socket_init(mem_ctx, NULL);
193 printf("Setup wrepl connections\n");
194 status = wrepl_connect(wrepl_socket, NULL, address);
195 CHECK_STATUS(status, NT_STATUS_OK);
198 printf("Send 1st start association request\n");
199 status = wrepl_associate(wrepl_socket, &associate);
200 CHECK_STATUS(status, NT_STATUS_OK);
201 assoc_ctx1 = associate.out.assoc_ctx;
202 printf("1st association context: 0x%x\n", associate.out.assoc_ctx);
204 printf("Send 2nd start association request\n");
205 status = wrepl_associate(wrepl_socket, &associate);
206 CHECK_VALUE(associate.out.assoc_ctx, assoc_ctx1);
207 CHECK_STATUS(status, NT_STATUS_OK);
208 printf("2nd association context: 0x%x\n", associate.out.assoc_ctx);
210 printf("Send 3rd start association request\n");
211 status = wrepl_associate(wrepl_socket, &associate);
212 CHECK_VALUE(associate.out.assoc_ctx, assoc_ctx1);
213 CHECK_STATUS(status, NT_STATUS_OK);
214 printf("3rd association context: 0x%x\n", associate.out.assoc_ctx);
217 printf("Close wrepl connections\n");
218 talloc_free(wrepl_socket);
224 display a replication entry
226 static void display_entry(TALLOC_CTX *mem_ctx, struct wrepl_name *name)
230 printf("%s\n", nbt_name_string(mem_ctx, &name->name));
231 printf("\tTYPE:%u STATE:%u NODE:%u STATIC:%u VERSION_ID: %llu\n",
232 name->type, name->state, name->node, name->is_static, name->version_id);
233 printf("\tRAW_FLAGS: 0x%08X OWNER: %-15s\n",
234 name->raw_flags, name->owner);
235 for (i=0;i<name->num_addresses;i++) {
236 printf("\tADDR: %-15s OWNER: %-15s\n",
237 name->addresses[i].address, name->addresses[i].owner);
242 test a full replication dump from a WINS server
244 static BOOL test_wins_replication(TALLOC_CTX *mem_ctx, const char *address)
247 struct wrepl_socket *wrepl_socket;
250 struct wrepl_associate associate;
251 struct wrepl_pull_table pull_table;
252 struct wrepl_pull_names pull_names;
254 printf("Test one pull replication cycle\n");
256 wrepl_socket = wrepl_socket_init(mem_ctx, NULL);
258 printf("Setup wrepl connections\n");
259 status = wrepl_connect(wrepl_socket, NULL, address);
260 CHECK_STATUS(status, NT_STATUS_OK);
262 printf("Send a start association request\n");
264 status = wrepl_associate(wrepl_socket, &associate);
265 CHECK_STATUS(status, NT_STATUS_OK);
267 printf("association context: 0x%x\n", associate.out.assoc_ctx);
269 printf("Send a replication table query\n");
270 pull_table.in.assoc_ctx = associate.out.assoc_ctx;
272 status = wrepl_pull_table(wrepl_socket, mem_ctx, &pull_table);
273 if (NT_STATUS_EQUAL(NT_STATUS_NETWORK_ACCESS_DENIED,status)) {
274 struct wrepl_packet packet;
275 struct wrepl_request *req;
278 packet.opcode = WREPL_OPCODE_BITS;
279 packet.assoc_ctx = associate.out.assoc_ctx;
280 packet.mess_type = WREPL_STOP_ASSOCIATION;
281 packet.message.stop.reason = 0;
283 req = wrepl_request_send(wrepl_socket, &packet);
286 printf("failed - We are not a valid pull partner for the server\n");
290 CHECK_STATUS(status, NT_STATUS_OK);
292 printf("Found %d replication partners\n", pull_table.out.num_partners);
294 for (i=0;i<pull_table.out.num_partners;i++) {
295 struct wrepl_wins_owner *partner = &pull_table.out.partners[i];
296 printf("%s max_version=%6llu min_version=%6llu type=%d\n",
298 partner->max_version,
299 partner->min_version,
302 pull_names.in.assoc_ctx = associate.out.assoc_ctx;
303 pull_names.in.partner = *partner;
305 status = wrepl_pull_names(wrepl_socket, mem_ctx, &pull_names);
306 CHECK_STATUS(status, NT_STATUS_OK);
308 printf("Received %d names\n", pull_names.out.num_names);
310 for (j=0;j<pull_names.out.num_names;j++) {
311 display_entry(mem_ctx, &pull_names.out.names[j]);
316 printf("Close wrepl connections\n");
317 talloc_free(wrepl_socket);
321 struct test_wrepl_conflict_conn {
323 struct wrepl_socket *pull;
326 #define TEST_OWNER_A_ADDRESS "127.65.65.1"
327 #define TEST_ADDRESS_A_PREFIX "127.0.65"
328 #define TEST_OWNER_B_ADDRESS "127.66.66.1"
329 #define TEST_ADDRESS_B_PREFIX "127.0.66"
331 struct wrepl_wins_owner a, b, c;
335 struct nbt_name_socket *nbtsock;
336 struct nbt_name_socket *nbtsock2;
338 struct nbt_name_socket *nbtsock_srv;
339 struct nbt_name_socket *nbtsock_srv2;
341 uint32_t addresses_best_num;
342 struct wrepl_ip *addresses_best;
344 uint32_t addresses_best2_num;
345 struct wrepl_ip *addresses_best2;
347 uint32_t addresses_all_num;
348 struct wrepl_ip *addresses_all;
350 uint32_t addresses_mhomed_num;
351 struct wrepl_ip *addresses_mhomed;
354 static const struct wrepl_ip addresses_A_1[] = {
356 .owner = TEST_OWNER_A_ADDRESS,
357 .ip = TEST_ADDRESS_A_PREFIX".1"
360 static const struct wrepl_ip addresses_A_2[] = {
362 .owner = TEST_OWNER_A_ADDRESS,
363 .ip = TEST_ADDRESS_A_PREFIX".2"
366 static const struct wrepl_ip addresses_A_3_4[] = {
368 .owner = TEST_OWNER_A_ADDRESS,
369 .ip = TEST_ADDRESS_A_PREFIX".3"
372 .owner = TEST_OWNER_A_ADDRESS,
373 .ip = TEST_ADDRESS_A_PREFIX".4"
377 static const struct wrepl_ip addresses_B_1[] = {
379 .owner = TEST_OWNER_B_ADDRESS,
380 .ip = TEST_ADDRESS_B_PREFIX".1"
383 static const struct wrepl_ip addresses_B_2[] = {
385 .owner = TEST_OWNER_B_ADDRESS,
386 .ip = TEST_ADDRESS_B_PREFIX".2"
389 static const struct wrepl_ip addresses_B_3_4[] = {
391 .owner = TEST_OWNER_B_ADDRESS,
392 .ip = TEST_ADDRESS_B_PREFIX".3"
395 .owner = TEST_OWNER_B_ADDRESS,
396 .ip = TEST_ADDRESS_B_PREFIX".4"
400 static struct test_wrepl_conflict_conn *test_create_conflict_ctx(TALLOC_CTX *mem_ctx,
403 struct test_wrepl_conflict_conn *ctx;
404 struct wrepl_associate associate;
405 struct wrepl_pull_table pull_table;
409 ctx = talloc_zero(mem_ctx, struct test_wrepl_conflict_conn);
410 if (!ctx) return NULL;
412 ctx->address = address;
413 ctx->pull = wrepl_socket_init(ctx, NULL);
414 if (!ctx->pull) return NULL;
416 printf("Setup wrepl conflict pull connection\n");
417 status = wrepl_connect(ctx->pull, NULL, ctx->address);
418 if (!NT_STATUS_IS_OK(status)) return NULL;
420 status = wrepl_associate(ctx->pull, &associate);
421 if (!NT_STATUS_IS_OK(status)) return NULL;
423 ctx->pull_assoc = associate.out.assoc_ctx;
425 ctx->a.address = TEST_OWNER_A_ADDRESS;
426 ctx->a.max_version = 0;
427 ctx->a.min_version = 0;
430 ctx->b.address = TEST_OWNER_B_ADDRESS;
431 ctx->b.max_version = 0;
432 ctx->b.min_version = 0;
435 ctx->c.address = address;
436 ctx->c.max_version = 0;
437 ctx->c.min_version = 0;
440 pull_table.in.assoc_ctx = ctx->pull_assoc;
441 status = wrepl_pull_table(ctx->pull, ctx->pull, &pull_table);
442 if (!NT_STATUS_IS_OK(status)) return NULL;
444 for (i=0; i < pull_table.out.num_partners; i++) {
445 if (strcmp(TEST_OWNER_A_ADDRESS,pull_table.out.partners[i].address)==0) {
446 ctx->a.max_version = pull_table.out.partners[i].max_version;
447 ctx->a.min_version = pull_table.out.partners[i].min_version;
449 if (strcmp(TEST_OWNER_B_ADDRESS,pull_table.out.partners[i].address)==0) {
450 ctx->b.max_version = pull_table.out.partners[i].max_version;
451 ctx->b.min_version = pull_table.out.partners[i].min_version;
453 if (strcmp(address,pull_table.out.partners[i].address)==0) {
454 ctx->c.max_version = pull_table.out.partners[i].max_version;
455 ctx->c.min_version = pull_table.out.partners[i].min_version;
459 talloc_free(pull_table.out.partners);
461 ctx->myaddr = talloc_strdup(mem_ctx, iface_best_ip(address));
462 if (!ctx->myaddr) return NULL;
464 for (i = 0; i < iface_count(); i++) {
465 if (strcmp(ctx->myaddr, iface_n_ip(i)) == 0) continue;
466 ctx->myaddr2 = talloc_strdup(mem_ctx, iface_n_ip(i));
467 if (!ctx->myaddr2) return NULL;
471 ctx->nbtsock = nbt_name_socket_init(ctx, NULL);
472 if (!ctx->nbtsock) return NULL;
474 status = socket_listen(ctx->nbtsock->sock, ctx->myaddr, 0, 0, 0);
475 if (!NT_STATUS_IS_OK(status)) return NULL;
477 ctx->nbtsock_srv = nbt_name_socket_init(ctx, NULL);
478 if (!ctx->nbtsock_srv) return NULL;
480 status = socket_listen(ctx->nbtsock_srv->sock, ctx->myaddr, lp_nbt_port(), 0, 0);
481 if (!NT_STATUS_IS_OK(status)) {
482 talloc_free(ctx->nbtsock_srv);
483 ctx->nbtsock_srv = NULL;
487 ctx->nbtsock2 = nbt_name_socket_init(ctx, NULL);
488 if (!ctx->nbtsock2) return NULL;
490 status = socket_listen(ctx->nbtsock2->sock, ctx->myaddr2, 0, 0, 0);
491 if (!NT_STATUS_IS_OK(status)) return NULL;
493 ctx->nbtsock_srv2 = nbt_name_socket_init(ctx, ctx->nbtsock_srv->event_ctx);
494 if (!ctx->nbtsock_srv2) return NULL;
496 status = socket_listen(ctx->nbtsock_srv2->sock, ctx->myaddr2, lp_nbt_port(), 0, 0);
497 if (!NT_STATUS_IS_OK(status)) {
498 talloc_free(ctx->nbtsock_srv2);
499 ctx->nbtsock_srv2 = NULL;
503 ctx->addresses_best_num = 1;
504 ctx->addresses_best = talloc_array(ctx, struct wrepl_ip, ctx->addresses_best_num);
505 if (!ctx->addresses_best) return NULL;
506 ctx->addresses_best[0].owner = ctx->b.address;
507 ctx->addresses_best[0].ip = ctx->myaddr;
509 ctx->addresses_all_num = iface_count();
510 ctx->addresses_all = talloc_array(ctx, struct wrepl_ip, ctx->addresses_all_num);
511 if (!ctx->addresses_all) return NULL;
512 for (i=0; i < ctx->addresses_all_num; i++) {
513 ctx->addresses_all[i].owner = ctx->b.address;
514 ctx->addresses_all[i].ip = talloc_strdup(ctx->addresses_all, iface_n_ip(i));
515 if (!ctx->addresses_all[i].ip) return NULL;
518 if (ctx->nbtsock_srv2) {
519 ctx->addresses_best2_num = 1;
520 ctx->addresses_best2 = talloc_array(ctx, struct wrepl_ip, ctx->addresses_best2_num);
521 if (!ctx->addresses_best2) return NULL;
522 ctx->addresses_best2[0].owner = ctx->b.address;
523 ctx->addresses_best2[0].ip = ctx->myaddr2;
525 ctx->addresses_mhomed_num = 2;
526 ctx->addresses_mhomed = talloc_array(ctx, struct wrepl_ip, ctx->addresses_mhomed_num);
527 if (!ctx->addresses_mhomed) return NULL;
528 ctx->addresses_mhomed[0].owner = ctx->b.address;
529 ctx->addresses_mhomed[0].ip = ctx->myaddr;
530 ctx->addresses_mhomed[1].owner = ctx->b.address;
531 ctx->addresses_mhomed[1].ip = ctx->myaddr2;
537 static BOOL test_wrepl_update_one(struct test_wrepl_conflict_conn *ctx,
538 const struct wrepl_wins_owner *owner,
539 const struct wrepl_wins_name *name)
542 struct wrepl_socket *wrepl_socket;
543 struct wrepl_associate associate;
544 struct wrepl_packet update_packet, repl_send;
545 struct wrepl_table *update;
546 struct wrepl_wins_owner wrepl_wins_owners[1];
547 struct wrepl_packet *repl_recv;
548 struct wrepl_wins_owner *send_request;
549 struct wrepl_send_reply *send_reply;
550 struct wrepl_wins_name wrepl_wins_names[1];
554 wrepl_socket = wrepl_socket_init(ctx, NULL);
556 status = wrepl_connect(wrepl_socket, NULL, ctx->address);
557 CHECK_STATUS(status, NT_STATUS_OK);
559 status = wrepl_associate(wrepl_socket, &associate);
560 CHECK_STATUS(status, NT_STATUS_OK);
561 assoc_ctx = associate.out.assoc_ctx;
563 /* now send a WREPL_REPL_UPDATE message */
564 ZERO_STRUCT(update_packet);
565 update_packet.opcode = WREPL_OPCODE_BITS;
566 update_packet.assoc_ctx = assoc_ctx;
567 update_packet.mess_type = WREPL_REPLICATION;
568 update_packet.message.replication.command = WREPL_REPL_UPDATE;
569 update = &update_packet.message.replication.info.table;
571 update->partner_count = ARRAY_SIZE(wrepl_wins_owners);
572 update->partners = wrepl_wins_owners;
573 update->initiator = "0.0.0.0";
575 wrepl_wins_owners[0] = *owner;
577 status = wrepl_request(wrepl_socket, wrepl_socket,
578 &update_packet, &repl_recv);
579 CHECK_STATUS(status, NT_STATUS_OK);
580 CHECK_VALUE(repl_recv->mess_type, WREPL_REPLICATION);
581 CHECK_VALUE(repl_recv->message.replication.command, WREPL_REPL_SEND_REQUEST);
582 send_request = &repl_recv->message.replication.info.owner;
584 ZERO_STRUCT(repl_send);
585 repl_send.opcode = WREPL_OPCODE_BITS;
586 repl_send.assoc_ctx = assoc_ctx;
587 repl_send.mess_type = WREPL_REPLICATION;
588 repl_send.message.replication.command = WREPL_REPL_SEND_REPLY;
589 send_reply = &repl_send.message.replication.info.reply;
591 send_reply->num_names = ARRAY_SIZE(wrepl_wins_names);
592 send_reply->names = wrepl_wins_names;
594 wrepl_wins_names[0] = *name;
596 status = wrepl_request(wrepl_socket, wrepl_socket,
597 &repl_send, &repl_recv);
598 CHECK_STATUS(status, NT_STATUS_OK);
599 CHECK_VALUE(repl_recv->mess_type, WREPL_STOP_ASSOCIATION);
600 CHECK_VALUE(repl_recv->message.stop.reason, 0);
603 talloc_free(wrepl_socket);
607 static BOOL test_wrepl_is_applied(struct test_wrepl_conflict_conn *ctx,
608 const struct wrepl_wins_owner *owner,
609 const struct wrepl_wins_name *name,
614 struct wrepl_pull_names pull_names;
615 struct wrepl_name *names;
617 pull_names.in.assoc_ctx = ctx->pull_assoc;
618 pull_names.in.partner = *owner;
619 pull_names.in.partner.min_version = pull_names.in.partner.max_version;
621 status = wrepl_pull_names(ctx->pull, ctx->pull, &pull_names);
622 CHECK_STATUS(status, NT_STATUS_OK);
623 CHECK_VALUE(pull_names.out.num_names, (expected?1:0));
625 names = pull_names.out.names;
628 uint32_t flags = WREPL_NAME_FLAGS(names[0].type,
632 CHECK_VALUE(names[0].name.type, name->name->type);
633 CHECK_VALUE_STRING(names[0].name.name, name->name->name);
634 CHECK_VALUE_STRING(names[0].name.scope, name->name->scope);
635 CHECK_VALUE(flags, name->flags);
636 CHECK_VALUE_UINT64(names[0].version_id, name->id);
639 CHECK_VALUE(names[0].num_addresses,
640 name->addresses.addresses.num_ips);
642 CHECK_VALUE(names[0].num_addresses, 1);
643 CHECK_VALUE_STRING(names[0].addresses[0].address,
648 talloc_free(pull_names.out.names);
652 static BOOL test_wrepl_mhomed_merged(struct test_wrepl_conflict_conn *ctx,
653 const struct wrepl_wins_owner *owner1,
654 uint32_t num_ips1, const struct wrepl_ip *ips1,
655 const struct wrepl_wins_owner *owner2,
656 uint32_t num_ips2, const struct wrepl_ip *ips2,
657 const struct wrepl_wins_name *name2)
661 struct wrepl_pull_names pull_names;
662 struct wrepl_name *names;
665 uint32_t num_ips = num_ips1 + num_ips2;
667 for (i = 0; i < num_ips2; i++) {
668 for (j = 0; j < num_ips1; j++) {
669 if (strcmp(ips2[i].ip,ips1[j].ip) == 0) {
676 pull_names.in.assoc_ctx = ctx->pull_assoc;
677 pull_names.in.partner = *owner2;
678 pull_names.in.partner.min_version = pull_names.in.partner.max_version;
680 status = wrepl_pull_names(ctx->pull, ctx->pull, &pull_names);
681 CHECK_STATUS(status, NT_STATUS_OK);
682 CHECK_VALUE(pull_names.out.num_names, 1);
684 names = pull_names.out.names;
686 flags = WREPL_NAME_FLAGS(names[0].type,
690 CHECK_VALUE(names[0].name.type, name2->name->type);
691 CHECK_VALUE_STRING(names[0].name.name, name2->name->name);
692 CHECK_VALUE_STRING(names[0].name.scope, name2->name->scope);
693 CHECK_VALUE(flags, name2->flags | WREPL_TYPE_MHOMED);
694 CHECK_VALUE_UINT64(names[0].version_id, name2->id);
696 CHECK_VALUE(names[0].num_addresses, num_ips);
698 for (i = 0; i < names[0].num_addresses; i++) {
699 const char *addr = names[0].addresses[i].address;
700 const char *owner = names[0].addresses[i].owner;
703 for (j = 0; j < num_ips2; j++) {
704 if (strcmp(addr, ips2[j].ip) == 0) {
706 CHECK_VALUE_STRING(owner, owner2->address);
713 for (j = 0; j < num_ips1; j++) {
714 if (strcmp(addr, ips1[j].ip) == 0) {
716 CHECK_VALUE_STRING(owner, owner1->address);
723 CHECK_VALUE_STRING(addr, "not found in address list");
726 talloc_free(pull_names.out.names);
730 static BOOL test_wrepl_sgroup_merged(struct test_wrepl_conflict_conn *ctx,
731 struct wrepl_wins_owner *owner1,
732 uint32_t num_ips1, const struct wrepl_ip *ips1,
733 struct wrepl_wins_owner *owner2,
734 uint32_t num_ips2, const struct wrepl_ip *ips2,
735 const struct wrepl_wins_name *name2)
739 struct wrepl_pull_names pull_names;
740 struct wrepl_name *names;
741 struct wrepl_name *name = NULL;
744 uint32_t num_ips = num_ips1 + num_ips2;
746 for (i = 0; i < num_ips2; i++) {
747 for (j = 0; j < num_ips1; j++) {
748 if (strcmp(ips2[i].ip,ips1[j].ip) == 0) {
755 pull_names.in.assoc_ctx = ctx->pull_assoc;
756 pull_names.in.partner = ctx->c;
757 pull_names.in.partner.min_version = pull_names.in.partner.max_version;
758 pull_names.in.partner.max_version = 0;
760 status = wrepl_pull_names(ctx->pull, ctx->pull, &pull_names);
761 CHECK_STATUS(status, NT_STATUS_OK);
763 names = pull_names.out.names;
765 for (i = 0; i < pull_names.out.num_names; i++) {
766 if (names[i].name.type != name2->name->type) continue;
767 if (!names[i].name.name) continue;
768 if (strcmp(names[i].name.name, name2->name->name) != 0) continue;
769 if (names[i].name.scope) continue;
774 if (pull_names.out.num_names > 0) {
775 ctx->c.max_version = names[pull_names.out.num_names-1].version_id;
779 printf("%s: Name '%s' not found\n", __location__, nbt_name_string(ctx, name2->name));
783 flags = WREPL_NAME_FLAGS(name->type,
787 CHECK_VALUE(name->name.type, name2->name->type);
788 CHECK_VALUE_STRING(name->name.name, name2->name->name);
789 CHECK_VALUE_STRING(name->name.scope, name2->name->scope);
790 CHECK_VALUE(flags, name2->flags);
792 CHECK_VALUE(name->num_addresses, num_ips);
794 for (i = 0; i < name->num_addresses; i++) {
795 const char *addr = name->addresses[i].address;
796 const char *owner = name->addresses[i].owner;
799 for (j = 0; j < num_ips2; j++) {
800 if (strcmp(addr, ips2[j].ip) == 0) {
802 CHECK_VALUE_STRING(owner, owner2->address);
809 for (j = 0; j < num_ips1; j++) {
810 if (strcmp(addr, ips1[j].ip) == 0) {
812 CHECK_VALUE_STRING(owner, owner1->address);
819 CHECK_VALUE_STRING(addr, "not found in address list");
822 talloc_free(pull_names.out.names);
826 static BOOL test_conflict_same_owner(struct test_wrepl_conflict_conn *ctx)
829 struct nbt_name name;
830 struct wrepl_wins_name wins_name1;
831 struct wrepl_wins_name wins_name2;
832 struct wrepl_wins_name *wins_name_tmp;
833 struct wrepl_wins_name *wins_name_last;
834 struct wrepl_wins_name *wins_name_cur;
836 uint8_t types[] = { 0x00, 0x1C };
838 enum wrepl_name_type type;
839 enum wrepl_name_state state;
840 enum wrepl_name_node node;
843 const struct wrepl_ip *ips;
846 .type = WREPL_TYPE_GROUP,
847 .state = WREPL_STATE_ACTIVE,
848 .node = WREPL_NODE_B,
850 .num_ips = ARRAY_SIZE(addresses_A_1),
851 .ips = addresses_A_1,
853 .type = WREPL_TYPE_UNIQUE,
854 .state = WREPL_STATE_ACTIVE,
855 .node = WREPL_NODE_B,
857 .num_ips = ARRAY_SIZE(addresses_A_1),
858 .ips = addresses_A_1,
860 .type = WREPL_TYPE_UNIQUE,
861 .state = WREPL_STATE_ACTIVE,
862 .node = WREPL_NODE_B,
864 .num_ips = ARRAY_SIZE(addresses_A_2),
865 .ips = addresses_A_2,
867 .type = WREPL_TYPE_UNIQUE,
868 .state = WREPL_STATE_ACTIVE,
869 .node = WREPL_NODE_B,
871 .num_ips = ARRAY_SIZE(addresses_A_1),
872 .ips = addresses_A_1,
874 .type = WREPL_TYPE_UNIQUE,
875 .state = WREPL_STATE_ACTIVE,
876 .node = WREPL_NODE_B,
878 .num_ips = ARRAY_SIZE(addresses_A_2),
879 .ips = addresses_A_2,
881 .type = WREPL_TYPE_SGROUP,
882 .state = WREPL_STATE_TOMBSTONE,
883 .node = WREPL_NODE_B,
885 .num_ips = ARRAY_SIZE(addresses_A_2),
886 .ips = addresses_A_2,
888 .type = WREPL_TYPE_MHOMED,
889 .state = WREPL_STATE_TOMBSTONE,
890 .node = WREPL_NODE_B,
892 .num_ips = ARRAY_SIZE(addresses_A_1),
893 .ips = addresses_A_1,
895 .type = WREPL_TYPE_MHOMED,
896 .state = WREPL_STATE_RELEASED,
897 .node = WREPL_NODE_B,
899 .num_ips = ARRAY_SIZE(addresses_A_2),
900 .ips = addresses_A_2,
902 .type = WREPL_TYPE_SGROUP,
903 .state = WREPL_STATE_ACTIVE,
904 .node = WREPL_NODE_B,
906 .num_ips = ARRAY_SIZE(addresses_A_1),
907 .ips = addresses_A_1,
909 .type = WREPL_TYPE_SGROUP,
910 .state = WREPL_STATE_ACTIVE,
911 .node = WREPL_NODE_B,
913 .num_ips = ARRAY_SIZE(addresses_A_3_4),
914 .ips = addresses_A_3_4,
916 .type = WREPL_TYPE_SGROUP,
917 .state = WREPL_STATE_TOMBSTONE,
918 .node = WREPL_NODE_B,
920 .num_ips = ARRAY_SIZE(addresses_B_3_4),
921 .ips = addresses_B_3_4,
923 /* the last one should always be a unique,tomstone record! */
924 .type = WREPL_TYPE_UNIQUE,
925 .state = WREPL_STATE_TOMBSTONE,
926 .node = WREPL_NODE_B,
928 .num_ips = ARRAY_SIZE(addresses_A_1),
929 .ips = addresses_A_1,
933 if (!ctx) return False;
935 name.name = "_SAME_OWNER_A";
939 wins_name_tmp = NULL;
940 wins_name_last = &wins_name2;
941 wins_name_cur = &wins_name1;
943 for (j=0; ret && j < ARRAY_SIZE(types); j++) {
944 name.type = types[j];
945 printf("Test Replica Conflicts with same owner[%s] for %s\n",
946 nbt_name_string(ctx, &name), ctx->a.address);
948 for(i=0; ret && i < ARRAY_SIZE(records); i++) {
949 wins_name_tmp = wins_name_last;
950 wins_name_last = wins_name_cur;
951 wins_name_cur = wins_name_tmp;
954 printf("%s,%s%s vs. %s,%s%s with %s ip(s) => %s\n",
955 wrepl_name_type_string(records[i-1].type),
956 wrepl_name_state_string(records[i-1].state),
957 (records[i-1].is_static?",static":""),
958 wrepl_name_type_string(records[i].type),
959 wrepl_name_state_string(records[i].state),
960 (records[i].is_static?",static":""),
961 (records[i-1].ips==records[i].ips?"same":"different"),
965 wins_name_cur->name = &name;
966 wins_name_cur->flags = WREPL_NAME_FLAGS(records[i].type,
969 records[i].is_static);
970 wins_name_cur->id = ++ctx->a.max_version;
971 if (wins_name_cur->flags & 2) {
972 wins_name_cur->addresses.addresses.num_ips = records[i].num_ips;
973 wins_name_cur->addresses.addresses.ips = discard_const(records[i].ips);
975 wins_name_cur->addresses.ip = records[i].ips[0].ip;
977 wins_name_cur->unknown = "255.255.255.255";
979 ret &= test_wrepl_update_one(ctx, &ctx->a,wins_name_cur);
980 if (records[i].state == WREPL_STATE_RELEASED) {
981 ret &= test_wrepl_is_applied(ctx, &ctx->a, wins_name_last, False);
982 ret &= test_wrepl_is_applied(ctx, &ctx->a, wins_name_cur, False);
984 ret &= test_wrepl_is_applied(ctx, &ctx->a, wins_name_cur, True);
987 /* the first one is a cleanup run */
988 if (!ret && i == 0) ret = True;
991 printf("conflict handled wrong or record[%u]: %s\n", i, __location__);
999 static BOOL test_conflict_different_owner(struct test_wrepl_conflict_conn *ctx)
1002 struct wrepl_wins_name wins_name1;
1003 struct wrepl_wins_name wins_name2;
1004 struct wrepl_wins_name *wins_name_r1;
1005 struct wrepl_wins_name *wins_name_r2;
1008 const char *line; /* just better debugging */
1009 struct nbt_name name;
1010 BOOL extra; /* not the worst case, this is an extra test */
1013 struct wrepl_wins_owner *owner;
1014 enum wrepl_name_type type;
1015 enum wrepl_name_state state;
1016 enum wrepl_name_node node;
1019 const struct wrepl_ip *ips;
1020 BOOL apply_expected;
1022 BOOL sgroup_cleanup;
1026 * NOTE: the first record and the last applied one
1027 * needs to be from the same owner,
1028 * to not conflict in the next smbtorture run!!!
1031 .line = __location__,
1032 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1036 .type = WREPL_TYPE_UNIQUE,
1037 .state = WREPL_STATE_TOMBSTONE,
1038 .node = WREPL_NODE_B,
1040 .num_ips = ARRAY_SIZE(addresses_B_1),
1041 .ips = addresses_B_1,
1042 .apply_expected = True /* ignored */
1046 .type = WREPL_TYPE_UNIQUE,
1047 .state = WREPL_STATE_TOMBSTONE,
1048 .node = WREPL_NODE_B,
1050 .num_ips = ARRAY_SIZE(addresses_A_1),
1051 .ips = addresses_A_1,
1052 .apply_expected = True /* ignored */
1057 * unique vs unique section
1060 * unique,active vs. unique,active
1061 * => should be replaced
1064 .line = __location__,
1065 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1068 .type = WREPL_TYPE_UNIQUE,
1069 .state = WREPL_STATE_ACTIVE,
1070 .node = WREPL_NODE_B,
1072 .num_ips = ARRAY_SIZE(addresses_A_1),
1073 .ips = addresses_A_1,
1074 .apply_expected = True
1078 .type = WREPL_TYPE_UNIQUE,
1079 .state = WREPL_STATE_ACTIVE,
1080 .node = WREPL_NODE_B,
1082 .num_ips = ARRAY_SIZE(addresses_B_1),
1083 .ips = addresses_B_1,
1084 .apply_expected = True
1089 * unique,active vs. unique,tombstone
1090 * => should NOT be replaced
1093 .line = __location__,
1094 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1097 .type = WREPL_TYPE_UNIQUE,
1098 .state = WREPL_STATE_ACTIVE,
1099 .node = WREPL_NODE_B,
1101 .num_ips = ARRAY_SIZE(addresses_B_1),
1102 .ips = addresses_B_1,
1103 .apply_expected = True
1107 .type = WREPL_TYPE_UNIQUE,
1108 .state = WREPL_STATE_TOMBSTONE,
1109 .node = WREPL_NODE_B,
1111 .num_ips = ARRAY_SIZE(addresses_B_1),
1112 .ips = addresses_B_1,
1113 .apply_expected = False
1118 * unique,released vs. unique,active
1119 * => should be replaced
1122 .line = __location__,
1123 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1126 .type = WREPL_TYPE_UNIQUE,
1127 .state = WREPL_STATE_RELEASED,
1128 .node = WREPL_NODE_B,
1130 .num_ips = ARRAY_SIZE(addresses_B_1),
1131 .ips = addresses_B_1,
1132 .apply_expected = False
1136 .type = WREPL_TYPE_UNIQUE,
1137 .state = WREPL_STATE_ACTIVE,
1138 .node = WREPL_NODE_B,
1140 .num_ips = ARRAY_SIZE(addresses_A_1),
1141 .ips = addresses_A_1,
1142 .apply_expected = True
1147 * unique,released vs. unique,tombstone
1148 * => should be replaced
1151 .line = __location__,
1152 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1155 .type = WREPL_TYPE_UNIQUE,
1156 .state = WREPL_STATE_RELEASED,
1157 .node = WREPL_NODE_B,
1159 .num_ips = ARRAY_SIZE(addresses_A_1),
1160 .ips = addresses_A_1,
1161 .apply_expected = False
1165 .type = WREPL_TYPE_UNIQUE,
1166 .state = WREPL_STATE_TOMBSTONE,
1167 .node = WREPL_NODE_B,
1169 .num_ips = ARRAY_SIZE(addresses_B_1),
1170 .ips = addresses_B_1,
1171 .apply_expected = True
1176 * unique,tombstone vs. unique,active
1177 * => should be replaced
1180 .line = __location__,
1181 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1184 .type = WREPL_TYPE_UNIQUE,
1185 .state = WREPL_STATE_TOMBSTONE,
1186 .node = WREPL_NODE_B,
1188 .num_ips = ARRAY_SIZE(addresses_B_1),
1189 .ips = addresses_B_1,
1190 .apply_expected = True
1194 .type = WREPL_TYPE_UNIQUE,
1195 .state = WREPL_STATE_ACTIVE,
1196 .node = WREPL_NODE_B,
1198 .num_ips = ARRAY_SIZE(addresses_A_1),
1199 .ips = addresses_A_1,
1200 .apply_expected = True
1205 * unique,tombstone vs. unique,tombstone
1206 * => should be replaced
1209 .line = __location__,
1210 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1213 .type = WREPL_TYPE_UNIQUE,
1214 .state = WREPL_STATE_TOMBSTONE,
1215 .node = WREPL_NODE_B,
1217 .num_ips = ARRAY_SIZE(addresses_A_1),
1218 .ips = addresses_A_1,
1219 .apply_expected = True
1223 .type = WREPL_TYPE_UNIQUE,
1224 .state = WREPL_STATE_TOMBSTONE,
1225 .node = WREPL_NODE_B,
1227 .num_ips = ARRAY_SIZE(addresses_B_1),
1228 .ips = addresses_B_1,
1229 .apply_expected = True
1235 * unique vs normal groups section,
1238 * unique,active vs. group,active
1239 * => should be replaced
1242 .line = __location__,
1243 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1246 .type = WREPL_TYPE_UNIQUE,
1247 .state = WREPL_STATE_ACTIVE,
1248 .node = WREPL_NODE_B,
1250 .num_ips = ARRAY_SIZE(addresses_B_1),
1251 .ips = addresses_B_1,
1252 .apply_expected = True
1256 .type = WREPL_TYPE_GROUP,
1257 .state = WREPL_STATE_ACTIVE,
1258 .node = WREPL_NODE_B,
1260 .num_ips = ARRAY_SIZE(addresses_A_1),
1261 .ips = addresses_A_1,
1262 .apply_expected = True
1267 * unique,active vs. group,tombstone
1268 * => should NOT be replaced
1271 .line = __location__,
1272 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1275 .type = WREPL_TYPE_UNIQUE,
1276 .state = WREPL_STATE_ACTIVE,
1277 .node = WREPL_NODE_B,
1279 .num_ips = ARRAY_SIZE(addresses_A_1),
1280 .ips = addresses_A_1,
1281 .apply_expected = True
1285 .type = WREPL_TYPE_GROUP,
1286 .state = WREPL_STATE_TOMBSTONE,
1287 .node = WREPL_NODE_B,
1289 .num_ips = ARRAY_SIZE(addresses_A_1),
1290 .ips = addresses_A_1,
1291 .apply_expected = False
1296 * unique,released vs. group,active
1297 * => should be replaced
1300 .line = __location__,
1301 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1304 .type = WREPL_TYPE_UNIQUE,
1305 .state = WREPL_STATE_RELEASED,
1306 .node = WREPL_NODE_B,
1308 .num_ips = ARRAY_SIZE(addresses_A_1),
1309 .ips = addresses_A_1,
1310 .apply_expected = False
1314 .type = WREPL_TYPE_GROUP,
1315 .state = WREPL_STATE_ACTIVE,
1316 .node = WREPL_NODE_B,
1318 .num_ips = ARRAY_SIZE(addresses_B_1),
1319 .ips = addresses_B_1,
1320 .apply_expected = True
1325 * unique,released vs. group,tombstone
1326 * => should be replaced
1329 .line = __location__,
1330 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1333 .type = WREPL_TYPE_UNIQUE,
1334 .state = WREPL_STATE_RELEASED,
1335 .node = WREPL_NODE_B,
1337 .num_ips = ARRAY_SIZE(addresses_B_1),
1338 .ips = addresses_B_1,
1339 .apply_expected = False
1343 .type = WREPL_TYPE_GROUP,
1344 .state = WREPL_STATE_TOMBSTONE,
1345 .node = WREPL_NODE_B,
1347 .num_ips = ARRAY_SIZE(addresses_A_1),
1348 .ips = addresses_A_1,
1349 .apply_expected = True
1354 * unique,tombstone vs. group,active
1355 * => should be replaced
1358 .line = __location__,
1359 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1362 .type = WREPL_TYPE_UNIQUE,
1363 .state = WREPL_STATE_TOMBSTONE,
1364 .node = WREPL_NODE_B,
1366 .num_ips = ARRAY_SIZE(addresses_A_1),
1367 .ips = addresses_A_1,
1368 .apply_expected = True
1372 .type = WREPL_TYPE_GROUP,
1373 .state = WREPL_STATE_ACTIVE,
1374 .node = WREPL_NODE_B,
1376 .num_ips = ARRAY_SIZE(addresses_B_1),
1377 .ips = addresses_B_1,
1378 .apply_expected = True
1383 * unique,tombstone vs. group,tombstone
1384 * => should be replaced
1387 .line = __location__,
1388 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1391 .type = WREPL_TYPE_UNIQUE,
1392 .state = WREPL_STATE_TOMBSTONE,
1393 .node = WREPL_NODE_B,
1395 .num_ips = ARRAY_SIZE(addresses_B_1),
1396 .ips = addresses_B_1,
1397 .apply_expected = True
1401 .type = WREPL_TYPE_GROUP,
1402 .state = WREPL_STATE_TOMBSTONE,
1403 .node = WREPL_NODE_B,
1405 .num_ips = ARRAY_SIZE(addresses_A_1),
1406 .ips = addresses_A_1,
1407 .apply_expected = True
1412 * unique vs special groups section,
1415 * unique,active vs. sgroup,active
1416 * => should NOT be replaced
1419 .line = __location__,
1420 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1423 .type = WREPL_TYPE_UNIQUE,
1424 .state = WREPL_STATE_ACTIVE,
1425 .node = WREPL_NODE_B,
1427 .num_ips = ARRAY_SIZE(addresses_A_1),
1428 .ips = addresses_A_1,
1429 .apply_expected = True
1433 .type = WREPL_TYPE_SGROUP,
1434 .state = WREPL_STATE_ACTIVE,
1435 .node = WREPL_NODE_B,
1437 .num_ips = ARRAY_SIZE(addresses_A_1),
1438 .ips = addresses_A_1,
1439 .apply_expected = False
1444 * unique,active vs. sgroup,tombstone
1445 * => should NOT be replaced
1448 .line = __location__,
1449 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1452 .type = WREPL_TYPE_UNIQUE,
1453 .state = WREPL_STATE_ACTIVE,
1454 .node = WREPL_NODE_B,
1456 .num_ips = ARRAY_SIZE(addresses_A_1),
1457 .ips = addresses_A_1,
1458 .apply_expected = True
1462 .type = WREPL_TYPE_SGROUP,
1463 .state = WREPL_STATE_TOMBSTONE,
1464 .node = WREPL_NODE_B,
1466 .num_ips = ARRAY_SIZE(addresses_A_1),
1467 .ips = addresses_A_1,
1468 .apply_expected = False
1473 * unique,released vs. sgroup,active
1474 * => should be replaced
1477 .line = __location__,
1478 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1481 .type = WREPL_TYPE_UNIQUE,
1482 .state = WREPL_STATE_RELEASED,
1483 .node = WREPL_NODE_B,
1485 .num_ips = ARRAY_SIZE(addresses_A_1),
1486 .ips = addresses_A_1,
1487 .apply_expected = False
1491 .type = WREPL_TYPE_SGROUP,
1492 .state = WREPL_STATE_ACTIVE,
1493 .node = WREPL_NODE_B,
1495 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1496 .ips = addresses_B_3_4,
1497 .apply_expected = True
1502 * unique,released vs. sgroup,tombstone
1503 * => should be replaced
1506 .line = __location__,
1507 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1510 .type = WREPL_TYPE_UNIQUE,
1511 .state = WREPL_STATE_RELEASED,
1512 .node = WREPL_NODE_B,
1514 .num_ips = ARRAY_SIZE(addresses_B_1),
1515 .ips = addresses_B_1,
1516 .apply_expected = False
1520 .type = WREPL_TYPE_SGROUP,
1521 .state = WREPL_STATE_TOMBSTONE,
1522 .node = WREPL_NODE_B,
1524 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1525 .ips = addresses_A_3_4,
1526 .apply_expected = True
1531 * unique,tombstone vs. sgroup,active
1532 * => should be replaced
1535 .line = __location__,
1536 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1539 .type = WREPL_TYPE_UNIQUE,
1540 .state = WREPL_STATE_TOMBSTONE,
1541 .node = WREPL_NODE_B,
1543 .num_ips = ARRAY_SIZE(addresses_A_1),
1544 .ips = addresses_A_1,
1545 .apply_expected = True
1549 .type = WREPL_TYPE_SGROUP,
1550 .state = WREPL_STATE_ACTIVE,
1551 .node = WREPL_NODE_B,
1553 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1554 .ips = addresses_B_3_4,
1555 .apply_expected = True
1560 * unique,tombstone vs. sgroup,tombstone
1561 * => should be replaced
1564 .line = __location__,
1565 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1568 .type = WREPL_TYPE_UNIQUE,
1569 .state = WREPL_STATE_TOMBSTONE,
1570 .node = WREPL_NODE_B,
1572 .num_ips = ARRAY_SIZE(addresses_B_1),
1573 .ips = addresses_B_1,
1574 .apply_expected = True
1578 .type = WREPL_TYPE_SGROUP,
1579 .state = WREPL_STATE_TOMBSTONE,
1580 .node = WREPL_NODE_B,
1582 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1583 .ips = addresses_A_3_4,
1584 .apply_expected = True
1589 * unique vs multi homed section,
1592 * unique,active vs. mhomed,active
1593 * => should be replaced
1596 .line = __location__,
1597 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1600 .type = WREPL_TYPE_UNIQUE,
1601 .state = WREPL_STATE_ACTIVE,
1602 .node = WREPL_NODE_B,
1604 .num_ips = ARRAY_SIZE(addresses_A_1),
1605 .ips = addresses_A_1,
1606 .apply_expected = True
1610 .type = WREPL_TYPE_MHOMED,
1611 .state = WREPL_STATE_ACTIVE,
1612 .node = WREPL_NODE_B,
1614 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1615 .ips = addresses_B_3_4,
1616 .apply_expected = True
1621 * unique,active vs. mhomed,tombstone
1622 * => should NOT be replaced
1625 .line = __location__,
1626 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1629 .type = WREPL_TYPE_UNIQUE,
1630 .state = WREPL_STATE_ACTIVE,
1631 .node = WREPL_NODE_B,
1633 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1634 .ips = addresses_B_3_4,
1635 .apply_expected = True
1639 .type = WREPL_TYPE_MHOMED,
1640 .state = WREPL_STATE_TOMBSTONE,
1641 .node = WREPL_NODE_B,
1643 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1644 .ips = addresses_B_3_4,
1645 .apply_expected = False
1650 * unique,released vs. mhomed,active
1651 * => should be replaced
1654 .line = __location__,
1655 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1658 .type = WREPL_TYPE_UNIQUE,
1659 .state = WREPL_STATE_RELEASED,
1660 .node = WREPL_NODE_B,
1662 .num_ips = ARRAY_SIZE(addresses_B_1),
1663 .ips = addresses_B_1,
1664 .apply_expected = False
1668 .type = WREPL_TYPE_MHOMED,
1669 .state = WREPL_STATE_ACTIVE,
1670 .node = WREPL_NODE_B,
1672 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1673 .ips = addresses_A_3_4,
1674 .apply_expected = True
1679 * unique,released vs. mhomed,tombstone
1680 * => should be replaced
1683 .line = __location__,
1684 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1687 .type = WREPL_TYPE_UNIQUE,
1688 .state = WREPL_STATE_RELEASED,
1689 .node = WREPL_NODE_B,
1691 .num_ips = ARRAY_SIZE(addresses_A_1),
1692 .ips = addresses_A_1,
1693 .apply_expected = False
1697 .type = WREPL_TYPE_MHOMED,
1698 .state = WREPL_STATE_TOMBSTONE,
1699 .node = WREPL_NODE_B,
1701 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1702 .ips = addresses_B_3_4,
1703 .apply_expected = True
1708 * unique,tombstone vs. mhomed,active
1709 * => should be replaced
1712 .line = __location__,
1713 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1716 .type = WREPL_TYPE_UNIQUE,
1717 .state = WREPL_STATE_TOMBSTONE,
1718 .node = WREPL_NODE_B,
1720 .num_ips = ARRAY_SIZE(addresses_B_1),
1721 .ips = addresses_B_1,
1722 .apply_expected = True
1726 .type = WREPL_TYPE_MHOMED,
1727 .state = WREPL_STATE_ACTIVE,
1728 .node = WREPL_NODE_B,
1730 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1731 .ips = addresses_A_3_4,
1732 .apply_expected = True
1737 * unique,tombstone vs. mhomed,tombstone
1738 * => should be replaced
1741 .line = __location__,
1742 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1745 .type = WREPL_TYPE_UNIQUE,
1746 .state = WREPL_STATE_TOMBSTONE,
1747 .node = WREPL_NODE_B,
1749 .num_ips = ARRAY_SIZE(addresses_A_1),
1750 .ips = addresses_A_1,
1751 .apply_expected = True
1755 .type = WREPL_TYPE_MHOMED,
1756 .state = WREPL_STATE_TOMBSTONE,
1757 .node = WREPL_NODE_B,
1759 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1760 .ips = addresses_B_3_4,
1761 .apply_expected = True
1766 * normal groups vs unique section,
1769 * group,active vs. unique,active
1770 * => should NOT be replaced
1773 .line = __location__,
1774 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1777 .type = WREPL_TYPE_GROUP,
1778 .state = WREPL_STATE_ACTIVE,
1779 .node = WREPL_NODE_B,
1781 .num_ips = ARRAY_SIZE(addresses_A_1),
1782 .ips = addresses_A_1,
1783 .apply_expected = True
1787 .type = WREPL_TYPE_UNIQUE,
1788 .state = WREPL_STATE_ACTIVE,
1789 .node = WREPL_NODE_B,
1791 .num_ips = ARRAY_SIZE(addresses_A_1),
1792 .ips = addresses_A_1,
1793 .apply_expected = False
1798 * group,active vs. unique,tombstone
1799 * => should NOT be replaced
1802 .line = __location__,
1803 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1806 .type = WREPL_TYPE_GROUP,
1807 .state = WREPL_STATE_ACTIVE,
1808 .node = WREPL_NODE_B,
1810 .num_ips = ARRAY_SIZE(addresses_A_1),
1811 .ips = addresses_A_1,
1812 .apply_expected = True
1816 .type = WREPL_TYPE_UNIQUE,
1817 .state = WREPL_STATE_TOMBSTONE,
1818 .node = WREPL_NODE_B,
1820 .num_ips = ARRAY_SIZE(addresses_A_1),
1821 .ips = addresses_A_1,
1822 .apply_expected = False
1827 * group,released vs. unique,active
1828 * => should NOT be replaced
1831 .line = __location__,
1832 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1835 .type = WREPL_TYPE_GROUP,
1836 .state = WREPL_STATE_RELEASED,
1837 .node = WREPL_NODE_B,
1839 .num_ips = ARRAY_SIZE(addresses_A_1),
1840 .ips = addresses_A_1,
1841 .apply_expected = False
1845 .type = WREPL_TYPE_UNIQUE,
1846 .state = WREPL_STATE_ACTIVE,
1847 .node = WREPL_NODE_B,
1849 .num_ips = ARRAY_SIZE(addresses_A_1),
1850 .ips = addresses_A_1,
1851 .apply_expected = False
1856 * group,released vs. unique,tombstone
1857 * => should NOT be replaced
1860 .line = __location__,
1861 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1864 .type = WREPL_TYPE_GROUP,
1865 .state = WREPL_STATE_RELEASED,
1866 .node = WREPL_NODE_B,
1868 .num_ips = ARRAY_SIZE(addresses_A_1),
1869 .ips = addresses_A_1,
1870 .apply_expected = False
1874 .type = WREPL_TYPE_UNIQUE,
1875 .state = WREPL_STATE_TOMBSTONE,
1876 .node = WREPL_NODE_B,
1878 .num_ips = ARRAY_SIZE(addresses_A_1),
1879 .ips = addresses_A_1,
1880 .apply_expected = False
1885 * group,tombstone vs. unique,active
1886 * => should NOT be replaced
1889 .line = __location__,
1890 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1893 .type = WREPL_TYPE_GROUP,
1894 .state = WREPL_STATE_TOMBSTONE,
1895 .node = WREPL_NODE_B,
1897 .num_ips = ARRAY_SIZE(addresses_A_1),
1898 .ips = addresses_A_1,
1899 .apply_expected = True
1903 .type = WREPL_TYPE_UNIQUE,
1904 .state = WREPL_STATE_ACTIVE,
1905 .node = WREPL_NODE_B,
1907 .num_ips = ARRAY_SIZE(addresses_A_1),
1908 .ips = addresses_A_1,
1909 .apply_expected = False
1914 * group,tombstone vs. unique,tombstone
1915 * => should NOT be replaced
1918 .line = __location__,
1919 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1922 .type = WREPL_TYPE_GROUP,
1923 .state = WREPL_STATE_TOMBSTONE,
1924 .node = WREPL_NODE_B,
1926 .num_ips = ARRAY_SIZE(addresses_A_1),
1927 .ips = addresses_A_1,
1928 .apply_expected = True
1932 .type = WREPL_TYPE_UNIQUE,
1933 .state = WREPL_STATE_TOMBSTONE,
1934 .node = WREPL_NODE_B,
1936 .num_ips = ARRAY_SIZE(addresses_A_1),
1937 .ips = addresses_A_1,
1938 .apply_expected = False
1943 * normal groups vs normal groups section,
1946 * group,active vs. group,active
1947 * => should NOT be replaced
1950 .line = __location__,
1951 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1954 .type = WREPL_TYPE_GROUP,
1955 .state = WREPL_STATE_ACTIVE,
1956 .node = WREPL_NODE_B,
1958 .num_ips = ARRAY_SIZE(addresses_A_1),
1959 .ips = addresses_A_1,
1960 .apply_expected = True
1964 .type = WREPL_TYPE_GROUP,
1965 .state = WREPL_STATE_ACTIVE,
1966 .node = WREPL_NODE_B,
1968 .num_ips = ARRAY_SIZE(addresses_A_1),
1969 .ips = addresses_A_1,
1970 .apply_expected = False
1975 * group,active vs. group,tombstone
1976 * => should NOT be replaced
1979 .line = __location__,
1980 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1983 .type = WREPL_TYPE_GROUP,
1984 .state = WREPL_STATE_ACTIVE,
1985 .node = WREPL_NODE_B,
1987 .num_ips = ARRAY_SIZE(addresses_A_1),
1988 .ips = addresses_A_1,
1989 .apply_expected = True
1993 .type = WREPL_TYPE_GROUP,
1994 .state = WREPL_STATE_TOMBSTONE,
1995 .node = WREPL_NODE_B,
1997 .num_ips = ARRAY_SIZE(addresses_A_1),
1998 .ips = addresses_A_1,
1999 .apply_expected = False
2004 * group,released vs. group,active
2005 * => should be replaced
2008 .line = __location__,
2009 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2012 .type = WREPL_TYPE_GROUP,
2013 .state = WREPL_STATE_RELEASED,
2014 .node = WREPL_NODE_B,
2016 .num_ips = ARRAY_SIZE(addresses_A_1),
2017 .ips = addresses_A_1,
2018 .apply_expected = False
2022 .type = WREPL_TYPE_GROUP,
2023 .state = WREPL_STATE_ACTIVE,
2024 .node = WREPL_NODE_B,
2026 .num_ips = ARRAY_SIZE(addresses_B_1),
2027 .ips = addresses_B_1,
2028 .apply_expected = True
2033 * group,released vs. group,tombstone
2034 * => should be replaced
2037 .line = __location__,
2038 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2041 .type = WREPL_TYPE_GROUP,
2042 .state = WREPL_STATE_RELEASED,
2043 .node = WREPL_NODE_B,
2045 .num_ips = ARRAY_SIZE(addresses_A_1),
2046 .ips = addresses_A_1,
2047 .apply_expected = False
2051 .type = WREPL_TYPE_GROUP,
2052 .state = WREPL_STATE_TOMBSTONE,
2053 .node = WREPL_NODE_B,
2055 .num_ips = ARRAY_SIZE(addresses_B_1),
2056 .ips = addresses_B_1,
2057 .apply_expected = True
2062 * group,tombstone vs. group,active
2063 * => should be replaced
2066 .line = __location__,
2067 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2070 .type = WREPL_TYPE_GROUP,
2071 .state = WREPL_STATE_TOMBSTONE,
2072 .node = WREPL_NODE_B,
2074 .num_ips = ARRAY_SIZE(addresses_B_1),
2075 .ips = addresses_B_1,
2076 .apply_expected = True
2080 .type = WREPL_TYPE_GROUP,
2081 .state = WREPL_STATE_ACTIVE,
2082 .node = WREPL_NODE_B,
2084 .num_ips = ARRAY_SIZE(addresses_A_1),
2085 .ips = addresses_A_1,
2086 .apply_expected = True
2091 * group,tombstone vs. group,tombstone
2092 * => should be replaced
2095 .line = __location__,
2096 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2099 .type = WREPL_TYPE_GROUP,
2100 .state = WREPL_STATE_TOMBSTONE,
2101 .node = WREPL_NODE_B,
2103 .num_ips = ARRAY_SIZE(addresses_A_1),
2104 .ips = addresses_A_1,
2105 .apply_expected = True
2109 .type = WREPL_TYPE_GROUP,
2110 .state = WREPL_STATE_TOMBSTONE,
2111 .node = WREPL_NODE_B,
2113 .num_ips = ARRAY_SIZE(addresses_B_1),
2114 .ips = addresses_B_1,
2115 .apply_expected = True
2120 * normal groups vs special groups section,
2123 * group,active vs. sgroup,active
2124 * => should NOT be replaced
2127 .line = __location__,
2128 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2131 .type = WREPL_TYPE_GROUP,
2132 .state = WREPL_STATE_ACTIVE,
2133 .node = WREPL_NODE_B,
2135 .num_ips = ARRAY_SIZE(addresses_B_1),
2136 .ips = addresses_B_1,
2137 .apply_expected = True
2141 .type = WREPL_TYPE_SGROUP,
2142 .state = WREPL_STATE_ACTIVE,
2143 .node = WREPL_NODE_B,
2145 .num_ips = ARRAY_SIZE(addresses_B_1),
2146 .ips = addresses_B_1,
2147 .apply_expected = False
2152 * group,active vs. sgroup,tombstone
2153 * => should NOT be replaced
2156 .line = __location__,
2157 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2160 .type = WREPL_TYPE_GROUP,
2161 .state = WREPL_STATE_ACTIVE,
2162 .node = WREPL_NODE_B,
2164 .num_ips = ARRAY_SIZE(addresses_B_1),
2165 .ips = addresses_B_1,
2166 .apply_expected = True
2170 .type = WREPL_TYPE_SGROUP,
2171 .state = WREPL_STATE_TOMBSTONE,
2172 .node = WREPL_NODE_B,
2174 .num_ips = ARRAY_SIZE(addresses_B_1),
2175 .ips = addresses_B_1,
2176 .apply_expected = False
2181 * group,released vs. sgroup,active
2182 * => should be replaced
2185 .line = __location__,
2186 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2189 .type = WREPL_TYPE_GROUP,
2190 .state = WREPL_STATE_RELEASED,
2191 .node = WREPL_NODE_B,
2193 .num_ips = ARRAY_SIZE(addresses_A_1),
2194 .ips = addresses_A_1,
2195 .apply_expected = False
2199 .type = WREPL_TYPE_SGROUP,
2200 .state = WREPL_STATE_ACTIVE,
2201 .node = WREPL_NODE_B,
2203 .num_ips = ARRAY_SIZE(addresses_B_1),
2204 .ips = addresses_B_1,
2205 .apply_expected = True
2210 * group,released vs. sgroup,tombstone
2211 * => should NOT be replaced
2214 .line = __location__,
2215 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2218 .type = WREPL_TYPE_GROUP,
2219 .state = WREPL_STATE_RELEASED,
2220 .node = WREPL_NODE_B,
2222 .num_ips = ARRAY_SIZE(addresses_B_1),
2223 .ips = addresses_B_1,
2224 .apply_expected = False
2228 .type = WREPL_TYPE_SGROUP,
2229 .state = WREPL_STATE_TOMBSTONE,
2230 .node = WREPL_NODE_B,
2232 .num_ips = ARRAY_SIZE(addresses_B_1),
2233 .ips = addresses_B_1,
2234 .apply_expected = False
2239 * group,tombstone vs. sgroup,active
2240 * => should be replaced
2243 .line = __location__,
2244 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2247 .type = WREPL_TYPE_GROUP,
2248 .state = WREPL_STATE_TOMBSTONE,
2249 .node = WREPL_NODE_B,
2251 .num_ips = ARRAY_SIZE(addresses_B_1),
2252 .ips = addresses_B_1,
2253 .apply_expected = True
2257 .type = WREPL_TYPE_SGROUP,
2258 .state = WREPL_STATE_ACTIVE,
2259 .node = WREPL_NODE_B,
2261 .num_ips = ARRAY_SIZE(addresses_A_1),
2262 .ips = addresses_A_1,
2263 .apply_expected = True
2268 * group,tombstone vs. sgroup,tombstone
2269 * => should be replaced
2272 .line = __location__,
2273 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2276 .type = WREPL_TYPE_GROUP,
2277 .state = WREPL_STATE_TOMBSTONE,
2278 .node = WREPL_NODE_B,
2280 .num_ips = ARRAY_SIZE(addresses_A_1),
2281 .ips = addresses_A_1,
2282 .apply_expected = True
2286 .type = WREPL_TYPE_SGROUP,
2287 .state = WREPL_STATE_TOMBSTONE,
2288 .node = WREPL_NODE_B,
2290 .num_ips = ARRAY_SIZE(addresses_B_1),
2291 .ips = addresses_B_1,
2292 .apply_expected = True
2297 * normal groups vs multi homed section,
2300 * group,active vs. mhomed,active
2301 * => should NOT be replaced
2304 .line = __location__,
2305 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2308 .type = WREPL_TYPE_GROUP,
2309 .state = WREPL_STATE_ACTIVE,
2310 .node = WREPL_NODE_B,
2312 .num_ips = ARRAY_SIZE(addresses_B_1),
2313 .ips = addresses_B_1,
2314 .apply_expected = True
2318 .type = WREPL_TYPE_MHOMED,
2319 .state = WREPL_STATE_ACTIVE,
2320 .node = WREPL_NODE_B,
2322 .num_ips = ARRAY_SIZE(addresses_B_1),
2323 .ips = addresses_B_1,
2324 .apply_expected = False
2329 * group,active vs. mhomed,tombstone
2330 * => should NOT be replaced
2333 .line = __location__,
2334 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2337 .type = WREPL_TYPE_GROUP,
2338 .state = WREPL_STATE_ACTIVE,
2339 .node = WREPL_NODE_B,
2341 .num_ips = ARRAY_SIZE(addresses_B_1),
2342 .ips = addresses_B_1,
2343 .apply_expected = True
2347 .type = WREPL_TYPE_MHOMED,
2348 .state = WREPL_STATE_TOMBSTONE,
2349 .node = WREPL_NODE_B,
2351 .num_ips = ARRAY_SIZE(addresses_B_1),
2352 .ips = addresses_B_1,
2353 .apply_expected = False
2358 * group,released vs. mhomed,active
2359 * => should NOT be replaced
2362 .line = __location__,
2363 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2366 .type = WREPL_TYPE_GROUP,
2367 .state = WREPL_STATE_RELEASED,
2368 .node = WREPL_NODE_B,
2370 .num_ips = ARRAY_SIZE(addresses_B_1),
2371 .ips = addresses_B_1,
2372 .apply_expected = False
2376 .type = WREPL_TYPE_MHOMED,
2377 .state = WREPL_STATE_ACTIVE,
2378 .node = WREPL_NODE_B,
2380 .num_ips = ARRAY_SIZE(addresses_B_1),
2381 .ips = addresses_B_1,
2382 .apply_expected = False
2387 * group,released vs. mhomed,tombstone
2388 * => should NOT be replaced
2391 .line = __location__,
2392 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2395 .type = WREPL_TYPE_GROUP,
2396 .state = WREPL_STATE_RELEASED,
2397 .node = WREPL_NODE_B,
2399 .num_ips = ARRAY_SIZE(addresses_B_1),
2400 .ips = addresses_B_1,
2401 .apply_expected = False
2405 .type = WREPL_TYPE_MHOMED,
2406 .state = WREPL_STATE_TOMBSTONE,
2407 .node = WREPL_NODE_B,
2409 .num_ips = ARRAY_SIZE(addresses_B_1),
2410 .ips = addresses_B_1,
2411 .apply_expected = False
2416 * group,tombstone vs. mhomed,active
2417 * => should be replaced
2420 .line = __location__,
2421 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2424 .type = WREPL_TYPE_GROUP,
2425 .state = WREPL_STATE_TOMBSTONE,
2426 .node = WREPL_NODE_B,
2428 .num_ips = ARRAY_SIZE(addresses_B_1),
2429 .ips = addresses_B_1,
2430 .apply_expected = True
2434 .type = WREPL_TYPE_MHOMED,
2435 .state = WREPL_STATE_ACTIVE,
2436 .node = WREPL_NODE_B,
2438 .num_ips = ARRAY_SIZE(addresses_A_1),
2439 .ips = addresses_A_1,
2440 .apply_expected = True
2445 * group,tombstone vs. mhomed,tombstone
2446 * => should be replaced
2449 .line = __location__,
2450 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2453 .type = WREPL_TYPE_GROUP,
2454 .state = WREPL_STATE_TOMBSTONE,
2455 .node = WREPL_NODE_B,
2457 .num_ips = ARRAY_SIZE(addresses_A_1),
2458 .ips = addresses_A_1,
2459 .apply_expected = True
2463 .type = WREPL_TYPE_MHOMED,
2464 .state = WREPL_STATE_TOMBSTONE,
2465 .node = WREPL_NODE_B,
2467 .num_ips = ARRAY_SIZE(addresses_B_1),
2468 .ips = addresses_B_1,
2469 .apply_expected = True
2474 * special groups vs unique section,
2477 * sgroup,active vs. unique,active
2478 * => should NOT be replaced
2481 .line = __location__,
2482 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2485 .type = WREPL_TYPE_SGROUP,
2486 .state = WREPL_STATE_ACTIVE,
2487 .node = WREPL_NODE_B,
2489 .num_ips = ARRAY_SIZE(addresses_B_1),
2490 .ips = addresses_B_1,
2491 .apply_expected = True
2495 .type = WREPL_TYPE_UNIQUE,
2496 .state = WREPL_STATE_ACTIVE,
2497 .node = WREPL_NODE_B,
2499 .num_ips = ARRAY_SIZE(addresses_B_1),
2500 .ips = addresses_B_1,
2501 .apply_expected = False
2506 * sgroup,active vs. unique,tombstone
2507 * => should NOT be replaced
2510 .line = __location__,
2511 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2514 .type = WREPL_TYPE_SGROUP,
2515 .state = WREPL_STATE_ACTIVE,
2516 .node = WREPL_NODE_B,
2518 .num_ips = ARRAY_SIZE(addresses_B_1),
2519 .ips = addresses_B_1,
2520 .apply_expected = True
2524 .type = WREPL_TYPE_UNIQUE,
2525 .state = WREPL_STATE_TOMBSTONE,
2526 .node = WREPL_NODE_B,
2528 .num_ips = ARRAY_SIZE(addresses_B_1),
2529 .ips = addresses_B_1,
2530 .apply_expected = False
2535 * sgroup,released vs. unique,active
2536 * => should be replaced
2539 .line = __location__,
2540 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2543 .type = WREPL_TYPE_SGROUP,
2544 .state = WREPL_STATE_RELEASED,
2545 .node = WREPL_NODE_B,
2547 .num_ips = ARRAY_SIZE(addresses_B_1),
2548 .ips = addresses_B_1,
2549 .apply_expected = False
2553 .type = WREPL_TYPE_UNIQUE,
2554 .state = WREPL_STATE_ACTIVE,
2555 .node = WREPL_NODE_B,
2557 .num_ips = ARRAY_SIZE(addresses_A_1),
2558 .ips = addresses_A_1,
2559 .apply_expected = True
2564 * sgroup,released vs. unique,tombstone
2565 * => should be replaced
2568 .line = __location__,
2569 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2572 .type = WREPL_TYPE_SGROUP,
2573 .state = WREPL_STATE_RELEASED,
2574 .node = WREPL_NODE_B,
2576 .num_ips = ARRAY_SIZE(addresses_A_1),
2577 .ips = addresses_A_1,
2578 .apply_expected = False
2582 .type = WREPL_TYPE_UNIQUE,
2583 .state = WREPL_STATE_TOMBSTONE,
2584 .node = WREPL_NODE_B,
2586 .num_ips = ARRAY_SIZE(addresses_B_1),
2587 .ips = addresses_B_1,
2588 .apply_expected = True
2593 * sgroup,tombstone vs. unique,active
2594 * => should be replaced
2597 .line = __location__,
2598 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2601 .type = WREPL_TYPE_SGROUP,
2602 .state = WREPL_STATE_TOMBSTONE,
2603 .node = WREPL_NODE_B,
2605 .num_ips = ARRAY_SIZE(addresses_A_1),
2606 .ips = addresses_A_1,
2607 .apply_expected = True
2611 .type = WREPL_TYPE_UNIQUE,
2612 .state = WREPL_STATE_ACTIVE,
2613 .node = WREPL_NODE_B,
2615 .num_ips = ARRAY_SIZE(addresses_B_1),
2616 .ips = addresses_B_1,
2617 .apply_expected = True
2622 * sgroup,tombstone vs. unique,tombstone
2623 * => should be replaced
2626 .line = __location__,
2627 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2630 .type = WREPL_TYPE_SGROUP,
2631 .state = WREPL_STATE_TOMBSTONE,
2632 .node = WREPL_NODE_B,
2634 .num_ips = ARRAY_SIZE(addresses_B_1),
2635 .ips = addresses_B_1,
2636 .apply_expected = True
2640 .type = WREPL_TYPE_UNIQUE,
2641 .state = WREPL_STATE_TOMBSTONE,
2642 .node = WREPL_NODE_B,
2644 .num_ips = ARRAY_SIZE(addresses_A_1),
2645 .ips = addresses_A_1,
2646 .apply_expected = True
2651 * special groups vs normal group section,
2654 * sgroup,active vs. group,active
2655 * => should NOT be replaced
2658 .line = __location__,
2659 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2662 .type = WREPL_TYPE_SGROUP,
2663 .state = WREPL_STATE_ACTIVE,
2664 .node = WREPL_NODE_B,
2666 .num_ips = ARRAY_SIZE(addresses_A_1),
2667 .ips = addresses_A_1,
2668 .apply_expected = True
2672 .type = WREPL_TYPE_GROUP,
2673 .state = WREPL_STATE_ACTIVE,
2674 .node = WREPL_NODE_B,
2676 .num_ips = ARRAY_SIZE(addresses_A_1),
2677 .ips = addresses_A_1,
2678 .apply_expected = False
2683 * sgroup,active vs. group,tombstone
2684 * => should NOT be replaced
2687 .line = __location__,
2688 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2691 .type = WREPL_TYPE_SGROUP,
2692 .state = WREPL_STATE_ACTIVE,
2693 .node = WREPL_NODE_B,
2695 .num_ips = ARRAY_SIZE(addresses_A_1),
2696 .ips = addresses_A_1,
2697 .apply_expected = True
2701 .type = WREPL_TYPE_GROUP,
2702 .state = WREPL_STATE_TOMBSTONE,
2703 .node = WREPL_NODE_B,
2705 .num_ips = ARRAY_SIZE(addresses_A_1),
2706 .ips = addresses_A_1,
2707 .apply_expected = False
2712 * sgroup,released vs. group,active
2713 * => should be replaced
2716 .line = __location__,
2717 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2720 .type = WREPL_TYPE_SGROUP,
2721 .state = WREPL_STATE_RELEASED,
2722 .node = WREPL_NODE_B,
2724 .num_ips = ARRAY_SIZE(addresses_A_1),
2725 .ips = addresses_A_1,
2726 .apply_expected = False
2730 .type = WREPL_TYPE_GROUP,
2731 .state = WREPL_STATE_ACTIVE,
2732 .node = WREPL_NODE_B,
2734 .num_ips = ARRAY_SIZE(addresses_B_1),
2735 .ips = addresses_B_1,
2736 .apply_expected = True
2741 * sgroup,released vs. group,tombstone
2742 * => should be replaced
2745 .line = __location__,
2746 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2749 .type = WREPL_TYPE_SGROUP,
2750 .state = WREPL_STATE_RELEASED,
2751 .node = WREPL_NODE_B,
2753 .num_ips = ARRAY_SIZE(addresses_B_1),
2754 .ips = addresses_B_1,
2755 .apply_expected = False
2759 .type = WREPL_TYPE_GROUP,
2760 .state = WREPL_STATE_TOMBSTONE,
2761 .node = WREPL_NODE_B,
2763 .num_ips = ARRAY_SIZE(addresses_A_1),
2764 .ips = addresses_A_1,
2765 .apply_expected = True
2770 * sgroup,tombstone vs. group,active
2771 * => should NOT be replaced
2774 .line = __location__,
2775 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2778 .type = WREPL_TYPE_SGROUP,
2779 .state = WREPL_STATE_TOMBSTONE,
2780 .node = WREPL_NODE_B,
2782 .num_ips = ARRAY_SIZE(addresses_A_1),
2783 .ips = addresses_A_1,
2784 .apply_expected = True
2788 .type = WREPL_TYPE_GROUP,
2789 .state = WREPL_STATE_ACTIVE,
2790 .node = WREPL_NODE_B,
2792 .num_ips = ARRAY_SIZE(addresses_B_1),
2793 .ips = addresses_B_1,
2794 .apply_expected = True
2799 * sgroup,tombstone vs. group,tombstone
2800 * => should NOT be replaced
2803 .line = __location__,
2804 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2807 .type = WREPL_TYPE_SGROUP,
2808 .state = WREPL_STATE_TOMBSTONE,
2809 .node = WREPL_NODE_B,
2811 .num_ips = ARRAY_SIZE(addresses_B_1),
2812 .ips = addresses_B_1,
2813 .apply_expected = True
2817 .type = WREPL_TYPE_GROUP,
2818 .state = WREPL_STATE_TOMBSTONE,
2819 .node = WREPL_NODE_B,
2821 .num_ips = ARRAY_SIZE(addresses_A_1),
2822 .ips = addresses_A_1,
2823 .apply_expected = True
2828 * special groups vs multi homed section,
2831 * sgroup,active vs. mhomed,active
2832 * => should NOT be replaced
2835 .line = __location__,
2836 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2839 .type = WREPL_TYPE_SGROUP,
2840 .state = WREPL_STATE_ACTIVE,
2841 .node = WREPL_NODE_B,
2843 .num_ips = ARRAY_SIZE(addresses_A_1),
2844 .ips = addresses_A_1,
2845 .apply_expected = True
2849 .type = WREPL_TYPE_MHOMED,
2850 .state = WREPL_STATE_ACTIVE,
2851 .node = WREPL_NODE_B,
2853 .num_ips = ARRAY_SIZE(addresses_A_1),
2854 .ips = addresses_A_1,
2855 .apply_expected = False
2860 * sgroup,active vs. mhomed,tombstone
2861 * => should NOT be replaced
2864 .line = __location__,
2865 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2868 .type = WREPL_TYPE_SGROUP,
2869 .state = WREPL_STATE_ACTIVE,
2870 .node = WREPL_NODE_B,
2872 .num_ips = ARRAY_SIZE(addresses_A_1),
2873 .ips = addresses_A_1,
2874 .apply_expected = True
2878 .type = WREPL_TYPE_MHOMED,
2879 .state = WREPL_STATE_TOMBSTONE,
2880 .node = WREPL_NODE_B,
2882 .num_ips = ARRAY_SIZE(addresses_A_1),
2883 .ips = addresses_A_1,
2884 .apply_expected = False
2889 * sgroup,released vs. mhomed,active
2890 * => should be replaced
2893 .line = __location__,
2894 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2897 .type = WREPL_TYPE_SGROUP,
2898 .state = WREPL_STATE_RELEASED,
2899 .node = WREPL_NODE_B,
2901 .num_ips = ARRAY_SIZE(addresses_A_1),
2902 .ips = addresses_A_1,
2903 .apply_expected = False
2907 .type = WREPL_TYPE_MHOMED,
2908 .state = WREPL_STATE_ACTIVE,
2909 .node = WREPL_NODE_B,
2911 .num_ips = ARRAY_SIZE(addresses_B_1),
2912 .ips = addresses_B_1,
2913 .apply_expected = True
2918 * sgroup,released vs. mhomed,tombstone
2919 * => should be replaced
2922 .line = __location__,
2923 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2926 .type = WREPL_TYPE_SGROUP,
2927 .state = WREPL_STATE_RELEASED,
2928 .node = WREPL_NODE_B,
2930 .num_ips = ARRAY_SIZE(addresses_B_1),
2931 .ips = addresses_B_1,
2932 .apply_expected = False
2936 .type = WREPL_TYPE_MHOMED,
2937 .state = WREPL_STATE_TOMBSTONE,
2938 .node = WREPL_NODE_B,
2940 .num_ips = ARRAY_SIZE(addresses_A_1),
2941 .ips = addresses_A_1,
2942 .apply_expected = True
2947 * sgroup,tombstone vs. mhomed,active
2948 * => should be replaced
2951 .line = __location__,
2952 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2955 .type = WREPL_TYPE_SGROUP,
2956 .state = WREPL_STATE_TOMBSTONE,
2957 .node = WREPL_NODE_B,
2959 .num_ips = ARRAY_SIZE(addresses_A_1),
2960 .ips = addresses_A_1,
2961 .apply_expected = True
2965 .type = WREPL_TYPE_MHOMED,
2966 .state = WREPL_STATE_ACTIVE,
2967 .node = WREPL_NODE_B,
2969 .num_ips = ARRAY_SIZE(addresses_B_1),
2970 .ips = addresses_B_1,
2971 .apply_expected = True
2976 * sgroup,tombstone vs. mhomed,tombstone
2977 * => should be replaced
2980 .line = __location__,
2981 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2984 .type = WREPL_TYPE_SGROUP,
2985 .state = WREPL_STATE_TOMBSTONE,
2986 .node = WREPL_NODE_B,
2988 .num_ips = ARRAY_SIZE(addresses_B_1),
2989 .ips = addresses_B_1,
2990 .apply_expected = True
2994 .type = WREPL_TYPE_MHOMED,
2995 .state = WREPL_STATE_TOMBSTONE,
2996 .node = WREPL_NODE_B,
2998 .num_ips = ARRAY_SIZE(addresses_A_1),
2999 .ips = addresses_A_1,
3000 .apply_expected = True
3005 * multi homed vs. unique section,
3008 * mhomed,active vs. unique,active
3009 * => should be replaced
3012 .line = __location__,
3013 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3016 .type = WREPL_TYPE_MHOMED,
3017 .state = WREPL_STATE_ACTIVE,
3018 .node = WREPL_NODE_B,
3020 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3021 .ips = addresses_A_3_4,
3022 .apply_expected = True
3026 .type = WREPL_TYPE_UNIQUE,
3027 .state = WREPL_STATE_ACTIVE,
3028 .node = WREPL_NODE_B,
3030 .num_ips = ARRAY_SIZE(addresses_B_1),
3031 .ips = addresses_B_1,
3032 .apply_expected = True
3037 * mhomed,active vs. unique,tombstone
3038 * => should NOT be replaced
3041 .line = __location__,
3042 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3045 .type = WREPL_TYPE_MHOMED,
3046 .state = WREPL_STATE_ACTIVE,
3047 .node = WREPL_NODE_B,
3049 .num_ips = ARRAY_SIZE(addresses_B_1),
3050 .ips = addresses_B_1,
3051 .apply_expected = True
3055 .type = WREPL_TYPE_UNIQUE,
3056 .state = WREPL_STATE_TOMBSTONE,
3057 .node = WREPL_NODE_B,
3059 .num_ips = ARRAY_SIZE(addresses_B_1),
3060 .ips = addresses_B_1,
3061 .apply_expected = False
3066 * mhomed,released vs. unique,active
3067 * => should be replaced
3070 .line = __location__,
3071 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3074 .type = WREPL_TYPE_MHOMED,
3075 .state = WREPL_STATE_RELEASED,
3076 .node = WREPL_NODE_B,
3078 .num_ips = ARRAY_SIZE(addresses_A_1),
3079 .ips = addresses_A_1,
3080 .apply_expected = False
3084 .type = WREPL_TYPE_UNIQUE,
3085 .state = WREPL_STATE_ACTIVE,
3086 .node = WREPL_NODE_B,
3088 .num_ips = ARRAY_SIZE(addresses_B_1),
3089 .ips = addresses_B_1,
3090 .apply_expected = True
3095 * mhomed,released vs. uinique,tombstone
3096 * => should be replaced
3099 .line = __location__,
3100 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3103 .type = WREPL_TYPE_MHOMED,
3104 .state = WREPL_STATE_RELEASED,
3105 .node = WREPL_NODE_B,
3107 .num_ips = ARRAY_SIZE(addresses_B_1),
3108 .ips = addresses_B_1,
3109 .apply_expected = False
3113 .type = WREPL_TYPE_UNIQUE,
3114 .state = WREPL_STATE_TOMBSTONE,
3115 .node = WREPL_NODE_B,
3117 .num_ips = ARRAY_SIZE(addresses_A_1),
3118 .ips = addresses_A_1,
3119 .apply_expected = True
3124 * mhomed,tombstone vs. unique,active
3125 * => should be replaced
3128 .line = __location__,
3129 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3132 .type = WREPL_TYPE_MHOMED,
3133 .state = WREPL_STATE_TOMBSTONE,
3134 .node = WREPL_NODE_B,
3136 .num_ips = ARRAY_SIZE(addresses_A_1),
3137 .ips = addresses_A_1,
3138 .apply_expected = True
3142 .type = WREPL_TYPE_UNIQUE,
3143 .state = WREPL_STATE_ACTIVE,
3144 .node = WREPL_NODE_B,
3146 .num_ips = ARRAY_SIZE(addresses_B_1),
3147 .ips = addresses_B_1,
3148 .apply_expected = True
3153 * mhomed,tombstone vs. uinique,tombstone
3154 * => should be replaced
3157 .line = __location__,
3158 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3161 .type = WREPL_TYPE_MHOMED,
3162 .state = WREPL_STATE_TOMBSTONE,
3163 .node = WREPL_NODE_B,
3165 .num_ips = ARRAY_SIZE(addresses_B_1),
3166 .ips = addresses_B_1,
3167 .apply_expected = True
3171 .type = WREPL_TYPE_UNIQUE,
3172 .state = WREPL_STATE_TOMBSTONE,
3173 .node = WREPL_NODE_B,
3175 .num_ips = ARRAY_SIZE(addresses_A_1),
3176 .ips = addresses_A_1,
3177 .apply_expected = True
3182 * multi homed vs. normal group section,
3185 * mhomed,active vs. group,active
3186 * => should be replaced
3189 .line = __location__,
3190 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3193 .type = WREPL_TYPE_MHOMED,
3194 .state = WREPL_STATE_ACTIVE,
3195 .node = WREPL_NODE_B,
3197 .num_ips = ARRAY_SIZE(addresses_A_1),
3198 .ips = addresses_A_1,
3199 .apply_expected = True
3203 .type = WREPL_TYPE_GROUP,
3204 .state = WREPL_STATE_ACTIVE,
3205 .node = WREPL_NODE_B,
3207 .num_ips = ARRAY_SIZE(addresses_B_1),
3208 .ips = addresses_B_1,
3209 .apply_expected = True
3214 * mhomed,active vs. group,tombstone
3215 * => should NOT be replaced
3218 .line = __location__,
3219 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3222 .type = WREPL_TYPE_MHOMED,
3223 .state = WREPL_STATE_ACTIVE,
3224 .node = WREPL_NODE_B,
3226 .num_ips = ARRAY_SIZE(addresses_B_1),
3227 .ips = addresses_B_1,
3228 .apply_expected = True
3232 .type = WREPL_TYPE_GROUP,
3233 .state = WREPL_STATE_TOMBSTONE,
3234 .node = WREPL_NODE_B,
3236 .num_ips = ARRAY_SIZE(addresses_B_1),
3237 .ips = addresses_B_1,
3238 .apply_expected = False
3243 * mhomed,released vs. group,active
3244 * => should be replaced
3247 .line = __location__,
3248 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3251 .type = WREPL_TYPE_MHOMED,
3252 .state = WREPL_STATE_RELEASED,
3253 .node = WREPL_NODE_B,
3255 .num_ips = ARRAY_SIZE(addresses_B_1),
3256 .ips = addresses_B_1,
3257 .apply_expected = False
3261 .type = WREPL_TYPE_GROUP,
3262 .state = WREPL_STATE_ACTIVE,
3263 .node = WREPL_NODE_B,
3265 .num_ips = ARRAY_SIZE(addresses_A_1),
3266 .ips = addresses_A_1,
3267 .apply_expected = True
3272 * mhomed,released vs. group,tombstone
3273 * => should be replaced
3276 .line = __location__,
3277 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3280 .type = WREPL_TYPE_MHOMED,
3281 .state = WREPL_STATE_RELEASED,
3282 .node = WREPL_NODE_B,
3284 .num_ips = ARRAY_SIZE(addresses_A_1),
3285 .ips = addresses_A_1,
3286 .apply_expected = False
3290 .type = WREPL_TYPE_GROUP,
3291 .state = WREPL_STATE_TOMBSTONE,
3292 .node = WREPL_NODE_B,
3294 .num_ips = ARRAY_SIZE(addresses_B_1),
3295 .ips = addresses_B_1,
3296 .apply_expected = True
3301 * mhomed,tombstone vs. group,active
3302 * => should be replaced
3305 .line = __location__,
3306 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3309 .type = WREPL_TYPE_MHOMED,
3310 .state = WREPL_STATE_TOMBSTONE,
3311 .node = WREPL_NODE_B,
3313 .num_ips = ARRAY_SIZE(addresses_B_1),
3314 .ips = addresses_B_1,
3315 .apply_expected = True
3319 .type = WREPL_TYPE_GROUP,
3320 .state = WREPL_STATE_ACTIVE,
3321 .node = WREPL_NODE_B,
3323 .num_ips = ARRAY_SIZE(addresses_A_1),
3324 .ips = addresses_A_1,
3325 .apply_expected = True
3330 * mhomed,tombstone vs. group,tombstone
3331 * => should be replaced
3334 .line = __location__,
3335 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3338 .type = WREPL_TYPE_MHOMED,
3339 .state = WREPL_STATE_TOMBSTONE,
3340 .node = WREPL_NODE_B,
3342 .num_ips = ARRAY_SIZE(addresses_A_1),
3343 .ips = addresses_A_1,
3344 .apply_expected = True
3348 .type = WREPL_TYPE_GROUP,
3349 .state = WREPL_STATE_TOMBSTONE,
3350 .node = WREPL_NODE_B,
3352 .num_ips = ARRAY_SIZE(addresses_B_1),
3353 .ips = addresses_B_1,
3354 .apply_expected = True
3359 * multi homed vs. special group section,
3362 * mhomed,active vs. sgroup,active
3363 * => should NOT be replaced
3366 .line = __location__,
3367 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3370 .type = WREPL_TYPE_MHOMED,
3371 .state = WREPL_STATE_ACTIVE,
3372 .node = WREPL_NODE_B,
3374 .num_ips = ARRAY_SIZE(addresses_A_1),
3375 .ips = addresses_A_1,
3376 .apply_expected = True
3380 .type = WREPL_TYPE_SGROUP,
3381 .state = WREPL_STATE_ACTIVE,
3382 .node = WREPL_NODE_B,
3384 .num_ips = ARRAY_SIZE(addresses_A_1),
3385 .ips = addresses_A_1,
3386 .apply_expected = False
3391 * mhomed,active vs. sgroup,tombstone
3392 * => should NOT be replaced
3395 .line = __location__,
3396 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3399 .type = WREPL_TYPE_MHOMED,
3400 .state = WREPL_STATE_ACTIVE,
3401 .node = WREPL_NODE_B,
3403 .num_ips = ARRAY_SIZE(addresses_A_1),
3404 .ips = addresses_A_1,
3405 .apply_expected = True
3409 .type = WREPL_TYPE_SGROUP,
3410 .state = WREPL_STATE_TOMBSTONE,
3411 .node = WREPL_NODE_B,
3413 .num_ips = ARRAY_SIZE(addresses_A_1),
3414 .ips = addresses_A_1,
3415 .apply_expected = False
3420 * mhomed,released vs. sgroup,active
3421 * => should be replaced
3424 .line = __location__,
3425 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3428 .type = WREPL_TYPE_MHOMED,
3429 .state = WREPL_STATE_RELEASED,
3430 .node = WREPL_NODE_B,
3432 .num_ips = ARRAY_SIZE(addresses_A_1),
3433 .ips = addresses_A_1,
3434 .apply_expected = False
3438 .type = WREPL_TYPE_SGROUP,
3439 .state = WREPL_STATE_ACTIVE,
3440 .node = WREPL_NODE_B,
3442 .num_ips = ARRAY_SIZE(addresses_B_1),
3443 .ips = addresses_B_1,
3444 .apply_expected = True
3449 * mhomed,released vs. sgroup,tombstone
3450 * => should be replaced
3453 .line = __location__,
3454 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3457 .type = WREPL_TYPE_MHOMED,
3458 .state = WREPL_STATE_RELEASED,
3459 .node = WREPL_NODE_B,
3461 .num_ips = ARRAY_SIZE(addresses_B_1),
3462 .ips = addresses_B_1,
3463 .apply_expected = False
3467 .type = WREPL_TYPE_SGROUP,
3468 .state = WREPL_STATE_TOMBSTONE,
3469 .node = WREPL_NODE_B,
3471 .num_ips = ARRAY_SIZE(addresses_A_1),
3472 .ips = addresses_A_1,
3473 .apply_expected = True
3478 * mhomed,tombstone vs. sgroup,active
3479 * => should be replaced
3482 .line = __location__,
3483 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3486 .type = WREPL_TYPE_MHOMED,
3487 .state = WREPL_STATE_TOMBSTONE,
3488 .node = WREPL_NODE_B,
3490 .num_ips = ARRAY_SIZE(addresses_A_1),
3491 .ips = addresses_A_1,
3492 .apply_expected = True
3496 .type = WREPL_TYPE_SGROUP,
3497 .state = WREPL_STATE_ACTIVE,
3498 .node = WREPL_NODE_B,
3500 .num_ips = ARRAY_SIZE(addresses_B_1),
3501 .ips = addresses_B_1,
3502 .apply_expected = True
3507 * mhomed,tombstone vs. sgroup,tombstone
3508 * => should be replaced
3511 .line = __location__,
3512 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3515 .type = WREPL_TYPE_MHOMED,
3516 .state = WREPL_STATE_TOMBSTONE,
3517 .node = WREPL_NODE_B,
3519 .num_ips = ARRAY_SIZE(addresses_B_1),
3520 .ips = addresses_B_1,
3521 .apply_expected = True
3525 .type = WREPL_TYPE_SGROUP,
3526 .state = WREPL_STATE_TOMBSTONE,
3527 .node = WREPL_NODE_B,
3529 .num_ips = ARRAY_SIZE(addresses_A_1),
3530 .ips = addresses_A_1,
3531 .apply_expected = True
3536 * multi homed vs. mlti homed section,
3539 * mhomed,active vs. mhomed,active
3540 * => should be replaced
3543 .line = __location__,
3544 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3547 .type = WREPL_TYPE_MHOMED,
3548 .state = WREPL_STATE_ACTIVE,
3549 .node = WREPL_NODE_B,
3551 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3552 .ips = addresses_A_3_4,
3553 .apply_expected = True
3557 .type = WREPL_TYPE_MHOMED,
3558 .state = WREPL_STATE_ACTIVE,
3559 .node = WREPL_NODE_B,
3561 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3562 .ips = addresses_B_3_4,
3563 .apply_expected = True
3568 * mhomed,active vs. mhomed,tombstone
3569 * => should NOT be replaced
3572 .line = __location__,
3573 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3576 .type = WREPL_TYPE_MHOMED,
3577 .state = WREPL_STATE_ACTIVE,
3578 .node = WREPL_NODE_B,
3580 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3581 .ips = addresses_B_3_4,
3582 .apply_expected = True
3586 .type = WREPL_TYPE_MHOMED,
3587 .state = WREPL_STATE_TOMBSTONE,
3588 .node = WREPL_NODE_B,
3590 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3591 .ips = addresses_B_3_4,
3592 .apply_expected = False
3597 * mhomed,released vs. mhomed,active
3598 * => should be replaced
3601 .line = __location__,
3602 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3605 .type = WREPL_TYPE_MHOMED,
3606 .state = WREPL_STATE_RELEASED,
3607 .node = WREPL_NODE_B,
3609 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3610 .ips = addresses_B_3_4,
3611 .apply_expected = False
3615 .type = WREPL_TYPE_MHOMED,
3616 .state = WREPL_STATE_ACTIVE,
3617 .node = WREPL_NODE_B,
3619 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3620 .ips = addresses_A_3_4,
3621 .apply_expected = True
3626 * mhomed,released vs. mhomed,tombstone
3627 * => should be replaced
3630 .line = __location__,
3631 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3634 .type = WREPL_TYPE_MHOMED,
3635 .state = WREPL_STATE_RELEASED,
3636 .node = WREPL_NODE_B,
3638 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3639 .ips = addresses_A_3_4,
3640 .apply_expected = False
3644 .type = WREPL_TYPE_MHOMED,
3645 .state = WREPL_STATE_TOMBSTONE,
3646 .node = WREPL_NODE_B,
3648 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3649 .ips = addresses_B_3_4,
3650 .apply_expected = True
3655 * mhomed,tombstone vs. mhomed,active
3656 * => should be replaced
3659 .line = __location__,
3660 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3663 .type = WREPL_TYPE_MHOMED,
3664 .state = WREPL_STATE_TOMBSTONE,
3665 .node = WREPL_NODE_B,
3667 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3668 .ips = addresses_B_3_4,
3669 .apply_expected = True
3673 .type = WREPL_TYPE_MHOMED,
3674 .state = WREPL_STATE_ACTIVE,
3675 .node = WREPL_NODE_B,
3677 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3678 .ips = addresses_A_3_4,
3679 .apply_expected = True
3684 * mhomed,tombstone vs. mhomed,tombstone
3685 * => should be replaced
3688 .line = __location__,
3689 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3692 .type = WREPL_TYPE_MHOMED,
3693 .state = WREPL_STATE_TOMBSTONE,
3694 .node = WREPL_NODE_B,
3696 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3697 .ips = addresses_A_3_4,
3698 .apply_expected = True
3702 .type = WREPL_TYPE_MHOMED,
3703 .state = WREPL_STATE_TOMBSTONE,
3704 .node = WREPL_NODE_B,
3706 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3707 .ips = addresses_B_3_4,
3708 .apply_expected = True
3712 * special group vs special group section,
3715 * sgroup,active vs. sgroup,active different addresses
3716 * => should be merged
3719 .line = __location__,
3720 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3724 .type = WREPL_TYPE_SGROUP,
3725 .state = WREPL_STATE_ACTIVE,
3726 .node = WREPL_NODE_B,
3728 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3729 .ips = addresses_B_3_4,
3730 .apply_expected = True,
3734 .type = WREPL_TYPE_SGROUP,
3735 .state = WREPL_STATE_ACTIVE,
3736 .node = WREPL_NODE_B,
3738 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3739 .ips = addresses_A_3_4,
3740 .sgroup_merge = True
3744 * sgroup,active vs. sgroup,active different addresses, but owner changed
3745 * => should be merged
3748 .line = __location__,
3749 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3753 .type = WREPL_TYPE_SGROUP,
3754 .state = WREPL_STATE_ACTIVE,
3755 .node = WREPL_NODE_B,
3757 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3758 .ips = addresses_B_3_4,
3759 .apply_expected = True,
3763 .type = WREPL_TYPE_SGROUP,
3764 .state = WREPL_STATE_ACTIVE,
3765 .node = WREPL_NODE_B,
3767 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3768 .ips = addresses_A_3_4,
3769 .apply_expected = True,
3770 .sgroup_cleanup = True
3774 * sgroup,active vs. sgroup,active same addresses
3775 * => should be NOT replaced
3778 .line = __location__,
3779 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3783 .type = WREPL_TYPE_SGROUP,
3784 .state = WREPL_STATE_ACTIVE,
3785 .node = WREPL_NODE_B,
3787 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3788 .ips = addresses_B_3_4,
3789 .apply_expected = True
3793 .type = WREPL_TYPE_SGROUP,
3794 .state = WREPL_STATE_ACTIVE,
3795 .node = WREPL_NODE_B,
3797 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3798 .ips = addresses_B_3_4,
3799 .apply_expected = False,
3800 .sgroup_cleanup = True
3804 * This should be the last record in this array,
3805 * we need to make sure the we leave a tombstoned unique entry
3809 .line = __location__,
3810 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3814 .type = WREPL_TYPE_UNIQUE,
3815 .state = WREPL_STATE_TOMBSTONE,
3816 .node = WREPL_NODE_B,
3818 .num_ips = ARRAY_SIZE(addresses_A_1),
3819 .ips = addresses_A_1,
3820 .apply_expected = True
3824 .type = WREPL_TYPE_UNIQUE,
3825 .state = WREPL_STATE_TOMBSTONE,
3826 .node = WREPL_NODE_B,
3828 .num_ips = ARRAY_SIZE(addresses_A_1),
3829 .ips = addresses_A_1,
3830 .apply_expected = True
3832 }}; /* do not add entries here, this should be the last record! */
3834 if (!ctx) return False;
3836 wins_name_r1 = &wins_name1;
3837 wins_name_r2 = &wins_name2;
3839 printf("Test Replica Conflicts with different owners\n");
3841 for(i=0; ret && i < ARRAY_SIZE(records); i++) {
3843 if (!records[i].extra && !records[i].cleanup) {
3844 /* we should test the worst cases */
3845 if (records[i].r2.apply_expected && records[i].r1.ips==records[i].r2.ips) {
3846 printf("(%s) Programmer error, invalid record[%u]: %s\n",
3847 __location__, i, records[i].line);
3849 } else if (!records[i].r2.apply_expected && records[i].r1.ips!=records[i].r2.ips) {
3850 printf("(%s) Programmer error, invalid record[%u]: %s\n",
3851 __location__, i, records[i].line);
3856 if (!records[i].cleanup) {
3857 const char *expected;
3860 if (records[i].r2.sgroup_merge) {
3861 expected = "SGROUP_MERGE";
3862 } else if (records[i].r2.apply_expected) {
3863 expected = "REPLACE";
3865 expected = "NOT REPLACE";
3868 if (!records[i].r1.ips && !records[i].r2.ips) {
3870 } else if (records[i].r1.ips==records[i].r2.ips) {
3876 printf("%s,%s%s vs. %s,%s%s with %s ip(s) => %s\n",
3877 wrepl_name_type_string(records[i].r1.type),
3878 wrepl_name_state_string(records[i].r1.state),
3879 (records[i].r1.is_static?",static":""),
3880 wrepl_name_type_string(records[i].r2.type),
3881 wrepl_name_state_string(records[i].r2.state),
3882 (records[i].r2.is_static?",static":""),
3889 wins_name_r1->name = &records[i].name;
3890 wins_name_r1->flags = WREPL_NAME_FLAGS(records[i].r1.type,
3891 records[i].r1.state,
3893 records[i].r1.is_static);
3894 wins_name_r1->id = ++records[i].r1.owner->max_version;
3895 if (wins_name_r1->flags & 2) {
3896 wins_name_r1->addresses.addresses.num_ips = records[i].r1.num_ips;
3897 wins_name_r1->addresses.addresses.ips = discard_const(records[i].r1.ips);
3899 wins_name_r1->addresses.ip = records[i].r1.ips[0].ip;
3901 wins_name_r1->unknown = "255.255.255.255";
3904 ret &= test_wrepl_update_one(ctx, records[i].r1.owner, wins_name_r1);
3905 ret &= test_wrepl_is_applied(ctx, records[i].r1.owner,
3906 wins_name_r1, records[i].r1.apply_expected);
3911 wins_name_r2->name = &records[i].name;
3912 wins_name_r2->flags = WREPL_NAME_FLAGS(records[i].r2.type,
3913 records[i].r2.state,
3915 records[i].r2.is_static);
3916 wins_name_r2->id = ++records[i].r2.owner->max_version;
3917 if (wins_name_r2->flags & 2) {
3918 wins_name_r2->addresses.addresses.num_ips = records[i].r2.num_ips;
3919 wins_name_r2->addresses.addresses.ips = discard_const(records[i].r2.ips);
3921 wins_name_r2->addresses.ip = records[i].r2.ips[0].ip;
3923 wins_name_r2->unknown = "255.255.255.255";
3926 ret &= test_wrepl_update_one(ctx, records[i].r2.owner, wins_name_r2);
3927 if (records[i].r1.state == WREPL_STATE_RELEASED) {
3928 ret &= test_wrepl_is_applied(ctx, records[i].r1.owner,
3929 wins_name_r1, False);
3930 } else if (records[i].r2.sgroup_merge) {
3931 ret &= test_wrepl_sgroup_merged(ctx,
3932 records[i].r1.owner,
3933 records[i].r1.num_ips, records[i].r1.ips,
3934 records[i].r2.owner,
3935 records[i].r2.num_ips, records[i].r2.ips,
3937 } else if (records[i].r1.owner != records[i].r2.owner) {
3939 _expected = (records[i].r1.apply_expected && !records[i].r2.apply_expected);
3940 ret &= test_wrepl_is_applied(ctx, records[i].r1.owner,
3941 wins_name_r1, _expected);
3943 if (records[i].r2.state == WREPL_STATE_RELEASED) {
3944 ret &= test_wrepl_is_applied(ctx, records[i].r2.owner,
3945 wins_name_r2, False);
3946 } else if (!records[i].r2.sgroup_merge) {
3947 ret &= test_wrepl_is_applied(ctx, records[i].r2.owner,
3948 wins_name_r2, records[i].r2.apply_expected);
3951 if (records[i].r2.sgroup_cleanup || records[i].r2.sgroup_merge) {
3952 /* clean up the SGROUP record */
3953 wins_name_r1->name = &records[i].name;
3954 wins_name_r1->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
3956 WREPL_NODE_B, False);
3957 wins_name_r1->id = ++records[i].r1.owner->max_version;
3958 wins_name_r1->addresses.addresses.num_ips = 0;
3959 wins_name_r1->addresses.addresses.ips = NULL;
3960 wins_name_r1->unknown = "255.255.255.255";
3961 ret &= test_wrepl_update_one(ctx, records[i].r1.owner, wins_name_r1);
3963 /* here we test how names from an owner are deleted */
3964 if (records[i].r2.sgroup_merge && records[i].r2.num_ips) {
3965 ret &= test_wrepl_sgroup_merged(ctx,
3966 records[i].r2.owner,
3967 records[i].r2.num_ips, records[i].r2.ips,
3968 records[i].r1.owner,
3973 /* clean up the SGROUP record */
3974 wins_name_r2->name = &records[i].name;
3975 wins_name_r2->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
3977 WREPL_NODE_B, False);
3978 wins_name_r2->id = ++records[i].r2.owner->max_version;
3979 wins_name_r2->addresses.addresses.num_ips = 0;
3980 wins_name_r2->addresses.addresses.ips = NULL;
3981 wins_name_r2->unknown = "255.255.255.255";
3982 ret &= test_wrepl_update_one(ctx, records[i].r2.owner, wins_name_r2);
3984 /* take ownership of the SGROUP record */
3985 wins_name_r2->name = &records[i].name;
3986 wins_name_r2->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
3988 WREPL_NODE_B, False);
3989 wins_name_r2->id = ++records[i].r2.owner->max_version;
3990 wins_name_r2->addresses.addresses.num_ips = ARRAY_SIZE(addresses_B_1);
3991 wins_name_r2->addresses.addresses.ips = discard_const(addresses_B_1);
3992 wins_name_r2->unknown = "255.255.255.255";
3993 ret &= test_wrepl_update_one(ctx, records[i].r2.owner, wins_name_r2);
3994 ret &= test_wrepl_is_applied(ctx, records[i].r2.owner, wins_name_r2, True);
3996 /* overwrite the SGROUP record with unique,tombstone */
3997 wins_name_r2->name = &records[i].name;
3998 wins_name_r2->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
3999 WREPL_STATE_TOMBSTONE,
4000 WREPL_NODE_B, False);
4001 wins_name_r2->id = ++records[i].r2.owner->max_version;
4002 wins_name_r2->addresses.addresses.num_ips = ARRAY_SIZE(addresses_B_1);
4003 wins_name_r2->addresses.addresses.ips = discard_const(addresses_B_1);
4004 wins_name_r2->unknown = "255.255.255.255";
4005 ret &= test_wrepl_update_one(ctx, records[i].r2.owner, wins_name_r2);
4006 ret &= test_wrepl_is_applied(ctx, records[i].r2.owner, wins_name_r2, True);
4009 /* the first one is a cleanup run */
4010 if (!ret && i == 0) ret = True;
4013 printf("conflict handled wrong or record[%u]: %s\n", i, records[i].line);
4021 static BOOL test_conflict_owned_released_vs_replica(struct test_wrepl_conflict_conn *ctx)
4025 struct wrepl_wins_name wins_name_;
4026 struct wrepl_wins_name *wins_name = &wins_name_;
4027 struct nbt_name_register name_register_;
4028 struct nbt_name_register *name_register = &name_register_;
4029 struct nbt_name_release release_;
4030 struct nbt_name_release *release = &release_;
4033 const char *line; /* just better debugging */
4034 struct nbt_name name;
4039 const struct wrepl_ip *ips;
4040 BOOL apply_expected;
4043 enum wrepl_name_type type;
4044 enum wrepl_name_state state;
4045 enum wrepl_name_node node;
4048 const struct wrepl_ip *ips;
4049 BOOL apply_expected;
4053 * unique vs. unique section
4056 * unique,released vs. unique,active with same ip(s)
4059 .line = __location__,
4060 .name = _NBT_NAME("_UR_UA_SI", 0x00, NULL),
4064 .num_ips = ctx->addresses_best_num,
4065 .ips = ctx->addresses_best,
4066 .apply_expected = True
4069 .type = WREPL_TYPE_UNIQUE,
4070 .state = WREPL_STATE_ACTIVE,
4071 .node = WREPL_NODE_B,
4073 .num_ips = ctx->addresses_best_num,
4074 .ips = ctx->addresses_best,
4075 .apply_expected = True
4079 * unique,released vs. unique,active with different ip(s)
4082 .line = __location__,
4083 .name = _NBT_NAME("_UR_UA_DI", 0x00, NULL),
4087 .num_ips = ctx->addresses_best_num,
4088 .ips = ctx->addresses_best,
4089 .apply_expected = True
4092 .type = WREPL_TYPE_UNIQUE,
4093 .state = WREPL_STATE_ACTIVE,
4094 .node = WREPL_NODE_B,
4096 .num_ips = ARRAY_SIZE(addresses_B_1),
4097 .ips = addresses_B_1,
4098 .apply_expected = True
4102 * unique,released vs. unique,tombstone with same ip(s)
4105 .line = __location__,
4106 .name = _NBT_NAME("_UR_UT_SI", 0x00, NULL),
4110 .num_ips = ctx->addresses_best_num,
4111 .ips = ctx->addresses_best,
4112 .apply_expected = True
4115 .type = WREPL_TYPE_UNIQUE,
4116 .state = WREPL_STATE_TOMBSTONE,
4117 .node = WREPL_NODE_B,
4119 .num_ips = ctx->addresses_best_num,
4120 .ips = ctx->addresses_best,
4121 .apply_expected = True
4125 * unique,released vs. unique,tombstone with different ip(s)
4128 .line = __location__,
4129 .name = _NBT_NAME("_UR_UT_DI", 0x00, NULL),
4133 .num_ips = ctx->addresses_best_num,
4134 .ips = ctx->addresses_best,
4135 .apply_expected = True
4138 .type = WREPL_TYPE_UNIQUE,
4139 .state = WREPL_STATE_TOMBSTONE,
4140 .node = WREPL_NODE_B,
4142 .num_ips = ARRAY_SIZE(addresses_B_1),
4143 .ips = addresses_B_1,
4144 .apply_expected = True
4148 * unique vs. group section
4151 * unique,released vs. group,active with same ip(s)
4154 .line = __location__,
4155 .name = _NBT_NAME("_UR_GA_SI", 0x00, NULL),
4159 .num_ips = ctx->addresses_best_num,
4160 .ips = ctx->addresses_best,
4161 .apply_expected = True
4164 .type = WREPL_TYPE_GROUP,
4165 .state = WREPL_STATE_ACTIVE,
4166 .node = WREPL_NODE_B,
4168 .num_ips = ctx->addresses_best_num,
4169 .ips = ctx->addresses_best,
4170 .apply_expected = True
4174 * unique,released vs. group,active with different ip(s)
4177 .line = __location__,
4178 .name = _NBT_NAME("_UR_GA_DI", 0x00, NULL),
4182 .num_ips = ctx->addresses_best_num,
4183 .ips = ctx->addresses_best,
4184 .apply_expected = True
4187 .type = WREPL_TYPE_GROUP,
4188 .state = WREPL_STATE_ACTIVE,
4189 .node = WREPL_NODE_B,
4191 .num_ips = ARRAY_SIZE(addresses_B_1),
4192 .ips = addresses_B_1,
4193 .apply_expected = True
4197 * unique,released vs. group,tombstone with same ip(s)
4200 .line = __location__,
4201 .name = _NBT_NAME("_UR_GT_SI", 0x00, NULL),
4205 .num_ips = ctx->addresses_best_num,
4206 .ips = ctx->addresses_best,
4207 .apply_expected = True
4210 .type = WREPL_TYPE_GROUP,
4211 .state = WREPL_STATE_TOMBSTONE,
4212 .node = WREPL_NODE_B,
4214 .num_ips = ctx->addresses_best_num,
4215 .ips = ctx->addresses_best,
4216 .apply_expected = True
4220 * unique,released vs. group,tombstone with different ip(s)
4223 .line = __location__,
4224 .name = _NBT_NAME("_UR_GT_DI", 0x00, NULL),
4228 .num_ips = ctx->addresses_best_num,
4229 .ips = ctx->addresses_best,
4230 .apply_expected = True
4233 .type = WREPL_TYPE_GROUP,
4234 .state = WREPL_STATE_TOMBSTONE,
4235 .node = WREPL_NODE_B,
4237 .num_ips = ARRAY_SIZE(addresses_B_1),
4238 .ips = addresses_B_1,
4239 .apply_expected = True
4243 * unique vs. special group section
4246 * unique,released vs. sgroup,active with same ip(s)
4249 .line = __location__,
4250 .name = _NBT_NAME("_UR_SA_SI", 0x00, NULL),
4254 .num_ips = ctx->addresses_best_num,
4255 .ips = ctx->addresses_best,
4256 .apply_expected = True
4259 .type = WREPL_TYPE_SGROUP,
4260 .state = WREPL_STATE_ACTIVE,
4261 .node = WREPL_NODE_B,
4263 .num_ips = ctx->addresses_best_num,
4264 .ips = ctx->addresses_best,
4265 .apply_expected = True
4269 * unique,released vs. sgroup,active with different ip(s)
4272 .line = __location__,
4273 .name = _NBT_NAME("_UR_SA_DI", 0x00, NULL),
4277 .num_ips = ctx->addresses_best_num,
4278 .ips = ctx->addresses_best,
4279 .apply_expected = True
4282 .type = WREPL_TYPE_SGROUP,
4283 .state = WREPL_STATE_ACTIVE,
4284 .node = WREPL_NODE_B,
4286 .num_ips = ARRAY_SIZE(addresses_B_1),
4287 .ips = addresses_B_1,
4288 .apply_expected = True
4292 * unique,released vs. sgroup,tombstone with same ip(s)
4295 .line = __location__,
4296 .name = _NBT_NAME("_UR_ST_SI", 0x00, NULL),
4300 .num_ips = ctx->addresses_best_num,
4301 .ips = ctx->addresses_best,
4302 .apply_expected = True
4305 .type = WREPL_TYPE_SGROUP,
4306 .state = WREPL_STATE_TOMBSTONE,
4307 .node = WREPL_NODE_B,
4309 .num_ips = ctx->addresses_best_num,
4310 .ips = ctx->addresses_best,
4311 .apply_expected = True
4315 * unique,released vs. sgroup,tombstone with different ip(s)
4318 .line = __location__,
4319 .name = _NBT_NAME("_UR_ST_DI", 0x00, NULL),
4323 .num_ips = ctx->addresses_best_num,
4324 .ips = ctx->addresses_best,
4325 .apply_expected = True
4328 .type = WREPL_TYPE_SGROUP,
4329 .state = WREPL_STATE_TOMBSTONE,
4330 .node = WREPL_NODE_B,
4332 .num_ips = ARRAY_SIZE(addresses_B_1),
4333 .ips = addresses_B_1,
4334 .apply_expected = True
4338 * unique vs. multi homed section
4341 * unique,released vs. mhomed,active with same ip(s)
4344 .line = __location__,
4345 .name = _NBT_NAME("_UR_MA_SI", 0x00, NULL),
4349 .num_ips = ctx->addresses_best_num,
4350 .ips = ctx->addresses_best,
4351 .apply_expected = True
4354 .type = WREPL_TYPE_MHOMED,
4355 .state = WREPL_STATE_ACTIVE,
4356 .node = WREPL_NODE_B,
4358 .num_ips = ctx->addresses_best_num,
4359 .ips = ctx->addresses_best,
4360 .apply_expected = True
4364 * unique,released vs. mhomed,active with different ip(s)
4367 .line = __location__,
4368 .name = _NBT_NAME("_UR_MA_DI", 0x00, NULL),
4372 .num_ips = ctx->addresses_best_num,
4373 .ips = ctx->addresses_best,
4374 .apply_expected = True
4377 .type = WREPL_TYPE_MHOMED,
4378 .state = WREPL_STATE_ACTIVE,
4379 .node = WREPL_NODE_B,
4381 .num_ips = ARRAY_SIZE(addresses_B_1),
4382 .ips = addresses_B_1,
4383 .apply_expected = True
4387 * unique,released vs. mhomed,tombstone with same ip(s)
4390 .line = __location__,
4391 .name = _NBT_NAME("_UR_MT_SI", 0x00, NULL),
4395 .num_ips = ctx->addresses_best_num,
4396 .ips = ctx->addresses_best,
4397 .apply_expected = True
4400 .type = WREPL_TYPE_MHOMED,
4401 .state = WREPL_STATE_TOMBSTONE,
4402 .node = WREPL_NODE_B,
4404 .num_ips = ctx->addresses_best_num,
4405 .ips = ctx->addresses_best,
4406 .apply_expected = True
4410 * unique,released vs. mhomed,tombstone with different ip(s)
4413 .line = __location__,
4414 .name = _NBT_NAME("_UR_MT_DI", 0x00, NULL),
4418 .num_ips = ctx->addresses_best_num,
4419 .ips = ctx->addresses_best,
4420 .apply_expected = True
4423 .type = WREPL_TYPE_MHOMED,
4424 .state = WREPL_STATE_TOMBSTONE,
4425 .node = WREPL_NODE_B,
4427 .num_ips = ARRAY_SIZE(addresses_B_1),
4428 .ips = addresses_B_1,
4429 .apply_expected = True
4433 * group vs. unique section
4436 * group,released vs. unique,active with same ip(s)
4439 .line = __location__,
4440 .name = _NBT_NAME("_GR_UA_SI", 0x00, NULL),
4442 .nb_flags = NBT_NM_GROUP,
4444 .num_ips = ctx->addresses_best_num,
4445 .ips = ctx->addresses_best,
4446 .apply_expected = True
4449 .type = WREPL_TYPE_UNIQUE,
4450 .state = WREPL_STATE_ACTIVE,
4451 .node = WREPL_NODE_B,
4453 .num_ips = ctx->addresses_best_num,
4454 .ips = ctx->addresses_best,
4455 .apply_expected = False
4459 * group,released vs. unique,active with different ip(s)
4462 .line = __location__,
4463 .name = _NBT_NAME("_GR_UA_DI", 0x00, NULL),
4465 .nb_flags = NBT_NM_GROUP,
4467 .num_ips = ctx->addresses_best_num,
4468 .ips = ctx->addresses_best,
4469 .apply_expected = True
4472 .type = WREPL_TYPE_UNIQUE,
4473 .state = WREPL_STATE_ACTIVE,
4474 .node = WREPL_NODE_B,
4476 .num_ips = ARRAY_SIZE(addresses_B_1),
4477 .ips = addresses_B_1,
4478 .apply_expected = False
4482 * group,released vs. unique,tombstone with same ip(s)
4485 .line = __location__,
4486 .name = _NBT_NAME("_GR_UT_SI", 0x00, NULL),
4488 .nb_flags = NBT_NM_GROUP,
4490 .num_ips = ctx->addresses_best_num,
4491 .ips = ctx->addresses_best,
4492 .apply_expected = True
4495 .type = WREPL_TYPE_UNIQUE,
4496 .state = WREPL_STATE_TOMBSTONE,
4497 .node = WREPL_NODE_B,
4499 .num_ips = ctx->addresses_best_num,
4500 .ips = ctx->addresses_best,
4501 .apply_expected = False
4505 * group,released vs. unique,tombstone with different ip(s)
4508 .line = __location__,
4509 .name = _NBT_NAME("_GR_UT_DI", 0x00, NULL),
4511 .nb_flags = NBT_NM_GROUP,
4513 .num_ips = ctx->addresses_best_num,
4514 .ips = ctx->addresses_best,
4515 .apply_expected = True
4518 .type = WREPL_TYPE_UNIQUE,
4519 .state = WREPL_STATE_TOMBSTONE,
4520 .node = WREPL_NODE_B,
4522 .num_ips = ARRAY_SIZE(addresses_B_1),
4523 .ips = addresses_B_1,
4524 .apply_expected = False
4528 * group vs. group section
4531 * group,released vs. group,active with same ip(s)
4534 .line = __location__,
4535 .name = _NBT_NAME("_GR_GA_SI", 0x00, NULL),
4537 .nb_flags = NBT_NM_GROUP,
4539 .num_ips = ctx->addresses_best_num,
4540 .ips = ctx->addresses_best,
4541 .apply_expected = True
4544 .type = WREPL_TYPE_GROUP,
4545 .state = WREPL_STATE_ACTIVE,
4546 .node = WREPL_NODE_B,
4548 .num_ips = ctx->addresses_best_num,
4549 .ips = ctx->addresses_best,
4550 .apply_expected = True
4554 * group,released vs. group,active with different ip(s)
4557 .line = __location__,
4558 .name = _NBT_NAME("_GR_GA_DI", 0x00, NULL),
4560 .nb_flags = NBT_NM_GROUP,
4562 .num_ips = ctx->addresses_best_num,
4563 .ips = ctx->addresses_best,
4564 .apply_expected = True
4567 .type = WREPL_TYPE_GROUP,
4568 .state = WREPL_STATE_ACTIVE,
4569 .node = WREPL_NODE_B,
4571 .num_ips = ARRAY_SIZE(addresses_B_1),
4572 .ips = addresses_B_1,
4573 .apply_expected = True
4577 * group,released vs. group,tombstone with same ip(s)
4580 .line = __location__,
4581 .name = _NBT_NAME("_GR_GT_SI", 0x00, NULL),
4583 .nb_flags = NBT_NM_GROUP,
4585 .num_ips = ctx->addresses_best_num,
4586 .ips = ctx->addresses_best,
4587 .apply_expected = True
4590 .type = WREPL_TYPE_GROUP,
4591 .state = WREPL_STATE_TOMBSTONE,
4592 .node = WREPL_NODE_B,
4594 .num_ips = ctx->addresses_best_num,
4595 .ips = ctx->addresses_best,
4596 .apply_expected = True
4600 * group,released vs. group,tombstone with different ip(s)
4603 .line = __location__,
4604 .name = _NBT_NAME("_GR_GT_DI", 0x00, NULL),
4606 .nb_flags = NBT_NM_GROUP,
4608 .num_ips = ctx->addresses_best_num,
4609 .ips = ctx->addresses_best,
4610 .apply_expected = True
4613 .type = WREPL_TYPE_GROUP,
4614 .state = WREPL_STATE_TOMBSTONE,
4615 .node = WREPL_NODE_B,
4617 .num_ips = ARRAY_SIZE(addresses_B_1),
4618 .ips = addresses_B_1,
4619 .apply_expected = True
4623 * group vs. special group section
4626 * group,released vs. sgroup,active with same ip(s)
4629 .line = __location__,
4630 .name = _NBT_NAME("_GR_SA_SI", 0x00, NULL),
4632 .nb_flags = NBT_NM_GROUP,
4634 .num_ips = ctx->addresses_best_num,
4635 .ips = ctx->addresses_best,
4636 .apply_expected = True
4639 .type = WREPL_TYPE_SGROUP,
4640 .state = WREPL_STATE_ACTIVE,
4641 .node = WREPL_NODE_B,
4643 .num_ips = ctx->addresses_best_num,
4644 .ips = ctx->addresses_best,
4645 .apply_expected = False
4649 * group,released vs. sgroup,active with different ip(s)
4652 .line = __location__,
4653 .name = _NBT_NAME("_GR_SA_DI", 0x00, NULL),
4655 .nb_flags = NBT_NM_GROUP,
4657 .num_ips = ctx->addresses_best_num,
4658 .ips = ctx->addresses_best,
4659 .apply_expected = True
4662 .type = WREPL_TYPE_SGROUP,
4663 .state = WREPL_STATE_ACTIVE,
4664 .node = WREPL_NODE_B,
4666 .num_ips = ARRAY_SIZE(addresses_B_1),
4667 .ips = addresses_B_1,
4668 .apply_expected = False
4672 * group,released vs. sgroup,tombstone with same ip(s)
4675 .line = __location__,
4676 .name = _NBT_NAME("_GR_ST_SI", 0x00, NULL),
4678 .nb_flags = NBT_NM_GROUP,
4680 .num_ips = ctx->addresses_best_num,
4681 .ips = ctx->addresses_best,
4682 .apply_expected = True
4685 .type = WREPL_TYPE_SGROUP,
4686 .state = WREPL_STATE_TOMBSTONE,
4687 .node = WREPL_NODE_B,
4689 .num_ips = ctx->addresses_best_num,
4690 .ips = ctx->addresses_best,
4691 .apply_expected = False
4695 * group,released vs. sgroup,tombstone with different ip(s)
4698 .line = __location__,
4699 .name = _NBT_NAME("_GR_ST_DI", 0x00, NULL),
4701 .nb_flags = NBT_NM_GROUP,
4703 .num_ips = ctx->addresses_best_num,
4704 .ips = ctx->addresses_best,
4705 .apply_expected = True
4708 .type = WREPL_TYPE_SGROUP,
4709 .state = WREPL_STATE_TOMBSTONE,
4710 .node = WREPL_NODE_B,
4712 .num_ips = ARRAY_SIZE(addresses_B_1),
4713 .ips = addresses_B_1,
4714 .apply_expected = False
4718 * group vs. multi homed section
4721 * group,released vs. mhomed,active with same ip(s)
4724 .line = __location__,
4725 .name = _NBT_NAME("_GR_MA_SI", 0x00, NULL),
4727 .nb_flags = NBT_NM_GROUP,
4729 .num_ips = ctx->addresses_best_num,
4730 .ips = ctx->addresses_best,
4731 .apply_expected = True
4734 .type = WREPL_TYPE_MHOMED,
4735 .state = WREPL_STATE_ACTIVE,
4736 .node = WREPL_NODE_B,
4738 .num_ips = ctx->addresses_best_num,
4739 .ips = ctx->addresses_best,
4740 .apply_expected = False
4744 * group,released vs. mhomed,active with different ip(s)
4747 .line = __location__,
4748 .name = _NBT_NAME("_GR_MA_DI", 0x00, NULL),
4750 .nb_flags = NBT_NM_GROUP,
4752 .num_ips = ctx->addresses_best_num,
4753 .ips = ctx->addresses_best,
4754 .apply_expected = True
4757 .type = WREPL_TYPE_MHOMED,
4758 .state = WREPL_STATE_ACTIVE,
4759 .node = WREPL_NODE_B,
4761 .num_ips = ARRAY_SIZE(addresses_B_1),
4762 .ips = addresses_B_1,
4763 .apply_expected = False
4767 * group,released vs. mhomed,tombstone with same ip(s)
4770 .line = __location__,
4771 .name = _NBT_NAME("_GR_MT_SI", 0x00, NULL),
4773 .nb_flags = NBT_NM_GROUP,
4775 .num_ips = ctx->addresses_best_num,
4776 .ips = ctx->addresses_best,
4777 .apply_expected = True
4780 .type = WREPL_TYPE_MHOMED,
4781 .state = WREPL_STATE_TOMBSTONE,
4782 .node = WREPL_NODE_B,
4784 .num_ips = ctx->addresses_best_num,
4785 .ips = ctx->addresses_best,
4786 .apply_expected = False
4790 * group,released vs. mhomed,tombstone with different ip(s)
4793 .line = __location__,
4794 .name = _NBT_NAME("_GR_MT_DI", 0x00, NULL),
4796 .nb_flags = NBT_NM_GROUP,
4798 .num_ips = ctx->addresses_best_num,
4799 .ips = ctx->addresses_best,
4800 .apply_expected = True
4803 .type = WREPL_TYPE_MHOMED,
4804 .state = WREPL_STATE_TOMBSTONE,
4805 .node = WREPL_NODE_B,
4807 .num_ips = ARRAY_SIZE(addresses_B_1),
4808 .ips = addresses_B_1,
4809 .apply_expected = False
4813 * special group vs. unique section
4816 * sgroup,released vs. unique,active with same ip(s)
4819 .line = __location__,
4820 .name = _NBT_NAME("_SR_UA_SI", 0x1C, NULL),
4822 .nb_flags = NBT_NM_GROUP,
4824 .num_ips = ctx->addresses_best_num,
4825 .ips = ctx->addresses_best,
4826 .apply_expected = True
4829 .type = WREPL_TYPE_UNIQUE,
4830 .state = WREPL_STATE_ACTIVE,
4831 .node = WREPL_NODE_B,
4833 .num_ips = ctx->addresses_best_num,
4834 .ips = ctx->addresses_best,
4835 .apply_expected = True
4839 * sgroup,released vs. unique,active with different ip(s)
4842 .line = __location__,
4843 .name = _NBT_NAME("_SR_UA_DI", 0x1C, NULL),
4845 .nb_flags = NBT_NM_GROUP,
4847 .num_ips = ctx->addresses_best_num,
4848 .ips = ctx->addresses_best,
4849 .apply_expected = True
4852 .type = WREPL_TYPE_UNIQUE,
4853 .state = WREPL_STATE_ACTIVE,
4854 .node = WREPL_NODE_B,
4856 .num_ips = ARRAY_SIZE(addresses_B_1),
4857 .ips = addresses_B_1,
4858 .apply_expected = True
4862 * sgroup,released vs. unique,tombstone with same ip(s)
4865 .line = __location__,
4866 .name = _NBT_NAME("_SR_UT_SI", 0x1C, NULL),
4868 .nb_flags = NBT_NM_GROUP,
4870 .num_ips = ctx->addresses_best_num,
4871 .ips = ctx->addresses_best,
4872 .apply_expected = True
4875 .type = WREPL_TYPE_UNIQUE,
4876 .state = WREPL_STATE_TOMBSTONE,
4877 .node = WREPL_NODE_B,
4879 .num_ips = ctx->addresses_best_num,
4880 .ips = ctx->addresses_best,
4881 .apply_expected = True
4885 * sgroup,released vs. unique,tombstone with different ip(s)
4888 .line = __location__,
4889 .name = _NBT_NAME("_SR_UT_DI", 0x1C, NULL),
4891 .nb_flags = NBT_NM_GROUP,
4893 .num_ips = ctx->addresses_best_num,
4894 .ips = ctx->addresses_best,
4895 .apply_expected = True
4898 .type = WREPL_TYPE_UNIQUE,
4899 .state = WREPL_STATE_TOMBSTONE,
4900 .node = WREPL_NODE_B,
4902 .num_ips = ARRAY_SIZE(addresses_B_1),
4903 .ips = addresses_B_1,
4904 .apply_expected = True
4908 * special group vs. group section
4911 * sgroup,released vs. group,active with same ip(s)
4914 .line = __location__,
4915 .name = _NBT_NAME("_SR_GA_SI", 0x1C, NULL),
4917 .nb_flags = NBT_NM_GROUP,
4919 .num_ips = ctx->addresses_best_num,
4920 .ips = ctx->addresses_best,
4921 .apply_expected = True
4924 .type = WREPL_TYPE_GROUP,
4925 .state = WREPL_STATE_ACTIVE,
4926 .node = WREPL_NODE_B,
4928 .num_ips = ctx->addresses_best_num,
4929 .ips = ctx->addresses_best,
4930 .apply_expected = True
4934 * sgroup,released vs. group,active with different ip(s)
4937 .line = __location__,
4938 .name = _NBT_NAME("_SR_GA_DI", 0x1C, NULL),
4940 .nb_flags = NBT_NM_GROUP,
4942 .num_ips = ctx->addresses_best_num,
4943 .ips = ctx->addresses_best,
4944 .apply_expected = True
4947 .type = WREPL_TYPE_GROUP,
4948 .state = WREPL_STATE_ACTIVE,
4949 .node = WREPL_NODE_B,
4951 .num_ips = ARRAY_SIZE(addresses_B_1),
4952 .ips = addresses_B_1,
4953 .apply_expected = True
4957 * sgroup,released vs. group,tombstone with same ip(s)
4960 .line = __location__,
4961 .name = _NBT_NAME("_SR_GT_SI", 0x1C, NULL),
4963 .nb_flags = NBT_NM_GROUP,
4965 .num_ips = ctx->addresses_best_num,
4966 .ips = ctx->addresses_best,
4967 .apply_expected = True
4970 .type = WREPL_TYPE_GROUP,
4971 .state = WREPL_STATE_TOMBSTONE,
4972 .node = WREPL_NODE_B,
4974 .num_ips = ctx->addresses_best_num,
4975 .ips = ctx->addresses_best,
4976 .apply_expected = True
4980 * sgroup,released vs. group,tombstone with different ip(s)
4983 .line = __location__,
4984 .name = _NBT_NAME("_SR_GT_DI", 0x1C, NULL),
4986 .nb_flags = NBT_NM_GROUP,
4988 .num_ips = ctx->addresses_best_num,
4989 .ips = ctx->addresses_best,
4990 .apply_expected = True
4993 .type = WREPL_TYPE_GROUP,
4994 .state = WREPL_STATE_TOMBSTONE,
4995 .node = WREPL_NODE_B,
4997 .num_ips = ARRAY_SIZE(addresses_B_1),
4998 .ips = addresses_B_1,
4999 .apply_expected = True
5003 * special group vs. special group section
5006 * sgroup,released vs. sgroup,active with same ip(s)
5009 .line = __location__,
5010 .name = _NBT_NAME("_SR_SA_SI", 0x1C, NULL),
5012 .nb_flags = NBT_NM_GROUP,
5014 .num_ips = ctx->addresses_best_num,
5015 .ips = ctx->addresses_best,
5016 .apply_expected = True
5019 .type = WREPL_TYPE_SGROUP,
5020 .state = WREPL_STATE_ACTIVE,
5021 .node = WREPL_NODE_B,
5023 .num_ips = ctx->addresses_best_num,
5024 .ips = ctx->addresses_best,
5025 .apply_expected = True
5029 * sgroup,released vs. sgroup,active with different ip(s)
5032 .line = __location__,
5033 .name = _NBT_NAME("_SR_SA_DI", 0x1C, NULL),
5035 .nb_flags = NBT_NM_GROUP,
5037 .num_ips = ctx->addresses_best_num,
5038 .ips = ctx->addresses_best,
5039 .apply_expected = True
5042 .type = WREPL_TYPE_SGROUP,
5043 .state = WREPL_STATE_ACTIVE,
5044 .node = WREPL_NODE_B,
5046 .num_ips = ARRAY_SIZE(addresses_B_1),
5047 .ips = addresses_B_1,
5048 .apply_expected = True
5052 * sgroup,released vs. sgroup,tombstone with same ip(s)
5055 .line = __location__,
5056 .name = _NBT_NAME("_SR_ST_SI", 0x1C, NULL),
5058 .nb_flags = NBT_NM_GROUP,
5060 .num_ips = ctx->addresses_best_num,
5061 .ips = ctx->addresses_best,
5062 .apply_expected = True
5065 .type = WREPL_TYPE_SGROUP,
5066 .state = WREPL_STATE_TOMBSTONE,
5067 .node = WREPL_NODE_B,
5069 .num_ips = ctx->addresses_best_num,
5070 .ips = ctx->addresses_best,
5071 .apply_expected = True
5075 * sgroup,released vs. sgroup,tombstone with different ip(s)
5078 .line = __location__,
5079 .name = _NBT_NAME("_SR_ST_DI", 0x1C, NULL),
5081 .nb_flags = NBT_NM_GROUP,
5083 .num_ips = ctx->addresses_best_num,
5084 .ips = ctx->addresses_best,
5085 .apply_expected = True
5088 .type = WREPL_TYPE_SGROUP,
5089 .state = WREPL_STATE_TOMBSTONE,
5090 .node = WREPL_NODE_B,
5092 .num_ips = ARRAY_SIZE(addresses_B_1),
5093 .ips = addresses_B_1,
5094 .apply_expected = True
5098 * special group vs. multi homed section
5101 * sgroup,released vs. mhomed,active with same ip(s)
5104 .line = __location__,
5105 .name = _NBT_NAME("_SR_MA_SI", 0x1C, NULL),
5107 .nb_flags = NBT_NM_GROUP,
5109 .num_ips = ctx->addresses_best_num,
5110 .ips = ctx->addresses_best,
5111 .apply_expected = True
5114 .type = WREPL_TYPE_MHOMED,
5115 .state = WREPL_STATE_ACTIVE,
5116 .node = WREPL_NODE_B,
5118 .num_ips = ctx->addresses_best_num,
5119 .ips = ctx->addresses_best,
5120 .apply_expected = True
5124 * sgroup,released vs. mhomed,active with different ip(s)
5127 .line = __location__,
5128 .name = _NBT_NAME("_SR_MA_DI", 0x1C, NULL),
5130 .nb_flags = NBT_NM_GROUP,
5132 .num_ips = ctx->addresses_best_num,
5133 .ips = ctx->addresses_best,
5134 .apply_expected = True
5137 .type = WREPL_TYPE_MHOMED,
5138 .state = WREPL_STATE_ACTIVE,
5139 .node = WREPL_NODE_B,
5141 .num_ips = ARRAY_SIZE(addresses_B_1),
5142 .ips = addresses_B_1,
5143 .apply_expected = True
5147 * sgroup,released vs. mhomed,tombstone with same ip(s)
5150 .line = __location__,
5151 .name = _NBT_NAME("_SR_MT_SI", 0x1C, NULL),
5153 .nb_flags = NBT_NM_GROUP,
5155 .num_ips = ctx->addresses_best_num,
5156 .ips = ctx->addresses_best,
5157 .apply_expected = True
5160 .type = WREPL_TYPE_MHOMED,
5161 .state = WREPL_STATE_TOMBSTONE,
5162 .node = WREPL_NODE_B,
5164 .num_ips = ctx->addresses_best_num,
5165 .ips = ctx->addresses_best,
5166 .apply_expected = True
5170 * sgroup,released vs. mhomed,tombstone with different ip(s)
5173 .line = __location__,
5174 .name = _NBT_NAME("_SR_MT_DI", 0x1C, NULL),
5176 .nb_flags = NBT_NM_GROUP,
5178 .num_ips = ctx->addresses_best_num,
5179 .ips = ctx->addresses_best,
5180 .apply_expected = True
5183 .type = WREPL_TYPE_MHOMED,
5184 .state = WREPL_STATE_TOMBSTONE,
5185 .node = WREPL_NODE_B,
5187 .num_ips = ARRAY_SIZE(addresses_B_1),
5188 .ips = addresses_B_1,
5189 .apply_expected = True
5193 * multi homed vs. unique section
5196 * mhomed,released vs. unique,active with same ip(s)
5199 .line = __location__,
5200 .name = _NBT_NAME("_MR_UA_SI", 0x00, NULL),
5204 .num_ips = ctx->addresses_best_num,
5205 .ips = ctx->addresses_best,
5206 .apply_expected = True
5209 .type = WREPL_TYPE_UNIQUE,
5210 .state = WREPL_STATE_ACTIVE,
5211 .node = WREPL_NODE_B,
5213 .num_ips = ctx->addresses_best_num,
5214 .ips = ctx->addresses_best,
5215 .apply_expected = True
5219 * mhomed,released vs. unique,active with different ip(s)
5222 .line = __location__,
5223 .name = _NBT_NAME("_MR_UA_DI", 0x00, NULL),
5227 .num_ips = ctx->addresses_best_num,
5228 .ips = ctx->addresses_best,
5229 .apply_expected = True
5232 .type = WREPL_TYPE_UNIQUE,
5233 .state = WREPL_STATE_ACTIVE,
5234 .node = WREPL_NODE_B,
5236 .num_ips = ARRAY_SIZE(addresses_B_1),
5237 .ips = addresses_B_1,
5238 .apply_expected = True
5242 * mhomed,released vs. unique,tombstone with same ip(s)
5245 .line = __location__,
5246 .name = _NBT_NAME("_MR_UT_SI", 0x00, NULL),
5250 .num_ips = ctx->addresses_best_num,
5251 .ips = ctx->addresses_best,
5252 .apply_expected = True
5255 .type = WREPL_TYPE_UNIQUE,
5256 .state = WREPL_STATE_TOMBSTONE,
5257 .node = WREPL_NODE_B,
5259 .num_ips = ctx->addresses_best_num,
5260 .ips = ctx->addresses_best,
5261 .apply_expected = True
5265 * mhomed,released vs. unique,tombstone with different ip(s)
5268 .line = __location__,
5269 .name = _NBT_NAME("_MR_UT_DI", 0x00, NULL),
5273 .num_ips = ctx->addresses_best_num,
5274 .ips = ctx->addresses_best,
5275 .apply_expected = True
5278 .type = WREPL_TYPE_UNIQUE,
5279 .state = WREPL_STATE_TOMBSTONE,
5280 .node = WREPL_NODE_B,
5282 .num_ips = ARRAY_SIZE(addresses_B_1),
5283 .ips = addresses_B_1,
5284 .apply_expected = True
5288 * multi homed vs. group section
5291 * mhomed,released vs. group,active with same ip(s)
5294 .line = __location__,
5295 .name = _NBT_NAME("_MR_GA_SI", 0x00, NULL),
5299 .num_ips = ctx->addresses_best_num,
5300 .ips = ctx->addresses_best,
5301 .apply_expected = True
5304 .type = WREPL_TYPE_GROUP,
5305 .state = WREPL_STATE_ACTIVE,
5306 .node = WREPL_NODE_B,
5308 .num_ips = ctx->addresses_best_num,
5309 .ips = ctx->addresses_best,
5310 .apply_expected = True
5314 * mhomed,released vs. group,active with different ip(s)
5317 .line = __location__,
5318 .name = _NBT_NAME("_MR_GA_DI", 0x00, NULL),
5322 .num_ips = ctx->addresses_best_num,
5323 .ips = ctx->addresses_best,
5324 .apply_expected = True
5327 .type = WREPL_TYPE_GROUP,
5328 .state = WREPL_STATE_ACTIVE,
5329 .node = WREPL_NODE_B,
5331 .num_ips = ARRAY_SIZE(addresses_B_1),
5332 .ips = addresses_B_1,
5333 .apply_expected = True
5337 * mhomed,released vs. group,tombstone with same ip(s)
5340 .line = __location__,
5341 .name = _NBT_NAME("_MR_GT_SI", 0x00, NULL),
5345 .num_ips = ctx->addresses_best_num,
5346 .ips = ctx->addresses_best,
5347 .apply_expected = True
5350 .type = WREPL_TYPE_GROUP,
5351 .state = WREPL_STATE_TOMBSTONE,
5352 .node = WREPL_NODE_B,
5354 .num_ips = ctx->addresses_best_num,
5355 .ips = ctx->addresses_best,
5356 .apply_expected = True
5360 * mhomed,released vs. group,tombstone with different ip(s)
5363 .line = __location__,
5364 .name = _NBT_NAME("_MR_GT_DI", 0x00, NULL),
5368 .num_ips = ctx->addresses_best_num,
5369 .ips = ctx->addresses_best,
5370 .apply_expected = True
5373 .type = WREPL_TYPE_GROUP,
5374 .state = WREPL_STATE_TOMBSTONE,
5375 .node = WREPL_NODE_B,
5377 .num_ips = ARRAY_SIZE(addresses_B_1),
5378 .ips = addresses_B_1,
5379 .apply_expected = True
5383 * multi homed vs. special group section
5386 * mhomed,released vs. sgroup,active with same ip(s)
5389 .line = __location__,
5390 .name = _NBT_NAME("_MR_SA_SI", 0x00, NULL),
5394 .num_ips = ctx->addresses_best_num,
5395 .ips = ctx->addresses_best,
5396 .apply_expected = True
5399 .type = WREPL_TYPE_SGROUP,
5400 .state = WREPL_STATE_ACTIVE,
5401 .node = WREPL_NODE_B,
5403 .num_ips = ctx->addresses_best_num,
5404 .ips = ctx->addresses_best,
5405 .apply_expected = True
5409 * mhomed,released vs. sgroup,active with different ip(s)
5412 .line = __location__,
5413 .name = _NBT_NAME("_MR_SA_DI", 0x00, NULL),
5417 .num_ips = ctx->addresses_best_num,
5418 .ips = ctx->addresses_best,
5419 .apply_expected = True
5422 .type = WREPL_TYPE_SGROUP,
5423 .state = WREPL_STATE_ACTIVE,
5424 .node = WREPL_NODE_B,
5426 .num_ips = ARRAY_SIZE(addresses_B_1),
5427 .ips = addresses_B_1,
5428 .apply_expected = True
5432 * mhomed,released vs. sgroup,tombstone with same ip(s)
5435 .line = __location__,
5436 .name = _NBT_NAME("_MR_ST_SI", 0x00, NULL),
5440 .num_ips = ctx->addresses_best_num,
5441 .ips = ctx->addresses_best,
5442 .apply_expected = True
5445 .type = WREPL_TYPE_SGROUP,
5446 .state = WREPL_STATE_TOMBSTONE,
5447 .node = WREPL_NODE_B,
5449 .num_ips = ctx->addresses_best_num,
5450 .ips = ctx->addresses_best,
5451 .apply_expected = True
5455 * mhomed,released vs. sgroup,tombstone with different ip(s)
5458 .line = __location__,
5459 .name = _NBT_NAME("_MR_ST_DI", 0x00, NULL),
5463 .num_ips = ctx->addresses_best_num,
5464 .ips = ctx->addresses_best,
5465 .apply_expected = True
5468 .type = WREPL_TYPE_SGROUP,
5469 .state = WREPL_STATE_TOMBSTONE,
5470 .node = WREPL_NODE_B,
5472 .num_ips = ARRAY_SIZE(addresses_B_1),
5473 .ips = addresses_B_1,
5474 .apply_expected = True
5478 * multi homed vs. multi homed section
5481 * mhomed,released vs. mhomed,active with same ip(s)
5484 .line = __location__,
5485 .name = _NBT_NAME("_MR_MA_SI", 0x00, NULL),
5489 .num_ips = ctx->addresses_best_num,
5490 .ips = ctx->addresses_best,
5491 .apply_expected = True
5494 .type = WREPL_TYPE_MHOMED,
5495 .state = WREPL_STATE_ACTIVE,
5496 .node = WREPL_NODE_B,
5498 .num_ips = ctx->addresses_best_num,
5499 .ips = ctx->addresses_best,
5500 .apply_expected = True
5504 * mhomed,released vs. mhomed,active with different ip(s)
5507 .line = __location__,
5508 .name = _NBT_NAME("_MR_MA_DI", 0x00, NULL),
5512 .num_ips = ctx->addresses_best_num,
5513 .ips = ctx->addresses_best,
5514 .apply_expected = True
5517 .type = WREPL_TYPE_MHOMED,
5518 .state = WREPL_STATE_ACTIVE,
5519 .node = WREPL_NODE_B,
5521 .num_ips = ARRAY_SIZE(addresses_B_1),
5522 .ips = addresses_B_1,
5523 .apply_expected = True
5527 * mhomed,released vs. mhomed,tombstone with same ip(s)
5530 .line = __location__,
5531 .name = _NBT_NAME("_MR_MT_SI", 0x00, NULL),
5535 .num_ips = ctx->addresses_best_num,
5536 .ips = ctx->addresses_best,
5537 .apply_expected = True
5540 .type = WREPL_TYPE_MHOMED,
5541 .state = WREPL_STATE_TOMBSTONE,
5542 .node = WREPL_NODE_B,
5544 .num_ips = ctx->addresses_best_num,
5545 .ips = ctx->addresses_best,
5546 .apply_expected = True
5550 * mhomed,released vs. mhomed,tombstone with different ip(s)
5553 .line = __location__,
5554 .name = _NBT_NAME("_MR_MT_DI", 0x00, NULL),
5558 .num_ips = ctx->addresses_best_num,
5559 .ips = ctx->addresses_best,
5560 .apply_expected = True
5563 .type = WREPL_TYPE_MHOMED,
5564 .state = WREPL_STATE_TOMBSTONE,
5565 .node = WREPL_NODE_B,
5567 .num_ips = ARRAY_SIZE(addresses_B_1),
5568 .ips = addresses_B_1,
5569 .apply_expected = True
5574 if (!ctx) return False;
5576 printf("Test Replica records vs. owned released records\n");
5578 for(i=0; ret && i < ARRAY_SIZE(records); i++) {
5579 printf("%s => %s\n", nbt_name_string(ctx, &records[i].name),
5580 (records[i].replica.apply_expected?"REPLACE":"NOT REPLACE"));
5585 name_register->in.name = records[i].name;
5586 name_register->in.dest_addr = ctx->address;
5587 name_register->in.address = records[i].wins.ips[0].ip;
5588 name_register->in.nb_flags = records[i].wins.nb_flags;
5589 name_register->in.register_demand= False;
5590 name_register->in.broadcast = False;
5591 name_register->in.multi_homed = records[i].wins.mhomed;
5592 name_register->in.ttl = 300000;
5593 name_register->in.timeout = 70;
5594 name_register->in.retries = 0;
5596 status = nbt_name_register(ctx->nbtsock, ctx, name_register);
5597 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
5598 printf("No response from %s for name register\n", ctx->address);
5601 if (!NT_STATUS_IS_OK(status)) {
5602 printf("Bad response from %s for name register - %s\n",
5603 ctx->address, nt_errstr(status));
5606 CHECK_VALUE(name_register->out.rcode, 0);
5607 CHECK_VALUE_STRING(name_register->out.reply_from, ctx->address);
5608 CHECK_VALUE(name_register->out.name.type, records[i].name.type);
5609 CHECK_VALUE_STRING(name_register->out.name.name, records[i].name.name);
5610 CHECK_VALUE_STRING(name_register->out.name.scope, records[i].name.scope);
5611 CHECK_VALUE_STRING(name_register->out.reply_addr, records[i].wins.ips[0].ip);
5613 /* release the record */
5614 release->in.name = records[i].name;
5615 release->in.dest_addr = ctx->address;
5616 release->in.address = records[i].wins.ips[0].ip;
5617 release->in.nb_flags = records[i].wins.nb_flags;
5618 release->in.broadcast = False;
5619 release->in.timeout = 30;
5620 release->in.retries = 0;
5622 status = nbt_name_release(ctx->nbtsock, ctx, release);
5623 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
5624 printf("No response from %s for name release\n", ctx->address);
5627 if (!NT_STATUS_IS_OK(status)) {
5628 printf("Bad response from %s for name query - %s\n",
5629 ctx->address, nt_errstr(status));
5632 CHECK_VALUE(release->out.rcode, 0);
5637 wins_name->name = &records[i].name;
5638 wins_name->flags = WREPL_NAME_FLAGS(records[i].replica.type,
5639 records[i].replica.state,
5640 records[i].replica.node,
5641 records[i].replica.is_static);
5642 wins_name->id = ++ctx->b.max_version;
5643 if (wins_name->flags & 2) {
5644 wins_name->addresses.addresses.num_ips = records[i].replica.num_ips;
5645 wins_name->addresses.addresses.ips = discard_const(records[i].replica.ips);
5647 wins_name->addresses.ip = records[i].replica.ips[0].ip;
5649 wins_name->unknown = "255.255.255.255";
5651 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
5652 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name,
5653 records[i].replica.apply_expected);
5655 if (records[i].replica.apply_expected) {
5656 wins_name->name = &records[i].name;
5657 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE,
5658 WREPL_STATE_TOMBSTONE,
5659 WREPL_NODE_B, False);
5660 wins_name->id = ++ctx->b.max_version;
5661 wins_name->addresses.ip = addresses_B_1[0].ip;
5662 wins_name->unknown = "255.255.255.255";
5664 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
5665 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name, True);
5667 release->in.name = records[i].name;
5668 release->in.dest_addr = ctx->address;
5669 release->in.address = records[i].wins.ips[0].ip;
5670 release->in.nb_flags = records[i].wins.nb_flags;
5671 release->in.broadcast = False;
5672 release->in.timeout = 30;
5673 release->in.retries = 0;
5675 status = nbt_name_release(ctx->nbtsock, ctx, release);
5676 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
5677 printf("No response from %s for name release\n", ctx->address);
5680 if (!NT_STATUS_IS_OK(status)) {
5681 printf("Bad response from %s for name query - %s\n",
5682 ctx->address, nt_errstr(status));
5685 CHECK_VALUE(release->out.rcode, 0);
5689 printf("conflict handled wrong or record[%u]: %s\n", i, records[i].line);
5697 struct test_conflict_owned_active_vs_replica_struct {
5698 const char *line; /* just better debugging */
5699 const char *section; /* just better debugging */
5700 struct nbt_name name;
5706 const struct wrepl_ip *ips;
5707 BOOL apply_expected;
5712 BOOL expect_release;
5715 /* when num_ips == 0, then .wins.ips are used */
5717 const struct wrepl_ip *ips;
5720 enum wrepl_name_type type;
5721 enum wrepl_name_state state;
5722 enum wrepl_name_node node;
5725 const struct wrepl_ip *ips;
5726 BOOL apply_expected;
5732 static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket *nbtsock,
5733 struct nbt_name_packet *req_packet,
5734 const struct nbt_peer_socket *src);
5736 static BOOL test_conflict_owned_active_vs_replica(struct test_wrepl_conflict_conn *ctx)
5740 struct wrepl_wins_name wins_name_;
5741 struct wrepl_wins_name *wins_name = &wins_name_;
5742 struct nbt_name_register name_register_;
5743 struct nbt_name_register *name_register = &name_register_;
5744 struct nbt_name_release release_;
5745 struct nbt_name_release *release = &release_;
5747 struct test_conflict_owned_active_vs_replica_struct records[] = {
5749 * unique vs. unique section
5752 * unique,active vs. unique,active with same ip(s), unchecked
5755 .line = __location__,
5756 .name = _NBT_NAME("_UA_UA_SI_U", 0x00, NULL),
5760 .num_ips = ctx->addresses_best_num,
5761 .ips = ctx->addresses_best,
5762 .apply_expected = True
5768 .type = WREPL_TYPE_UNIQUE,
5769 .state = WREPL_STATE_ACTIVE,
5770 .node = WREPL_NODE_B,
5772 .num_ips = ctx->addresses_best_num,
5773 .ips = ctx->addresses_best,
5774 .apply_expected = True
5778 * unique,active vs. unique,active with different ip(s), positive response
5781 .line = __location__,
5782 .name = _NBT_NAME("_UA_UA_DI_P", 0x00, NULL),
5786 .num_ips = ctx->addresses_best_num,
5787 .ips = ctx->addresses_best,
5788 .apply_expected = True
5795 .type = WREPL_TYPE_UNIQUE,
5796 .state = WREPL_STATE_ACTIVE,
5797 .node = WREPL_NODE_B,
5799 .num_ips = ARRAY_SIZE(addresses_B_1),
5800 .ips = addresses_B_1,
5801 .apply_expected = False
5805 * unique,active vs. unique,active with different ip(s), positive response other ips
5808 .line = __location__,
5809 .name = _NBT_NAME("_UA_UA_DI_O", 0x00, NULL),
5813 .num_ips = ctx->addresses_best_num,
5814 .ips = ctx->addresses_best,
5815 .apply_expected = True
5820 .num_ips = ARRAY_SIZE(addresses_A_3_4),
5821 .ips = addresses_A_3_4,
5824 .type = WREPL_TYPE_UNIQUE,
5825 .state = WREPL_STATE_ACTIVE,
5826 .node = WREPL_NODE_B,
5828 .num_ips = ARRAY_SIZE(addresses_B_1),
5829 .ips = addresses_B_1,
5830 .apply_expected = False
5834 * unique,active vs. unique,active with different ip(s), negative response
5837 .line = __location__,
5838 .name = _NBT_NAME("_UA_UA_DI_N", 0x00, NULL),
5842 .num_ips = ctx->addresses_best_num,
5843 .ips = ctx->addresses_best,
5844 .apply_expected = True
5851 .type = WREPL_TYPE_UNIQUE,
5852 .state = WREPL_STATE_ACTIVE,
5853 .node = WREPL_NODE_B,
5855 .num_ips = ARRAY_SIZE(addresses_B_1),
5856 .ips = addresses_B_1,
5857 .apply_expected = True
5861 * unique,active vs. unique,tombstone with same ip(s), unchecked
5864 .line = __location__,
5865 .name = _NBT_NAME("_UA_UT_SI_U", 0x00, NULL),
5869 .num_ips = ctx->addresses_best_num,
5870 .ips = ctx->addresses_best,
5871 .apply_expected = True
5877 .type = WREPL_TYPE_UNIQUE,
5878 .state = WREPL_STATE_TOMBSTONE,
5879 .node = WREPL_NODE_B,
5881 .num_ips = ctx->addresses_best_num,
5882 .ips = ctx->addresses_best,
5883 .apply_expected = False
5887 * unique,active vs. unique,tombstone with different ip(s), unchecked
5890 .line = __location__,
5891 .name = _NBT_NAME("_UA_UT_DI_U", 0x00, NULL),
5895 .num_ips = ctx->addresses_best_num,
5896 .ips = ctx->addresses_best,
5897 .apply_expected = True
5903 .type = WREPL_TYPE_UNIQUE,
5904 .state = WREPL_STATE_TOMBSTONE,
5905 .node = WREPL_NODE_B,
5907 .num_ips = ARRAY_SIZE(addresses_B_1),
5908 .ips = addresses_B_1,
5909 .apply_expected = False
5913 * unique vs. group section
5916 * unique,active vs. group,active with same ip(s), release expected
5919 .line = __location__,
5920 .name = _NBT_NAME("_UA_GA_SI_R", 0x00, NULL),
5924 .num_ips = ctx->addresses_best_num,
5925 .ips = ctx->addresses_best,
5926 .apply_expected = True
5930 .expect_release = True,
5933 .type = WREPL_TYPE_GROUP,
5934 .state = WREPL_STATE_ACTIVE,
5935 .node = WREPL_NODE_B,
5937 .num_ips = ctx->addresses_best_num,
5938 .ips = ctx->addresses_best,
5939 .apply_expected = True
5943 * unique,active vs. group,active with different ip(s), release expected
5946 .line = __location__,
5947 .name = _NBT_NAME("_UA_GA_DI_R", 0x00, NULL),
5951 .num_ips = ctx->addresses_best_num,
5952 .ips = ctx->addresses_best,
5953 .apply_expected = True
5957 .expect_release = True,
5960 .type = WREPL_TYPE_GROUP,
5961 .state = WREPL_STATE_ACTIVE,
5962 .node = WREPL_NODE_B,
5964 .num_ips = ARRAY_SIZE(addresses_B_1),
5965 .ips = addresses_B_1,
5966 .apply_expected = True
5970 * unique,active vs. group,tombstone with same ip(s), unchecked
5973 .line = __location__,
5974 .name = _NBT_NAME("_UA_GT_SI_U", 0x00, NULL),
5978 .num_ips = ctx->addresses_best_num,
5979 .ips = ctx->addresses_best,
5980 .apply_expected = True
5986 .type = WREPL_TYPE_GROUP,
5987 .state = WREPL_STATE_TOMBSTONE,
5988 .node = WREPL_NODE_B,
5990 .num_ips = ctx->addresses_best_num,
5991 .ips = ctx->addresses_best,
5992 .apply_expected = False
5996 * unique,active vs. group,tombstone with different ip(s), unchecked
5999 .line = __location__,
6000 .name = _NBT_NAME("_UA_GT_DI_U", 0x00, NULL),
6004 .num_ips = ctx->addresses_best_num,
6005 .ips = ctx->addresses_best,
6006 .apply_expected = True
6012 .type = WREPL_TYPE_GROUP,
6013 .state = WREPL_STATE_TOMBSTONE,
6014 .node = WREPL_NODE_B,
6016 .num_ips = ARRAY_SIZE(addresses_B_1),
6017 .ips = addresses_B_1,
6018 .apply_expected = False
6022 * unique vs. special group section
6025 * unique,active vs. sgroup,active with same ip(s), release expected
6028 .line = __location__,
6029 .name = _NBT_NAME("_UA_SA_SI_R", 0x00, NULL),
6033 .num_ips = ctx->addresses_best_num,
6034 .ips = ctx->addresses_best,
6035 .apply_expected = True
6039 .expect_release = True,
6042 .type = WREPL_TYPE_SGROUP,
6043 .state = WREPL_STATE_ACTIVE,
6044 .node = WREPL_NODE_B,
6046 .num_ips = ctx->addresses_best_num,
6047 .ips = ctx->addresses_best,
6048 .apply_expected = True
6052 * unique,active vs. group,active with different ip(s), release expected
6055 .line = __location__,
6056 .name = _NBT_NAME("_UA_SA_DI_R", 0x00, NULL),
6060 .num_ips = ctx->addresses_best_num,
6061 .ips = ctx->addresses_best,
6062 .apply_expected = True
6066 .expect_release = True,
6069 .type = WREPL_TYPE_SGROUP,
6070 .state = WREPL_STATE_ACTIVE,
6071 .node = WREPL_NODE_B,
6073 .num_ips = ARRAY_SIZE(addresses_B_1),
6074 .ips = addresses_B_1,
6075 .apply_expected = True
6079 * unique,active vs. sgroup,tombstone with same ip(s), unchecked
6082 .line = __location__,
6083 .name = _NBT_NAME("_UA_ST_SI_U", 0x00, NULL),
6087 .num_ips = ctx->addresses_best_num,
6088 .ips = ctx->addresses_best,
6089 .apply_expected = True
6095 .type = WREPL_TYPE_SGROUP,
6096 .state = WREPL_STATE_TOMBSTONE,
6097 .node = WREPL_NODE_B,
6099 .num_ips = ctx->addresses_best_num,
6100 .ips = ctx->addresses_best,
6101 .apply_expected = False
6105 * unique,active vs. sgroup,tombstone with different ip(s), unchecked
6108 .line = __location__,
6109 .name = _NBT_NAME("_UA_ST_DI_U", 0x00, NULL),
6113 .num_ips = ctx->addresses_best_num,
6114 .ips = ctx->addresses_best,
6115 .apply_expected = True
6121 .type = WREPL_TYPE_SGROUP,
6122 .state = WREPL_STATE_TOMBSTONE,
6123 .node = WREPL_NODE_B,
6125 .num_ips = ARRAY_SIZE(addresses_B_1),
6126 .ips = addresses_B_1,
6127 .apply_expected = False
6131 * unique vs. multi homed section
6134 * unique,active vs. mhomed,active with same ip(s), unchecked
6137 .line = __location__,
6138 .name = _NBT_NAME("_UA_MA_SI_U", 0x00, NULL),
6142 .num_ips = ctx->addresses_best_num,
6143 .ips = ctx->addresses_best,
6144 .apply_expected = True
6150 .type = WREPL_TYPE_MHOMED,
6151 .state = WREPL_STATE_ACTIVE,
6152 .node = WREPL_NODE_B,
6154 .num_ips = ctx->addresses_best_num,
6155 .ips = ctx->addresses_best,
6156 .apply_expected = True
6160 * unique,active vs. mhomed,active with superset ip(s), unchecked
6163 .line = __location__,
6164 .name = _NBT_NAME("_UA_MA_SP_U", 0x00, NULL),
6168 .num_ips = ctx->addresses_best_num,
6169 .ips = ctx->addresses_best,
6170 .apply_expected = True
6176 .type = WREPL_TYPE_MHOMED,
6177 .state = WREPL_STATE_ACTIVE,
6178 .node = WREPL_NODE_B,
6180 .num_ips = ctx->addresses_all_num,
6181 .ips = ctx->addresses_all,
6182 .apply_expected = True
6186 * unique,active vs. mhomed,active with different ip(s), positive response
6189 .line = __location__,
6190 .name = _NBT_NAME("_UA_MA_DI_P", 0x00, NULL),
6194 .num_ips = ctx->addresses_best_num,
6195 .ips = ctx->addresses_best,
6196 .apply_expected = True
6203 .type = WREPL_TYPE_MHOMED,
6204 .state = WREPL_STATE_ACTIVE,
6205 .node = WREPL_NODE_B,
6207 .num_ips = ARRAY_SIZE(addresses_B_3_4),
6208 .ips = addresses_B_3_4,
6209 .apply_expected = False
6213 * unique,active vs. mhomed,active with different ip(s), positive response other ips
6216 .line = __location__,
6217 .name = _NBT_NAME("_UA_MA_DI_O", 0x00, NULL),
6221 .num_ips = ctx->addresses_best_num,
6222 .ips = ctx->addresses_best,
6223 .apply_expected = True
6228 .num_ips = ARRAY_SIZE(addresses_A_3_4),
6229 .ips = addresses_A_3_4,
6232 .type = WREPL_TYPE_MHOMED,
6233 .state = WREPL_STATE_ACTIVE,
6234 .node = WREPL_NODE_B,
6236 .num_ips = ARRAY_SIZE(addresses_B_3_4),
6237 .ips = addresses_B_3_4,
6238 .apply_expected = False
6242 * unique,active vs. mhomed,active with different ip(s), negative response
6245 .line = __location__,
6246 .name = _NBT_NAME("_UA_MA_DI_N", 0x00, NULL),
6250 .num_ips = ctx->addresses_best_num,
6251 .ips = ctx->addresses_best,
6252 .apply_expected = True
6259 .type = WREPL_TYPE_MHOMED,
6260 .state = WREPL_STATE_ACTIVE,
6261 .node = WREPL_NODE_B,
6263 .num_ips = ARRAY_SIZE(addresses_B_3_4),
6264 .ips = addresses_B_3_4,
6265 .apply_expected = True
6269 * unique,active vs. mhomed,tombstone with same ip(s), unchecked
6272 .line = __location__,
6273 .name = _NBT_NAME("_UA_MT_SI_U", 0x00, NULL),
6277 .num_ips = ctx->addresses_best_num,
6278 .ips = ctx->addresses_best,
6279 .apply_expected = True
6285 .type = WREPL_TYPE_MHOMED,
6286 .state = WREPL_STATE_TOMBSTONE,
6287 .node = WREPL_NODE_B,
6289 .num_ips = ctx->addresses_best_num,
6290 .ips = ctx->addresses_best,
6291 .apply_expected = False
6295 * unique,active vs. mhomed,tombstone with different ip(s), unchecked
6298 .line = __location__,
6299 .name = _NBT_NAME("_UA_MT_DI_U", 0x00, NULL),
6303 .num_ips = ctx->addresses_best_num,
6304 .ips = ctx->addresses_best,
6305 .apply_expected = True
6311 .type = WREPL_TYPE_MHOMED,
6312 .state = WREPL_STATE_TOMBSTONE,
6313 .node = WREPL_NODE_B,
6315 .num_ips = ARRAY_SIZE(addresses_B_3_4),
6316 .ips = addresses_B_3_4,
6317 .apply_expected = False
6321 * normal group vs. unique section
6324 * group,active vs. unique,active with same ip(s), unchecked
6327 .line = __location__,
6328 .name = _NBT_NAME("_GA_UA_SI_U", 0x00, NULL),
6330 .nb_flags = NBT_NM_GROUP,
6332 .num_ips = ctx->addresses_best_num,
6333 .ips = ctx->addresses_best,
6334 .apply_expected = True
6340 .type = WREPL_TYPE_UNIQUE,
6341 .state = WREPL_STATE_ACTIVE,
6342 .node = WREPL_NODE_B,
6344 .num_ips = ctx->addresses_best_num,
6345 .ips = ctx->addresses_best,
6346 .apply_expected = False
6350 * group,active vs. unique,active with different ip(s), unchecked
6353 .line = __location__,
6354 .name = _NBT_NAME("_GA_UA_DI_U", 0x00, NULL),
6356 .nb_flags = NBT_NM_GROUP,
6358 .num_ips = ctx->addresses_best_num,
6359 .ips = ctx->addresses_best,
6360 .apply_expected = True
6366 .type = WREPL_TYPE_UNIQUE,
6367 .state = WREPL_STATE_ACTIVE,
6368 .node = WREPL_NODE_B,
6370 .num_ips = ARRAY_SIZE(addresses_B_1),
6371 .ips = addresses_B_1,
6372 .apply_expected = False
6376 * group,active vs. unique,tombstone with same ip(s), unchecked
6379 .line = __location__,
6380 .name = _NBT_NAME("_GA_UT_SI_U", 0x00, NULL),
6382 .nb_flags = NBT_NM_GROUP,
6384 .num_ips = ctx->addresses_best_num,
6385 .ips = ctx->addresses_best,
6386 .apply_expected = True
6392 .type = WREPL_TYPE_UNIQUE,
6393 .state = WREPL_STATE_TOMBSTONE,
6394 .node = WREPL_NODE_B,
6396 .num_ips = ctx->addresses_best_num,
6397 .ips = ctx->addresses_best,
6398 .apply_expected = False
6402 * group,active vs. unique,tombstone with different ip(s), unchecked
6405 .line = __location__,
6406 .name = _NBT_NAME("_GA_UT_DI_U", 0x00, NULL),
6408 .nb_flags = NBT_NM_GROUP,
6410 .num_ips = ctx->addresses_best_num,
6411 .ips = ctx->addresses_best,
6412 .apply_expected = True
6418 .type = WREPL_TYPE_UNIQUE,
6419 .state = WREPL_STATE_TOMBSTONE,
6420 .node = WREPL_NODE_B,
6422 .num_ips = ARRAY_SIZE(addresses_B_1),
6423 .ips = addresses_B_1,
6424 .apply_expected = False
6428 * normal group vs. normal group section
6431 * group,active vs. group,active with same ip(s), unchecked
6434 .line = __location__,
6435 .name = _NBT_NAME("_GA_GA_SI_U", 0x00, NULL),
6437 .nb_flags = NBT_NM_GROUP,
6439 .num_ips = ctx->addresses_best_num,
6440 .ips = ctx->addresses_best,
6441 .apply_expected = True
6447 .type = WREPL_TYPE_GROUP,
6448 .state = WREPL_STATE_ACTIVE,
6449 .node = WREPL_NODE_B,
6451 .num_ips = ctx->addresses_best_num,
6452 .ips = ctx->addresses_best,
6453 .apply_expected = True
6457 * group,active vs. group,active with different ip(s), unchecked
6460 .line = __location__,
6461 .name = _NBT_NAME("_GA_GA_DI_U", 0x00, NULL),
6463 .nb_flags = NBT_NM_GROUP,
6465 .num_ips = ctx->addresses_best_num,
6466 .ips = ctx->addresses_best,
6467 .apply_expected = True
6473 .type = WREPL_TYPE_GROUP,
6474 .state = WREPL_STATE_ACTIVE,
6475 .node = WREPL_NODE_B,
6477 .num_ips = ARRAY_SIZE(addresses_B_1),
6478 .ips = addresses_B_1,
6479 .apply_expected = True
6483 * group,active vs. group,tombstone with same ip(s), unchecked
6486 .line = __location__,
6487 .name = _NBT_NAME("_GA_GT_SI_U", 0x00, NULL),
6489 .nb_flags = NBT_NM_GROUP,
6491 .num_ips = ctx->addresses_best_num,
6492 .ips = ctx->addresses_best,
6493 .apply_expected = True
6499 .type = WREPL_TYPE_GROUP,
6500 .state = WREPL_STATE_TOMBSTONE,
6501 .node = WREPL_NODE_B,
6503 .num_ips = ctx->addresses_best_num,
6504 .ips = ctx->addresses_best,
6505 .apply_expected = False
6509 * group,active vs. group,tombstone with different ip(s), unchecked
6512 .line = __location__,
6513 .name = _NBT_NAME("_GA_GT_DI_U", 0x00, NULL),
6515 .nb_flags = NBT_NM_GROUP,
6517 .num_ips = ctx->addresses_best_num,
6518 .ips = ctx->addresses_best,
6519 .apply_expected = True
6525 .type = WREPL_TYPE_GROUP,
6526 .state = WREPL_STATE_TOMBSTONE,
6527 .node = WREPL_NODE_B,
6529 .num_ips = ARRAY_SIZE(addresses_B_1),
6530 .ips = addresses_B_1,
6531 .apply_expected = False
6535 * normal group vs. special group section
6538 * group,active vs. sgroup,active with same ip(s), unchecked
6541 .line = __location__,
6542 .name = _NBT_NAME("_GA_SA_SI_U", 0x00, NULL),
6544 .nb_flags = NBT_NM_GROUP,
6546 .num_ips = ctx->addresses_best_num,
6547 .ips = ctx->addresses_best,
6548 .apply_expected = True
6554 .type = WREPL_TYPE_SGROUP,
6555 .state = WREPL_STATE_ACTIVE,
6556 .node = WREPL_NODE_B,
6558 .num_ips = ctx->addresses_best_num,
6559 .ips = ctx->addresses_best,
6560 .apply_expected = False
6564 * group,active vs. sgroup,active with different ip(s), unchecked
6567 .line = __location__,
6568 .name = _NBT_NAME("_GA_SA_DI_U", 0x00, NULL),
6570 .nb_flags = NBT_NM_GROUP,
6572 .num_ips = ctx->addresses_best_num,
6573 .ips = ctx->addresses_best,
6574 .apply_expected = True
6580 .type = WREPL_TYPE_SGROUP,
6581 .state = WREPL_STATE_ACTIVE,
6582 .node = WREPL_NODE_B,
6584 .num_ips = ARRAY_SIZE(addresses_B_3_4),
6585 .ips = addresses_B_3_4,
6586 .apply_expected = False
6590 * group,active vs. sgroup,tombstone with same ip(s), unchecked
6593 .line = __location__,
6594 .name = _NBT_NAME("_GA_ST_SI_U", 0x00, NULL),
6596 .nb_flags = NBT_NM_GROUP,
6598 .num_ips = ctx->addresses_best_num,
6599 .ips = ctx->addresses_best,
6600 .apply_expected = True
6606 .type = WREPL_TYPE_SGROUP,
6607 .state = WREPL_STATE_TOMBSTONE,
6608 .node = WREPL_NODE_B,
6610 .num_ips = ctx->addresses_best_num,
6611 .ips = ctx->addresses_best,
6612 .apply_expected = False
6616 * group,active vs. sgroup,tombstone with different ip(s), unchecked
6619 .line = __location__,
6620 .name = _NBT_NAME("_GA_ST_DI_U", 0x00, NULL),
6622 .nb_flags = NBT_NM_GROUP,
6624 .num_ips = ctx->addresses_best_num,
6625 .ips = ctx->addresses_best,
6626 .apply_expected = True
6632 .type = WREPL_TYPE_SGROUP,
6633 .state = WREPL_STATE_TOMBSTONE,
6634 .node = WREPL_NODE_B,
6636 .num_ips = ARRAY_SIZE(addresses_B_3_4),
6637 .ips = addresses_B_3_4,
6638 .apply_expected = False
6642 * normal group vs. multi homed section
6645 * group,active vs. mhomed,active with same ip(s), unchecked
6648 .line = __location__,
6649 .name = _NBT_NAME("_GA_MA_SI_U", 0x00, NULL),
6651 .nb_flags = NBT_NM_GROUP,
6653 .num_ips = ctx->addresses_best_num,
6654 .ips = ctx->addresses_best,
6655 .apply_expected = True
6661 .type = WREPL_TYPE_MHOMED,
6662 .state = WREPL_STATE_ACTIVE,
6663 .node = WREPL_NODE_B,
6665 .num_ips = ctx->addresses_best_num,
6666 .ips = ctx->addresses_best,
6667 .apply_expected = False
6671 * group,active vs. mhomed,active with different ip(s), unchecked
6674 .line = __location__,
6675 .name = _NBT_NAME("_GA_MA_DI_U", 0x00, NULL),
6677 .nb_flags = NBT_NM_GROUP,
6679 .num_ips = ctx->addresses_best_num,
6680 .ips = ctx->addresses_best,
6681 .apply_expected = True
6687 .type = WREPL_TYPE_MHOMED,
6688 .state = WREPL_STATE_ACTIVE,
6689 .node = WREPL_NODE_B,
6691 .num_ips = ARRAY_SIZE(addresses_B_3_4),
6692 .ips = addresses_B_3_4,
6693 .apply_expected = False
6697 * group,active vs. mhomed,tombstone with same ip(s), unchecked
6700 .line = __location__,
6701 .name = _NBT_NAME("_GA_MT_SI_U", 0x00, NULL),
6703 .nb_flags = NBT_NM_GROUP,
6705 .num_ips = ctx->addresses_best_num,
6706 .ips = ctx->addresses_best,
6707 .apply_expected = True
6713 .type = WREPL_TYPE_MHOMED,
6714 .state = WREPL_STATE_TOMBSTONE,
6715 .node = WREPL_NODE_B,
6717 .num_ips = ctx->addresses_best_num,
6718 .ips = ctx->addresses_best,
6719 .apply_expected = False
6723 * group,active vs. mhomed,tombstone with different ip(s), unchecked
6726 .line = __location__,
6727 .name = _NBT_NAME("_GA_MT_DI_U", 0x00, NULL),
6729 .nb_flags = NBT_NM_GROUP,
6731 .num_ips = ctx->addresses_best_num,
6732 .ips = ctx->addresses_best,
6733 .apply_expected = True
6739 .type = WREPL_TYPE_MHOMED,
6740 .state = WREPL_STATE_TOMBSTONE,
6741 .node = WREPL_NODE_B,
6743 .num_ips = ARRAY_SIZE(addresses_B_3_4),
6744 .ips = addresses_B_3_4,
6745 .apply_expected = False
6749 * special group vs. unique section
6752 * sgroup,active vs. unique,active with same ip(s), unchecked
6755 .line = __location__,
6756 .name = _NBT_NAME("_SA_UA_SI_U", 0x1C, NULL),
6758 .nb_flags = NBT_NM_GROUP,
6760 .num_ips = ctx->addresses_best_num,
6761 .ips = ctx->addresses_best,
6762 .apply_expected = True
6768 .type = WREPL_TYPE_UNIQUE,
6769 .state = WREPL_STATE_ACTIVE,
6770 .node = WREPL_NODE_B,
6772 .num_ips = ctx->addresses_best_num,
6773 .ips = ctx->addresses_best,
6774 .apply_expected = False
6778 * sgroup,active vs. unique,active with different ip(s), unchecked
6781 .line = __location__,
6782 .name = _NBT_NAME("_SA_UA_DI_U", 0x1C, NULL),
6784 .nb_flags = NBT_NM_GROUP,
6786 .num_ips = ctx->addresses_best_num,
6787 .ips = ctx->addresses_best,
6788 .apply_expected = True
6794 .type = WREPL_TYPE_UNIQUE,
6795 .state = WREPL_STATE_ACTIVE,
6796 .node = WREPL_NODE_B,
6798 .num_ips = ARRAY_SIZE(addresses_B_1),
6799 .ips = addresses_B_1,
6800 .apply_expected = False
6804 * sgroup,active vs. unique,tombstone with same ip(s), unchecked
6807 .line = __location__,
6808 .name = _NBT_NAME("_SA_UT_SI_U", 0x1C, NULL),
6810 .nb_flags = NBT_NM_GROUP,
6812 .num_ips = ctx->addresses_best_num,
6813 .ips = ctx->addresses_best,
6814 .apply_expected = True
6820 .type = WREPL_TYPE_UNIQUE,
6821 .state = WREPL_STATE_TOMBSTONE,
6822 .node = WREPL_NODE_B,
6824 .num_ips = ctx->addresses_best_num,
6825 .ips = ctx->addresses_best,
6826 .apply_expected = False
6830 * sgroup,active vs. unique,tombstone with different ip(s), unchecked
6833 .line = __location__,
6834 .name = _NBT_NAME("_SA_UT_DI_U", 0x1C, NULL),
6836 .nb_flags = NBT_NM_GROUP,
6838 .num_ips = ctx->addresses_best_num,
6839 .ips = ctx->addresses_best,
6840 .apply_expected = True
6846 .type = WREPL_TYPE_UNIQUE,
6847 .state = WREPL_STATE_TOMBSTONE,
6848 .node = WREPL_NODE_B,
6850 .num_ips = ARRAY_SIZE(addresses_B_1),
6851 .ips = addresses_B_1,
6852 .apply_expected = False
6856 * special group vs. normal group section
6859 * sgroup,active vs. group,active with same ip(s), unchecked
6862 .line = __location__,
6863 .name = _NBT_NAME("_SA_GA_SI_U", 0x1C, NULL),
6865 .nb_flags = NBT_NM_GROUP,
6867 .num_ips = ctx->addresses_best_num,
6868 .ips = ctx->addresses_best,
6869 .apply_expected = True
6875 .type = WREPL_TYPE_GROUP,
6876 .state = WREPL_STATE_ACTIVE,
6877 .node = WREPL_NODE_B,
6879 .num_ips = ctx->addresses_best_num,
6880 .ips = ctx->addresses_best,
6881 .apply_expected = False
6885 * sgroup,active vs. group,active with different ip(s), unchecked
6888 .line = __location__,
6889 .name = _NBT_NAME("_SA_GA_DI_U", 0x1C, NULL),
6891 .nb_flags = NBT_NM_GROUP,
6893 .num_ips = ctx->addresses_best_num,
6894 .ips = ctx->addresses_best,
6895 .apply_expected = True
6901 .type = WREPL_TYPE_GROUP,
6902 .state = WREPL_STATE_ACTIVE,
6903 .node = WREPL_NODE_B,
6905 .num_ips = ARRAY_SIZE(addresses_B_1),
6906 .ips = addresses_B_1,
6907 .apply_expected = False
6911 * sgroup,active vs. group,tombstone with same ip(s), unchecked
6914 .line = __location__,
6915 .name = _NBT_NAME("_SA_GT_SI_U", 0x1C, NULL),
6917 .nb_flags = NBT_NM_GROUP,
6919 .num_ips = ctx->addresses_best_num,
6920 .ips = ctx->addresses_best,
6921 .apply_expected = True
6927 .type = WREPL_TYPE_GROUP,
6928 .state = WREPL_STATE_TOMBSTONE,
6929 .node = WREPL_NODE_B,
6931 .num_ips = ctx->addresses_best_num,
6932 .ips = ctx->addresses_best,
6933 .apply_expected = False
6937 * sgroup,active vs. group,tombstone with different ip(s), unchecked
6940 .line = __location__,
6941 .name = _NBT_NAME("_SA_GT_DI_U", 0x1C, NULL),
6943 .nb_flags = NBT_NM_GROUP,
6945 .num_ips = ctx->addresses_best_num,
6946 .ips = ctx->addresses_best,
6947 .apply_expected = True
6953 .type = WREPL_TYPE_GROUP,
6954 .state = WREPL_STATE_TOMBSTONE,
6955 .node = WREPL_NODE_B,
6957 .num_ips = ARRAY_SIZE(addresses_B_1),
6958 .ips = addresses_B_1,
6959 .apply_expected = False
6963 * special group vs. multi homed section
6966 * sgroup,active vs. mhomed,active with same ip(s), unchecked
6969 .line = __location__,
6970 .name = _NBT_NAME("_SA_MA_SI_U", 0x1C, NULL),
6972 .nb_flags = NBT_NM_GROUP,
6974 .num_ips = ctx->addresses_best_num,
6975 .ips = ctx->addresses_best,
6976 .apply_expected = True
6982 .type = WREPL_TYPE_MHOMED,
6983 .state = WREPL_STATE_ACTIVE,
6984 .node = WREPL_NODE_B,
6986 .num_ips = ctx->addresses_best_num,
6987 .ips = ctx->addresses_best,
6988 .apply_expected = False
6992 * sgroup,active vs. mhomed,active with different ip(s), unchecked
6995 .line = __location__,
6996 .name = _NBT_NAME("_SA_MA_DI_U", 0x1C, NULL),
6998 .nb_flags = NBT_NM_GROUP,
7000 .num_ips = ctx->addresses_best_num,
7001 .ips = ctx->addresses_best,
7002 .apply_expected = True
7008 .type = WREPL_TYPE_MHOMED,
7009 .state = WREPL_STATE_ACTIVE,
7010 .node = WREPL_NODE_B,
7012 .num_ips = ARRAY_SIZE(addresses_B_1),
7013 .ips = addresses_B_1,
7014 .apply_expected = False
7018 * sgroup,active vs. mhomed,tombstone with same ip(s), unchecked
7021 .line = __location__,
7022 .name = _NBT_NAME("_SA_MT_SI_U", 0x1C, NULL),
7024 .nb_flags = NBT_NM_GROUP,
7026 .num_ips = ctx->addresses_best_num,
7027 .ips = ctx->addresses_best,
7028 .apply_expected = True
7034 .type = WREPL_TYPE_MHOMED,
7035 .state = WREPL_STATE_TOMBSTONE,
7036 .node = WREPL_NODE_B,
7038 .num_ips = ctx->addresses_best_num,
7039 .ips = ctx->addresses_best,
7040 .apply_expected = False
7044 * sgroup,active vs. mhomed,tombstone with different ip(s), unchecked
7047 .line = __location__,
7048 .name = _NBT_NAME("_SA_MT_DI_U", 0x1C, NULL),
7050 .nb_flags = NBT_NM_GROUP,
7052 .num_ips = ctx->addresses_best_num,
7053 .ips = ctx->addresses_best,
7054 .apply_expected = True
7060 .type = WREPL_TYPE_MHOMED,
7061 .state = WREPL_STATE_TOMBSTONE,
7062 .node = WREPL_NODE_B,
7064 .num_ips = ARRAY_SIZE(addresses_B_1),
7065 .ips = addresses_B_1,
7066 .apply_expected = False
7070 * multi homed vs. unique section
7073 * mhomed,active vs. unique,active with same ip(s), unchecked
7076 .line = __location__,
7077 .name = _NBT_NAME("_MA_UA_SI_U", 0x00, NULL),
7081 .num_ips = ctx->addresses_best_num,
7082 .ips = ctx->addresses_best,
7083 .apply_expected = True
7089 .type = WREPL_TYPE_UNIQUE,
7090 .state = WREPL_STATE_ACTIVE,
7091 .node = WREPL_NODE_B,
7093 .num_ips = ctx->addresses_best_num,
7094 .ips = ctx->addresses_best,
7095 .apply_expected = True
7099 * mhomed,active vs. unique,active with different ip(s), positive response
7102 .line = __location__,
7103 .name = _NBT_NAME("_MA_UA_DI_P", 0x00, NULL),
7107 .num_ips = ctx->addresses_best_num,
7108 .ips = ctx->addresses_best,
7109 .apply_expected = True
7116 .type = WREPL_TYPE_UNIQUE,
7117 .state = WREPL_STATE_ACTIVE,
7118 .node = WREPL_NODE_B,
7120 .num_ips = ARRAY_SIZE(addresses_B_1),
7121 .ips = addresses_B_1,
7122 .apply_expected = False
7126 * mhomed,active vs. unique,active with different ip(s), positive response other ips
7129 .line = __location__,
7130 .name = _NBT_NAME("_MA_UA_DI_O", 0x00, NULL),
7134 .num_ips = ctx->addresses_best_num,
7135 .ips = ctx->addresses_best,
7136 .apply_expected = True
7141 .num_ips = ARRAY_SIZE(addresses_A_3_4),
7142 .ips = addresses_A_3_4,
7145 .type = WREPL_TYPE_UNIQUE,
7146 .state = WREPL_STATE_ACTIVE,
7147 .node = WREPL_NODE_B,
7149 .num_ips = ARRAY_SIZE(addresses_B_1),
7150 .ips = addresses_B_1,
7151 .apply_expected = False
7155 * mhomed,active vs. unique,active with different ip(s), negative response
7158 .line = __location__,
7159 .name = _NBT_NAME("_MA_UA_DI_N", 0x00, NULL),
7163 .num_ips = ctx->addresses_best_num,
7164 .ips = ctx->addresses_best,
7165 .apply_expected = True
7172 .type = WREPL_TYPE_UNIQUE,
7173 .state = WREPL_STATE_ACTIVE,
7174 .node = WREPL_NODE_B,
7176 .num_ips = ARRAY_SIZE(addresses_B_1),
7177 .ips = addresses_B_1,
7178 .apply_expected = True
7182 * mhomed,active vs. unique,tombstone with same ip(s), unchecked
7185 .line = __location__,
7186 .name = _NBT_NAME("_MA_UT_SI_U", 0x00, NULL),
7190 .num_ips = ctx->addresses_best_num,
7191 .ips = ctx->addresses_best,
7192 .apply_expected = True
7198 .type = WREPL_TYPE_UNIQUE,
7199 .state = WREPL_STATE_TOMBSTONE,
7200 .node = WREPL_NODE_B,
7202 .num_ips = ctx->addresses_best_num,
7203 .ips = ctx->addresses_best,
7204 .apply_expected = False
7208 * mhomed,active vs. unique,tombstone with different ip(s), unchecked
7211 .line = __location__,
7212 .name = _NBT_NAME("_MA_UT_DI_U", 0x00, NULL),
7216 .num_ips = ctx->addresses_best_num,
7217 .ips = ctx->addresses_best,
7218 .apply_expected = True
7224 .type = WREPL_TYPE_UNIQUE,
7225 .state = WREPL_STATE_TOMBSTONE,
7226 .node = WREPL_NODE_B,
7228 .num_ips = ARRAY_SIZE(addresses_B_1),
7229 .ips = addresses_B_1,
7230 .apply_expected = False
7234 * multi homed vs. normal group section
7237 * mhomed,active vs. group,active with same ip(s), release expected
7240 .line = __location__,
7241 .name = _NBT_NAME("_MA_GA_SI_R", 0x00, NULL),
7245 .num_ips = ctx->addresses_best_num,
7246 .ips = ctx->addresses_best,
7247 .apply_expected = True
7251 .expect_release = True,
7254 .type = WREPL_TYPE_GROUP,
7255 .state = WREPL_STATE_ACTIVE,
7256 .node = WREPL_NODE_B,
7258 .num_ips = ctx->addresses_best_num,
7259 .ips = ctx->addresses_best,
7260 .apply_expected = True
7264 * mhomed,active vs. group,active with different ip(s), release expected
7267 .line = __location__,
7268 .name = _NBT_NAME("_MA_GA_DI_R", 0x00, NULL),
7272 .num_ips = ctx->addresses_best_num,
7273 .ips = ctx->addresses_best,
7274 .apply_expected = True
7278 .expect_release = True,
7281 .type = WREPL_TYPE_GROUP,
7282 .state = WREPL_STATE_ACTIVE,
7283 .node = WREPL_NODE_B,
7285 .num_ips = ARRAY_SIZE(addresses_B_1),
7286 .ips = addresses_B_1,
7287 .apply_expected = True
7291 * mhomed,active vs. group,tombstone with same ip(s), unchecked
7294 .line = __location__,
7295 .name = _NBT_NAME("_MA_GT_SI_U", 0x00, NULL),
7299 .num_ips = ctx->addresses_best_num,
7300 .ips = ctx->addresses_best,
7301 .apply_expected = True
7307 .type = WREPL_TYPE_GROUP,
7308 .state = WREPL_STATE_TOMBSTONE,
7309 .node = WREPL_NODE_B,
7311 .num_ips = ctx->addresses_best_num,
7312 .ips = ctx->addresses_best,
7313 .apply_expected = False
7317 * mhomed,active vs. group,tombstone with different ip(s), unchecked
7320 .line = __location__,
7321 .name = _NBT_NAME("_MA_GT_DI_U", 0x00, NULL),
7325 .num_ips = ctx->addresses_best_num,
7326 .ips = ctx->addresses_best,
7327 .apply_expected = True
7333 .type = WREPL_TYPE_GROUP,
7334 .state = WREPL_STATE_TOMBSTONE,
7335 .node = WREPL_NODE_B,
7337 .num_ips = ARRAY_SIZE(addresses_B_1),
7338 .ips = addresses_B_1,
7339 .apply_expected = False
7343 * multi homed vs. special group section
7346 * mhomed,active vs. sgroup,active with same ip(s), release expected
7349 .line = __location__,
7350 .name = _NBT_NAME("_MA_SA_SI_R", 0x00, NULL),
7354 .num_ips = ctx->addresses_best_num,
7355 .ips = ctx->addresses_best,
7356 .apply_expected = True
7360 .expect_release = True,
7363 .type = WREPL_TYPE_SGROUP,
7364 .state = WREPL_STATE_ACTIVE,
7365 .node = WREPL_NODE_B,
7367 .num_ips = ctx->addresses_best_num,
7368 .ips = ctx->addresses_best,
7369 .apply_expected = True
7373 * mhomed,active vs. group,active with different ip(s), release expected
7376 .line = __location__,
7377 .name = _NBT_NAME("_MA_SA_DI_R", 0x00, NULL),
7381 .num_ips = ctx->addresses_best_num,
7382 .ips = ctx->addresses_best,
7383 .apply_expected = True
7387 .expect_release = True,
7390 .type = WREPL_TYPE_SGROUP,
7391 .state = WREPL_STATE_ACTIVE,
7392 .node = WREPL_NODE_B,
7394 .num_ips = ARRAY_SIZE(addresses_B_1),
7395 .ips = addresses_B_1,
7396 .apply_expected = True
7400 * mhomed,active vs. sgroup,tombstone with same ip(s), unchecked
7403 .line = __location__,
7404 .name = _NBT_NAME("_MA_ST_SI_U", 0x00, NULL),
7408 .num_ips = ctx->addresses_best_num,
7409 .ips = ctx->addresses_best,
7410 .apply_expected = True
7416 .type = WREPL_TYPE_SGROUP,
7417 .state = WREPL_STATE_TOMBSTONE,
7418 .node = WREPL_NODE_B,
7420 .num_ips = ctx->addresses_best_num,
7421 .ips = ctx->addresses_best,
7422 .apply_expected = False
7426 * mhomed,active vs. sgroup,tombstone with different ip(s), unchecked
7429 .line = __location__,
7430 .name = _NBT_NAME("_MA_ST_DI_U", 0x00, NULL),
7434 .num_ips = ctx->addresses_best_num,
7435 .ips = ctx->addresses_best,
7436 .apply_expected = True
7442 .type = WREPL_TYPE_SGROUP,
7443 .state = WREPL_STATE_TOMBSTONE,
7444 .node = WREPL_NODE_B,
7446 .num_ips = ARRAY_SIZE(addresses_B_1),
7447 .ips = addresses_B_1,
7448 .apply_expected = False
7452 * multi homed vs. multi homed section
7455 * mhomed,active vs. mhomed,active with same ip(s), unchecked
7458 .line = __location__,
7459 .name = _NBT_NAME("_MA_MA_SI_U", 0x00, NULL),
7463 .num_ips = ctx->addresses_best_num,
7464 .ips = ctx->addresses_best,
7465 .apply_expected = True
7471 .type = WREPL_TYPE_MHOMED,
7472 .state = WREPL_STATE_ACTIVE,
7473 .node = WREPL_NODE_B,
7475 .num_ips = ctx->addresses_best_num,
7476 .ips = ctx->addresses_best,
7477 .apply_expected = True
7481 * mhomed,active vs. mhomed,active with superset ip(s), unchecked
7484 .line = __location__,
7485 .name = _NBT_NAME("_MA_MA_SP_U", 0x00, NULL),
7489 .num_ips = ctx->addresses_best_num,
7490 .ips = ctx->addresses_best,
7491 .apply_expected = True
7497 .type = WREPL_TYPE_MHOMED,
7498 .state = WREPL_STATE_ACTIVE,
7499 .node = WREPL_NODE_B,
7501 .num_ips = ctx->addresses_all_num,
7502 .ips = ctx->addresses_all,
7503 .apply_expected = True
7507 * mhomed,active vs. mhomed,active with different ip(s), positive response
7510 .line = __location__,
7511 .name = _NBT_NAME("_MA_MA_DI_P", 0x00, NULL),
7515 .num_ips = ctx->addresses_best_num,
7516 .ips = ctx->addresses_best,
7517 .apply_expected = True
7524 .type = WREPL_TYPE_MHOMED,
7525 .state = WREPL_STATE_ACTIVE,
7526 .node = WREPL_NODE_B,
7528 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7529 .ips = addresses_B_3_4,
7530 .apply_expected = False
7534 * mhomed,active vs. mhomed,active with different ip(s), positive response other ips
7537 .line = __location__,
7538 .name = _NBT_NAME("_MA_MA_DI_O", 0x00, NULL),
7542 .num_ips = ctx->addresses_best_num,
7543 .ips = ctx->addresses_best,
7544 .apply_expected = True
7549 .num_ips = ARRAY_SIZE(addresses_A_3_4),
7550 .ips = addresses_A_3_4,
7553 .type = WREPL_TYPE_MHOMED,
7554 .state = WREPL_STATE_ACTIVE,
7555 .node = WREPL_NODE_B,
7557 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7558 .ips = addresses_B_3_4,
7559 .apply_expected = False
7563 * mhomed,active vs. mhomed,active with different ip(s), negative response
7566 .line = __location__,
7567 .name = _NBT_NAME("_MA_MA_DI_N", 0x00, NULL),
7571 .num_ips = ctx->addresses_best_num,
7572 .ips = ctx->addresses_best,
7573 .apply_expected = True
7580 .type = WREPL_TYPE_MHOMED,
7581 .state = WREPL_STATE_ACTIVE,
7582 .node = WREPL_NODE_B,
7584 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7585 .ips = addresses_B_3_4,
7586 .apply_expected = True
7590 * mhomed,active vs. mhomed,tombstone with same ip(s), unchecked
7593 .line = __location__,
7594 .name = _NBT_NAME("_MA_MT_SI_U", 0x00, NULL),
7598 .num_ips = ctx->addresses_best_num,
7599 .ips = ctx->addresses_best,
7600 .apply_expected = True
7606 .type = WREPL_TYPE_MHOMED,
7607 .state = WREPL_STATE_TOMBSTONE,
7608 .node = WREPL_NODE_B,
7610 .num_ips = ctx->addresses_best_num,
7611 .ips = ctx->addresses_best,
7612 .apply_expected = False
7616 * mhomed,active vs. mhomed,tombstone with different ip(s), unchecked
7619 .line = __location__,
7620 .name = _NBT_NAME("_MA_MT_DI_U", 0x00, NULL),
7624 .num_ips = ctx->addresses_best_num,
7625 .ips = ctx->addresses_best,
7626 .apply_expected = True
7632 .type = WREPL_TYPE_MHOMED,
7633 .state = WREPL_STATE_TOMBSTONE,
7634 .node = WREPL_NODE_B,
7636 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7637 .ips = addresses_B_3_4,
7638 .apply_expected = False
7642 * some more multi homed test, including merging
7645 * mhomed,active vs. mhomed,active with superset ip(s), unchecked
7648 .line = __location__,
7649 .section= "Test Replica vs. owned active: some more MHOMED combinations",
7650 .name = _NBT_NAME("_MA_MA_SP_U", 0x00, NULL),
7651 .skip = (ctx->addresses_all_num < 3),
7655 .num_ips = ctx->addresses_mhomed_num,
7656 .ips = ctx->addresses_mhomed,
7657 .apply_expected = True
7663 .type = WREPL_TYPE_MHOMED,
7664 .state = WREPL_STATE_ACTIVE,
7665 .node = WREPL_NODE_B,
7667 .num_ips = ctx->addresses_all_num,
7668 .ips = ctx->addresses_all,
7669 .apply_expected = True
7673 * mhomed,active vs. mhomed,active with same ips, unchecked
7676 .line = __location__,
7677 .name = _NBT_NAME("_MA_MA_SM_U", 0x00, NULL),
7678 .skip = (ctx->addresses_mhomed_num != 2),
7682 .num_ips = ctx->addresses_mhomed_num,
7683 .ips = ctx->addresses_mhomed,
7684 .apply_expected = True
7690 .type = WREPL_TYPE_MHOMED,
7691 .state = WREPL_STATE_ACTIVE,
7692 .node = WREPL_NODE_B,
7694 .num_ips = ctx->addresses_mhomed_num,
7695 .ips = ctx->addresses_mhomed,
7696 .apply_expected = True
7700 * mhomed,active vs. mhomed,active with subset ip(s), positive response
7703 .line = __location__,
7704 .name = _NBT_NAME("_MA_MA_SB_P", 0x00, NULL),
7705 .skip = (ctx->addresses_mhomed_num != 2),
7709 .num_ips = ctx->addresses_mhomed_num,
7710 .ips = ctx->addresses_mhomed,
7711 .apply_expected = True
7718 .type = WREPL_TYPE_MHOMED,
7719 .state = WREPL_STATE_ACTIVE,
7720 .node = WREPL_NODE_B,
7722 .num_ips = ctx->addresses_best_num,
7723 .ips = ctx->addresses_best,
7724 .mhomed_merge = True
7728 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with all addresses
7731 .line = __location__,
7732 .name = _NBT_NAME("_MA_MA_SB_A", 0x00, NULL),
7733 .skip = (ctx->addresses_all_num < 3),
7737 .num_ips = ctx->addresses_mhomed_num,
7738 .ips = ctx->addresses_mhomed,
7739 .apply_expected = True
7744 .num_ips = ctx->addresses_all_num,
7745 .ips = ctx->addresses_all,
7748 .type = WREPL_TYPE_MHOMED,
7749 .state = WREPL_STATE_ACTIVE,
7750 .node = WREPL_NODE_B,
7752 .num_ips = ctx->addresses_best_num,
7753 .ips = ctx->addresses_best,
7754 .mhomed_merge = True
7758 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with replicas addresses
7759 * TODO: check why the server sends a name release demand for one address?
7760 * the release demand has no effect to the database record...
7763 .line = __location__,
7764 .name = _NBT_NAME("_MA_MA_SB_C", 0x00, NULL),
7765 .skip = (ctx->addresses_all_num < 3),
7769 .num_ips = ctx->addresses_mhomed_num,
7770 .ips = ctx->addresses_mhomed,
7771 .apply_expected = True
7776 .num_ips = ctx->addresses_best_num,
7777 .ips = ctx->addresses_best,
7778 .late_release = True
7781 .type = WREPL_TYPE_MHOMED,
7782 .state = WREPL_STATE_ACTIVE,
7783 .node = WREPL_NODE_B,
7785 .num_ips = ctx->addresses_best_num,
7786 .ips = ctx->addresses_best,
7787 .apply_expected = False
7791 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with other addresses
7794 .line = __location__,
7795 .name = _NBT_NAME("_MA_MA_SB_O", 0x00, NULL),
7797 .skip = (ctx->addresses_all_num < 3),
7801 .num_ips = ctx->addresses_mhomed_num,
7802 .ips = ctx->addresses_mhomed,
7803 .apply_expected = True
7808 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7809 .ips = addresses_B_3_4,
7812 .type = WREPL_TYPE_MHOMED,
7813 .state = WREPL_STATE_ACTIVE,
7814 .node = WREPL_NODE_B,
7816 .num_ips = ctx->addresses_best_num,
7817 .ips = ctx->addresses_best,
7818 .apply_expected = False
7822 * mhomed,active vs. mhomed,active with subset ip(s), negative response
7825 .line = __location__,
7826 .name = _NBT_NAME("_MA_MA_SB_N", 0x00, NULL),
7827 .skip = (ctx->addresses_mhomed_num != 2),
7831 .num_ips = ctx->addresses_mhomed_num,
7832 .ips = ctx->addresses_mhomed,
7833 .apply_expected = True
7840 .type = WREPL_TYPE_MHOMED,
7841 .state = WREPL_STATE_ACTIVE,
7842 .node = WREPL_NODE_B,
7844 .num_ips = ctx->addresses_best_num,
7845 .ips = ctx->addresses_best,
7846 .apply_expected = True
7850 * some more multi homed and unique test, including merging
7853 * mhomed,active vs. unique,active with subset ip(s), positive response
7856 .line = __location__,
7857 .section= "Test Replica vs. owned active: some more UNIQUE,MHOMED combinations",
7858 .name = _NBT_NAME("_MA_UA_SB_A", 0x00, NULL),
7859 .skip = (ctx->addresses_all_num < 3),
7863 .num_ips = ctx->addresses_mhomed_num,
7864 .ips = ctx->addresses_mhomed,
7865 .apply_expected = True
7872 .type = WREPL_TYPE_UNIQUE,
7873 .state = WREPL_STATE_ACTIVE,
7874 .node = WREPL_NODE_B,
7876 .num_ips = ctx->addresses_best_num,
7877 .ips = ctx->addresses_best,
7878 .mhomed_merge = True
7882 * unique,active vs. unique,active with different ip(s), positive response, with all addresses
7885 .line = __location__,
7886 .name = _NBT_NAME("_UA_UA_DI_A", 0x00, NULL),
7887 .skip = (ctx->addresses_all_num < 3),
7891 .num_ips = ctx->addresses_best_num,
7892 .ips = ctx->addresses_best,
7893 .apply_expected = True
7898 .num_ips = ctx->addresses_all_num,
7899 .ips = ctx->addresses_all,
7902 .type = WREPL_TYPE_UNIQUE,
7903 .state = WREPL_STATE_ACTIVE,
7904 .node = WREPL_NODE_B,
7906 .num_ips = ctx->addresses_best2_num,
7907 .ips = ctx->addresses_best2,
7908 .mhomed_merge = True,
7912 * unique,active vs. mhomed,active with different ip(s), positive response, with all addresses
7915 .line = __location__,
7916 .name = _NBT_NAME("_UA_MA_DI_A", 0x00, NULL),
7917 .skip = (ctx->addresses_all_num < 3),
7921 .num_ips = ctx->addresses_best_num,
7922 .ips = ctx->addresses_best,
7923 .apply_expected = True
7928 .num_ips = ctx->addresses_all_num,
7929 .ips = ctx->addresses_all,
7932 .type = WREPL_TYPE_MHOMED,
7933 .state = WREPL_STATE_ACTIVE,
7934 .node = WREPL_NODE_B,
7936 .num_ips = ctx->addresses_best2_num,
7937 .ips = ctx->addresses_best2,
7938 .mhomed_merge = True,
7942 * special group vs. special group merging section
7945 * sgroup,active vs. sgroup,active with different ip(s)
7948 .line = __location__,
7949 .section= "Test Replica vs. owned active: SGROUP vs. SGROUP tests",
7950 .name = _NBT_NAME("_SA_SA_DI_U", 0x1C, NULL),
7951 .skip = (ctx->addresses_all_num < 3),
7953 .nb_flags = NBT_NM_GROUP,
7955 .num_ips = ctx->addresses_mhomed_num,
7956 .ips = ctx->addresses_mhomed,
7957 .apply_expected = True
7963 .type = WREPL_TYPE_SGROUP,
7964 .state = WREPL_STATE_ACTIVE,
7965 .node = WREPL_NODE_B,
7967 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7968 .ips = addresses_B_3_4,
7969 .sgroup_merge = True
7973 * sgroup,active vs. sgroup,active with same ip(s)
7976 .line = __location__,
7977 .name = _NBT_NAME("_SA_SA_SI_U", 0x1C, NULL),
7978 .skip = (ctx->addresses_all_num < 3),
7980 .nb_flags = NBT_NM_GROUP,
7982 .num_ips = ctx->addresses_mhomed_num,
7983 .ips = ctx->addresses_mhomed,
7984 .apply_expected = True
7990 .type = WREPL_TYPE_SGROUP,
7991 .state = WREPL_STATE_ACTIVE,
7992 .node = WREPL_NODE_B,
7994 .num_ips = ctx->addresses_mhomed_num,
7995 .ips = ctx->addresses_mhomed,
7996 .sgroup_merge = True
8000 * sgroup,active vs. sgroup,active with superset ip(s)
8003 .line = __location__,
8004 .name = _NBT_NAME("_SA_SA_SP_U", 0x1C, NULL),
8005 .skip = (ctx->addresses_all_num < 3),
8007 .nb_flags = NBT_NM_GROUP,
8009 .num_ips = ctx->addresses_mhomed_num,
8010 .ips = ctx->addresses_mhomed,
8011 .apply_expected = True
8017 .type = WREPL_TYPE_SGROUP,
8018 .state = WREPL_STATE_ACTIVE,
8019 .node = WREPL_NODE_B,
8021 .num_ips = ctx->addresses_all_num,
8022 .ips = ctx->addresses_all,
8023 .sgroup_merge = True
8027 * sgroup,active vs. sgroup,active with subset ip(s)
8030 .line = __location__,
8031 .name = _NBT_NAME("_SA_SA_SB_U", 0x1C, NULL),
8032 .skip = (ctx->addresses_all_num < 3),
8034 .nb_flags = NBT_NM_GROUP,
8036 .num_ips = ctx->addresses_mhomed_num,
8037 .ips = ctx->addresses_mhomed,
8038 .apply_expected = True
8044 .type = WREPL_TYPE_SGROUP,
8045 .state = WREPL_STATE_ACTIVE,
8046 .node = WREPL_NODE_B,
8048 .num_ips = ctx->addresses_best_num,
8049 .ips = ctx->addresses_best,
8050 .sgroup_merge = True
8054 * sgroup,active vs. sgroup,tombstone with different ip(s)
8057 .line = __location__,
8058 .name = _NBT_NAME("_SA_ST_DI_U", 0x1C, NULL),
8059 .skip = (ctx->addresses_all_num < 3),
8061 .nb_flags = NBT_NM_GROUP,
8063 .num_ips = ctx->addresses_mhomed_num,
8064 .ips = ctx->addresses_mhomed,
8065 .apply_expected = True
8071 .type = WREPL_TYPE_SGROUP,
8072 .state = WREPL_STATE_TOMBSTONE,
8073 .node = WREPL_NODE_B,
8075 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8076 .ips = addresses_B_3_4,
8077 .apply_expected = False
8081 * sgroup,active vs. sgroup,tombstone with same ip(s)
8084 .line = __location__,
8085 .name = _NBT_NAME("_SA_ST_SI_U", 0x1C, NULL),
8086 .skip = (ctx->addresses_all_num < 3),
8088 .nb_flags = NBT_NM_GROUP,
8090 .num_ips = ctx->addresses_mhomed_num,
8091 .ips = ctx->addresses_mhomed,
8092 .apply_expected = True
8098 .type = WREPL_TYPE_SGROUP,
8099 .state = WREPL_STATE_TOMBSTONE,
8100 .node = WREPL_NODE_B,
8102 .num_ips = ctx->addresses_mhomed_num,
8103 .ips = ctx->addresses_mhomed,
8104 .apply_expected = False
8108 * sgroup,active vs. sgroup,tombstone with superset ip(s)
8111 .line = __location__,
8112 .name = _NBT_NAME("_SA_ST_SP_U", 0x1C, NULL),
8113 .skip = (ctx->addresses_all_num < 3),
8115 .nb_flags = NBT_NM_GROUP,
8117 .num_ips = ctx->addresses_mhomed_num,
8118 .ips = ctx->addresses_mhomed,
8119 .apply_expected = True
8125 .type = WREPL_TYPE_SGROUP,
8126 .state = WREPL_STATE_TOMBSTONE,
8127 .node = WREPL_NODE_B,
8129 .num_ips = ctx->addresses_all_num,
8130 .ips = ctx->addresses_all,
8131 .apply_expected = False
8135 * sgroup,active vs. sgroup,tombstone with subset ip(s)
8138 .line = __location__,
8139 .name = _NBT_NAME("_SA_ST_SB_U", 0x1C, NULL),
8140 .skip = (ctx->addresses_all_num < 3),
8142 .nb_flags = NBT_NM_GROUP,
8144 .num_ips = ctx->addresses_mhomed_num,
8145 .ips = ctx->addresses_mhomed,
8146 .apply_expected = True
8152 .type = WREPL_TYPE_SGROUP,
8153 .state = WREPL_STATE_TOMBSTONE,
8154 .node = WREPL_NODE_B,
8156 .num_ips = ctx->addresses_best_num,
8157 .ips = ctx->addresses_best,
8158 .apply_expected = False
8163 if (!ctx) return False;
8165 if (!ctx->nbtsock_srv) {
8166 printf("SKIP: Test Replica records vs. owned active records: not bound to port[%d]\n",
8171 printf("Test Replica records vs. owned active records\n");
8173 for(i=0; ret && i < ARRAY_SIZE(records); i++) {
8175 struct test_conflict_owned_active_vs_replica_struct record = records[i];
8176 uint32_t j, count = 1;
8179 if (records[i].wins.mhomed || records[i].name.type == 0x1C) {
8180 count = records[i].wins.num_ips;
8183 if (records[i].section) {
8184 printf("%s\n", records[i].section);
8187 if (records[i].skip) {
8188 printf("%s => SKIPPED\n", nbt_name_string(ctx, &records[i].name));
8192 if (records[i].replica.mhomed_merge) {
8193 action = "MHOMED_MERGE";
8194 } else if (records[i].replica.sgroup_merge) {
8195 action = "SGROUP_MERGE";
8196 } else if (records[i].replica.apply_expected) {
8199 action = "NOT REPLACE";
8202 printf("%s => %s\n", nbt_name_string(ctx, &records[i].name), action);
8204 /* Prepare for multi homed registration */
8205 ZERO_STRUCT(records[i].defend);
8206 records[i].defend.timeout = 10;
8207 records[i].defend.positive = True;
8208 nbt_set_incoming_handler(ctx->nbtsock_srv,
8209 test_conflict_owned_active_vs_replica_handler,
8211 if (ctx->nbtsock_srv2) {
8212 nbt_set_incoming_handler(ctx->nbtsock_srv2,
8213 test_conflict_owned_active_vs_replica_handler,
8220 for (j=0; j < count; j++) {
8221 struct nbt_name_request *req;
8223 name_register->in.name = records[i].name;
8224 name_register->in.dest_addr = ctx->address;
8225 name_register->in.address = records[i].wins.ips[j].ip;
8226 name_register->in.nb_flags = records[i].wins.nb_flags;
8227 name_register->in.register_demand= False;
8228 name_register->in.broadcast = False;
8229 name_register->in.multi_homed = records[i].wins.mhomed;
8230 name_register->in.ttl = 300000;
8231 name_register->in.timeout = 70;
8232 name_register->in.retries = 0;
8234 req = nbt_name_register_send(ctx->nbtsock, name_register);
8236 /* push the request on the wire */
8237 event_loop_once(ctx->nbtsock->event_ctx);
8240 * if we register multiple addresses,
8241 * the server will do name queries to see if the old addresses
8244 if (records[i].wins.mhomed && j > 0) {
8245 end = timeval_current_ofs(records[i].defend.timeout,0);
8246 records[i].defend.ret = True;
8247 while (records[i].defend.timeout > 0) {
8248 event_loop_once(ctx->nbtsock_srv->event_ctx);
8249 if (timeval_expired(&end)) break;
8251 ret &= records[i].defend.ret;
8254 status = nbt_name_register_recv(req, ctx, name_register);
8255 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
8256 printf("No response from %s for name register\n", ctx->address);
8259 if (!NT_STATUS_IS_OK(status)) {
8260 printf("Bad response from %s for name register - %s\n",
8261 ctx->address, nt_errstr(status));
8264 CHECK_VALUE(name_register->out.rcode, 0);
8265 CHECK_VALUE_STRING(name_register->out.reply_from, ctx->address);
8266 CHECK_VALUE(name_register->out.name.type, records[i].name.type);
8267 CHECK_VALUE_STRING(name_register->out.name.name, records[i].name.name);
8268 CHECK_VALUE_STRING(name_register->out.name.scope, records[i].name.scope);
8269 CHECK_VALUE_STRING(name_register->out.reply_addr, records[i].wins.ips[j].ip);
8272 /* Prepare for the current test */
8273 records[i].defend = record.defend;
8274 nbt_set_incoming_handler(ctx->nbtsock_srv,
8275 test_conflict_owned_active_vs_replica_handler,
8277 if (ctx->nbtsock_srv2) {
8278 nbt_set_incoming_handler(ctx->nbtsock_srv2,
8279 test_conflict_owned_active_vs_replica_handler,
8286 wins_name->name = &records[i].name;
8287 wins_name->flags = WREPL_NAME_FLAGS(records[i].replica.type,
8288 records[i].replica.state,
8289 records[i].replica.node,
8290 records[i].replica.is_static);
8291 wins_name->id = ++ctx->b.max_version;
8292 if (wins_name->flags & 2) {
8293 wins_name->addresses.addresses.num_ips = records[i].replica.num_ips;
8294 wins_name->addresses.addresses.ips = discard_const(records[i].replica.ips);
8296 wins_name->addresses.ip = records[i].replica.ips[0].ip;
8298 wins_name->unknown = "255.255.255.255";
8300 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
8303 * wait for the name query, which is handled in
8304 * test_conflict_owned_active_vs_replica_handler()
8306 end = timeval_current_ofs(records[i].defend.timeout,0);
8307 records[i].defend.ret = True;
8308 while (records[i].defend.timeout > 0) {
8309 event_loop_once(ctx->nbtsock_srv->event_ctx);
8310 if (timeval_expired(&end)) break;
8312 ret &= records[i].defend.ret;
8314 if (records[i].defend.late_release) {
8315 records[i].defend = record.defend;
8316 records[i].defend.expect_release = True;
8318 * wait for the name release demand, which is handled in
8319 * test_conflict_owned_active_vs_replica_handler()
8321 end = timeval_current_ofs(records[i].defend.timeout,0);
8322 records[i].defend.ret = True;
8323 while (records[i].defend.timeout > 0) {
8324 event_loop_once(ctx->nbtsock_srv->event_ctx);
8325 if (timeval_expired(&end)) break;
8327 ret &= records[i].defend.ret;
8330 if (records[i].replica.mhomed_merge) {
8331 ret &= test_wrepl_mhomed_merged(ctx, &ctx->c,
8332 records[i].wins.num_ips, records[i].wins.ips,
8334 records[i].replica.num_ips, records[i].replica.ips,
8336 } else if (records[i].replica.sgroup_merge) {
8337 ret &= test_wrepl_sgroup_merged(ctx,
8339 records[i].wins.num_ips, records[i].wins.ips,
8341 records[i].replica.num_ips, records[i].replica.ips,
8344 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name,
8345 records[i].replica.apply_expected);
8348 if (records[i].replica.apply_expected ||
8349 records[i].replica.mhomed_merge) {
8350 wins_name->name = &records[i].name;
8351 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE,
8352 WREPL_STATE_TOMBSTONE,
8353 WREPL_NODE_B, False);
8354 wins_name->id = ++ctx->b.max_version;
8355 wins_name->addresses.ip = addresses_B_1[0].ip;
8356 wins_name->unknown = "255.255.255.255";
8358 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
8359 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name, True);
8361 for (j=0; j < count; j++) {
8362 struct nbt_name_socket *nbtsock = ctx->nbtsock;
8364 if (ctx->myaddr2 && strcmp(records[i].wins.ips[j].ip, ctx->myaddr2) == 0) {
8365 nbtsock = ctx->nbtsock2;
8368 release->in.name = records[i].name;
8369 release->in.dest_addr = ctx->address;
8370 release->in.address = records[i].wins.ips[j].ip;
8371 release->in.nb_flags = records[i].wins.nb_flags;
8372 release->in.broadcast = False;
8373 release->in.timeout = 30;
8374 release->in.retries = 0;
8376 status = nbt_name_release(nbtsock, ctx, release);
8377 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
8378 printf("No response from %s for name release\n", ctx->address);
8381 if (!NT_STATUS_IS_OK(status)) {
8382 printf("Bad response from %s for name query - %s\n",
8383 ctx->address, nt_errstr(status));
8386 CHECK_VALUE(release->out.rcode, 0);
8389 if (records[i].replica.sgroup_merge) {
8390 /* clean up the SGROUP record */
8391 wins_name->name = &records[i].name;
8392 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
8394 WREPL_NODE_B, False);
8395 wins_name->id = ++ctx->b.max_version;
8396 wins_name->addresses.addresses.num_ips = 0;
8397 wins_name->addresses.addresses.ips = NULL;
8398 wins_name->unknown = "255.255.255.255";
8399 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
8401 /* take ownership of the SGROUP record */
8402 wins_name->name = &records[i].name;
8403 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
8405 WREPL_NODE_B, False);
8406 wins_name->id = ++ctx->b.max_version;
8407 wins_name->addresses.addresses.num_ips = ARRAY_SIZE(addresses_B_1);
8408 wins_name->addresses.addresses.ips = discard_const(addresses_B_1);
8409 wins_name->unknown = "255.255.255.255";
8410 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
8411 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name, True);
8413 /* overwrite the SGROUP record with unique,tombstone */
8414 wins_name->name = &records[i].name;
8415 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE,
8416 WREPL_STATE_TOMBSTONE,
8417 WREPL_NODE_B, False);
8418 wins_name->id = ++ctx->b.max_version;
8419 wins_name->addresses.ip = addresses_A_1[0].ip;
8420 wins_name->unknown = "255.255.255.255";
8421 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
8422 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name, True);
8428 printf("conflict handled wrong or record[%u]: %s\n", i, records[i].line);
8436 #define _NBT_ASSERT(v, correct) do { \
8437 if ((v) != (correct)) { \
8438 printf("(%s) Incorrect value %s=%d - should be %s (%d)\n", \
8439 __location__, #v, v, #correct, correct); \
8444 #define _NBT_ASSERT_STRING(v, correct) do { \
8445 if ( ((!v) && (correct)) || \
8446 ((v) && (!correct)) || \
8447 ((v) && (correct) && strcmp(v,correct) != 0)) { \
8448 printf("(%s) Incorrect value %s=%s - should be %s\n", \
8449 __location__, #v, v, correct); \
8454 static void test_conflict_owned_active_vs_replica_handler_query(struct nbt_name_socket *nbtsock,
8455 struct nbt_name_packet *req_packet,
8456 const struct nbt_peer_socket *src)
8458 struct nbt_name *name;
8459 struct nbt_name_packet *rep_packet;
8460 struct test_conflict_owned_active_vs_replica_struct *rec = nbtsock->incoming.private;
8462 _NBT_ASSERT(req_packet->qdcount, 1);
8463 _NBT_ASSERT(req_packet->questions[0].question_type, NBT_QTYPE_NETBIOS);
8464 _NBT_ASSERT(req_packet->questions[0].question_class, NBT_QCLASS_IP);
8466 name = &req_packet->questions[0].name;
8468 _NBT_ASSERT(name->type, rec->name.type);
8469 _NBT_ASSERT_STRING(name->name, rec->name.name);
8470 _NBT_ASSERT_STRING(name->scope, rec->name.scope);
8472 _NBT_ASSERT(rec->defend.expect_release, False);
8474 rep_packet = talloc_zero(nbtsock, struct nbt_name_packet);
8475 if (rep_packet == NULL) return;
8477 rep_packet->name_trn_id = req_packet->name_trn_id;
8478 rep_packet->ancount = 1;
8480 rep_packet->answers = talloc_array(rep_packet, struct nbt_res_rec, 1);
8481 if (rep_packet->answers == NULL) return;
8483 rep_packet->answers[0].name = *name;
8484 rep_packet->answers[0].rr_class = NBT_QCLASS_IP;
8485 rep_packet->answers[0].ttl = 0;
8487 if (rec->defend.positive) {
8488 uint32_t i, num_ips;
8489 const struct wrepl_ip *ips;
8491 if (rec->defend.num_ips > 0) {
8492 num_ips = rec->defend.num_ips;
8493 ips = rec->defend.ips;
8495 num_ips = rec->wins.num_ips;
8496 ips = rec->wins.ips;
8499 /* send a positive reply */
8500 rep_packet->operation =
8503 NBT_FLAG_AUTHORITIVE |
8504 NBT_FLAG_RECURSION_DESIRED |
8505 NBT_FLAG_RECURSION_AVAIL;
8507 rep_packet->answers[0].rr_type = NBT_QTYPE_NETBIOS;
8509 rep_packet->answers[0].rdata.netbios.length = num_ips*6;
8510 rep_packet->answers[0].rdata.netbios.addresses =
8511 talloc_array(rep_packet->answers, struct nbt_rdata_address, num_ips);
8512 if (rep_packet->answers[0].rdata.netbios.addresses == NULL) return;
8514 for (i=0; i < num_ips; i++) {
8515 struct nbt_rdata_address *addr =
8516 &rep_packet->answers[0].rdata.netbios.addresses[i];
8517 addr->nb_flags = rec->wins.nb_flags;
8518 addr->ipaddr = ips[i].ip;
8520 DEBUG(2,("Sending positive name query reply for %s to %s:%d\n",
8521 nbt_name_string(rep_packet, name), src->addr, src->port));
8523 /* send a negative reply */
8524 rep_packet->operation =
8527 NBT_FLAG_AUTHORITIVE |
8530 rep_packet->answers[0].rr_type = NBT_QTYPE_NULL;
8532 ZERO_STRUCT(rep_packet->answers[0].rdata);
8534 DEBUG(2,("Sending negative name query reply for %s to %s:%d\n",
8535 nbt_name_string(rep_packet, name), src->addr, src->port));
8538 nbt_name_reply_send(nbtsock, src, rep_packet);
8539 talloc_free(rep_packet);
8541 /* make sure we push the reply to the wire */
8542 event_loop_once(nbtsock->event_ctx);
8544 rec->defend.timeout = 0;
8545 rec->defend.ret = True;
8548 static void test_conflict_owned_active_vs_replica_handler_release(struct nbt_name_socket *nbtsock,
8549 struct nbt_name_packet *req_packet,
8550 const struct nbt_peer_socket *src)
8552 struct nbt_name *name;
8553 struct nbt_name_packet *rep_packet;
8554 struct test_conflict_owned_active_vs_replica_struct *rec = nbtsock->incoming.private;
8556 _NBT_ASSERT(req_packet->qdcount, 1);
8557 _NBT_ASSERT(req_packet->questions[0].question_type, NBT_QTYPE_NETBIOS);
8558 _NBT_ASSERT(req_packet->questions[0].question_class, NBT_QCLASS_IP);
8560 name = &req_packet->questions[0].name;
8562 _NBT_ASSERT(name->type, rec->name.type);
8563 _NBT_ASSERT_STRING(name->name, rec->name.name);
8564 _NBT_ASSERT_STRING(name->scope, rec->name.scope);
8566 _NBT_ASSERT(rec->defend.expect_release, True);
8568 rep_packet = talloc_zero(nbtsock, struct nbt_name_packet);
8569 if (rep_packet == NULL) return;
8571 rep_packet->name_trn_id = req_packet->name_trn_id;
8572 rep_packet->ancount = 1;
8573 rep_packet->operation =
8575 NBT_OPCODE_RELEASE |
8576 NBT_FLAG_AUTHORITIVE;
8578 rep_packet->answers = talloc_array(rep_packet, struct nbt_res_rec, 1);
8579 if (rep_packet->answers == NULL) return;
8581 rep_packet->answers[0].name = *name;
8582 rep_packet->answers[0].rr_type = NBT_QTYPE_NETBIOS;
8583 rep_packet->answers[0].rr_class = NBT_QCLASS_IP;
8584 rep_packet->answers[0].ttl = req_packet->additional[0].ttl;
8585 rep_packet->answers[0].rdata = req_packet->additional[0].rdata;
8587 DEBUG(2,("Sending name release reply for %s to %s:%d\n",
8588 nbt_name_string(rep_packet, name), src->addr, src->port));
8590 nbt_name_reply_send(nbtsock, src, rep_packet);
8591 talloc_free(rep_packet);
8593 /* make sure we push the reply to the wire */
8594 event_loop_once(nbtsock->event_ctx);
8596 rec->defend.timeout = 0;
8597 rec->defend.ret = True;
8600 static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket *nbtsock,
8601 struct nbt_name_packet *req_packet,
8602 const struct nbt_peer_socket *src)
8604 struct test_conflict_owned_active_vs_replica_struct *rec = nbtsock->incoming.private;
8606 rec->defend.ret = False;
8608 switch (req_packet->operation & NBT_OPCODE) {
8609 case NBT_OPCODE_QUERY:
8610 test_conflict_owned_active_vs_replica_handler_query(nbtsock, req_packet, src);
8612 case NBT_OPCODE_RELEASE:
8613 test_conflict_owned_active_vs_replica_handler_release(nbtsock, req_packet, src);
8616 printf("%s: unexpected incoming packet\n", __location__);
8622 test WINS replication operations
8624 BOOL torture_nbt_winsreplication_quick(void)
8626 const char *address;
8627 struct nbt_name name;
8628 TALLOC_CTX *mem_ctx = talloc_new(NULL);
8632 make_nbt_name_server(&name, lp_parm_string(-1, "torture", "host"));
8634 /* do an initial name resolution to find its IP */
8635 status = resolve_name(&name, mem_ctx, &address, NULL);
8636 if (!NT_STATUS_IS_OK(status)) {
8637 printf("Failed to resolve %s - %s\n",
8638 name.name, nt_errstr(status));
8639 talloc_free(mem_ctx);
8643 ret &= test_assoc_ctx1(mem_ctx, address);
8644 ret &= test_assoc_ctx2(mem_ctx, address);
8646 ret &= test_wins_replication(mem_ctx, address);
8648 talloc_free(mem_ctx);
8654 test WINS replication operations
8656 BOOL torture_nbt_winsreplication(void)
8658 const char *address;
8659 struct nbt_name name;
8660 TALLOC_CTX *mem_ctx = talloc_new(NULL);
8663 struct test_wrepl_conflict_conn *ctx;
8665 make_nbt_name_server(&name, lp_parm_string(-1, "torture", "host"));
8667 /* do an initial name resolution to find its IP */
8668 status = resolve_name(&name, mem_ctx, &address, NULL);
8669 if (!NT_STATUS_IS_OK(status)) {
8670 printf("Failed to resolve %s - %s\n",
8671 name.name, nt_errstr(status));
8672 talloc_free(mem_ctx);
8676 ret &= test_assoc_ctx1(mem_ctx, address);
8677 ret &= test_assoc_ctx2(mem_ctx, address);
8679 ret &= test_wins_replication(mem_ctx, address);
8681 ctx = test_create_conflict_ctx(mem_ctx, address);
8683 ret &= test_conflict_same_owner(ctx);
8684 ret &= test_conflict_different_owner(ctx);
8685 ret &= test_conflict_owned_released_vs_replica(ctx);
8686 ret &= test_conflict_owned_active_vs_replica(ctx);
8688 talloc_free(mem_ctx);