2 Unix SMB/CIFS implementation.
4 WINS replication testing
6 Copyright (C) Andrew Tridgell 2005
7 Copyright (C) Stefan Metzmacher 2005
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #include "libcli/nbt/libnbt.h"
26 #include "libcli/wrepl/winsrepl.h"
27 #include "lib/events/events.h"
28 #include "lib/socket/socket.h"
29 #include "system/time.h"
31 #define CHECK_STATUS(status, correct) do { \
32 if (!NT_STATUS_EQUAL(status, correct)) { \
33 printf("(%s) Incorrect status %s - should be %s\n", \
34 __location__, nt_errstr(status), nt_errstr(correct)); \
39 #define CHECK_VALUE(v, correct) do { \
40 if ((v) != (correct)) { \
41 printf("(%s) Incorrect value %s=%d - should be %d\n", \
42 __location__, #v, v, correct); \
47 #define CHECK_VALUE_UINT64(v, correct) do { \
48 if ((v) != (correct)) { \
49 printf("(%s) Incorrect value %s=%llu - should be %llu\n", \
50 __location__, #v, v, correct); \
55 #define CHECK_VALUE_STRING(v, correct) do { \
56 if ( ((!v) && (correct)) || \
57 ((v) && (!correct)) || \
58 ((v) && (correct) && strcmp(v,correct) != 0)) { \
59 printf("(%s) Incorrect value %s='%s' - should be '%s'\n", \
60 __location__, #v, v, correct); \
65 #define _NBT_NAME(n,t,s) {\
71 static const char *wrepl_name_type_string(enum wrepl_name_type type)
74 case WREPL_TYPE_UNIQUE: return "UNIQUE";
75 case WREPL_TYPE_GROUP: return "GROUP";
76 case WREPL_TYPE_SGROUP: return "SGROUP";
77 case WREPL_TYPE_MHOMED: return "MHOMED";
79 return "UNKNOWN_TYPE";
82 static const char *wrepl_name_state_string(enum wrepl_name_state state)
85 case WREPL_STATE_ACTIVE: return "ACTIVE";
86 case WREPL_STATE_RELEASED: return "RELEASED";
87 case WREPL_STATE_TOMBSTONE: return "TOMBSTONE";
88 case WREPL_STATE_RESERVED: return "RESERVED";
90 return "UNKNOWN_STATE";
94 test how assoc_ctx's are only usable on the connection
97 static BOOL test_assoc_ctx1(TALLOC_CTX *mem_ctx, const char *address)
100 struct wrepl_request *req;
101 struct wrepl_socket *wrepl_socket1;
102 struct wrepl_associate associate1;
103 struct wrepl_socket *wrepl_socket2;
104 struct wrepl_associate associate2;
105 struct wrepl_pull_table pull_table;
106 struct wrepl_packet *rep_packet;
107 struct wrepl_associate_stop assoc_stop;
110 if (!lp_parm_bool(-1, "torture", "dangerous", False)) {
111 printf("winsrepl: cross connection assoc_ctx usage disabled - enable dangerous tests to use\n");
115 printf("Test if assoc_ctx is only valid on the conection it was created on\n");
117 wrepl_socket1 = wrepl_socket_init(mem_ctx, NULL);
118 wrepl_socket2 = wrepl_socket_init(mem_ctx, NULL);
120 printf("Setup 2 wrepl connections\n");
121 status = wrepl_connect(wrepl_socket1, NULL, address);
122 CHECK_STATUS(status, NT_STATUS_OK);
124 status = wrepl_connect(wrepl_socket2, NULL, address);
125 CHECK_STATUS(status, NT_STATUS_OK);
127 printf("Send a start association request (conn1)\n");
128 status = wrepl_associate(wrepl_socket1, &associate1);
129 CHECK_STATUS(status, NT_STATUS_OK);
131 printf("association context (conn1): 0x%x\n", associate1.out.assoc_ctx);
133 printf("Send a start association request (conn2)\n");
134 status = wrepl_associate(wrepl_socket2, &associate2);
135 CHECK_STATUS(status, NT_STATUS_OK);
137 printf("association context (conn2): 0x%x\n", associate2.out.assoc_ctx);
139 printf("Send a replication table query, with assoc 1 (conn2), the anwser should be on conn1\n");
140 pull_table.in.assoc_ctx = associate1.out.assoc_ctx;
141 req = wrepl_pull_table_send(wrepl_socket2, &pull_table);
142 req->send_only = True;
143 status = wrepl_request_recv(req, mem_ctx, &rep_packet);
144 CHECK_STATUS(status, NT_STATUS_OK);
146 printf("Send a association request (conn2), to make sure the last request was ignored\n");
147 status = wrepl_associate(wrepl_socket2, &associate2);
148 CHECK_STATUS(status, NT_STATUS_OK);
150 printf("Send a replication table query, with invalid assoc (conn1), receive answer from conn2\n");
151 pull_table.in.assoc_ctx = 0;
152 req = wrepl_pull_table_send(wrepl_socket1, &pull_table);
153 status = wrepl_request_recv(req, mem_ctx, &rep_packet);
154 CHECK_STATUS(status, NT_STATUS_OK);
156 printf("Send a association request (conn1), to make sure the last request was handled correct\n");
157 status = wrepl_associate(wrepl_socket1, &associate2);
158 CHECK_STATUS(status, NT_STATUS_OK);
160 assoc_stop.in.assoc_ctx = associate1.out.assoc_ctx;
161 assoc_stop.in.reason = 4;
162 printf("Send a association stop request (conn1), reson: %u\n", assoc_stop.in.reason);
163 status = wrepl_associate_stop(wrepl_socket1, &assoc_stop);
164 CHECK_STATUS(status, NT_STATUS_END_OF_FILE);
166 assoc_stop.in.assoc_ctx = associate2.out.assoc_ctx;
167 assoc_stop.in.reason = 0;
168 printf("Send a association stop request (conn2), reson: %u\n", assoc_stop.in.reason);
169 status = wrepl_associate_stop(wrepl_socket2, &assoc_stop);
170 CHECK_STATUS(status, NT_STATUS_OK);
173 printf("Close 2 wrepl connections\n");
174 talloc_free(wrepl_socket1);
175 talloc_free(wrepl_socket2);
180 test if we always get back the same assoc_ctx
182 static BOOL test_assoc_ctx2(TALLOC_CTX *mem_ctx, const char *address)
185 struct wrepl_socket *wrepl_socket;
186 struct wrepl_associate associate;
190 printf("Test if we always get back the same assoc_ctx\n");
192 wrepl_socket = wrepl_socket_init(mem_ctx, NULL);
194 printf("Setup wrepl connections\n");
195 status = wrepl_connect(wrepl_socket, NULL, address);
196 CHECK_STATUS(status, NT_STATUS_OK);
199 printf("Send 1st start association request\n");
200 status = wrepl_associate(wrepl_socket, &associate);
201 CHECK_STATUS(status, NT_STATUS_OK);
202 assoc_ctx1 = associate.out.assoc_ctx;
203 printf("1st association context: 0x%x\n", associate.out.assoc_ctx);
205 printf("Send 2nd start association request\n");
206 status = wrepl_associate(wrepl_socket, &associate);
207 CHECK_VALUE(associate.out.assoc_ctx, assoc_ctx1);
208 CHECK_STATUS(status, NT_STATUS_OK);
209 printf("2nd association context: 0x%x\n", associate.out.assoc_ctx);
211 printf("Send 3rd start association request\n");
212 status = wrepl_associate(wrepl_socket, &associate);
213 CHECK_VALUE(associate.out.assoc_ctx, assoc_ctx1);
214 CHECK_STATUS(status, NT_STATUS_OK);
215 printf("3rd association context: 0x%x\n", associate.out.assoc_ctx);
218 printf("Close wrepl connections\n");
219 talloc_free(wrepl_socket);
225 display a replication entry
227 static void display_entry(TALLOC_CTX *mem_ctx, struct wrepl_name *name)
231 printf("%s\n", nbt_name_string(mem_ctx, &name->name));
232 printf("\tTYPE:%u STATE:%u NODE:%u STATIC:%u VERSION_ID: %llu\n",
233 name->type, name->state, name->node, name->is_static, name->version_id);
234 printf("\tRAW_FLAGS: 0x%08X OWNER: %-15s\n",
235 name->raw_flags, name->owner);
236 for (i=0;i<name->num_addresses;i++) {
237 printf("\tADDR: %-15s OWNER: %-15s\n",
238 name->addresses[i].address, name->addresses[i].owner);
243 test a full replication dump from a WINS server
245 static BOOL test_wins_replication(TALLOC_CTX *mem_ctx, const char *address)
248 struct wrepl_socket *wrepl_socket;
251 struct wrepl_associate associate;
252 struct wrepl_pull_table pull_table;
253 struct wrepl_pull_names pull_names;
255 printf("Test one pull replication cycle\n");
257 wrepl_socket = wrepl_socket_init(mem_ctx, NULL);
259 printf("Setup wrepl connections\n");
260 status = wrepl_connect(wrepl_socket, NULL, address);
261 CHECK_STATUS(status, NT_STATUS_OK);
263 printf("Send a start association request\n");
265 status = wrepl_associate(wrepl_socket, &associate);
266 CHECK_STATUS(status, NT_STATUS_OK);
268 printf("association context: 0x%x\n", associate.out.assoc_ctx);
270 printf("Send a replication table query\n");
271 pull_table.in.assoc_ctx = associate.out.assoc_ctx;
273 status = wrepl_pull_table(wrepl_socket, mem_ctx, &pull_table);
274 if (NT_STATUS_EQUAL(NT_STATUS_NETWORK_ACCESS_DENIED,status)) {
275 struct wrepl_packet packet;
276 struct wrepl_request *req;
279 packet.opcode = WREPL_OPCODE_BITS;
280 packet.assoc_ctx = associate.out.assoc_ctx;
281 packet.mess_type = WREPL_STOP_ASSOCIATION;
282 packet.message.stop.reason = 0;
284 req = wrepl_request_send(wrepl_socket, &packet);
287 printf("failed - We are not a valid pull partner for the server\n");
291 CHECK_STATUS(status, NT_STATUS_OK);
293 printf("Found %d replication partners\n", pull_table.out.num_partners);
295 for (i=0;i<pull_table.out.num_partners;i++) {
296 struct wrepl_wins_owner *partner = &pull_table.out.partners[i];
297 printf("%s max_version=%6llu min_version=%6llu type=%d\n",
299 partner->max_version,
300 partner->min_version,
303 pull_names.in.assoc_ctx = associate.out.assoc_ctx;
304 pull_names.in.partner = *partner;
306 status = wrepl_pull_names(wrepl_socket, mem_ctx, &pull_names);
307 CHECK_STATUS(status, NT_STATUS_OK);
309 printf("Received %d names\n", pull_names.out.num_names);
311 for (j=0;j<pull_names.out.num_names;j++) {
312 display_entry(mem_ctx, &pull_names.out.names[j]);
317 printf("Close wrepl connections\n");
318 talloc_free(wrepl_socket);
322 struct test_wrepl_conflict_conn {
324 struct wrepl_socket *pull;
327 #define TEST_OWNER_A_ADDRESS "127.65.65.1"
328 #define TEST_ADDRESS_A_PREFIX "127.0.65"
329 #define TEST_OWNER_B_ADDRESS "127.66.66.1"
330 #define TEST_ADDRESS_B_PREFIX "127.0.66"
331 #define TEST_OWNER_X_ADDRESS "127.88.88.1"
332 #define TEST_ADDRESS_X_PREFIX "127.0.88"
334 struct wrepl_wins_owner a, b, c, x;
338 struct nbt_name_socket *nbtsock;
339 struct nbt_name_socket *nbtsock2;
341 struct nbt_name_socket *nbtsock_srv;
342 struct nbt_name_socket *nbtsock_srv2;
344 uint32_t addresses_best_num;
345 struct wrepl_ip *addresses_best;
347 uint32_t addresses_best2_num;
348 struct wrepl_ip *addresses_best2;
350 uint32_t addresses_all_num;
351 struct wrepl_ip *addresses_all;
353 uint32_t addresses_mhomed_num;
354 struct wrepl_ip *addresses_mhomed;
357 static const struct wrepl_ip addresses_A_1[] = {
359 .owner = TEST_OWNER_A_ADDRESS,
360 .ip = TEST_ADDRESS_A_PREFIX".1"
363 static const struct wrepl_ip addresses_A_2[] = {
365 .owner = TEST_OWNER_A_ADDRESS,
366 .ip = TEST_ADDRESS_A_PREFIX".2"
369 static const struct wrepl_ip addresses_A_3_4[] = {
371 .owner = TEST_OWNER_A_ADDRESS,
372 .ip = TEST_ADDRESS_A_PREFIX".3"
375 .owner = TEST_OWNER_A_ADDRESS,
376 .ip = TEST_ADDRESS_A_PREFIX".4"
379 static const struct wrepl_ip addresses_A_3_4_X_3_4[] = {
381 .owner = TEST_OWNER_A_ADDRESS,
382 .ip = TEST_ADDRESS_A_PREFIX".3"
385 .owner = TEST_OWNER_A_ADDRESS,
386 .ip = TEST_ADDRESS_A_PREFIX".4"
389 .owner = TEST_OWNER_X_ADDRESS,
390 .ip = TEST_ADDRESS_X_PREFIX".3"
393 .owner = TEST_OWNER_X_ADDRESS,
394 .ip = TEST_ADDRESS_X_PREFIX".4"
397 static const struct wrepl_ip addresses_A_3_4_B_3_4[] = {
399 .owner = TEST_OWNER_A_ADDRESS,
400 .ip = TEST_ADDRESS_A_PREFIX".3"
403 .owner = TEST_OWNER_A_ADDRESS,
404 .ip = TEST_ADDRESS_A_PREFIX".4"
407 .owner = TEST_OWNER_B_ADDRESS,
408 .ip = TEST_ADDRESS_B_PREFIX".3"
411 .owner = TEST_OWNER_B_ADDRESS,
412 .ip = TEST_ADDRESS_B_PREFIX".4"
415 static const struct wrepl_ip addresses_A_3_4_OWNER_B[] = {
417 .owner = TEST_OWNER_B_ADDRESS,
418 .ip = TEST_ADDRESS_A_PREFIX".3"
421 .owner = TEST_OWNER_B_ADDRESS,
422 .ip = TEST_ADDRESS_A_PREFIX".4"
425 static const struct wrepl_ip addresses_A_3_4_X_3_4_OWNER_B[] = {
427 .owner = TEST_OWNER_B_ADDRESS,
428 .ip = TEST_ADDRESS_A_PREFIX".3"
431 .owner = TEST_OWNER_B_ADDRESS,
432 .ip = TEST_ADDRESS_A_PREFIX".4"
435 .owner = TEST_OWNER_B_ADDRESS,
436 .ip = TEST_ADDRESS_X_PREFIX".3"
439 .owner = TEST_OWNER_B_ADDRESS,
440 .ip = TEST_ADDRESS_X_PREFIX".4"
444 static const struct wrepl_ip addresses_A_3_4_X_1_2[] = {
446 .owner = TEST_OWNER_A_ADDRESS,
447 .ip = TEST_ADDRESS_A_PREFIX".3"
450 .owner = TEST_OWNER_A_ADDRESS,
451 .ip = TEST_ADDRESS_A_PREFIX".4"
454 .owner = TEST_OWNER_X_ADDRESS,
455 .ip = TEST_ADDRESS_X_PREFIX".1"
458 .owner = TEST_OWNER_X_ADDRESS,
459 .ip = TEST_ADDRESS_X_PREFIX".2"
463 static const struct wrepl_ip addresses_B_1[] = {
465 .owner = TEST_OWNER_B_ADDRESS,
466 .ip = TEST_ADDRESS_B_PREFIX".1"
469 static const struct wrepl_ip addresses_B_2[] = {
471 .owner = TEST_OWNER_B_ADDRESS,
472 .ip = TEST_ADDRESS_B_PREFIX".2"
475 static const struct wrepl_ip addresses_B_3_4[] = {
477 .owner = TEST_OWNER_B_ADDRESS,
478 .ip = TEST_ADDRESS_B_PREFIX".3"
481 .owner = TEST_OWNER_B_ADDRESS,
482 .ip = TEST_ADDRESS_B_PREFIX".4"
485 static const struct wrepl_ip addresses_B_3_4_X_3_4[] = {
487 .owner = TEST_OWNER_B_ADDRESS,
488 .ip = TEST_ADDRESS_B_PREFIX".3"
491 .owner = TEST_OWNER_B_ADDRESS,
492 .ip = TEST_ADDRESS_B_PREFIX".4"
495 .owner = TEST_OWNER_X_ADDRESS,
496 .ip = TEST_ADDRESS_X_PREFIX".3"
499 .owner = TEST_OWNER_X_ADDRESS,
500 .ip = TEST_ADDRESS_X_PREFIX".4"
503 static const struct wrepl_ip addresses_B_3_4_X_1_2[] = {
505 .owner = TEST_OWNER_B_ADDRESS,
506 .ip = TEST_ADDRESS_B_PREFIX".3"
509 .owner = TEST_OWNER_B_ADDRESS,
510 .ip = TEST_ADDRESS_B_PREFIX".4"
513 .owner = TEST_OWNER_X_ADDRESS,
514 .ip = TEST_ADDRESS_X_PREFIX".1"
517 .owner = TEST_OWNER_X_ADDRESS,
518 .ip = TEST_ADDRESS_X_PREFIX".2"
522 static const struct wrepl_ip addresses_X_1_2[] = {
524 .owner = TEST_OWNER_X_ADDRESS,
525 .ip = TEST_ADDRESS_X_PREFIX".1"
528 .owner = TEST_OWNER_X_ADDRESS,
529 .ip = TEST_ADDRESS_X_PREFIX".2"
532 static const struct wrepl_ip addresses_X_3_4[] = {
534 .owner = TEST_OWNER_X_ADDRESS,
535 .ip = TEST_ADDRESS_X_PREFIX".3"
538 .owner = TEST_OWNER_X_ADDRESS,
539 .ip = TEST_ADDRESS_X_PREFIX".4"
543 static struct test_wrepl_conflict_conn *test_create_conflict_ctx(TALLOC_CTX *mem_ctx,
546 struct test_wrepl_conflict_conn *ctx;
547 struct wrepl_associate associate;
548 struct wrepl_pull_table pull_table;
552 ctx = talloc_zero(mem_ctx, struct test_wrepl_conflict_conn);
553 if (!ctx) return NULL;
555 ctx->address = address;
556 ctx->pull = wrepl_socket_init(ctx, NULL);
557 if (!ctx->pull) return NULL;
559 printf("Setup wrepl conflict pull connection\n");
560 status = wrepl_connect(ctx->pull, NULL, ctx->address);
561 if (!NT_STATUS_IS_OK(status)) return NULL;
563 status = wrepl_associate(ctx->pull, &associate);
564 if (!NT_STATUS_IS_OK(status)) return NULL;
566 ctx->pull_assoc = associate.out.assoc_ctx;
568 ctx->a.address = TEST_OWNER_A_ADDRESS;
569 ctx->a.max_version = 0;
570 ctx->a.min_version = 0;
573 ctx->b.address = TEST_OWNER_B_ADDRESS;
574 ctx->b.max_version = 0;
575 ctx->b.min_version = 0;
578 ctx->x.address = TEST_OWNER_X_ADDRESS;
579 ctx->x.max_version = 0;
580 ctx->x.min_version = 0;
583 ctx->c.address = address;
584 ctx->c.max_version = 0;
585 ctx->c.min_version = 0;
588 pull_table.in.assoc_ctx = ctx->pull_assoc;
589 status = wrepl_pull_table(ctx->pull, ctx->pull, &pull_table);
590 if (!NT_STATUS_IS_OK(status)) return NULL;
592 for (i=0; i < pull_table.out.num_partners; i++) {
593 if (strcmp(TEST_OWNER_A_ADDRESS,pull_table.out.partners[i].address)==0) {
594 ctx->a.max_version = pull_table.out.partners[i].max_version;
595 ctx->a.min_version = pull_table.out.partners[i].min_version;
597 if (strcmp(TEST_OWNER_B_ADDRESS,pull_table.out.partners[i].address)==0) {
598 ctx->b.max_version = pull_table.out.partners[i].max_version;
599 ctx->b.min_version = pull_table.out.partners[i].min_version;
601 if (strcmp(TEST_OWNER_X_ADDRESS,pull_table.out.partners[i].address)==0) {
602 ctx->x.max_version = pull_table.out.partners[i].max_version;
603 ctx->x.min_version = pull_table.out.partners[i].min_version;
605 if (strcmp(address,pull_table.out.partners[i].address)==0) {
606 ctx->c.max_version = pull_table.out.partners[i].max_version;
607 ctx->c.min_version = pull_table.out.partners[i].min_version;
611 talloc_free(pull_table.out.partners);
613 ctx->myaddr = talloc_strdup(mem_ctx, iface_best_ip(address));
614 if (!ctx->myaddr) return NULL;
616 for (i = 0; i < iface_count(); i++) {
617 if (strcmp(ctx->myaddr, iface_n_ip(i)) == 0) continue;
618 ctx->myaddr2 = talloc_strdup(mem_ctx, iface_n_ip(i));
619 if (!ctx->myaddr2) return NULL;
623 ctx->nbtsock = nbt_name_socket_init(ctx, NULL);
624 if (!ctx->nbtsock) return NULL;
626 status = socket_listen(ctx->nbtsock->sock, ctx->myaddr, 0, 0, 0);
627 if (!NT_STATUS_IS_OK(status)) return NULL;
629 ctx->nbtsock_srv = nbt_name_socket_init(ctx, NULL);
630 if (!ctx->nbtsock_srv) return NULL;
632 status = socket_listen(ctx->nbtsock_srv->sock, ctx->myaddr, lp_nbt_port(), 0, 0);
633 if (!NT_STATUS_IS_OK(status)) {
634 talloc_free(ctx->nbtsock_srv);
635 ctx->nbtsock_srv = NULL;
638 if (ctx->myaddr2 && ctx->nbtsock_srv) {
639 ctx->nbtsock2 = nbt_name_socket_init(ctx, NULL);
640 if (!ctx->nbtsock2) return NULL;
642 status = socket_listen(ctx->nbtsock2->sock, ctx->myaddr2, 0, 0, 0);
643 if (!NT_STATUS_IS_OK(status)) return NULL;
645 ctx->nbtsock_srv2 = nbt_name_socket_init(ctx, ctx->nbtsock_srv->event_ctx);
646 if (!ctx->nbtsock_srv2) return NULL;
648 status = socket_listen(ctx->nbtsock_srv2->sock, ctx->myaddr2, lp_nbt_port(), 0, 0);
649 if (!NT_STATUS_IS_OK(status)) {
650 talloc_free(ctx->nbtsock_srv2);
651 ctx->nbtsock_srv2 = NULL;
655 ctx->addresses_best_num = 1;
656 ctx->addresses_best = talloc_array(ctx, struct wrepl_ip, ctx->addresses_best_num);
657 if (!ctx->addresses_best) return NULL;
658 ctx->addresses_best[0].owner = ctx->b.address;
659 ctx->addresses_best[0].ip = ctx->myaddr;
661 ctx->addresses_all_num = iface_count();
662 ctx->addresses_all = talloc_array(ctx, struct wrepl_ip, ctx->addresses_all_num);
663 if (!ctx->addresses_all) return NULL;
664 for (i=0; i < ctx->addresses_all_num; i++) {
665 ctx->addresses_all[i].owner = ctx->b.address;
666 ctx->addresses_all[i].ip = talloc_strdup(ctx->addresses_all, iface_n_ip(i));
667 if (!ctx->addresses_all[i].ip) return NULL;
670 if (ctx->nbtsock_srv2) {
671 ctx->addresses_best2_num = 1;
672 ctx->addresses_best2 = talloc_array(ctx, struct wrepl_ip, ctx->addresses_best2_num);
673 if (!ctx->addresses_best2) return NULL;
674 ctx->addresses_best2[0].owner = ctx->b.address;
675 ctx->addresses_best2[0].ip = ctx->myaddr2;
677 ctx->addresses_mhomed_num = 2;
678 ctx->addresses_mhomed = talloc_array(ctx, struct wrepl_ip, ctx->addresses_mhomed_num);
679 if (!ctx->addresses_mhomed) return NULL;
680 ctx->addresses_mhomed[0].owner = ctx->b.address;
681 ctx->addresses_mhomed[0].ip = ctx->myaddr;
682 ctx->addresses_mhomed[1].owner = ctx->b.address;
683 ctx->addresses_mhomed[1].ip = ctx->myaddr2;
689 static BOOL test_wrepl_update_one(struct test_wrepl_conflict_conn *ctx,
690 const struct wrepl_wins_owner *owner,
691 const struct wrepl_wins_name *name)
694 struct wrepl_socket *wrepl_socket;
695 struct wrepl_associate associate;
696 struct wrepl_packet update_packet, repl_send;
697 struct wrepl_table *update;
698 struct wrepl_wins_owner wrepl_wins_owners[1];
699 struct wrepl_packet *repl_recv;
700 struct wrepl_wins_owner *send_request;
701 struct wrepl_send_reply *send_reply;
702 struct wrepl_wins_name wrepl_wins_names[1];
706 wrepl_socket = wrepl_socket_init(ctx, NULL);
708 status = wrepl_connect(wrepl_socket, NULL, ctx->address);
709 CHECK_STATUS(status, NT_STATUS_OK);
711 status = wrepl_associate(wrepl_socket, &associate);
712 CHECK_STATUS(status, NT_STATUS_OK);
713 assoc_ctx = associate.out.assoc_ctx;
715 /* now send a WREPL_REPL_UPDATE message */
716 ZERO_STRUCT(update_packet);
717 update_packet.opcode = WREPL_OPCODE_BITS;
718 update_packet.assoc_ctx = assoc_ctx;
719 update_packet.mess_type = WREPL_REPLICATION;
720 update_packet.message.replication.command = WREPL_REPL_UPDATE;
721 update = &update_packet.message.replication.info.table;
723 update->partner_count = ARRAY_SIZE(wrepl_wins_owners);
724 update->partners = wrepl_wins_owners;
725 update->initiator = "0.0.0.0";
727 wrepl_wins_owners[0] = *owner;
729 status = wrepl_request(wrepl_socket, wrepl_socket,
730 &update_packet, &repl_recv);
731 CHECK_STATUS(status, NT_STATUS_OK);
732 CHECK_VALUE(repl_recv->mess_type, WREPL_REPLICATION);
733 CHECK_VALUE(repl_recv->message.replication.command, WREPL_REPL_SEND_REQUEST);
734 send_request = &repl_recv->message.replication.info.owner;
736 ZERO_STRUCT(repl_send);
737 repl_send.opcode = WREPL_OPCODE_BITS;
738 repl_send.assoc_ctx = assoc_ctx;
739 repl_send.mess_type = WREPL_REPLICATION;
740 repl_send.message.replication.command = WREPL_REPL_SEND_REPLY;
741 send_reply = &repl_send.message.replication.info.reply;
743 send_reply->num_names = ARRAY_SIZE(wrepl_wins_names);
744 send_reply->names = wrepl_wins_names;
746 wrepl_wins_names[0] = *name;
748 status = wrepl_request(wrepl_socket, wrepl_socket,
749 &repl_send, &repl_recv);
750 CHECK_STATUS(status, NT_STATUS_OK);
751 CHECK_VALUE(repl_recv->mess_type, WREPL_STOP_ASSOCIATION);
752 CHECK_VALUE(repl_recv->message.stop.reason, 0);
755 talloc_free(wrepl_socket);
759 static BOOL test_wrepl_is_applied(struct test_wrepl_conflict_conn *ctx,
760 const struct wrepl_wins_owner *owner,
761 const struct wrepl_wins_name *name,
766 struct wrepl_pull_names pull_names;
767 struct wrepl_name *names;
769 pull_names.in.assoc_ctx = ctx->pull_assoc;
770 pull_names.in.partner = *owner;
771 pull_names.in.partner.min_version = pull_names.in.partner.max_version;
773 status = wrepl_pull_names(ctx->pull, ctx->pull, &pull_names);
774 CHECK_STATUS(status, NT_STATUS_OK);
775 CHECK_VALUE(pull_names.out.num_names, (expected?1:0));
777 names = pull_names.out.names;
780 uint32_t flags = WREPL_NAME_FLAGS(names[0].type,
784 CHECK_VALUE(names[0].name.type, name->name->type);
785 CHECK_VALUE_STRING(names[0].name.name, name->name->name);
786 CHECK_VALUE_STRING(names[0].name.scope, name->name->scope);
787 CHECK_VALUE(flags, name->flags);
788 CHECK_VALUE_UINT64(names[0].version_id, name->id);
791 CHECK_VALUE(names[0].num_addresses,
792 name->addresses.addresses.num_ips);
794 CHECK_VALUE(names[0].num_addresses, 1);
795 CHECK_VALUE_STRING(names[0].addresses[0].address,
800 talloc_free(pull_names.out.names);
804 static BOOL test_wrepl_mhomed_merged(struct test_wrepl_conflict_conn *ctx,
805 const struct wrepl_wins_owner *owner1,
806 uint32_t num_ips1, const struct wrepl_ip *ips1,
807 const struct wrepl_wins_owner *owner2,
808 uint32_t num_ips2, const struct wrepl_ip *ips2,
809 const struct wrepl_wins_name *name2)
813 struct wrepl_pull_names pull_names;
814 struct wrepl_name *names;
817 uint32_t num_ips = num_ips1 + num_ips2;
819 for (i = 0; i < num_ips2; i++) {
820 for (j = 0; j < num_ips1; j++) {
821 if (strcmp(ips2[i].ip,ips1[j].ip) == 0) {
828 pull_names.in.assoc_ctx = ctx->pull_assoc;
829 pull_names.in.partner = *owner2;
830 pull_names.in.partner.min_version = pull_names.in.partner.max_version;
832 status = wrepl_pull_names(ctx->pull, ctx->pull, &pull_names);
833 CHECK_STATUS(status, NT_STATUS_OK);
834 CHECK_VALUE(pull_names.out.num_names, 1);
836 names = pull_names.out.names;
838 flags = WREPL_NAME_FLAGS(names[0].type,
842 CHECK_VALUE(names[0].name.type, name2->name->type);
843 CHECK_VALUE_STRING(names[0].name.name, name2->name->name);
844 CHECK_VALUE_STRING(names[0].name.scope, name2->name->scope);
845 CHECK_VALUE(flags, name2->flags | WREPL_TYPE_MHOMED);
846 CHECK_VALUE_UINT64(names[0].version_id, name2->id);
848 CHECK_VALUE(names[0].num_addresses, num_ips);
850 for (i = 0; i < names[0].num_addresses; i++) {
851 const char *addr = names[0].addresses[i].address;
852 const char *owner = names[0].addresses[i].owner;
855 for (j = 0; j < num_ips2; j++) {
856 if (strcmp(addr, ips2[j].ip) == 0) {
858 CHECK_VALUE_STRING(owner, owner2->address);
865 for (j = 0; j < num_ips1; j++) {
866 if (strcmp(addr, ips1[j].ip) == 0) {
868 CHECK_VALUE_STRING(owner, owner1->address);
875 CHECK_VALUE_STRING(addr, "not found in address list");
878 talloc_free(pull_names.out.names);
882 static BOOL test_wrepl_sgroup_merged(struct test_wrepl_conflict_conn *ctx,
883 struct wrepl_wins_owner *merge_owner,
884 struct wrepl_wins_owner *owner1,
885 uint32_t num_ips1, const struct wrepl_ip *ips1,
886 struct wrepl_wins_owner *owner2,
887 uint32_t num_ips2, const struct wrepl_ip *ips2,
888 const struct wrepl_wins_name *name2)
892 struct wrepl_pull_names pull_names;
893 struct wrepl_name *names;
894 struct wrepl_name *name = NULL;
897 uint32_t num_ips = num_ips1 + num_ips2;
900 merge_owner = &ctx->c;
903 for (i = 0; i < num_ips1; i++) {
904 if (owner1 != &ctx->c && strcmp(ips1[i].owner,owner2->address) == 0) {
908 for (j = 0; j < num_ips2; j++) {
909 if (strcmp(ips1[i].ip,ips2[j].ip) == 0) {
917 pull_names.in.assoc_ctx = ctx->pull_assoc;
918 pull_names.in.partner = *merge_owner;
919 pull_names.in.partner.min_version = pull_names.in.partner.max_version;
920 pull_names.in.partner.max_version = 0;
922 status = wrepl_pull_names(ctx->pull, ctx->pull, &pull_names);
923 CHECK_STATUS(status, NT_STATUS_OK);
925 names = pull_names.out.names;
927 for (i = 0; i < pull_names.out.num_names; i++) {
928 if (names[i].name.type != name2->name->type) continue;
929 if (!names[i].name.name) continue;
930 if (strcmp(names[i].name.name, name2->name->name) != 0) continue;
931 if (names[i].name.scope) continue;
936 if (pull_names.out.num_names > 0) {
937 merge_owner->max_version = names[pull_names.out.num_names-1].version_id;
941 printf("%s: Name '%s' not found\n", __location__, nbt_name_string(ctx, name2->name));
945 flags = WREPL_NAME_FLAGS(name->type,
949 CHECK_VALUE(name->name.type, name2->name->type);
950 CHECK_VALUE_STRING(name->name.name, name2->name->name);
951 CHECK_VALUE_STRING(name->name.scope, name2->name->scope);
952 CHECK_VALUE(flags, name2->flags);
954 CHECK_VALUE(name->num_addresses, num_ips);
956 for (i = 0; i < name->num_addresses; i++) {
957 const char *addr = name->addresses[i].address;
958 const char *owner = name->addresses[i].owner;
961 for (j = 0; j < num_ips2; j++) {
962 if (strcmp(addr, ips2[j].ip) == 0) {
964 CHECK_VALUE_STRING(owner, ips2[j].owner);
971 for (j = 0; j < num_ips1; j++) {
972 if (strcmp(addr, ips1[j].ip) == 0) {
974 if (owner1 == &ctx->c) {
975 CHECK_VALUE_STRING(owner, owner1->address);
977 CHECK_VALUE_STRING(owner, ips1[j].owner);
985 CHECK_VALUE_STRING(addr, "not found in address list");
988 talloc_free(pull_names.out.names);
992 static BOOL test_conflict_same_owner(struct test_wrepl_conflict_conn *ctx)
995 struct nbt_name name;
996 struct wrepl_wins_name wins_name1;
997 struct wrepl_wins_name wins_name2;
998 struct wrepl_wins_name *wins_name_tmp;
999 struct wrepl_wins_name *wins_name_last;
1000 struct wrepl_wins_name *wins_name_cur;
1002 uint8_t types[] = { 0x00, 0x1C };
1004 enum wrepl_name_type type;
1005 enum wrepl_name_state state;
1006 enum wrepl_name_node node;
1009 const struct wrepl_ip *ips;
1012 .type = WREPL_TYPE_GROUP,
1013 .state = WREPL_STATE_ACTIVE,
1014 .node = WREPL_NODE_B,
1016 .num_ips = ARRAY_SIZE(addresses_A_1),
1017 .ips = addresses_A_1,
1019 .type = WREPL_TYPE_UNIQUE,
1020 .state = WREPL_STATE_ACTIVE,
1021 .node = WREPL_NODE_B,
1023 .num_ips = ARRAY_SIZE(addresses_A_1),
1024 .ips = addresses_A_1,
1026 .type = WREPL_TYPE_UNIQUE,
1027 .state = WREPL_STATE_ACTIVE,
1028 .node = WREPL_NODE_B,
1030 .num_ips = ARRAY_SIZE(addresses_A_2),
1031 .ips = addresses_A_2,
1033 .type = WREPL_TYPE_UNIQUE,
1034 .state = WREPL_STATE_ACTIVE,
1035 .node = WREPL_NODE_B,
1037 .num_ips = ARRAY_SIZE(addresses_A_1),
1038 .ips = addresses_A_1,
1040 .type = WREPL_TYPE_UNIQUE,
1041 .state = WREPL_STATE_ACTIVE,
1042 .node = WREPL_NODE_B,
1044 .num_ips = ARRAY_SIZE(addresses_A_2),
1045 .ips = addresses_A_2,
1047 .type = WREPL_TYPE_SGROUP,
1048 .state = WREPL_STATE_TOMBSTONE,
1049 .node = WREPL_NODE_B,
1051 .num_ips = ARRAY_SIZE(addresses_A_2),
1052 .ips = addresses_A_2,
1054 .type = WREPL_TYPE_MHOMED,
1055 .state = WREPL_STATE_TOMBSTONE,
1056 .node = WREPL_NODE_B,
1058 .num_ips = ARRAY_SIZE(addresses_A_1),
1059 .ips = addresses_A_1,
1061 .type = WREPL_TYPE_MHOMED,
1062 .state = WREPL_STATE_RELEASED,
1063 .node = WREPL_NODE_B,
1065 .num_ips = ARRAY_SIZE(addresses_A_2),
1066 .ips = addresses_A_2,
1068 .type = WREPL_TYPE_SGROUP,
1069 .state = WREPL_STATE_ACTIVE,
1070 .node = WREPL_NODE_B,
1072 .num_ips = ARRAY_SIZE(addresses_A_1),
1073 .ips = addresses_A_1,
1075 .type = WREPL_TYPE_SGROUP,
1076 .state = WREPL_STATE_ACTIVE,
1077 .node = WREPL_NODE_B,
1079 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1080 .ips = addresses_A_3_4,
1082 .type = WREPL_TYPE_SGROUP,
1083 .state = WREPL_STATE_TOMBSTONE,
1084 .node = WREPL_NODE_B,
1086 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1087 .ips = addresses_B_3_4,
1089 /* the last one should always be a unique,tomstone record! */
1090 .type = WREPL_TYPE_UNIQUE,
1091 .state = WREPL_STATE_TOMBSTONE,
1092 .node = WREPL_NODE_B,
1094 .num_ips = ARRAY_SIZE(addresses_A_1),
1095 .ips = addresses_A_1,
1099 if (!ctx) return False;
1101 name.name = "_SAME_OWNER_A";
1105 wins_name_tmp = NULL;
1106 wins_name_last = &wins_name2;
1107 wins_name_cur = &wins_name1;
1109 for (j=0; ret && j < ARRAY_SIZE(types); j++) {
1110 name.type = types[j];
1111 printf("Test Replica Conflicts with same owner[%s] for %s\n",
1112 nbt_name_string(ctx, &name), ctx->a.address);
1114 for(i=0; ret && i < ARRAY_SIZE(records); i++) {
1115 wins_name_tmp = wins_name_last;
1116 wins_name_last = wins_name_cur;
1117 wins_name_cur = wins_name_tmp;
1120 printf("%s,%s%s vs. %s,%s%s with %s ip(s) => %s\n",
1121 wrepl_name_type_string(records[i-1].type),
1122 wrepl_name_state_string(records[i-1].state),
1123 (records[i-1].is_static?",static":""),
1124 wrepl_name_type_string(records[i].type),
1125 wrepl_name_state_string(records[i].state),
1126 (records[i].is_static?",static":""),
1127 (records[i-1].ips==records[i].ips?"same":"different"),
1131 wins_name_cur->name = &name;
1132 wins_name_cur->flags = WREPL_NAME_FLAGS(records[i].type,
1135 records[i].is_static);
1136 wins_name_cur->id = ++ctx->a.max_version;
1137 if (wins_name_cur->flags & 2) {
1138 wins_name_cur->addresses.addresses.num_ips = records[i].num_ips;
1139 wins_name_cur->addresses.addresses.ips = discard_const(records[i].ips);
1141 wins_name_cur->addresses.ip = records[i].ips[0].ip;
1143 wins_name_cur->unknown = "255.255.255.255";
1145 ret &= test_wrepl_update_one(ctx, &ctx->a,wins_name_cur);
1146 if (records[i].state == WREPL_STATE_RELEASED) {
1147 ret &= test_wrepl_is_applied(ctx, &ctx->a, wins_name_last, False);
1148 ret &= test_wrepl_is_applied(ctx, &ctx->a, wins_name_cur, False);
1150 ret &= test_wrepl_is_applied(ctx, &ctx->a, wins_name_cur, True);
1153 /* the first one is a cleanup run */
1154 if (!ret && i == 0) ret = True;
1157 printf("conflict handled wrong or record[%u]: %s\n", i, __location__);
1165 static BOOL test_conflict_different_owner(struct test_wrepl_conflict_conn *ctx)
1168 struct wrepl_wins_name wins_name1;
1169 struct wrepl_wins_name wins_name2;
1170 struct wrepl_wins_name *wins_name_r1;
1171 struct wrepl_wins_name *wins_name_r2;
1174 const char *line; /* just better debugging */
1175 struct nbt_name name;
1176 const char *comment;
1177 BOOL extra; /* not the worst case, this is an extra test */
1180 struct wrepl_wins_owner *owner;
1181 enum wrepl_name_type type;
1182 enum wrepl_name_state state;
1183 enum wrepl_name_node node;
1186 const struct wrepl_ip *ips;
1187 BOOL apply_expected;
1189 struct wrepl_wins_owner *merge_owner;
1190 BOOL sgroup_cleanup;
1194 * NOTE: the first record and the last applied one
1195 * needs to be from the same owner,
1196 * to not conflict in the next smbtorture run!!!
1199 .line = __location__,
1200 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1204 .type = WREPL_TYPE_UNIQUE,
1205 .state = WREPL_STATE_TOMBSTONE,
1206 .node = WREPL_NODE_B,
1208 .num_ips = ARRAY_SIZE(addresses_B_1),
1209 .ips = addresses_B_1,
1210 .apply_expected = True /* ignored */
1214 .type = WREPL_TYPE_UNIQUE,
1215 .state = WREPL_STATE_TOMBSTONE,
1216 .node = WREPL_NODE_B,
1218 .num_ips = ARRAY_SIZE(addresses_A_1),
1219 .ips = addresses_A_1,
1220 .apply_expected = True /* ignored */
1225 * unique vs unique section
1228 * unique,active vs. unique,active
1229 * => should be replaced
1232 .line = __location__,
1233 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1236 .type = WREPL_TYPE_UNIQUE,
1237 .state = WREPL_STATE_ACTIVE,
1238 .node = WREPL_NODE_B,
1240 .num_ips = ARRAY_SIZE(addresses_A_1),
1241 .ips = addresses_A_1,
1242 .apply_expected = True
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
1257 * unique,active vs. unique,tombstone
1258 * => should NOT be replaced
1261 .line = __location__,
1262 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1265 .type = WREPL_TYPE_UNIQUE,
1266 .state = WREPL_STATE_ACTIVE,
1267 .node = WREPL_NODE_B,
1269 .num_ips = ARRAY_SIZE(addresses_B_1),
1270 .ips = addresses_B_1,
1271 .apply_expected = True
1275 .type = WREPL_TYPE_UNIQUE,
1276 .state = WREPL_STATE_TOMBSTONE,
1277 .node = WREPL_NODE_B,
1279 .num_ips = ARRAY_SIZE(addresses_B_1),
1280 .ips = addresses_B_1,
1281 .apply_expected = False
1286 * unique,released vs. unique,active
1287 * => should be replaced
1290 .line = __location__,
1291 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1294 .type = WREPL_TYPE_UNIQUE,
1295 .state = WREPL_STATE_RELEASED,
1296 .node = WREPL_NODE_B,
1298 .num_ips = ARRAY_SIZE(addresses_B_1),
1299 .ips = addresses_B_1,
1300 .apply_expected = False
1304 .type = WREPL_TYPE_UNIQUE,
1305 .state = WREPL_STATE_ACTIVE,
1306 .node = WREPL_NODE_B,
1308 .num_ips = ARRAY_SIZE(addresses_A_1),
1309 .ips = addresses_A_1,
1310 .apply_expected = True
1315 * unique,released vs. unique,tombstone
1316 * => should be replaced
1319 .line = __location__,
1320 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1323 .type = WREPL_TYPE_UNIQUE,
1324 .state = WREPL_STATE_RELEASED,
1325 .node = WREPL_NODE_B,
1327 .num_ips = ARRAY_SIZE(addresses_A_1),
1328 .ips = addresses_A_1,
1329 .apply_expected = False
1333 .type = WREPL_TYPE_UNIQUE,
1334 .state = WREPL_STATE_TOMBSTONE,
1335 .node = WREPL_NODE_B,
1337 .num_ips = ARRAY_SIZE(addresses_B_1),
1338 .ips = addresses_B_1,
1339 .apply_expected = True
1344 * unique,tombstone vs. unique,active
1345 * => should be replaced
1348 .line = __location__,
1349 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1352 .type = WREPL_TYPE_UNIQUE,
1353 .state = WREPL_STATE_TOMBSTONE,
1354 .node = WREPL_NODE_B,
1356 .num_ips = ARRAY_SIZE(addresses_B_1),
1357 .ips = addresses_B_1,
1358 .apply_expected = True
1362 .type = WREPL_TYPE_UNIQUE,
1363 .state = WREPL_STATE_ACTIVE,
1364 .node = WREPL_NODE_B,
1366 .num_ips = ARRAY_SIZE(addresses_A_1),
1367 .ips = addresses_A_1,
1368 .apply_expected = True
1373 * unique,tombstone vs. unique,tombstone
1374 * => should be replaced
1377 .line = __location__,
1378 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1381 .type = WREPL_TYPE_UNIQUE,
1382 .state = WREPL_STATE_TOMBSTONE,
1383 .node = WREPL_NODE_B,
1385 .num_ips = ARRAY_SIZE(addresses_A_1),
1386 .ips = addresses_A_1,
1387 .apply_expected = True
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
1403 * unique vs normal groups section,
1406 * unique,active vs. group,active
1407 * => should be replaced
1410 .line = __location__,
1411 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1414 .type = WREPL_TYPE_UNIQUE,
1415 .state = WREPL_STATE_ACTIVE,
1416 .node = WREPL_NODE_B,
1418 .num_ips = ARRAY_SIZE(addresses_B_1),
1419 .ips = addresses_B_1,
1420 .apply_expected = True
1424 .type = WREPL_TYPE_GROUP,
1425 .state = WREPL_STATE_ACTIVE,
1426 .node = WREPL_NODE_B,
1428 .num_ips = ARRAY_SIZE(addresses_A_1),
1429 .ips = addresses_A_1,
1430 .apply_expected = True
1435 * unique,active vs. group,tombstone
1436 * => should NOT be replaced
1439 .line = __location__,
1440 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1443 .type = WREPL_TYPE_UNIQUE,
1444 .state = WREPL_STATE_ACTIVE,
1445 .node = WREPL_NODE_B,
1447 .num_ips = ARRAY_SIZE(addresses_A_1),
1448 .ips = addresses_A_1,
1449 .apply_expected = True
1453 .type = WREPL_TYPE_GROUP,
1454 .state = WREPL_STATE_TOMBSTONE,
1455 .node = WREPL_NODE_B,
1457 .num_ips = ARRAY_SIZE(addresses_A_1),
1458 .ips = addresses_A_1,
1459 .apply_expected = False
1464 * unique,released vs. group,active
1465 * => should be replaced
1468 .line = __location__,
1469 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1472 .type = WREPL_TYPE_UNIQUE,
1473 .state = WREPL_STATE_RELEASED,
1474 .node = WREPL_NODE_B,
1476 .num_ips = ARRAY_SIZE(addresses_A_1),
1477 .ips = addresses_A_1,
1478 .apply_expected = False
1482 .type = WREPL_TYPE_GROUP,
1483 .state = WREPL_STATE_ACTIVE,
1484 .node = WREPL_NODE_B,
1486 .num_ips = ARRAY_SIZE(addresses_B_1),
1487 .ips = addresses_B_1,
1488 .apply_expected = True
1493 * unique,released vs. group,tombstone
1494 * => should be replaced
1497 .line = __location__,
1498 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1501 .type = WREPL_TYPE_UNIQUE,
1502 .state = WREPL_STATE_RELEASED,
1503 .node = WREPL_NODE_B,
1505 .num_ips = ARRAY_SIZE(addresses_B_1),
1506 .ips = addresses_B_1,
1507 .apply_expected = False
1511 .type = WREPL_TYPE_GROUP,
1512 .state = WREPL_STATE_TOMBSTONE,
1513 .node = WREPL_NODE_B,
1515 .num_ips = ARRAY_SIZE(addresses_A_1),
1516 .ips = addresses_A_1,
1517 .apply_expected = True
1522 * unique,tombstone vs. group,active
1523 * => should be replaced
1526 .line = __location__,
1527 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1530 .type = WREPL_TYPE_UNIQUE,
1531 .state = WREPL_STATE_TOMBSTONE,
1532 .node = WREPL_NODE_B,
1534 .num_ips = ARRAY_SIZE(addresses_A_1),
1535 .ips = addresses_A_1,
1536 .apply_expected = True
1540 .type = WREPL_TYPE_GROUP,
1541 .state = WREPL_STATE_ACTIVE,
1542 .node = WREPL_NODE_B,
1544 .num_ips = ARRAY_SIZE(addresses_B_1),
1545 .ips = addresses_B_1,
1546 .apply_expected = True
1551 * unique,tombstone vs. group,tombstone
1552 * => should be replaced
1555 .line = __location__,
1556 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1559 .type = WREPL_TYPE_UNIQUE,
1560 .state = WREPL_STATE_TOMBSTONE,
1561 .node = WREPL_NODE_B,
1563 .num_ips = ARRAY_SIZE(addresses_B_1),
1564 .ips = addresses_B_1,
1565 .apply_expected = True
1569 .type = WREPL_TYPE_GROUP,
1570 .state = WREPL_STATE_TOMBSTONE,
1571 .node = WREPL_NODE_B,
1573 .num_ips = ARRAY_SIZE(addresses_A_1),
1574 .ips = addresses_A_1,
1575 .apply_expected = True
1580 * unique vs special groups section,
1583 * unique,active vs. sgroup,active
1584 * => should NOT be replaced
1587 .line = __location__,
1588 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1591 .type = WREPL_TYPE_UNIQUE,
1592 .state = WREPL_STATE_ACTIVE,
1593 .node = WREPL_NODE_B,
1595 .num_ips = ARRAY_SIZE(addresses_A_1),
1596 .ips = addresses_A_1,
1597 .apply_expected = True
1601 .type = WREPL_TYPE_SGROUP,
1602 .state = WREPL_STATE_ACTIVE,
1603 .node = WREPL_NODE_B,
1605 .num_ips = ARRAY_SIZE(addresses_A_1),
1606 .ips = addresses_A_1,
1607 .apply_expected = False
1612 * unique,active vs. sgroup,tombstone
1613 * => should NOT be replaced
1616 .line = __location__,
1617 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1620 .type = WREPL_TYPE_UNIQUE,
1621 .state = WREPL_STATE_ACTIVE,
1622 .node = WREPL_NODE_B,
1624 .num_ips = ARRAY_SIZE(addresses_A_1),
1625 .ips = addresses_A_1,
1626 .apply_expected = True
1630 .type = WREPL_TYPE_SGROUP,
1631 .state = WREPL_STATE_TOMBSTONE,
1632 .node = WREPL_NODE_B,
1634 .num_ips = ARRAY_SIZE(addresses_A_1),
1635 .ips = addresses_A_1,
1636 .apply_expected = False
1641 * unique,released vs. sgroup,active
1642 * => should be replaced
1645 .line = __location__,
1646 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1649 .type = WREPL_TYPE_UNIQUE,
1650 .state = WREPL_STATE_RELEASED,
1651 .node = WREPL_NODE_B,
1653 .num_ips = ARRAY_SIZE(addresses_A_1),
1654 .ips = addresses_A_1,
1655 .apply_expected = False
1659 .type = WREPL_TYPE_SGROUP,
1660 .state = WREPL_STATE_ACTIVE,
1661 .node = WREPL_NODE_B,
1663 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1664 .ips = addresses_B_3_4,
1665 .apply_expected = True
1670 * unique,released vs. sgroup,tombstone
1671 * => should be replaced
1674 .line = __location__,
1675 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1678 .type = WREPL_TYPE_UNIQUE,
1679 .state = WREPL_STATE_RELEASED,
1680 .node = WREPL_NODE_B,
1682 .num_ips = ARRAY_SIZE(addresses_B_1),
1683 .ips = addresses_B_1,
1684 .apply_expected = False
1688 .type = WREPL_TYPE_SGROUP,
1689 .state = WREPL_STATE_TOMBSTONE,
1690 .node = WREPL_NODE_B,
1692 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1693 .ips = addresses_A_3_4,
1694 .apply_expected = True
1699 * unique,tombstone vs. sgroup,active
1700 * => should be replaced
1703 .line = __location__,
1704 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1707 .type = WREPL_TYPE_UNIQUE,
1708 .state = WREPL_STATE_TOMBSTONE,
1709 .node = WREPL_NODE_B,
1711 .num_ips = ARRAY_SIZE(addresses_A_1),
1712 .ips = addresses_A_1,
1713 .apply_expected = True
1717 .type = WREPL_TYPE_SGROUP,
1718 .state = WREPL_STATE_ACTIVE,
1719 .node = WREPL_NODE_B,
1721 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1722 .ips = addresses_B_3_4,
1723 .apply_expected = True
1728 * unique,tombstone vs. sgroup,tombstone
1729 * => should be replaced
1732 .line = __location__,
1733 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1736 .type = WREPL_TYPE_UNIQUE,
1737 .state = WREPL_STATE_TOMBSTONE,
1738 .node = WREPL_NODE_B,
1740 .num_ips = ARRAY_SIZE(addresses_B_1),
1741 .ips = addresses_B_1,
1742 .apply_expected = True
1746 .type = WREPL_TYPE_SGROUP,
1747 .state = WREPL_STATE_TOMBSTONE,
1748 .node = WREPL_NODE_B,
1750 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1751 .ips = addresses_A_3_4,
1752 .apply_expected = True
1757 * unique vs multi homed section,
1760 * unique,active vs. mhomed,active
1761 * => should be replaced
1764 .line = __location__,
1765 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1768 .type = WREPL_TYPE_UNIQUE,
1769 .state = WREPL_STATE_ACTIVE,
1770 .node = WREPL_NODE_B,
1772 .num_ips = ARRAY_SIZE(addresses_A_1),
1773 .ips = addresses_A_1,
1774 .apply_expected = True
1778 .type = WREPL_TYPE_MHOMED,
1779 .state = WREPL_STATE_ACTIVE,
1780 .node = WREPL_NODE_B,
1782 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1783 .ips = addresses_B_3_4,
1784 .apply_expected = True
1789 * unique,active vs. mhomed,tombstone
1790 * => should NOT be replaced
1793 .line = __location__,
1794 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1797 .type = WREPL_TYPE_UNIQUE,
1798 .state = WREPL_STATE_ACTIVE,
1799 .node = WREPL_NODE_B,
1801 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1802 .ips = addresses_B_3_4,
1803 .apply_expected = True
1807 .type = WREPL_TYPE_MHOMED,
1808 .state = WREPL_STATE_TOMBSTONE,
1809 .node = WREPL_NODE_B,
1811 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1812 .ips = addresses_B_3_4,
1813 .apply_expected = False
1818 * unique,released vs. mhomed,active
1819 * => should be replaced
1822 .line = __location__,
1823 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1826 .type = WREPL_TYPE_UNIQUE,
1827 .state = WREPL_STATE_RELEASED,
1828 .node = WREPL_NODE_B,
1830 .num_ips = ARRAY_SIZE(addresses_B_1),
1831 .ips = addresses_B_1,
1832 .apply_expected = False
1836 .type = WREPL_TYPE_MHOMED,
1837 .state = WREPL_STATE_ACTIVE,
1838 .node = WREPL_NODE_B,
1840 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1841 .ips = addresses_A_3_4,
1842 .apply_expected = True
1847 * unique,released vs. mhomed,tombstone
1848 * => should be replaced
1851 .line = __location__,
1852 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1855 .type = WREPL_TYPE_UNIQUE,
1856 .state = WREPL_STATE_RELEASED,
1857 .node = WREPL_NODE_B,
1859 .num_ips = ARRAY_SIZE(addresses_A_1),
1860 .ips = addresses_A_1,
1861 .apply_expected = False
1865 .type = WREPL_TYPE_MHOMED,
1866 .state = WREPL_STATE_TOMBSTONE,
1867 .node = WREPL_NODE_B,
1869 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1870 .ips = addresses_B_3_4,
1871 .apply_expected = True
1876 * unique,tombstone vs. mhomed,active
1877 * => should be replaced
1880 .line = __location__,
1881 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1884 .type = WREPL_TYPE_UNIQUE,
1885 .state = WREPL_STATE_TOMBSTONE,
1886 .node = WREPL_NODE_B,
1888 .num_ips = ARRAY_SIZE(addresses_B_1),
1889 .ips = addresses_B_1,
1890 .apply_expected = True
1894 .type = WREPL_TYPE_MHOMED,
1895 .state = WREPL_STATE_ACTIVE,
1896 .node = WREPL_NODE_B,
1898 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1899 .ips = addresses_A_3_4,
1900 .apply_expected = True
1905 * unique,tombstone vs. mhomed,tombstone
1906 * => should be replaced
1909 .line = __location__,
1910 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1913 .type = WREPL_TYPE_UNIQUE,
1914 .state = WREPL_STATE_TOMBSTONE,
1915 .node = WREPL_NODE_B,
1917 .num_ips = ARRAY_SIZE(addresses_A_1),
1918 .ips = addresses_A_1,
1919 .apply_expected = True
1923 .type = WREPL_TYPE_MHOMED,
1924 .state = WREPL_STATE_TOMBSTONE,
1925 .node = WREPL_NODE_B,
1927 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1928 .ips = addresses_B_3_4,
1929 .apply_expected = True
1934 * normal groups vs unique section,
1937 * group,active vs. unique,active
1938 * => should NOT be replaced
1941 .line = __location__,
1942 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1945 .type = WREPL_TYPE_GROUP,
1946 .state = WREPL_STATE_ACTIVE,
1947 .node = WREPL_NODE_B,
1949 .num_ips = ARRAY_SIZE(addresses_A_1),
1950 .ips = addresses_A_1,
1951 .apply_expected = True
1955 .type = WREPL_TYPE_UNIQUE,
1956 .state = WREPL_STATE_ACTIVE,
1957 .node = WREPL_NODE_B,
1959 .num_ips = ARRAY_SIZE(addresses_A_1),
1960 .ips = addresses_A_1,
1961 .apply_expected = False
1966 * group,active vs. unique,tombstone
1967 * => should NOT be replaced
1970 .line = __location__,
1971 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1974 .type = WREPL_TYPE_GROUP,
1975 .state = WREPL_STATE_ACTIVE,
1976 .node = WREPL_NODE_B,
1978 .num_ips = ARRAY_SIZE(addresses_A_1),
1979 .ips = addresses_A_1,
1980 .apply_expected = True
1984 .type = WREPL_TYPE_UNIQUE,
1985 .state = WREPL_STATE_TOMBSTONE,
1986 .node = WREPL_NODE_B,
1988 .num_ips = ARRAY_SIZE(addresses_A_1),
1989 .ips = addresses_A_1,
1990 .apply_expected = False
1995 * group,released vs. unique,active
1996 * => should NOT be replaced
1999 .line = __location__,
2000 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2003 .type = WREPL_TYPE_GROUP,
2004 .state = WREPL_STATE_RELEASED,
2005 .node = WREPL_NODE_B,
2007 .num_ips = ARRAY_SIZE(addresses_A_1),
2008 .ips = addresses_A_1,
2009 .apply_expected = False
2013 .type = WREPL_TYPE_UNIQUE,
2014 .state = WREPL_STATE_ACTIVE,
2015 .node = WREPL_NODE_B,
2017 .num_ips = ARRAY_SIZE(addresses_A_1),
2018 .ips = addresses_A_1,
2019 .apply_expected = False
2024 * group,released vs. unique,tombstone
2025 * => should NOT be replaced
2028 .line = __location__,
2029 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2032 .type = WREPL_TYPE_GROUP,
2033 .state = WREPL_STATE_RELEASED,
2034 .node = WREPL_NODE_B,
2036 .num_ips = ARRAY_SIZE(addresses_A_1),
2037 .ips = addresses_A_1,
2038 .apply_expected = False
2042 .type = WREPL_TYPE_UNIQUE,
2043 .state = WREPL_STATE_TOMBSTONE,
2044 .node = WREPL_NODE_B,
2046 .num_ips = ARRAY_SIZE(addresses_A_1),
2047 .ips = addresses_A_1,
2048 .apply_expected = False
2053 * group,tombstone vs. unique,active
2054 * => should NOT be replaced
2057 .line = __location__,
2058 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2061 .type = WREPL_TYPE_GROUP,
2062 .state = WREPL_STATE_TOMBSTONE,
2063 .node = WREPL_NODE_B,
2065 .num_ips = ARRAY_SIZE(addresses_A_1),
2066 .ips = addresses_A_1,
2067 .apply_expected = True
2071 .type = WREPL_TYPE_UNIQUE,
2072 .state = WREPL_STATE_ACTIVE,
2073 .node = WREPL_NODE_B,
2075 .num_ips = ARRAY_SIZE(addresses_A_1),
2076 .ips = addresses_A_1,
2077 .apply_expected = False
2082 * group,tombstone vs. unique,tombstone
2083 * => should NOT be replaced
2086 .line = __location__,
2087 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2090 .type = WREPL_TYPE_GROUP,
2091 .state = WREPL_STATE_TOMBSTONE,
2092 .node = WREPL_NODE_B,
2094 .num_ips = ARRAY_SIZE(addresses_A_1),
2095 .ips = addresses_A_1,
2096 .apply_expected = True
2100 .type = WREPL_TYPE_UNIQUE,
2101 .state = WREPL_STATE_TOMBSTONE,
2102 .node = WREPL_NODE_B,
2104 .num_ips = ARRAY_SIZE(addresses_A_1),
2105 .ips = addresses_A_1,
2106 .apply_expected = False
2111 * normal groups vs normal groups section,
2114 * group,active vs. group,active
2115 * => should NOT be replaced
2118 .line = __location__,
2119 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2122 .type = WREPL_TYPE_GROUP,
2123 .state = WREPL_STATE_ACTIVE,
2124 .node = WREPL_NODE_B,
2126 .num_ips = ARRAY_SIZE(addresses_A_1),
2127 .ips = addresses_A_1,
2128 .apply_expected = True
2132 .type = WREPL_TYPE_GROUP,
2133 .state = WREPL_STATE_ACTIVE,
2134 .node = WREPL_NODE_B,
2136 .num_ips = ARRAY_SIZE(addresses_A_1),
2137 .ips = addresses_A_1,
2138 .apply_expected = False
2143 * group,active vs. group,tombstone
2144 * => should NOT be replaced
2147 .line = __location__,
2148 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2151 .type = WREPL_TYPE_GROUP,
2152 .state = WREPL_STATE_ACTIVE,
2153 .node = WREPL_NODE_B,
2155 .num_ips = ARRAY_SIZE(addresses_A_1),
2156 .ips = addresses_A_1,
2157 .apply_expected = True
2161 .type = WREPL_TYPE_GROUP,
2162 .state = WREPL_STATE_TOMBSTONE,
2163 .node = WREPL_NODE_B,
2165 .num_ips = ARRAY_SIZE(addresses_A_1),
2166 .ips = addresses_A_1,
2167 .apply_expected = False
2172 * group,released vs. group,active
2173 * => should be replaced
2176 .line = __location__,
2177 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2180 .type = WREPL_TYPE_GROUP,
2181 .state = WREPL_STATE_RELEASED,
2182 .node = WREPL_NODE_B,
2184 .num_ips = ARRAY_SIZE(addresses_A_1),
2185 .ips = addresses_A_1,
2186 .apply_expected = False
2190 .type = WREPL_TYPE_GROUP,
2191 .state = WREPL_STATE_ACTIVE,
2192 .node = WREPL_NODE_B,
2194 .num_ips = ARRAY_SIZE(addresses_B_1),
2195 .ips = addresses_B_1,
2196 .apply_expected = True
2201 * group,released vs. group,tombstone
2202 * => should be replaced
2205 .line = __location__,
2206 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2209 .type = WREPL_TYPE_GROUP,
2210 .state = WREPL_STATE_RELEASED,
2211 .node = WREPL_NODE_B,
2213 .num_ips = ARRAY_SIZE(addresses_A_1),
2214 .ips = addresses_A_1,
2215 .apply_expected = False
2219 .type = WREPL_TYPE_GROUP,
2220 .state = WREPL_STATE_TOMBSTONE,
2221 .node = WREPL_NODE_B,
2223 .num_ips = ARRAY_SIZE(addresses_B_1),
2224 .ips = addresses_B_1,
2225 .apply_expected = True
2230 * group,tombstone vs. group,active
2231 * => should be replaced
2234 .line = __location__,
2235 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2238 .type = WREPL_TYPE_GROUP,
2239 .state = WREPL_STATE_TOMBSTONE,
2240 .node = WREPL_NODE_B,
2242 .num_ips = ARRAY_SIZE(addresses_B_1),
2243 .ips = addresses_B_1,
2244 .apply_expected = True
2248 .type = WREPL_TYPE_GROUP,
2249 .state = WREPL_STATE_ACTIVE,
2250 .node = WREPL_NODE_B,
2252 .num_ips = ARRAY_SIZE(addresses_A_1),
2253 .ips = addresses_A_1,
2254 .apply_expected = True
2259 * group,tombstone vs. group,tombstone
2260 * => should be replaced
2263 .line = __location__,
2264 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2267 .type = WREPL_TYPE_GROUP,
2268 .state = WREPL_STATE_TOMBSTONE,
2269 .node = WREPL_NODE_B,
2271 .num_ips = ARRAY_SIZE(addresses_A_1),
2272 .ips = addresses_A_1,
2273 .apply_expected = True
2277 .type = WREPL_TYPE_GROUP,
2278 .state = WREPL_STATE_TOMBSTONE,
2279 .node = WREPL_NODE_B,
2281 .num_ips = ARRAY_SIZE(addresses_B_1),
2282 .ips = addresses_B_1,
2283 .apply_expected = True
2288 * normal groups vs special groups section,
2291 * group,active vs. sgroup,active
2292 * => should NOT be replaced
2295 .line = __location__,
2296 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2299 .type = WREPL_TYPE_GROUP,
2300 .state = WREPL_STATE_ACTIVE,
2301 .node = WREPL_NODE_B,
2303 .num_ips = ARRAY_SIZE(addresses_B_1),
2304 .ips = addresses_B_1,
2305 .apply_expected = True
2309 .type = WREPL_TYPE_SGROUP,
2310 .state = WREPL_STATE_ACTIVE,
2311 .node = WREPL_NODE_B,
2313 .num_ips = ARRAY_SIZE(addresses_B_1),
2314 .ips = addresses_B_1,
2315 .apply_expected = False
2320 * group,active vs. sgroup,tombstone
2321 * => should NOT be replaced
2324 .line = __location__,
2325 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2328 .type = WREPL_TYPE_GROUP,
2329 .state = WREPL_STATE_ACTIVE,
2330 .node = WREPL_NODE_B,
2332 .num_ips = ARRAY_SIZE(addresses_B_1),
2333 .ips = addresses_B_1,
2334 .apply_expected = True
2338 .type = WREPL_TYPE_SGROUP,
2339 .state = WREPL_STATE_TOMBSTONE,
2340 .node = WREPL_NODE_B,
2342 .num_ips = ARRAY_SIZE(addresses_B_1),
2343 .ips = addresses_B_1,
2344 .apply_expected = False
2349 * group,released vs. sgroup,active
2350 * => should be replaced
2353 .line = __location__,
2354 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2357 .type = WREPL_TYPE_GROUP,
2358 .state = WREPL_STATE_RELEASED,
2359 .node = WREPL_NODE_B,
2361 .num_ips = ARRAY_SIZE(addresses_A_1),
2362 .ips = addresses_A_1,
2363 .apply_expected = False
2367 .type = WREPL_TYPE_SGROUP,
2368 .state = WREPL_STATE_ACTIVE,
2369 .node = WREPL_NODE_B,
2371 .num_ips = ARRAY_SIZE(addresses_B_1),
2372 .ips = addresses_B_1,
2373 .apply_expected = True
2378 * group,released vs. sgroup,tombstone
2379 * => should NOT be replaced
2382 .line = __location__,
2383 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2386 .type = WREPL_TYPE_GROUP,
2387 .state = WREPL_STATE_RELEASED,
2388 .node = WREPL_NODE_B,
2390 .num_ips = ARRAY_SIZE(addresses_B_1),
2391 .ips = addresses_B_1,
2392 .apply_expected = False
2396 .type = WREPL_TYPE_SGROUP,
2397 .state = WREPL_STATE_TOMBSTONE,
2398 .node = WREPL_NODE_B,
2400 .num_ips = ARRAY_SIZE(addresses_B_1),
2401 .ips = addresses_B_1,
2402 .apply_expected = False
2407 * group,tombstone vs. sgroup,active
2408 * => should be replaced
2411 .line = __location__,
2412 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2415 .type = WREPL_TYPE_GROUP,
2416 .state = WREPL_STATE_TOMBSTONE,
2417 .node = WREPL_NODE_B,
2419 .num_ips = ARRAY_SIZE(addresses_B_1),
2420 .ips = addresses_B_1,
2421 .apply_expected = True
2425 .type = WREPL_TYPE_SGROUP,
2426 .state = WREPL_STATE_ACTIVE,
2427 .node = WREPL_NODE_B,
2429 .num_ips = ARRAY_SIZE(addresses_A_1),
2430 .ips = addresses_A_1,
2431 .apply_expected = True
2436 * group,tombstone vs. sgroup,tombstone
2437 * => should be replaced
2440 .line = __location__,
2441 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2444 .type = WREPL_TYPE_GROUP,
2445 .state = WREPL_STATE_TOMBSTONE,
2446 .node = WREPL_NODE_B,
2448 .num_ips = ARRAY_SIZE(addresses_A_1),
2449 .ips = addresses_A_1,
2450 .apply_expected = True
2454 .type = WREPL_TYPE_SGROUP,
2455 .state = WREPL_STATE_TOMBSTONE,
2456 .node = WREPL_NODE_B,
2458 .num_ips = ARRAY_SIZE(addresses_B_1),
2459 .ips = addresses_B_1,
2460 .apply_expected = True
2465 * normal groups vs multi homed section,
2468 * group,active vs. mhomed,active
2469 * => should NOT be replaced
2472 .line = __location__,
2473 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2476 .type = WREPL_TYPE_GROUP,
2477 .state = WREPL_STATE_ACTIVE,
2478 .node = WREPL_NODE_B,
2480 .num_ips = ARRAY_SIZE(addresses_B_1),
2481 .ips = addresses_B_1,
2482 .apply_expected = True
2486 .type = WREPL_TYPE_MHOMED,
2487 .state = WREPL_STATE_ACTIVE,
2488 .node = WREPL_NODE_B,
2490 .num_ips = ARRAY_SIZE(addresses_B_1),
2491 .ips = addresses_B_1,
2492 .apply_expected = False
2497 * group,active vs. mhomed,tombstone
2498 * => should NOT be replaced
2501 .line = __location__,
2502 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2505 .type = WREPL_TYPE_GROUP,
2506 .state = WREPL_STATE_ACTIVE,
2507 .node = WREPL_NODE_B,
2509 .num_ips = ARRAY_SIZE(addresses_B_1),
2510 .ips = addresses_B_1,
2511 .apply_expected = True
2515 .type = WREPL_TYPE_MHOMED,
2516 .state = WREPL_STATE_TOMBSTONE,
2517 .node = WREPL_NODE_B,
2519 .num_ips = ARRAY_SIZE(addresses_B_1),
2520 .ips = addresses_B_1,
2521 .apply_expected = False
2526 * group,released vs. mhomed,active
2527 * => should NOT be replaced
2530 .line = __location__,
2531 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2534 .type = WREPL_TYPE_GROUP,
2535 .state = WREPL_STATE_RELEASED,
2536 .node = WREPL_NODE_B,
2538 .num_ips = ARRAY_SIZE(addresses_B_1),
2539 .ips = addresses_B_1,
2540 .apply_expected = False
2544 .type = WREPL_TYPE_MHOMED,
2545 .state = WREPL_STATE_ACTIVE,
2546 .node = WREPL_NODE_B,
2548 .num_ips = ARRAY_SIZE(addresses_B_1),
2549 .ips = addresses_B_1,
2550 .apply_expected = False
2555 * group,released vs. mhomed,tombstone
2556 * => should NOT be replaced
2559 .line = __location__,
2560 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2563 .type = WREPL_TYPE_GROUP,
2564 .state = WREPL_STATE_RELEASED,
2565 .node = WREPL_NODE_B,
2567 .num_ips = ARRAY_SIZE(addresses_B_1),
2568 .ips = addresses_B_1,
2569 .apply_expected = False
2573 .type = WREPL_TYPE_MHOMED,
2574 .state = WREPL_STATE_TOMBSTONE,
2575 .node = WREPL_NODE_B,
2577 .num_ips = ARRAY_SIZE(addresses_B_1),
2578 .ips = addresses_B_1,
2579 .apply_expected = False
2584 * group,tombstone vs. mhomed,active
2585 * => should be replaced
2588 .line = __location__,
2589 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2592 .type = WREPL_TYPE_GROUP,
2593 .state = WREPL_STATE_TOMBSTONE,
2594 .node = WREPL_NODE_B,
2596 .num_ips = ARRAY_SIZE(addresses_B_1),
2597 .ips = addresses_B_1,
2598 .apply_expected = True
2602 .type = WREPL_TYPE_MHOMED,
2603 .state = WREPL_STATE_ACTIVE,
2604 .node = WREPL_NODE_B,
2606 .num_ips = ARRAY_SIZE(addresses_A_1),
2607 .ips = addresses_A_1,
2608 .apply_expected = True
2613 * group,tombstone vs. mhomed,tombstone
2614 * => should be replaced
2617 .line = __location__,
2618 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2621 .type = WREPL_TYPE_GROUP,
2622 .state = WREPL_STATE_TOMBSTONE,
2623 .node = WREPL_NODE_B,
2625 .num_ips = ARRAY_SIZE(addresses_A_1),
2626 .ips = addresses_A_1,
2627 .apply_expected = True
2631 .type = WREPL_TYPE_MHOMED,
2632 .state = WREPL_STATE_TOMBSTONE,
2633 .node = WREPL_NODE_B,
2635 .num_ips = ARRAY_SIZE(addresses_B_1),
2636 .ips = addresses_B_1,
2637 .apply_expected = True
2642 * special groups vs unique section,
2645 * sgroup,active vs. unique,active
2646 * => should NOT be replaced
2649 .line = __location__,
2650 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2653 .type = WREPL_TYPE_SGROUP,
2654 .state = WREPL_STATE_ACTIVE,
2655 .node = WREPL_NODE_B,
2657 .num_ips = ARRAY_SIZE(addresses_B_1),
2658 .ips = addresses_B_1,
2659 .apply_expected = True
2663 .type = WREPL_TYPE_UNIQUE,
2664 .state = WREPL_STATE_ACTIVE,
2665 .node = WREPL_NODE_B,
2667 .num_ips = ARRAY_SIZE(addresses_B_1),
2668 .ips = addresses_B_1,
2669 .apply_expected = False
2674 * sgroup,active vs. unique,tombstone
2675 * => should NOT be replaced
2678 .line = __location__,
2679 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2682 .type = WREPL_TYPE_SGROUP,
2683 .state = WREPL_STATE_ACTIVE,
2684 .node = WREPL_NODE_B,
2686 .num_ips = ARRAY_SIZE(addresses_B_1),
2687 .ips = addresses_B_1,
2688 .apply_expected = True
2692 .type = WREPL_TYPE_UNIQUE,
2693 .state = WREPL_STATE_TOMBSTONE,
2694 .node = WREPL_NODE_B,
2696 .num_ips = ARRAY_SIZE(addresses_B_1),
2697 .ips = addresses_B_1,
2698 .apply_expected = False
2703 * sgroup,released vs. unique,active
2704 * => should be replaced
2707 .line = __location__,
2708 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2711 .type = WREPL_TYPE_SGROUP,
2712 .state = WREPL_STATE_RELEASED,
2713 .node = WREPL_NODE_B,
2715 .num_ips = ARRAY_SIZE(addresses_B_1),
2716 .ips = addresses_B_1,
2717 .apply_expected = False
2721 .type = WREPL_TYPE_UNIQUE,
2722 .state = WREPL_STATE_ACTIVE,
2723 .node = WREPL_NODE_B,
2725 .num_ips = ARRAY_SIZE(addresses_A_1),
2726 .ips = addresses_A_1,
2727 .apply_expected = True
2732 * sgroup,released vs. unique,tombstone
2733 * => should be replaced
2736 .line = __location__,
2737 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2740 .type = WREPL_TYPE_SGROUP,
2741 .state = WREPL_STATE_RELEASED,
2742 .node = WREPL_NODE_B,
2744 .num_ips = ARRAY_SIZE(addresses_A_1),
2745 .ips = addresses_A_1,
2746 .apply_expected = False
2750 .type = WREPL_TYPE_UNIQUE,
2751 .state = WREPL_STATE_TOMBSTONE,
2752 .node = WREPL_NODE_B,
2754 .num_ips = ARRAY_SIZE(addresses_B_1),
2755 .ips = addresses_B_1,
2756 .apply_expected = True
2761 * sgroup,tombstone vs. unique,active
2762 * => should be replaced
2765 .line = __location__,
2766 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2769 .type = WREPL_TYPE_SGROUP,
2770 .state = WREPL_STATE_TOMBSTONE,
2771 .node = WREPL_NODE_B,
2773 .num_ips = ARRAY_SIZE(addresses_A_1),
2774 .ips = addresses_A_1,
2775 .apply_expected = True
2779 .type = WREPL_TYPE_UNIQUE,
2780 .state = WREPL_STATE_ACTIVE,
2781 .node = WREPL_NODE_B,
2783 .num_ips = ARRAY_SIZE(addresses_B_1),
2784 .ips = addresses_B_1,
2785 .apply_expected = True
2790 * sgroup,tombstone vs. unique,tombstone
2791 * => should be replaced
2794 .line = __location__,
2795 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2798 .type = WREPL_TYPE_SGROUP,
2799 .state = WREPL_STATE_TOMBSTONE,
2800 .node = WREPL_NODE_B,
2802 .num_ips = ARRAY_SIZE(addresses_B_1),
2803 .ips = addresses_B_1,
2804 .apply_expected = True
2808 .type = WREPL_TYPE_UNIQUE,
2809 .state = WREPL_STATE_TOMBSTONE,
2810 .node = WREPL_NODE_B,
2812 .num_ips = ARRAY_SIZE(addresses_A_1),
2813 .ips = addresses_A_1,
2814 .apply_expected = True
2819 * special groups vs normal group section,
2822 * sgroup,active vs. group,active
2823 * => should NOT be replaced
2826 .line = __location__,
2827 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2830 .type = WREPL_TYPE_SGROUP,
2831 .state = WREPL_STATE_ACTIVE,
2832 .node = WREPL_NODE_B,
2834 .num_ips = ARRAY_SIZE(addresses_A_1),
2835 .ips = addresses_A_1,
2836 .apply_expected = True
2840 .type = WREPL_TYPE_GROUP,
2841 .state = WREPL_STATE_ACTIVE,
2842 .node = WREPL_NODE_B,
2844 .num_ips = ARRAY_SIZE(addresses_A_1),
2845 .ips = addresses_A_1,
2846 .apply_expected = False
2851 * sgroup,active vs. group,tombstone
2852 * => should NOT be replaced
2855 .line = __location__,
2856 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2859 .type = WREPL_TYPE_SGROUP,
2860 .state = WREPL_STATE_ACTIVE,
2861 .node = WREPL_NODE_B,
2863 .num_ips = ARRAY_SIZE(addresses_A_1),
2864 .ips = addresses_A_1,
2865 .apply_expected = True
2869 .type = WREPL_TYPE_GROUP,
2870 .state = WREPL_STATE_TOMBSTONE,
2871 .node = WREPL_NODE_B,
2873 .num_ips = ARRAY_SIZE(addresses_A_1),
2874 .ips = addresses_A_1,
2875 .apply_expected = False
2880 * sgroup,released vs. group,active
2881 * => should be replaced
2884 .line = __location__,
2885 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2888 .type = WREPL_TYPE_SGROUP,
2889 .state = WREPL_STATE_RELEASED,
2890 .node = WREPL_NODE_B,
2892 .num_ips = ARRAY_SIZE(addresses_A_1),
2893 .ips = addresses_A_1,
2894 .apply_expected = False
2898 .type = WREPL_TYPE_GROUP,
2899 .state = WREPL_STATE_ACTIVE,
2900 .node = WREPL_NODE_B,
2902 .num_ips = ARRAY_SIZE(addresses_B_1),
2903 .ips = addresses_B_1,
2904 .apply_expected = True
2909 * sgroup,released vs. group,tombstone
2910 * => should be replaced
2913 .line = __location__,
2914 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2917 .type = WREPL_TYPE_SGROUP,
2918 .state = WREPL_STATE_RELEASED,
2919 .node = WREPL_NODE_B,
2921 .num_ips = ARRAY_SIZE(addresses_B_1),
2922 .ips = addresses_B_1,
2923 .apply_expected = False
2927 .type = WREPL_TYPE_GROUP,
2928 .state = WREPL_STATE_TOMBSTONE,
2929 .node = WREPL_NODE_B,
2931 .num_ips = ARRAY_SIZE(addresses_A_1),
2932 .ips = addresses_A_1,
2933 .apply_expected = True
2938 * sgroup,tombstone vs. group,active
2939 * => should NOT be replaced
2942 .line = __location__,
2943 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2946 .type = WREPL_TYPE_SGROUP,
2947 .state = WREPL_STATE_TOMBSTONE,
2948 .node = WREPL_NODE_B,
2950 .num_ips = ARRAY_SIZE(addresses_A_1),
2951 .ips = addresses_A_1,
2952 .apply_expected = True
2956 .type = WREPL_TYPE_GROUP,
2957 .state = WREPL_STATE_ACTIVE,
2958 .node = WREPL_NODE_B,
2960 .num_ips = ARRAY_SIZE(addresses_B_1),
2961 .ips = addresses_B_1,
2962 .apply_expected = True
2967 * sgroup,tombstone vs. group,tombstone
2968 * => should NOT be replaced
2971 .line = __location__,
2972 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2975 .type = WREPL_TYPE_SGROUP,
2976 .state = WREPL_STATE_TOMBSTONE,
2977 .node = WREPL_NODE_B,
2979 .num_ips = ARRAY_SIZE(addresses_B_1),
2980 .ips = addresses_B_1,
2981 .apply_expected = True
2985 .type = WREPL_TYPE_GROUP,
2986 .state = WREPL_STATE_TOMBSTONE,
2987 .node = WREPL_NODE_B,
2989 .num_ips = ARRAY_SIZE(addresses_A_1),
2990 .ips = addresses_A_1,
2991 .apply_expected = True
2996 * special groups (not active) vs special group section,
2999 * sgroup,released vs. sgroup,active
3000 * => should be replaced
3003 .line = __location__,
3004 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3007 .type = WREPL_TYPE_SGROUP,
3008 .state = WREPL_STATE_RELEASED,
3009 .node = WREPL_NODE_B,
3011 .num_ips = ARRAY_SIZE(addresses_A_1),
3012 .ips = addresses_A_1,
3013 .apply_expected = False
3017 .type = WREPL_TYPE_SGROUP,
3018 .state = WREPL_STATE_ACTIVE,
3019 .node = WREPL_NODE_B,
3021 .num_ips = ARRAY_SIZE(addresses_B_1),
3022 .ips = addresses_B_1,
3023 .apply_expected = True
3028 * sgroup,released vs. sgroup,tombstone
3029 * => should be replaced
3032 .line = __location__,
3033 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3036 .type = WREPL_TYPE_SGROUP,
3037 .state = WREPL_STATE_RELEASED,
3038 .node = WREPL_NODE_B,
3040 .num_ips = ARRAY_SIZE(addresses_B_1),
3041 .ips = addresses_B_1,
3042 .apply_expected = False
3046 .type = WREPL_TYPE_SGROUP,
3047 .state = WREPL_STATE_TOMBSTONE,
3048 .node = WREPL_NODE_B,
3050 .num_ips = ARRAY_SIZE(addresses_A_1),
3051 .ips = addresses_A_1,
3052 .apply_expected = True
3057 * sgroup,tombstone vs. sgroup,active
3058 * => should NOT be replaced
3061 .line = __location__,
3062 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3065 .type = WREPL_TYPE_SGROUP,
3066 .state = WREPL_STATE_TOMBSTONE,
3067 .node = WREPL_NODE_B,
3069 .num_ips = ARRAY_SIZE(addresses_A_1),
3070 .ips = addresses_A_1,
3071 .apply_expected = True
3075 .type = WREPL_TYPE_SGROUP,
3076 .state = WREPL_STATE_ACTIVE,
3077 .node = WREPL_NODE_B,
3079 .num_ips = ARRAY_SIZE(addresses_B_1),
3080 .ips = addresses_B_1,
3081 .apply_expected = True
3086 * sgroup,tombstone vs. sgroup,tombstone
3087 * => should NOT be replaced
3090 .line = __location__,
3091 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3094 .type = WREPL_TYPE_SGROUP,
3095 .state = WREPL_STATE_TOMBSTONE,
3096 .node = WREPL_NODE_B,
3098 .num_ips = ARRAY_SIZE(addresses_B_1),
3099 .ips = addresses_B_1,
3100 .apply_expected = True
3104 .type = WREPL_TYPE_SGROUP,
3105 .state = WREPL_STATE_TOMBSTONE,
3106 .node = WREPL_NODE_B,
3108 .num_ips = ARRAY_SIZE(addresses_A_1),
3109 .ips = addresses_A_1,
3110 .apply_expected = True
3115 * special groups vs multi homed section,
3118 * sgroup,active vs. mhomed,active
3119 * => should NOT be replaced
3122 .line = __location__,
3123 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3126 .type = WREPL_TYPE_SGROUP,
3127 .state = WREPL_STATE_ACTIVE,
3128 .node = WREPL_NODE_B,
3130 .num_ips = ARRAY_SIZE(addresses_A_1),
3131 .ips = addresses_A_1,
3132 .apply_expected = True
3136 .type = WREPL_TYPE_MHOMED,
3137 .state = WREPL_STATE_ACTIVE,
3138 .node = WREPL_NODE_B,
3140 .num_ips = ARRAY_SIZE(addresses_A_1),
3141 .ips = addresses_A_1,
3142 .apply_expected = False
3147 * sgroup,active vs. mhomed,tombstone
3148 * => should NOT be replaced
3151 .line = __location__,
3152 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3155 .type = WREPL_TYPE_SGROUP,
3156 .state = WREPL_STATE_ACTIVE,
3157 .node = WREPL_NODE_B,
3159 .num_ips = ARRAY_SIZE(addresses_A_1),
3160 .ips = addresses_A_1,
3161 .apply_expected = True
3165 .type = WREPL_TYPE_MHOMED,
3166 .state = WREPL_STATE_TOMBSTONE,
3167 .node = WREPL_NODE_B,
3169 .num_ips = ARRAY_SIZE(addresses_A_1),
3170 .ips = addresses_A_1,
3171 .apply_expected = False
3176 * sgroup,released vs. mhomed,active
3177 * => should be replaced
3180 .line = __location__,
3181 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3184 .type = WREPL_TYPE_SGROUP,
3185 .state = WREPL_STATE_RELEASED,
3186 .node = WREPL_NODE_B,
3188 .num_ips = ARRAY_SIZE(addresses_A_1),
3189 .ips = addresses_A_1,
3190 .apply_expected = False
3194 .type = WREPL_TYPE_MHOMED,
3195 .state = WREPL_STATE_ACTIVE,
3196 .node = WREPL_NODE_B,
3198 .num_ips = ARRAY_SIZE(addresses_B_1),
3199 .ips = addresses_B_1,
3200 .apply_expected = True
3205 * sgroup,released vs. mhomed,tombstone
3206 * => should be replaced
3209 .line = __location__,
3210 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3213 .type = WREPL_TYPE_SGROUP,
3214 .state = WREPL_STATE_RELEASED,
3215 .node = WREPL_NODE_B,
3217 .num_ips = ARRAY_SIZE(addresses_B_1),
3218 .ips = addresses_B_1,
3219 .apply_expected = False
3223 .type = WREPL_TYPE_MHOMED,
3224 .state = WREPL_STATE_TOMBSTONE,
3225 .node = WREPL_NODE_B,
3227 .num_ips = ARRAY_SIZE(addresses_A_1),
3228 .ips = addresses_A_1,
3229 .apply_expected = True
3234 * sgroup,tombstone vs. mhomed,active
3235 * => should be replaced
3238 .line = __location__,
3239 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3242 .type = WREPL_TYPE_SGROUP,
3243 .state = WREPL_STATE_TOMBSTONE,
3244 .node = WREPL_NODE_B,
3246 .num_ips = ARRAY_SIZE(addresses_A_1),
3247 .ips = addresses_A_1,
3248 .apply_expected = True
3252 .type = WREPL_TYPE_MHOMED,
3253 .state = WREPL_STATE_ACTIVE,
3254 .node = WREPL_NODE_B,
3256 .num_ips = ARRAY_SIZE(addresses_B_1),
3257 .ips = addresses_B_1,
3258 .apply_expected = True
3263 * sgroup,tombstone vs. mhomed,tombstone
3264 * => should be replaced
3267 .line = __location__,
3268 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3271 .type = WREPL_TYPE_SGROUP,
3272 .state = WREPL_STATE_TOMBSTONE,
3273 .node = WREPL_NODE_B,
3275 .num_ips = ARRAY_SIZE(addresses_B_1),
3276 .ips = addresses_B_1,
3277 .apply_expected = True
3281 .type = WREPL_TYPE_MHOMED,
3282 .state = WREPL_STATE_TOMBSTONE,
3283 .node = WREPL_NODE_B,
3285 .num_ips = ARRAY_SIZE(addresses_A_1),
3286 .ips = addresses_A_1,
3287 .apply_expected = True
3292 * multi homed vs. unique section,
3295 * mhomed,active vs. unique,active
3296 * => should be replaced
3299 .line = __location__,
3300 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3303 .type = WREPL_TYPE_MHOMED,
3304 .state = WREPL_STATE_ACTIVE,
3305 .node = WREPL_NODE_B,
3307 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3308 .ips = addresses_A_3_4,
3309 .apply_expected = True
3313 .type = WREPL_TYPE_UNIQUE,
3314 .state = WREPL_STATE_ACTIVE,
3315 .node = WREPL_NODE_B,
3317 .num_ips = ARRAY_SIZE(addresses_B_1),
3318 .ips = addresses_B_1,
3319 .apply_expected = True
3324 * mhomed,active vs. unique,tombstone
3325 * => should NOT be replaced
3328 .line = __location__,
3329 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3332 .type = WREPL_TYPE_MHOMED,
3333 .state = WREPL_STATE_ACTIVE,
3334 .node = WREPL_NODE_B,
3336 .num_ips = ARRAY_SIZE(addresses_B_1),
3337 .ips = addresses_B_1,
3338 .apply_expected = True
3342 .type = WREPL_TYPE_UNIQUE,
3343 .state = WREPL_STATE_TOMBSTONE,
3344 .node = WREPL_NODE_B,
3346 .num_ips = ARRAY_SIZE(addresses_B_1),
3347 .ips = addresses_B_1,
3348 .apply_expected = False
3353 * mhomed,released vs. unique,active
3354 * => should be replaced
3357 .line = __location__,
3358 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3361 .type = WREPL_TYPE_MHOMED,
3362 .state = WREPL_STATE_RELEASED,
3363 .node = WREPL_NODE_B,
3365 .num_ips = ARRAY_SIZE(addresses_A_1),
3366 .ips = addresses_A_1,
3367 .apply_expected = False
3371 .type = WREPL_TYPE_UNIQUE,
3372 .state = WREPL_STATE_ACTIVE,
3373 .node = WREPL_NODE_B,
3375 .num_ips = ARRAY_SIZE(addresses_B_1),
3376 .ips = addresses_B_1,
3377 .apply_expected = True
3382 * mhomed,released vs. uinique,tombstone
3383 * => should be replaced
3386 .line = __location__,
3387 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3390 .type = WREPL_TYPE_MHOMED,
3391 .state = WREPL_STATE_RELEASED,
3392 .node = WREPL_NODE_B,
3394 .num_ips = ARRAY_SIZE(addresses_B_1),
3395 .ips = addresses_B_1,
3396 .apply_expected = False
3400 .type = WREPL_TYPE_UNIQUE,
3401 .state = WREPL_STATE_TOMBSTONE,
3402 .node = WREPL_NODE_B,
3404 .num_ips = ARRAY_SIZE(addresses_A_1),
3405 .ips = addresses_A_1,
3406 .apply_expected = True
3411 * mhomed,tombstone vs. unique,active
3412 * => should be replaced
3415 .line = __location__,
3416 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3419 .type = WREPL_TYPE_MHOMED,
3420 .state = WREPL_STATE_TOMBSTONE,
3421 .node = WREPL_NODE_B,
3423 .num_ips = ARRAY_SIZE(addresses_A_1),
3424 .ips = addresses_A_1,
3425 .apply_expected = True
3429 .type = WREPL_TYPE_UNIQUE,
3430 .state = WREPL_STATE_ACTIVE,
3431 .node = WREPL_NODE_B,
3433 .num_ips = ARRAY_SIZE(addresses_B_1),
3434 .ips = addresses_B_1,
3435 .apply_expected = True
3440 * mhomed,tombstone vs. uinique,tombstone
3441 * => should be replaced
3444 .line = __location__,
3445 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3448 .type = WREPL_TYPE_MHOMED,
3449 .state = WREPL_STATE_TOMBSTONE,
3450 .node = WREPL_NODE_B,
3452 .num_ips = ARRAY_SIZE(addresses_B_1),
3453 .ips = addresses_B_1,
3454 .apply_expected = True
3458 .type = WREPL_TYPE_UNIQUE,
3459 .state = WREPL_STATE_TOMBSTONE,
3460 .node = WREPL_NODE_B,
3462 .num_ips = ARRAY_SIZE(addresses_A_1),
3463 .ips = addresses_A_1,
3464 .apply_expected = True
3469 * multi homed vs. normal group section,
3472 * mhomed,active vs. group,active
3473 * => should be replaced
3476 .line = __location__,
3477 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3480 .type = WREPL_TYPE_MHOMED,
3481 .state = WREPL_STATE_ACTIVE,
3482 .node = WREPL_NODE_B,
3484 .num_ips = ARRAY_SIZE(addresses_A_1),
3485 .ips = addresses_A_1,
3486 .apply_expected = True
3490 .type = WREPL_TYPE_GROUP,
3491 .state = WREPL_STATE_ACTIVE,
3492 .node = WREPL_NODE_B,
3494 .num_ips = ARRAY_SIZE(addresses_B_1),
3495 .ips = addresses_B_1,
3496 .apply_expected = True
3501 * mhomed,active vs. group,tombstone
3502 * => should NOT be replaced
3505 .line = __location__,
3506 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3509 .type = WREPL_TYPE_MHOMED,
3510 .state = WREPL_STATE_ACTIVE,
3511 .node = WREPL_NODE_B,
3513 .num_ips = ARRAY_SIZE(addresses_B_1),
3514 .ips = addresses_B_1,
3515 .apply_expected = True
3519 .type = WREPL_TYPE_GROUP,
3520 .state = WREPL_STATE_TOMBSTONE,
3521 .node = WREPL_NODE_B,
3523 .num_ips = ARRAY_SIZE(addresses_B_1),
3524 .ips = addresses_B_1,
3525 .apply_expected = False
3530 * mhomed,released vs. group,active
3531 * => should be replaced
3534 .line = __location__,
3535 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3538 .type = WREPL_TYPE_MHOMED,
3539 .state = WREPL_STATE_RELEASED,
3540 .node = WREPL_NODE_B,
3542 .num_ips = ARRAY_SIZE(addresses_B_1),
3543 .ips = addresses_B_1,
3544 .apply_expected = False
3548 .type = WREPL_TYPE_GROUP,
3549 .state = WREPL_STATE_ACTIVE,
3550 .node = WREPL_NODE_B,
3552 .num_ips = ARRAY_SIZE(addresses_A_1),
3553 .ips = addresses_A_1,
3554 .apply_expected = True
3559 * mhomed,released vs. group,tombstone
3560 * => should be replaced
3563 .line = __location__,
3564 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3567 .type = WREPL_TYPE_MHOMED,
3568 .state = WREPL_STATE_RELEASED,
3569 .node = WREPL_NODE_B,
3571 .num_ips = ARRAY_SIZE(addresses_A_1),
3572 .ips = addresses_A_1,
3573 .apply_expected = False
3577 .type = WREPL_TYPE_GROUP,
3578 .state = WREPL_STATE_TOMBSTONE,
3579 .node = WREPL_NODE_B,
3581 .num_ips = ARRAY_SIZE(addresses_B_1),
3582 .ips = addresses_B_1,
3583 .apply_expected = True
3588 * mhomed,tombstone vs. group,active
3589 * => should be replaced
3592 .line = __location__,
3593 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3596 .type = WREPL_TYPE_MHOMED,
3597 .state = WREPL_STATE_TOMBSTONE,
3598 .node = WREPL_NODE_B,
3600 .num_ips = ARRAY_SIZE(addresses_B_1),
3601 .ips = addresses_B_1,
3602 .apply_expected = True
3606 .type = WREPL_TYPE_GROUP,
3607 .state = WREPL_STATE_ACTIVE,
3608 .node = WREPL_NODE_B,
3610 .num_ips = ARRAY_SIZE(addresses_A_1),
3611 .ips = addresses_A_1,
3612 .apply_expected = True
3617 * mhomed,tombstone vs. group,tombstone
3618 * => should be replaced
3621 .line = __location__,
3622 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3625 .type = WREPL_TYPE_MHOMED,
3626 .state = WREPL_STATE_TOMBSTONE,
3627 .node = WREPL_NODE_B,
3629 .num_ips = ARRAY_SIZE(addresses_A_1),
3630 .ips = addresses_A_1,
3631 .apply_expected = True
3635 .type = WREPL_TYPE_GROUP,
3636 .state = WREPL_STATE_TOMBSTONE,
3637 .node = WREPL_NODE_B,
3639 .num_ips = ARRAY_SIZE(addresses_B_1),
3640 .ips = addresses_B_1,
3641 .apply_expected = True
3646 * multi homed vs. special group section,
3649 * mhomed,active vs. sgroup,active
3650 * => should NOT be replaced
3653 .line = __location__,
3654 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3657 .type = WREPL_TYPE_MHOMED,
3658 .state = WREPL_STATE_ACTIVE,
3659 .node = WREPL_NODE_B,
3661 .num_ips = ARRAY_SIZE(addresses_A_1),
3662 .ips = addresses_A_1,
3663 .apply_expected = True
3667 .type = WREPL_TYPE_SGROUP,
3668 .state = WREPL_STATE_ACTIVE,
3669 .node = WREPL_NODE_B,
3671 .num_ips = ARRAY_SIZE(addresses_A_1),
3672 .ips = addresses_A_1,
3673 .apply_expected = False
3678 * mhomed,active vs. sgroup,tombstone
3679 * => should NOT be replaced
3682 .line = __location__,
3683 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3686 .type = WREPL_TYPE_MHOMED,
3687 .state = WREPL_STATE_ACTIVE,
3688 .node = WREPL_NODE_B,
3690 .num_ips = ARRAY_SIZE(addresses_A_1),
3691 .ips = addresses_A_1,
3692 .apply_expected = True
3696 .type = WREPL_TYPE_SGROUP,
3697 .state = WREPL_STATE_TOMBSTONE,
3698 .node = WREPL_NODE_B,
3700 .num_ips = ARRAY_SIZE(addresses_A_1),
3701 .ips = addresses_A_1,
3702 .apply_expected = False
3707 * mhomed,released vs. sgroup,active
3708 * => should be replaced
3711 .line = __location__,
3712 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3715 .type = WREPL_TYPE_MHOMED,
3716 .state = WREPL_STATE_RELEASED,
3717 .node = WREPL_NODE_B,
3719 .num_ips = ARRAY_SIZE(addresses_A_1),
3720 .ips = addresses_A_1,
3721 .apply_expected = False
3725 .type = WREPL_TYPE_SGROUP,
3726 .state = WREPL_STATE_ACTIVE,
3727 .node = WREPL_NODE_B,
3729 .num_ips = ARRAY_SIZE(addresses_B_1),
3730 .ips = addresses_B_1,
3731 .apply_expected = True
3736 * mhomed,released vs. sgroup,tombstone
3737 * => should be replaced
3740 .line = __location__,
3741 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3744 .type = WREPL_TYPE_MHOMED,
3745 .state = WREPL_STATE_RELEASED,
3746 .node = WREPL_NODE_B,
3748 .num_ips = ARRAY_SIZE(addresses_B_1),
3749 .ips = addresses_B_1,
3750 .apply_expected = False
3754 .type = WREPL_TYPE_SGROUP,
3755 .state = WREPL_STATE_TOMBSTONE,
3756 .node = WREPL_NODE_B,
3758 .num_ips = ARRAY_SIZE(addresses_A_1),
3759 .ips = addresses_A_1,
3760 .apply_expected = True
3765 * mhomed,tombstone vs. sgroup,active
3766 * => should be replaced
3769 .line = __location__,
3770 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3773 .type = WREPL_TYPE_MHOMED,
3774 .state = WREPL_STATE_TOMBSTONE,
3775 .node = WREPL_NODE_B,
3777 .num_ips = ARRAY_SIZE(addresses_A_1),
3778 .ips = addresses_A_1,
3779 .apply_expected = True
3783 .type = WREPL_TYPE_SGROUP,
3784 .state = WREPL_STATE_ACTIVE,
3785 .node = WREPL_NODE_B,
3787 .num_ips = ARRAY_SIZE(addresses_B_1),
3788 .ips = addresses_B_1,
3789 .apply_expected = True
3794 * mhomed,tombstone vs. sgroup,tombstone
3795 * => should be replaced
3798 .line = __location__,
3799 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3802 .type = WREPL_TYPE_MHOMED,
3803 .state = WREPL_STATE_TOMBSTONE,
3804 .node = WREPL_NODE_B,
3806 .num_ips = ARRAY_SIZE(addresses_B_1),
3807 .ips = addresses_B_1,
3808 .apply_expected = True
3812 .type = WREPL_TYPE_SGROUP,
3813 .state = WREPL_STATE_TOMBSTONE,
3814 .node = WREPL_NODE_B,
3816 .num_ips = ARRAY_SIZE(addresses_A_1),
3817 .ips = addresses_A_1,
3818 .apply_expected = True
3823 * multi homed vs. mlti homed section,
3826 * mhomed,active vs. mhomed,active
3827 * => should be replaced
3830 .line = __location__,
3831 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3834 .type = WREPL_TYPE_MHOMED,
3835 .state = WREPL_STATE_ACTIVE,
3836 .node = WREPL_NODE_B,
3838 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3839 .ips = addresses_A_3_4,
3840 .apply_expected = True
3844 .type = WREPL_TYPE_MHOMED,
3845 .state = WREPL_STATE_ACTIVE,
3846 .node = WREPL_NODE_B,
3848 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3849 .ips = addresses_B_3_4,
3850 .apply_expected = True
3855 * mhomed,active vs. mhomed,tombstone
3856 * => should NOT be replaced
3859 .line = __location__,
3860 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3863 .type = WREPL_TYPE_MHOMED,
3864 .state = WREPL_STATE_ACTIVE,
3865 .node = WREPL_NODE_B,
3867 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3868 .ips = addresses_B_3_4,
3869 .apply_expected = True
3873 .type = WREPL_TYPE_MHOMED,
3874 .state = WREPL_STATE_TOMBSTONE,
3875 .node = WREPL_NODE_B,
3877 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3878 .ips = addresses_B_3_4,
3879 .apply_expected = False
3884 * mhomed,released vs. mhomed,active
3885 * => should be replaced
3888 .line = __location__,
3889 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3892 .type = WREPL_TYPE_MHOMED,
3893 .state = WREPL_STATE_RELEASED,
3894 .node = WREPL_NODE_B,
3896 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3897 .ips = addresses_B_3_4,
3898 .apply_expected = False
3902 .type = WREPL_TYPE_MHOMED,
3903 .state = WREPL_STATE_ACTIVE,
3904 .node = WREPL_NODE_B,
3906 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3907 .ips = addresses_A_3_4,
3908 .apply_expected = True
3913 * mhomed,released vs. mhomed,tombstone
3914 * => should be replaced
3917 .line = __location__,
3918 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3921 .type = WREPL_TYPE_MHOMED,
3922 .state = WREPL_STATE_RELEASED,
3923 .node = WREPL_NODE_B,
3925 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3926 .ips = addresses_A_3_4,
3927 .apply_expected = False
3931 .type = WREPL_TYPE_MHOMED,
3932 .state = WREPL_STATE_TOMBSTONE,
3933 .node = WREPL_NODE_B,
3935 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3936 .ips = addresses_B_3_4,
3937 .apply_expected = True
3942 * mhomed,tombstone vs. mhomed,active
3943 * => should be replaced
3946 .line = __location__,
3947 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3950 .type = WREPL_TYPE_MHOMED,
3951 .state = WREPL_STATE_TOMBSTONE,
3952 .node = WREPL_NODE_B,
3954 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3955 .ips = addresses_B_3_4,
3956 .apply_expected = True
3960 .type = WREPL_TYPE_MHOMED,
3961 .state = WREPL_STATE_ACTIVE,
3962 .node = WREPL_NODE_B,
3964 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3965 .ips = addresses_A_3_4,
3966 .apply_expected = True
3971 * mhomed,tombstone vs. mhomed,tombstone
3972 * => should be replaced
3975 .line = __location__,
3976 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3979 .type = WREPL_TYPE_MHOMED,
3980 .state = WREPL_STATE_TOMBSTONE,
3981 .node = WREPL_NODE_B,
3983 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3984 .ips = addresses_A_3_4,
3985 .apply_expected = True
3989 .type = WREPL_TYPE_MHOMED,
3990 .state = WREPL_STATE_TOMBSTONE,
3991 .node = WREPL_NODE_B,
3993 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3994 .ips = addresses_B_3_4,
3995 .apply_expected = True
3999 .line = __location__,
4000 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4004 .type = WREPL_TYPE_UNIQUE,
4005 .state = WREPL_STATE_TOMBSTONE,
4006 .node = WREPL_NODE_B,
4008 .num_ips = ARRAY_SIZE(addresses_B_1),
4009 .ips = addresses_B_1,
4010 .apply_expected = True,
4014 .type = WREPL_TYPE_UNIQUE,
4015 .state = WREPL_STATE_TOMBSTONE,
4016 .node = WREPL_NODE_B,
4018 .num_ips = ARRAY_SIZE(addresses_A_1),
4019 .ips = addresses_A_1,
4020 .apply_expected = True,
4024 * special group vs special group section,
4027 * sgroup,active vs. sgroup,active same addresses
4028 * => should be NOT replaced
4031 .line = __location__,
4032 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4033 .comment= "A:A_3_4 vs. B:A_3_4",
4037 .type = WREPL_TYPE_SGROUP,
4038 .state = WREPL_STATE_ACTIVE,
4039 .node = WREPL_NODE_B,
4041 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4042 .ips = addresses_A_3_4,
4043 .apply_expected = True
4047 .type = WREPL_TYPE_SGROUP,
4048 .state = WREPL_STATE_ACTIVE,
4049 .node = WREPL_NODE_B,
4051 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4052 .ips = addresses_A_3_4,
4053 .apply_expected = False,
4054 .sgroup_cleanup = True
4058 * sgroup,active vs. sgroup,active same addresses
4059 * => should be NOT replaced
4062 .line = __location__,
4063 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4064 .comment= "A:A_3_4 vs. B:NULL",
4068 .type = WREPL_TYPE_SGROUP,
4069 .state = WREPL_STATE_ACTIVE,
4070 .node = WREPL_NODE_B,
4072 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4073 .ips = addresses_A_3_4,
4074 .apply_expected = True
4078 .type = WREPL_TYPE_SGROUP,
4079 .state = WREPL_STATE_ACTIVE,
4080 .node = WREPL_NODE_B,
4084 .apply_expected = False,
4085 .sgroup_cleanup = True
4089 * sgroup,active vs. sgroup,active subset addresses, special case...
4090 * => should NOT be replaced
4093 .line = __location__,
4094 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4095 .comment= "A:A_3_4_X_3_4 vs. B:A_3_4",
4099 .type = WREPL_TYPE_SGROUP,
4100 .state = WREPL_STATE_ACTIVE,
4101 .node = WREPL_NODE_B,
4103 .num_ips = ARRAY_SIZE(addresses_A_3_4_X_3_4),
4104 .ips = addresses_A_3_4_X_3_4,
4105 .apply_expected = True,
4109 .type = WREPL_TYPE_SGROUP,
4110 .state = WREPL_STATE_ACTIVE,
4111 .node = WREPL_NODE_B,
4113 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4114 .ips = addresses_A_3_4,
4115 .apply_expected = False,
4119 .line = __location__,
4120 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4124 .type = WREPL_TYPE_SGROUP,
4125 .state = WREPL_STATE_ACTIVE,
4126 .node = WREPL_NODE_B,
4130 .apply_expected = False,
4134 .type = WREPL_TYPE_SGROUP,
4135 .state = WREPL_STATE_ACTIVE,
4136 .node = WREPL_NODE_B,
4140 .apply_expected = False,
4144 * sgroup,active vs. sgroup,active different addresses, but owner changed
4145 * => should be replaced
4148 .line = __location__,
4149 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4150 .comment= "A:B_3_4 vs. B:A_3_4",
4154 .type = WREPL_TYPE_SGROUP,
4155 .state = WREPL_STATE_ACTIVE,
4156 .node = WREPL_NODE_B,
4158 .num_ips = ARRAY_SIZE(addresses_B_3_4),
4159 .ips = addresses_B_3_4,
4160 .apply_expected = True,
4164 .type = WREPL_TYPE_SGROUP,
4165 .state = WREPL_STATE_ACTIVE,
4166 .node = WREPL_NODE_B,
4168 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4169 .ips = addresses_A_3_4,
4170 .apply_expected = True,
4171 .sgroup_cleanup = True
4175 * sgroup,active vs. sgroup,active different addresses, but owner changed
4176 * => should be replaced
4179 .line = __location__,
4180 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4181 .comment= "A:A_3_4 vs. B:A_3_4_OWNER_B",
4185 .type = WREPL_TYPE_SGROUP,
4186 .state = WREPL_STATE_ACTIVE,
4187 .node = WREPL_NODE_B,
4189 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4190 .ips = addresses_A_3_4,
4191 .apply_expected = True,
4195 .type = WREPL_TYPE_SGROUP,
4196 .state = WREPL_STATE_ACTIVE,
4197 .node = WREPL_NODE_B,
4199 .num_ips = ARRAY_SIZE(addresses_A_3_4_OWNER_B),
4200 .ips = addresses_A_3_4_OWNER_B,
4201 .apply_expected = True,
4202 .sgroup_cleanup = True
4206 * sgroup,active vs. sgroup,active different addresses, but owner changed
4207 * => should be replaced
4210 .line = __location__,
4211 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4212 .comment= "A:A_3_4_OWNER_B vs. B:A_3_4",
4216 .type = WREPL_TYPE_SGROUP,
4217 .state = WREPL_STATE_ACTIVE,
4218 .node = WREPL_NODE_B,
4220 .num_ips = ARRAY_SIZE(addresses_A_3_4_OWNER_B),
4221 .ips = addresses_A_3_4_OWNER_B,
4222 .apply_expected = True,
4226 .type = WREPL_TYPE_SGROUP,
4227 .state = WREPL_STATE_ACTIVE,
4228 .node = WREPL_NODE_B,
4230 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4231 .ips = addresses_A_3_4,
4232 .apply_expected = True,
4233 .sgroup_cleanup = True
4237 * sgroup,active vs. sgroup,active different addresses
4238 * => should be merged
4241 .line = __location__,
4242 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4243 .comment= "A:A_3_4 vs. B:B_3_4 => C:A_3_4_B_3_4",
4247 .type = WREPL_TYPE_SGROUP,
4248 .state = WREPL_STATE_ACTIVE,
4249 .node = WREPL_NODE_B,
4251 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4252 .ips = addresses_A_3_4,
4253 .apply_expected = True,
4257 .type = WREPL_TYPE_SGROUP,
4258 .state = WREPL_STATE_ACTIVE,
4259 .node = WREPL_NODE_B,
4261 .num_ips = ARRAY_SIZE(addresses_B_3_4),
4262 .ips = addresses_B_3_4,
4263 .sgroup_merge = True,
4264 .sgroup_cleanup = True,
4268 * sgroup,active vs. sgroup,active different addresses, special case...
4269 * => should be merged
4272 .line = __location__,
4273 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4274 .comment= "A:B_3_4_X_3_4 vs. B:A_3_4 => B:A_3_4_X_3_4",
4278 .type = WREPL_TYPE_SGROUP,
4279 .state = WREPL_STATE_ACTIVE,
4280 .node = WREPL_NODE_B,
4282 .num_ips = ARRAY_SIZE(addresses_B_3_4_X_3_4),
4283 .ips = addresses_B_3_4_X_3_4,
4284 .apply_expected = True,
4288 .type = WREPL_TYPE_SGROUP,
4289 .state = WREPL_STATE_ACTIVE,
4290 .node = WREPL_NODE_B,
4292 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4293 .ips = addresses_A_3_4,
4294 .sgroup_merge = True,
4295 .merge_owner = &ctx->b,
4296 .sgroup_cleanup = False
4300 .line = __location__,
4301 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4305 .type = WREPL_TYPE_SGROUP,
4306 .state = WREPL_STATE_ACTIVE,
4307 .node = WREPL_NODE_B,
4309 .num_ips = ARRAY_SIZE(addresses_A_3_4_X_3_4_OWNER_B),
4310 .ips = addresses_A_3_4_X_3_4_OWNER_B,
4311 .apply_expected = True,
4315 .type = WREPL_TYPE_SGROUP,
4316 .state = WREPL_STATE_ACTIVE,
4317 .node = WREPL_NODE_B,
4321 .apply_expected = False,
4325 * sgroup,active vs. sgroup,active different addresses, special case...
4326 * => should be merged
4329 .line = __location__,
4330 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4331 .comment= "A:X_3_4 vs. B:A_3_4 => C:A_3_4_X_3_4",
4335 .type = WREPL_TYPE_SGROUP,
4336 .state = WREPL_STATE_ACTIVE,
4337 .node = WREPL_NODE_B,
4339 .num_ips = ARRAY_SIZE(addresses_X_3_4),
4340 .ips = addresses_X_3_4,
4341 .apply_expected = True,
4345 .type = WREPL_TYPE_SGROUP,
4346 .state = WREPL_STATE_ACTIVE,
4347 .node = WREPL_NODE_B,
4349 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4350 .ips = addresses_A_3_4,
4351 .sgroup_merge = True,
4352 .sgroup_cleanup = False
4356 .line = __location__,
4357 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4361 .type = WREPL_TYPE_SGROUP,
4362 .state = WREPL_STATE_ACTIVE,
4363 .node = WREPL_NODE_B,
4367 .apply_expected = False,
4371 .type = WREPL_TYPE_SGROUP,
4372 .state = WREPL_STATE_ACTIVE,
4373 .node = WREPL_NODE_B,
4377 .apply_expected = False,
4381 * sgroup,active vs. sgroup,active different addresses, special case...
4382 * => should be merged
4385 .line = __location__,
4386 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4387 .comment= "A:A_3_4_X_3_4 vs. B:A_3_4_OWNER_B => B:A_3_4_OWNER_B_X_3_4",
4391 .type = WREPL_TYPE_SGROUP,
4392 .state = WREPL_STATE_ACTIVE,
4393 .node = WREPL_NODE_B,
4395 .num_ips = ARRAY_SIZE(addresses_A_3_4_X_3_4),
4396 .ips = addresses_A_3_4_X_3_4,
4397 .apply_expected = True,
4401 .type = WREPL_TYPE_SGROUP,
4402 .state = WREPL_STATE_ACTIVE,
4403 .node = WREPL_NODE_B,
4405 .num_ips = ARRAY_SIZE(addresses_A_3_4_OWNER_B),
4406 .ips = addresses_A_3_4_OWNER_B,
4407 .sgroup_merge = True,
4408 .merge_owner = &ctx->b,
4412 .line = __location__,
4413 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4417 .type = WREPL_TYPE_SGROUP,
4418 .state = WREPL_STATE_ACTIVE,
4419 .node = WREPL_NODE_B,
4423 .apply_expected = False,
4427 .type = WREPL_TYPE_SGROUP,
4428 .state = WREPL_STATE_ACTIVE,
4429 .node = WREPL_NODE_B,
4433 .apply_expected = False,
4437 * sgroup,active vs. sgroup,active partly different addresses, special case...
4438 * => should be merged
4441 .line = __location__,
4442 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4443 .comment= "A:B_3_4_X_3_4 vs. B:B_3_4_X_1_2 => C:B_3_4_X_1_2_3_4",
4447 .type = WREPL_TYPE_SGROUP,
4448 .state = WREPL_STATE_ACTIVE,
4449 .node = WREPL_NODE_B,
4451 .num_ips = ARRAY_SIZE(addresses_B_3_4_X_3_4),
4452 .ips = addresses_B_3_4_X_3_4,
4453 .apply_expected = True,
4457 .type = WREPL_TYPE_SGROUP,
4458 .state = WREPL_STATE_ACTIVE,
4459 .node = WREPL_NODE_B,
4461 .num_ips = ARRAY_SIZE(addresses_B_3_4_X_1_2),
4462 .ips = addresses_B_3_4_X_1_2,
4463 .sgroup_merge = True,
4464 .sgroup_cleanup = False
4468 .line = __location__,
4469 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4473 .type = WREPL_TYPE_SGROUP,
4474 .state = WREPL_STATE_ACTIVE,
4475 .node = WREPL_NODE_B,
4479 .apply_expected = False,
4483 .type = WREPL_TYPE_SGROUP,
4484 .state = WREPL_STATE_ACTIVE,
4485 .node = WREPL_NODE_B,
4489 .apply_expected = False,
4493 * sgroup,active vs. sgroup,active different addresses, special case...
4494 * => should be merged
4497 .line = __location__,
4498 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4499 .comment= "A:A_3_4_B_3_4 vs. B:NULL => B:A_3_4",
4503 .type = WREPL_TYPE_SGROUP,
4504 .state = WREPL_STATE_ACTIVE,
4505 .node = WREPL_NODE_B,
4507 .num_ips = ARRAY_SIZE(addresses_A_3_4_B_3_4),
4508 .ips = addresses_A_3_4_B_3_4,
4509 .apply_expected = True,
4513 .type = WREPL_TYPE_SGROUP,
4514 .state = WREPL_STATE_ACTIVE,
4515 .node = WREPL_NODE_B,
4519 .sgroup_merge = True,
4520 .merge_owner = &ctx->b,
4521 .sgroup_cleanup = True
4525 .line = __location__,
4526 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4530 .type = WREPL_TYPE_SGROUP,
4531 .state = WREPL_STATE_ACTIVE,
4532 .node = WREPL_NODE_B,
4536 .apply_expected = False,
4540 .type = WREPL_TYPE_UNIQUE,
4541 .state = WREPL_STATE_TOMBSTONE,
4542 .node = WREPL_NODE_B,
4544 .num_ips = ARRAY_SIZE(addresses_A_1),
4545 .ips = addresses_A_1,
4546 .apply_expected = True,
4550 * sgroup,active vs. sgroup,active different addresses, special case...
4551 * => should be merged
4554 .line = __location__,
4555 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4556 .comment= "A:B_3_4_X_3_4 vs. B:NULL => B:X_3_4",
4560 .type = WREPL_TYPE_SGROUP,
4561 .state = WREPL_STATE_ACTIVE,
4562 .node = WREPL_NODE_B,
4564 .num_ips = ARRAY_SIZE(addresses_B_3_4_X_3_4),
4565 .ips = addresses_B_3_4_X_3_4,
4566 .apply_expected = True,
4570 .type = WREPL_TYPE_SGROUP,
4571 .state = WREPL_STATE_ACTIVE,
4572 .node = WREPL_NODE_B,
4576 .sgroup_merge = True,
4577 .merge_owner = &ctx->b,
4578 .sgroup_cleanup = True
4582 .line = __location__,
4583 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4587 .type = WREPL_TYPE_SGROUP,
4588 .state = WREPL_STATE_ACTIVE,
4589 .node = WREPL_NODE_B,
4593 .apply_expected = False,
4597 .type = WREPL_TYPE_UNIQUE,
4598 .state = WREPL_STATE_TOMBSTONE,
4599 .node = WREPL_NODE_B,
4601 .num_ips = ARRAY_SIZE(addresses_A_1),
4602 .ips = addresses_A_1,
4603 .apply_expected = True,
4607 * This should be the last record in this array,
4608 * we need to make sure the we leave a tombstoned unique entry
4612 .line = __location__,
4613 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4617 .type = WREPL_TYPE_UNIQUE,
4618 .state = WREPL_STATE_TOMBSTONE,
4619 .node = WREPL_NODE_B,
4621 .num_ips = ARRAY_SIZE(addresses_A_1),
4622 .ips = addresses_A_1,
4623 .apply_expected = True
4627 .type = WREPL_TYPE_UNIQUE,
4628 .state = WREPL_STATE_TOMBSTONE,
4629 .node = WREPL_NODE_B,
4631 .num_ips = ARRAY_SIZE(addresses_A_1),
4632 .ips = addresses_A_1,
4633 .apply_expected = True
4635 }}; /* do not add entries here, this should be the last record! */
4637 if (!ctx) return False;
4639 wins_name_r1 = &wins_name1;
4640 wins_name_r2 = &wins_name2;
4642 printf("Test Replica Conflicts with different owners\n");
4644 for(i=0; ret && i < ARRAY_SIZE(records); i++) {
4646 if (!records[i].extra && !records[i].cleanup) {
4647 /* we should test the worst cases */
4648 if (records[i].r2.apply_expected && records[i].r1.ips==records[i].r2.ips) {
4649 printf("(%s) Programmer error, invalid record[%u]: %s\n",
4650 __location__, i, records[i].line);
4652 } else if (!records[i].r2.apply_expected && records[i].r1.ips!=records[i].r2.ips) {
4653 printf("(%s) Programmer error, invalid record[%u]: %s\n",
4654 __location__, i, records[i].line);
4659 if (!records[i].cleanup) {
4660 const char *expected;
4663 if (records[i].r2.sgroup_merge) {
4664 expected = "SGROUP_MERGE";
4665 } else if (records[i].r2.apply_expected) {
4666 expected = "REPLACE";
4668 expected = "NOT REPLACE";
4671 if (!records[i].r1.ips && !records[i].r2.ips) {
4672 ips = "with no ip(s)";
4673 } else if (records[i].r1.ips==records[i].r2.ips) {
4674 ips = "with same ip(s)";
4676 ips = "with different ip(s)";
4679 printf("%s,%s%s vs. %s,%s%s %s => %s\n",
4680 wrepl_name_type_string(records[i].r1.type),
4681 wrepl_name_state_string(records[i].r1.state),
4682 (records[i].r1.is_static?",static":""),
4683 wrepl_name_type_string(records[i].r2.type),
4684 wrepl_name_state_string(records[i].r2.state),
4685 (records[i].r2.is_static?",static":""),
4686 (records[i].comment?records[i].comment:ips),
4693 wins_name_r1->name = &records[i].name;
4694 wins_name_r1->flags = WREPL_NAME_FLAGS(records[i].r1.type,
4695 records[i].r1.state,
4697 records[i].r1.is_static);
4698 wins_name_r1->id = ++records[i].r1.owner->max_version;
4699 if (wins_name_r1->flags & 2) {
4700 wins_name_r1->addresses.addresses.num_ips = records[i].r1.num_ips;
4701 wins_name_r1->addresses.addresses.ips = discard_const(records[i].r1.ips);
4703 wins_name_r1->addresses.ip = records[i].r1.ips[0].ip;
4705 wins_name_r1->unknown = "255.255.255.255";
4708 ret &= test_wrepl_update_one(ctx, records[i].r1.owner, wins_name_r1);
4709 ret &= test_wrepl_is_applied(ctx, records[i].r1.owner,
4710 wins_name_r1, records[i].r1.apply_expected);
4715 wins_name_r2->name = &records[i].name;
4716 wins_name_r2->flags = WREPL_NAME_FLAGS(records[i].r2.type,
4717 records[i].r2.state,
4719 records[i].r2.is_static);
4720 wins_name_r2->id = ++records[i].r2.owner->max_version;
4721 if (wins_name_r2->flags & 2) {
4722 wins_name_r2->addresses.addresses.num_ips = records[i].r2.num_ips;
4723 wins_name_r2->addresses.addresses.ips = discard_const(records[i].r2.ips);
4725 wins_name_r2->addresses.ip = records[i].r2.ips[0].ip;
4727 wins_name_r2->unknown = "255.255.255.255";
4730 ret &= test_wrepl_update_one(ctx, records[i].r2.owner, wins_name_r2);
4731 if (records[i].r1.state == WREPL_STATE_RELEASED) {
4732 ret &= test_wrepl_is_applied(ctx, records[i].r1.owner,
4733 wins_name_r1, False);
4734 } else if (records[i].r2.sgroup_merge) {
4735 ret &= test_wrepl_sgroup_merged(ctx, records[i].r2.merge_owner,
4736 records[i].r1.owner,
4737 records[i].r1.num_ips, records[i].r1.ips,
4738 records[i].r2.owner,
4739 records[i].r2.num_ips, records[i].r2.ips,
4741 } else if (records[i].r1.owner != records[i].r2.owner) {
4743 _expected = (records[i].r1.apply_expected && !records[i].r2.apply_expected);
4744 ret &= test_wrepl_is_applied(ctx, records[i].r1.owner,
4745 wins_name_r1, _expected);
4747 if (records[i].r2.state == WREPL_STATE_RELEASED) {
4748 ret &= test_wrepl_is_applied(ctx, records[i].r2.owner,
4749 wins_name_r2, False);
4750 } else if (!records[i].r2.sgroup_merge) {
4751 ret &= test_wrepl_is_applied(ctx, records[i].r2.owner,
4752 wins_name_r2, records[i].r2.apply_expected);
4755 if (records[i].r2.sgroup_cleanup) {
4756 /* clean up the SGROUP record */
4757 wins_name_r1->name = &records[i].name;
4758 wins_name_r1->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
4760 WREPL_NODE_B, False);
4761 wins_name_r1->id = ++records[i].r1.owner->max_version;
4762 wins_name_r1->addresses.addresses.num_ips = 0;
4763 wins_name_r1->addresses.addresses.ips = NULL;
4764 wins_name_r1->unknown = "255.255.255.255";
4765 ret &= test_wrepl_update_one(ctx, records[i].r1.owner, wins_name_r1);
4767 /* here we test how names from an owner are deleted */
4768 if (records[i].r2.sgroup_merge && records[i].r2.num_ips) {
4769 ret &= test_wrepl_sgroup_merged(ctx, NULL,
4770 records[i].r2.owner,
4771 records[i].r2.num_ips, records[i].r2.ips,
4772 records[i].r1.owner,
4777 /* clean up the SGROUP record */
4778 wins_name_r2->name = &records[i].name;
4779 wins_name_r2->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
4781 WREPL_NODE_B, False);
4782 wins_name_r2->id = ++records[i].r2.owner->max_version;
4783 wins_name_r2->addresses.addresses.num_ips = 0;
4784 wins_name_r2->addresses.addresses.ips = NULL;
4785 wins_name_r2->unknown = "255.255.255.255";
4786 ret &= test_wrepl_update_one(ctx, records[i].r2.owner, wins_name_r2);
4788 /* take ownership of the SGROUP record */
4789 wins_name_r2->name = &records[i].name;
4790 wins_name_r2->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
4792 WREPL_NODE_B, False);
4793 wins_name_r2->id = ++records[i].r2.owner->max_version;
4794 wins_name_r2->addresses.addresses.num_ips = ARRAY_SIZE(addresses_B_1);
4795 wins_name_r2->addresses.addresses.ips = discard_const(addresses_B_1);
4796 wins_name_r2->unknown = "255.255.255.255";
4797 ret &= test_wrepl_update_one(ctx, records[i].r2.owner, wins_name_r2);
4798 ret &= test_wrepl_is_applied(ctx, records[i].r2.owner, wins_name_r2, True);
4800 /* overwrite the SGROUP record with unique,tombstone */
4801 wins_name_r2->name = &records[i].name;
4802 wins_name_r2->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
4803 WREPL_STATE_TOMBSTONE,
4804 WREPL_NODE_B, False);
4805 wins_name_r2->id = ++records[i].r2.owner->max_version;
4806 wins_name_r2->addresses.addresses.num_ips = ARRAY_SIZE(addresses_B_1);
4807 wins_name_r2->addresses.addresses.ips = discard_const(addresses_B_1);
4808 wins_name_r2->unknown = "255.255.255.255";
4809 ret &= test_wrepl_update_one(ctx, records[i].r2.owner, wins_name_r2);
4810 ret &= test_wrepl_is_applied(ctx, records[i].r2.owner, wins_name_r2, True);
4813 /* the first one is a cleanup run */
4814 if (!ret && i == 0) ret = True;
4817 printf("conflict handled wrong or record[%u]: %s\n", i, records[i].line);
4825 static BOOL test_conflict_owned_released_vs_replica(struct test_wrepl_conflict_conn *ctx)
4829 struct wrepl_wins_name wins_name_;
4830 struct wrepl_wins_name *wins_name = &wins_name_;
4831 struct nbt_name_register name_register_;
4832 struct nbt_name_register *name_register = &name_register_;
4833 struct nbt_name_release release_;
4834 struct nbt_name_release *release = &release_;
4837 const char *line; /* just better debugging */
4838 struct nbt_name name;
4843 const struct wrepl_ip *ips;
4844 BOOL apply_expected;
4847 enum wrepl_name_type type;
4848 enum wrepl_name_state state;
4849 enum wrepl_name_node node;
4852 const struct wrepl_ip *ips;
4853 BOOL apply_expected;
4857 * unique vs. unique section
4860 * unique,released vs. unique,active with same ip(s)
4863 .line = __location__,
4864 .name = _NBT_NAME("_UR_UA_SI", 0x00, NULL),
4868 .num_ips = ctx->addresses_best_num,
4869 .ips = ctx->addresses_best,
4870 .apply_expected = True
4873 .type = WREPL_TYPE_UNIQUE,
4874 .state = WREPL_STATE_ACTIVE,
4875 .node = WREPL_NODE_B,
4877 .num_ips = ctx->addresses_best_num,
4878 .ips = ctx->addresses_best,
4879 .apply_expected = True
4883 * unique,released vs. unique,active with different ip(s)
4886 .line = __location__,
4887 .name = _NBT_NAME("_UR_UA_DI", 0x00, NULL),
4891 .num_ips = ctx->addresses_best_num,
4892 .ips = ctx->addresses_best,
4893 .apply_expected = True
4896 .type = WREPL_TYPE_UNIQUE,
4897 .state = WREPL_STATE_ACTIVE,
4898 .node = WREPL_NODE_B,
4900 .num_ips = ARRAY_SIZE(addresses_B_1),
4901 .ips = addresses_B_1,
4902 .apply_expected = True
4906 * unique,released vs. unique,tombstone with same ip(s)
4909 .line = __location__,
4910 .name = _NBT_NAME("_UR_UT_SI", 0x00, NULL),
4914 .num_ips = ctx->addresses_best_num,
4915 .ips = ctx->addresses_best,
4916 .apply_expected = True
4919 .type = WREPL_TYPE_UNIQUE,
4920 .state = WREPL_STATE_TOMBSTONE,
4921 .node = WREPL_NODE_B,
4923 .num_ips = ctx->addresses_best_num,
4924 .ips = ctx->addresses_best,
4925 .apply_expected = True
4929 * unique,released vs. unique,tombstone with different ip(s)
4932 .line = __location__,
4933 .name = _NBT_NAME("_UR_UT_DI", 0x00, NULL),
4937 .num_ips = ctx->addresses_best_num,
4938 .ips = ctx->addresses_best,
4939 .apply_expected = True
4942 .type = WREPL_TYPE_UNIQUE,
4943 .state = WREPL_STATE_TOMBSTONE,
4944 .node = WREPL_NODE_B,
4946 .num_ips = ARRAY_SIZE(addresses_B_1),
4947 .ips = addresses_B_1,
4948 .apply_expected = True
4952 * unique vs. group section
4955 * unique,released vs. group,active with same ip(s)
4958 .line = __location__,
4959 .name = _NBT_NAME("_UR_GA_SI", 0x00, NULL),
4963 .num_ips = ctx->addresses_best_num,
4964 .ips = ctx->addresses_best,
4965 .apply_expected = True
4968 .type = WREPL_TYPE_GROUP,
4969 .state = WREPL_STATE_ACTIVE,
4970 .node = WREPL_NODE_B,
4972 .num_ips = ctx->addresses_best_num,
4973 .ips = ctx->addresses_best,
4974 .apply_expected = True
4978 * unique,released vs. group,active with different ip(s)
4981 .line = __location__,
4982 .name = _NBT_NAME("_UR_GA_DI", 0x00, NULL),
4986 .num_ips = ctx->addresses_best_num,
4987 .ips = ctx->addresses_best,
4988 .apply_expected = True
4991 .type = WREPL_TYPE_GROUP,
4992 .state = WREPL_STATE_ACTIVE,
4993 .node = WREPL_NODE_B,
4995 .num_ips = ARRAY_SIZE(addresses_B_1),
4996 .ips = addresses_B_1,
4997 .apply_expected = True
5001 * unique,released vs. group,tombstone with same ip(s)
5004 .line = __location__,
5005 .name = _NBT_NAME("_UR_GT_SI", 0x00, NULL),
5009 .num_ips = ctx->addresses_best_num,
5010 .ips = ctx->addresses_best,
5011 .apply_expected = True
5014 .type = WREPL_TYPE_GROUP,
5015 .state = WREPL_STATE_TOMBSTONE,
5016 .node = WREPL_NODE_B,
5018 .num_ips = ctx->addresses_best_num,
5019 .ips = ctx->addresses_best,
5020 .apply_expected = True
5024 * unique,released vs. group,tombstone with different ip(s)
5027 .line = __location__,
5028 .name = _NBT_NAME("_UR_GT_DI", 0x00, NULL),
5032 .num_ips = ctx->addresses_best_num,
5033 .ips = ctx->addresses_best,
5034 .apply_expected = True
5037 .type = WREPL_TYPE_GROUP,
5038 .state = WREPL_STATE_TOMBSTONE,
5039 .node = WREPL_NODE_B,
5041 .num_ips = ARRAY_SIZE(addresses_B_1),
5042 .ips = addresses_B_1,
5043 .apply_expected = True
5047 * unique vs. special group section
5050 * unique,released vs. sgroup,active with same ip(s)
5053 .line = __location__,
5054 .name = _NBT_NAME("_UR_SA_SI", 0x00, NULL),
5058 .num_ips = ctx->addresses_best_num,
5059 .ips = ctx->addresses_best,
5060 .apply_expected = True
5063 .type = WREPL_TYPE_SGROUP,
5064 .state = WREPL_STATE_ACTIVE,
5065 .node = WREPL_NODE_B,
5067 .num_ips = ctx->addresses_best_num,
5068 .ips = ctx->addresses_best,
5069 .apply_expected = True
5073 * unique,released vs. sgroup,active with different ip(s)
5076 .line = __location__,
5077 .name = _NBT_NAME("_UR_SA_DI", 0x00, NULL),
5081 .num_ips = ctx->addresses_best_num,
5082 .ips = ctx->addresses_best,
5083 .apply_expected = True
5086 .type = WREPL_TYPE_SGROUP,
5087 .state = WREPL_STATE_ACTIVE,
5088 .node = WREPL_NODE_B,
5090 .num_ips = ARRAY_SIZE(addresses_B_1),
5091 .ips = addresses_B_1,
5092 .apply_expected = True
5096 * unique,released vs. sgroup,tombstone with same ip(s)
5099 .line = __location__,
5100 .name = _NBT_NAME("_UR_ST_SI", 0x00, NULL),
5104 .num_ips = ctx->addresses_best_num,
5105 .ips = ctx->addresses_best,
5106 .apply_expected = True
5109 .type = WREPL_TYPE_SGROUP,
5110 .state = WREPL_STATE_TOMBSTONE,
5111 .node = WREPL_NODE_B,
5113 .num_ips = ctx->addresses_best_num,
5114 .ips = ctx->addresses_best,
5115 .apply_expected = True
5119 * unique,released vs. sgroup,tombstone with different ip(s)
5122 .line = __location__,
5123 .name = _NBT_NAME("_UR_ST_DI", 0x00, NULL),
5127 .num_ips = ctx->addresses_best_num,
5128 .ips = ctx->addresses_best,
5129 .apply_expected = True
5132 .type = WREPL_TYPE_SGROUP,
5133 .state = WREPL_STATE_TOMBSTONE,
5134 .node = WREPL_NODE_B,
5136 .num_ips = ARRAY_SIZE(addresses_B_1),
5137 .ips = addresses_B_1,
5138 .apply_expected = True
5142 * unique vs. multi homed section
5145 * unique,released vs. mhomed,active with same ip(s)
5148 .line = __location__,
5149 .name = _NBT_NAME("_UR_MA_SI", 0x00, NULL),
5153 .num_ips = ctx->addresses_best_num,
5154 .ips = ctx->addresses_best,
5155 .apply_expected = True
5158 .type = WREPL_TYPE_MHOMED,
5159 .state = WREPL_STATE_ACTIVE,
5160 .node = WREPL_NODE_B,
5162 .num_ips = ctx->addresses_best_num,
5163 .ips = ctx->addresses_best,
5164 .apply_expected = True
5168 * unique,released vs. mhomed,active with different ip(s)
5171 .line = __location__,
5172 .name = _NBT_NAME("_UR_MA_DI", 0x00, NULL),
5176 .num_ips = ctx->addresses_best_num,
5177 .ips = ctx->addresses_best,
5178 .apply_expected = True
5181 .type = WREPL_TYPE_MHOMED,
5182 .state = WREPL_STATE_ACTIVE,
5183 .node = WREPL_NODE_B,
5185 .num_ips = ARRAY_SIZE(addresses_B_1),
5186 .ips = addresses_B_1,
5187 .apply_expected = True
5191 * unique,released vs. mhomed,tombstone with same ip(s)
5194 .line = __location__,
5195 .name = _NBT_NAME("_UR_MT_SI", 0x00, NULL),
5199 .num_ips = ctx->addresses_best_num,
5200 .ips = ctx->addresses_best,
5201 .apply_expected = True
5204 .type = WREPL_TYPE_MHOMED,
5205 .state = WREPL_STATE_TOMBSTONE,
5206 .node = WREPL_NODE_B,
5208 .num_ips = ctx->addresses_best_num,
5209 .ips = ctx->addresses_best,
5210 .apply_expected = True
5214 * unique,released vs. mhomed,tombstone with different ip(s)
5217 .line = __location__,
5218 .name = _NBT_NAME("_UR_MT_DI", 0x00, NULL),
5222 .num_ips = ctx->addresses_best_num,
5223 .ips = ctx->addresses_best,
5224 .apply_expected = True
5227 .type = WREPL_TYPE_MHOMED,
5228 .state = WREPL_STATE_TOMBSTONE,
5229 .node = WREPL_NODE_B,
5231 .num_ips = ARRAY_SIZE(addresses_B_1),
5232 .ips = addresses_B_1,
5233 .apply_expected = True
5237 * group vs. unique section
5240 * group,released vs. unique,active with same ip(s)
5243 .line = __location__,
5244 .name = _NBT_NAME("_GR_UA_SI", 0x00, NULL),
5246 .nb_flags = NBT_NM_GROUP,
5248 .num_ips = ctx->addresses_best_num,
5249 .ips = ctx->addresses_best,
5250 .apply_expected = True
5253 .type = WREPL_TYPE_UNIQUE,
5254 .state = WREPL_STATE_ACTIVE,
5255 .node = WREPL_NODE_B,
5257 .num_ips = ctx->addresses_best_num,
5258 .ips = ctx->addresses_best,
5259 .apply_expected = False
5263 * group,released vs. unique,active with different ip(s)
5266 .line = __location__,
5267 .name = _NBT_NAME("_GR_UA_DI", 0x00, NULL),
5269 .nb_flags = NBT_NM_GROUP,
5271 .num_ips = ctx->addresses_best_num,
5272 .ips = ctx->addresses_best,
5273 .apply_expected = True
5276 .type = WREPL_TYPE_UNIQUE,
5277 .state = WREPL_STATE_ACTIVE,
5278 .node = WREPL_NODE_B,
5280 .num_ips = ARRAY_SIZE(addresses_B_1),
5281 .ips = addresses_B_1,
5282 .apply_expected = False
5286 * group,released vs. unique,tombstone with same ip(s)
5289 .line = __location__,
5290 .name = _NBT_NAME("_GR_UT_SI", 0x00, NULL),
5292 .nb_flags = NBT_NM_GROUP,
5294 .num_ips = ctx->addresses_best_num,
5295 .ips = ctx->addresses_best,
5296 .apply_expected = True
5299 .type = WREPL_TYPE_UNIQUE,
5300 .state = WREPL_STATE_TOMBSTONE,
5301 .node = WREPL_NODE_B,
5303 .num_ips = ctx->addresses_best_num,
5304 .ips = ctx->addresses_best,
5305 .apply_expected = False
5309 * group,released vs. unique,tombstone with different ip(s)
5312 .line = __location__,
5313 .name = _NBT_NAME("_GR_UT_DI", 0x00, NULL),
5315 .nb_flags = NBT_NM_GROUP,
5317 .num_ips = ctx->addresses_best_num,
5318 .ips = ctx->addresses_best,
5319 .apply_expected = True
5322 .type = WREPL_TYPE_UNIQUE,
5323 .state = WREPL_STATE_TOMBSTONE,
5324 .node = WREPL_NODE_B,
5326 .num_ips = ARRAY_SIZE(addresses_B_1),
5327 .ips = addresses_B_1,
5328 .apply_expected = False
5332 * group vs. group section
5335 * group,released vs. group,active with same ip(s)
5338 .line = __location__,
5339 .name = _NBT_NAME("_GR_GA_SI", 0x00, NULL),
5341 .nb_flags = NBT_NM_GROUP,
5343 .num_ips = ctx->addresses_best_num,
5344 .ips = ctx->addresses_best,
5345 .apply_expected = True
5348 .type = WREPL_TYPE_GROUP,
5349 .state = WREPL_STATE_ACTIVE,
5350 .node = WREPL_NODE_B,
5352 .num_ips = ctx->addresses_best_num,
5353 .ips = ctx->addresses_best,
5354 .apply_expected = True
5358 * group,released vs. group,active with different ip(s)
5361 .line = __location__,
5362 .name = _NBT_NAME("_GR_GA_DI", 0x00, NULL),
5364 .nb_flags = NBT_NM_GROUP,
5366 .num_ips = ctx->addresses_best_num,
5367 .ips = ctx->addresses_best,
5368 .apply_expected = True
5371 .type = WREPL_TYPE_GROUP,
5372 .state = WREPL_STATE_ACTIVE,
5373 .node = WREPL_NODE_B,
5375 .num_ips = ARRAY_SIZE(addresses_B_1),
5376 .ips = addresses_B_1,
5377 .apply_expected = True
5381 * group,released vs. group,tombstone with same ip(s)
5384 .line = __location__,
5385 .name = _NBT_NAME("_GR_GT_SI", 0x00, NULL),
5387 .nb_flags = NBT_NM_GROUP,
5389 .num_ips = ctx->addresses_best_num,
5390 .ips = ctx->addresses_best,
5391 .apply_expected = True
5394 .type = WREPL_TYPE_GROUP,
5395 .state = WREPL_STATE_TOMBSTONE,
5396 .node = WREPL_NODE_B,
5398 .num_ips = ctx->addresses_best_num,
5399 .ips = ctx->addresses_best,
5400 .apply_expected = True
5404 * group,released vs. group,tombstone with different ip(s)
5407 .line = __location__,
5408 .name = _NBT_NAME("_GR_GT_DI", 0x00, NULL),
5410 .nb_flags = NBT_NM_GROUP,
5412 .num_ips = ctx->addresses_best_num,
5413 .ips = ctx->addresses_best,
5414 .apply_expected = True
5417 .type = WREPL_TYPE_GROUP,
5418 .state = WREPL_STATE_TOMBSTONE,
5419 .node = WREPL_NODE_B,
5421 .num_ips = ARRAY_SIZE(addresses_B_1),
5422 .ips = addresses_B_1,
5423 .apply_expected = True
5427 * group vs. special group section
5430 * group,released vs. sgroup,active with same ip(s)
5433 .line = __location__,
5434 .name = _NBT_NAME("_GR_SA_SI", 0x00, NULL),
5436 .nb_flags = NBT_NM_GROUP,
5438 .num_ips = ctx->addresses_best_num,
5439 .ips = ctx->addresses_best,
5440 .apply_expected = True
5443 .type = WREPL_TYPE_SGROUP,
5444 .state = WREPL_STATE_ACTIVE,
5445 .node = WREPL_NODE_B,
5447 .num_ips = ctx->addresses_best_num,
5448 .ips = ctx->addresses_best,
5449 .apply_expected = False
5453 * group,released vs. sgroup,active with different ip(s)
5456 .line = __location__,
5457 .name = _NBT_NAME("_GR_SA_DI", 0x00, NULL),
5459 .nb_flags = NBT_NM_GROUP,
5461 .num_ips = ctx->addresses_best_num,
5462 .ips = ctx->addresses_best,
5463 .apply_expected = True
5466 .type = WREPL_TYPE_SGROUP,
5467 .state = WREPL_STATE_ACTIVE,
5468 .node = WREPL_NODE_B,
5470 .num_ips = ARRAY_SIZE(addresses_B_1),
5471 .ips = addresses_B_1,
5472 .apply_expected = False
5476 * group,released vs. sgroup,tombstone with same ip(s)
5479 .line = __location__,
5480 .name = _NBT_NAME("_GR_ST_SI", 0x00, NULL),
5482 .nb_flags = NBT_NM_GROUP,
5484 .num_ips = ctx->addresses_best_num,
5485 .ips = ctx->addresses_best,
5486 .apply_expected = True
5489 .type = WREPL_TYPE_SGROUP,
5490 .state = WREPL_STATE_TOMBSTONE,
5491 .node = WREPL_NODE_B,
5493 .num_ips = ctx->addresses_best_num,
5494 .ips = ctx->addresses_best,
5495 .apply_expected = False
5499 * group,released vs. sgroup,tombstone with different ip(s)
5502 .line = __location__,
5503 .name = _NBT_NAME("_GR_ST_DI", 0x00, NULL),
5505 .nb_flags = NBT_NM_GROUP,
5507 .num_ips = ctx->addresses_best_num,
5508 .ips = ctx->addresses_best,
5509 .apply_expected = True
5512 .type = WREPL_TYPE_SGROUP,
5513 .state = WREPL_STATE_TOMBSTONE,
5514 .node = WREPL_NODE_B,
5516 .num_ips = ARRAY_SIZE(addresses_B_1),
5517 .ips = addresses_B_1,
5518 .apply_expected = False
5522 * group vs. multi homed section
5525 * group,released vs. mhomed,active with same ip(s)
5528 .line = __location__,
5529 .name = _NBT_NAME("_GR_MA_SI", 0x00, NULL),
5531 .nb_flags = NBT_NM_GROUP,
5533 .num_ips = ctx->addresses_best_num,
5534 .ips = ctx->addresses_best,
5535 .apply_expected = True
5538 .type = WREPL_TYPE_MHOMED,
5539 .state = WREPL_STATE_ACTIVE,
5540 .node = WREPL_NODE_B,
5542 .num_ips = ctx->addresses_best_num,
5543 .ips = ctx->addresses_best,
5544 .apply_expected = False
5548 * group,released vs. mhomed,active with different ip(s)
5551 .line = __location__,
5552 .name = _NBT_NAME("_GR_MA_DI", 0x00, NULL),
5554 .nb_flags = NBT_NM_GROUP,
5556 .num_ips = ctx->addresses_best_num,
5557 .ips = ctx->addresses_best,
5558 .apply_expected = True
5561 .type = WREPL_TYPE_MHOMED,
5562 .state = WREPL_STATE_ACTIVE,
5563 .node = WREPL_NODE_B,
5565 .num_ips = ARRAY_SIZE(addresses_B_1),
5566 .ips = addresses_B_1,
5567 .apply_expected = False
5571 * group,released vs. mhomed,tombstone with same ip(s)
5574 .line = __location__,
5575 .name = _NBT_NAME("_GR_MT_SI", 0x00, NULL),
5577 .nb_flags = NBT_NM_GROUP,
5579 .num_ips = ctx->addresses_best_num,
5580 .ips = ctx->addresses_best,
5581 .apply_expected = True
5584 .type = WREPL_TYPE_MHOMED,
5585 .state = WREPL_STATE_TOMBSTONE,
5586 .node = WREPL_NODE_B,
5588 .num_ips = ctx->addresses_best_num,
5589 .ips = ctx->addresses_best,
5590 .apply_expected = False
5594 * group,released vs. mhomed,tombstone with different ip(s)
5597 .line = __location__,
5598 .name = _NBT_NAME("_GR_MT_DI", 0x00, NULL),
5600 .nb_flags = NBT_NM_GROUP,
5602 .num_ips = ctx->addresses_best_num,
5603 .ips = ctx->addresses_best,
5604 .apply_expected = True
5607 .type = WREPL_TYPE_MHOMED,
5608 .state = WREPL_STATE_TOMBSTONE,
5609 .node = WREPL_NODE_B,
5611 .num_ips = ARRAY_SIZE(addresses_B_1),
5612 .ips = addresses_B_1,
5613 .apply_expected = False
5617 * special group vs. unique section
5620 * sgroup,released vs. unique,active with same ip(s)
5623 .line = __location__,
5624 .name = _NBT_NAME("_SR_UA_SI", 0x1C, NULL),
5626 .nb_flags = NBT_NM_GROUP,
5628 .num_ips = ctx->addresses_best_num,
5629 .ips = ctx->addresses_best,
5630 .apply_expected = True
5633 .type = WREPL_TYPE_UNIQUE,
5634 .state = WREPL_STATE_ACTIVE,
5635 .node = WREPL_NODE_B,
5637 .num_ips = ctx->addresses_best_num,
5638 .ips = ctx->addresses_best,
5639 .apply_expected = True
5643 * sgroup,released vs. unique,active with different ip(s)
5646 .line = __location__,
5647 .name = _NBT_NAME("_SR_UA_DI", 0x1C, NULL),
5649 .nb_flags = NBT_NM_GROUP,
5651 .num_ips = ctx->addresses_best_num,
5652 .ips = ctx->addresses_best,
5653 .apply_expected = True
5656 .type = WREPL_TYPE_UNIQUE,
5657 .state = WREPL_STATE_ACTIVE,
5658 .node = WREPL_NODE_B,
5660 .num_ips = ARRAY_SIZE(addresses_B_1),
5661 .ips = addresses_B_1,
5662 .apply_expected = True
5666 * sgroup,released vs. unique,tombstone with same ip(s)
5669 .line = __location__,
5670 .name = _NBT_NAME("_SR_UT_SI", 0x1C, NULL),
5672 .nb_flags = NBT_NM_GROUP,
5674 .num_ips = ctx->addresses_best_num,
5675 .ips = ctx->addresses_best,
5676 .apply_expected = True
5679 .type = WREPL_TYPE_UNIQUE,
5680 .state = WREPL_STATE_TOMBSTONE,
5681 .node = WREPL_NODE_B,
5683 .num_ips = ctx->addresses_best_num,
5684 .ips = ctx->addresses_best,
5685 .apply_expected = True
5689 * sgroup,released vs. unique,tombstone with different ip(s)
5692 .line = __location__,
5693 .name = _NBT_NAME("_SR_UT_DI", 0x1C, NULL),
5695 .nb_flags = NBT_NM_GROUP,
5697 .num_ips = ctx->addresses_best_num,
5698 .ips = ctx->addresses_best,
5699 .apply_expected = True
5702 .type = WREPL_TYPE_UNIQUE,
5703 .state = WREPL_STATE_TOMBSTONE,
5704 .node = WREPL_NODE_B,
5706 .num_ips = ARRAY_SIZE(addresses_B_1),
5707 .ips = addresses_B_1,
5708 .apply_expected = True
5712 * special group vs. group section
5715 * sgroup,released vs. group,active with same ip(s)
5718 .line = __location__,
5719 .name = _NBT_NAME("_SR_GA_SI", 0x1C, NULL),
5721 .nb_flags = NBT_NM_GROUP,
5723 .num_ips = ctx->addresses_best_num,
5724 .ips = ctx->addresses_best,
5725 .apply_expected = True
5728 .type = WREPL_TYPE_GROUP,
5729 .state = WREPL_STATE_ACTIVE,
5730 .node = WREPL_NODE_B,
5732 .num_ips = ctx->addresses_best_num,
5733 .ips = ctx->addresses_best,
5734 .apply_expected = True
5738 * sgroup,released vs. group,active with different ip(s)
5741 .line = __location__,
5742 .name = _NBT_NAME("_SR_GA_DI", 0x1C, NULL),
5744 .nb_flags = NBT_NM_GROUP,
5746 .num_ips = ctx->addresses_best_num,
5747 .ips = ctx->addresses_best,
5748 .apply_expected = True
5751 .type = WREPL_TYPE_GROUP,
5752 .state = WREPL_STATE_ACTIVE,
5753 .node = WREPL_NODE_B,
5755 .num_ips = ARRAY_SIZE(addresses_B_1),
5756 .ips = addresses_B_1,
5757 .apply_expected = True
5761 * sgroup,released vs. group,tombstone with same ip(s)
5764 .line = __location__,
5765 .name = _NBT_NAME("_SR_GT_SI", 0x1C, NULL),
5767 .nb_flags = NBT_NM_GROUP,
5769 .num_ips = ctx->addresses_best_num,
5770 .ips = ctx->addresses_best,
5771 .apply_expected = True
5774 .type = WREPL_TYPE_GROUP,
5775 .state = WREPL_STATE_TOMBSTONE,
5776 .node = WREPL_NODE_B,
5778 .num_ips = ctx->addresses_best_num,
5779 .ips = ctx->addresses_best,
5780 .apply_expected = True
5784 * sgroup,released vs. group,tombstone with different ip(s)
5787 .line = __location__,
5788 .name = _NBT_NAME("_SR_GT_DI", 0x1C, NULL),
5790 .nb_flags = NBT_NM_GROUP,
5792 .num_ips = ctx->addresses_best_num,
5793 .ips = ctx->addresses_best,
5794 .apply_expected = True
5797 .type = WREPL_TYPE_GROUP,
5798 .state = WREPL_STATE_TOMBSTONE,
5799 .node = WREPL_NODE_B,
5801 .num_ips = ARRAY_SIZE(addresses_B_1),
5802 .ips = addresses_B_1,
5803 .apply_expected = True
5807 * special group vs. special group section
5810 * sgroup,released vs. sgroup,active with same ip(s)
5813 .line = __location__,
5814 .name = _NBT_NAME("_SR_SA_SI", 0x1C, NULL),
5816 .nb_flags = NBT_NM_GROUP,
5818 .num_ips = ctx->addresses_best_num,
5819 .ips = ctx->addresses_best,
5820 .apply_expected = True
5823 .type = WREPL_TYPE_SGROUP,
5824 .state = WREPL_STATE_ACTIVE,
5825 .node = WREPL_NODE_B,
5827 .num_ips = ctx->addresses_best_num,
5828 .ips = ctx->addresses_best,
5829 .apply_expected = True
5833 * sgroup,released vs. sgroup,active with different ip(s)
5836 .line = __location__,
5837 .name = _NBT_NAME("_SR_SA_DI", 0x1C, NULL),
5839 .nb_flags = NBT_NM_GROUP,
5841 .num_ips = ctx->addresses_best_num,
5842 .ips = ctx->addresses_best,
5843 .apply_expected = True
5846 .type = WREPL_TYPE_SGROUP,
5847 .state = WREPL_STATE_ACTIVE,
5848 .node = WREPL_NODE_B,
5850 .num_ips = ARRAY_SIZE(addresses_B_1),
5851 .ips = addresses_B_1,
5852 .apply_expected = True
5856 * sgroup,released vs. sgroup,tombstone with same ip(s)
5859 .line = __location__,
5860 .name = _NBT_NAME("_SR_ST_SI", 0x1C, NULL),
5862 .nb_flags = NBT_NM_GROUP,
5864 .num_ips = ctx->addresses_best_num,
5865 .ips = ctx->addresses_best,
5866 .apply_expected = True
5869 .type = WREPL_TYPE_SGROUP,
5870 .state = WREPL_STATE_TOMBSTONE,
5871 .node = WREPL_NODE_B,
5873 .num_ips = ctx->addresses_best_num,
5874 .ips = ctx->addresses_best,
5875 .apply_expected = True
5879 * sgroup,released vs. sgroup,tombstone with different ip(s)
5882 .line = __location__,
5883 .name = _NBT_NAME("_SR_ST_DI", 0x1C, NULL),
5885 .nb_flags = NBT_NM_GROUP,
5887 .num_ips = ctx->addresses_best_num,
5888 .ips = ctx->addresses_best,
5889 .apply_expected = True
5892 .type = WREPL_TYPE_SGROUP,
5893 .state = WREPL_STATE_TOMBSTONE,
5894 .node = WREPL_NODE_B,
5896 .num_ips = ARRAY_SIZE(addresses_B_1),
5897 .ips = addresses_B_1,
5898 .apply_expected = True
5902 * special group vs. multi homed section
5905 * sgroup,released vs. mhomed,active with same ip(s)
5908 .line = __location__,
5909 .name = _NBT_NAME("_SR_MA_SI", 0x1C, NULL),
5911 .nb_flags = NBT_NM_GROUP,
5913 .num_ips = ctx->addresses_best_num,
5914 .ips = ctx->addresses_best,
5915 .apply_expected = True
5918 .type = WREPL_TYPE_MHOMED,
5919 .state = WREPL_STATE_ACTIVE,
5920 .node = WREPL_NODE_B,
5922 .num_ips = ctx->addresses_best_num,
5923 .ips = ctx->addresses_best,
5924 .apply_expected = True
5928 * sgroup,released vs. mhomed,active with different ip(s)
5931 .line = __location__,
5932 .name = _NBT_NAME("_SR_MA_DI", 0x1C, NULL),
5934 .nb_flags = NBT_NM_GROUP,
5936 .num_ips = ctx->addresses_best_num,
5937 .ips = ctx->addresses_best,
5938 .apply_expected = True
5941 .type = WREPL_TYPE_MHOMED,
5942 .state = WREPL_STATE_ACTIVE,
5943 .node = WREPL_NODE_B,
5945 .num_ips = ARRAY_SIZE(addresses_B_1),
5946 .ips = addresses_B_1,
5947 .apply_expected = True
5951 * sgroup,released vs. mhomed,tombstone with same ip(s)
5954 .line = __location__,
5955 .name = _NBT_NAME("_SR_MT_SI", 0x1C, NULL),
5957 .nb_flags = NBT_NM_GROUP,
5959 .num_ips = ctx->addresses_best_num,
5960 .ips = ctx->addresses_best,
5961 .apply_expected = True
5964 .type = WREPL_TYPE_MHOMED,
5965 .state = WREPL_STATE_TOMBSTONE,
5966 .node = WREPL_NODE_B,
5968 .num_ips = ctx->addresses_best_num,
5969 .ips = ctx->addresses_best,
5970 .apply_expected = True
5974 * sgroup,released vs. mhomed,tombstone with different ip(s)
5977 .line = __location__,
5978 .name = _NBT_NAME("_SR_MT_DI", 0x1C, NULL),
5980 .nb_flags = NBT_NM_GROUP,
5982 .num_ips = ctx->addresses_best_num,
5983 .ips = ctx->addresses_best,
5984 .apply_expected = True
5987 .type = WREPL_TYPE_MHOMED,
5988 .state = WREPL_STATE_TOMBSTONE,
5989 .node = WREPL_NODE_B,
5991 .num_ips = ARRAY_SIZE(addresses_B_1),
5992 .ips = addresses_B_1,
5993 .apply_expected = True
5997 * multi homed vs. unique section
6000 * mhomed,released vs. unique,active with same ip(s)
6003 .line = __location__,
6004 .name = _NBT_NAME("_MR_UA_SI", 0x00, NULL),
6008 .num_ips = ctx->addresses_best_num,
6009 .ips = ctx->addresses_best,
6010 .apply_expected = True
6013 .type = WREPL_TYPE_UNIQUE,
6014 .state = WREPL_STATE_ACTIVE,
6015 .node = WREPL_NODE_B,
6017 .num_ips = ctx->addresses_best_num,
6018 .ips = ctx->addresses_best,
6019 .apply_expected = True
6023 * mhomed,released vs. unique,active with different ip(s)
6026 .line = __location__,
6027 .name = _NBT_NAME("_MR_UA_DI", 0x00, NULL),
6031 .num_ips = ctx->addresses_best_num,
6032 .ips = ctx->addresses_best,
6033 .apply_expected = True
6036 .type = WREPL_TYPE_UNIQUE,
6037 .state = WREPL_STATE_ACTIVE,
6038 .node = WREPL_NODE_B,
6040 .num_ips = ARRAY_SIZE(addresses_B_1),
6041 .ips = addresses_B_1,
6042 .apply_expected = True
6046 * mhomed,released vs. unique,tombstone with same ip(s)
6049 .line = __location__,
6050 .name = _NBT_NAME("_MR_UT_SI", 0x00, NULL),
6054 .num_ips = ctx->addresses_best_num,
6055 .ips = ctx->addresses_best,
6056 .apply_expected = True
6059 .type = WREPL_TYPE_UNIQUE,
6060 .state = WREPL_STATE_TOMBSTONE,
6061 .node = WREPL_NODE_B,
6063 .num_ips = ctx->addresses_best_num,
6064 .ips = ctx->addresses_best,
6065 .apply_expected = True
6069 * mhomed,released vs. unique,tombstone with different ip(s)
6072 .line = __location__,
6073 .name = _NBT_NAME("_MR_UT_DI", 0x00, NULL),
6077 .num_ips = ctx->addresses_best_num,
6078 .ips = ctx->addresses_best,
6079 .apply_expected = True
6082 .type = WREPL_TYPE_UNIQUE,
6083 .state = WREPL_STATE_TOMBSTONE,
6084 .node = WREPL_NODE_B,
6086 .num_ips = ARRAY_SIZE(addresses_B_1),
6087 .ips = addresses_B_1,
6088 .apply_expected = True
6092 * multi homed vs. group section
6095 * mhomed,released vs. group,active with same ip(s)
6098 .line = __location__,
6099 .name = _NBT_NAME("_MR_GA_SI", 0x00, NULL),
6103 .num_ips = ctx->addresses_best_num,
6104 .ips = ctx->addresses_best,
6105 .apply_expected = True
6108 .type = WREPL_TYPE_GROUP,
6109 .state = WREPL_STATE_ACTIVE,
6110 .node = WREPL_NODE_B,
6112 .num_ips = ctx->addresses_best_num,
6113 .ips = ctx->addresses_best,
6114 .apply_expected = True
6118 * mhomed,released vs. group,active with different ip(s)
6121 .line = __location__,
6122 .name = _NBT_NAME("_MR_GA_DI", 0x00, NULL),
6126 .num_ips = ctx->addresses_best_num,
6127 .ips = ctx->addresses_best,
6128 .apply_expected = True
6131 .type = WREPL_TYPE_GROUP,
6132 .state = WREPL_STATE_ACTIVE,
6133 .node = WREPL_NODE_B,
6135 .num_ips = ARRAY_SIZE(addresses_B_1),
6136 .ips = addresses_B_1,
6137 .apply_expected = True
6141 * mhomed,released vs. group,tombstone with same ip(s)
6144 .line = __location__,
6145 .name = _NBT_NAME("_MR_GT_SI", 0x00, NULL),
6149 .num_ips = ctx->addresses_best_num,
6150 .ips = ctx->addresses_best,
6151 .apply_expected = True
6154 .type = WREPL_TYPE_GROUP,
6155 .state = WREPL_STATE_TOMBSTONE,
6156 .node = WREPL_NODE_B,
6158 .num_ips = ctx->addresses_best_num,
6159 .ips = ctx->addresses_best,
6160 .apply_expected = True
6164 * mhomed,released vs. group,tombstone with different ip(s)
6167 .line = __location__,
6168 .name = _NBT_NAME("_MR_GT_DI", 0x00, NULL),
6172 .num_ips = ctx->addresses_best_num,
6173 .ips = ctx->addresses_best,
6174 .apply_expected = True
6177 .type = WREPL_TYPE_GROUP,
6178 .state = WREPL_STATE_TOMBSTONE,
6179 .node = WREPL_NODE_B,
6181 .num_ips = ARRAY_SIZE(addresses_B_1),
6182 .ips = addresses_B_1,
6183 .apply_expected = True
6187 * multi homed vs. special group section
6190 * mhomed,released vs. sgroup,active with same ip(s)
6193 .line = __location__,
6194 .name = _NBT_NAME("_MR_SA_SI", 0x00, NULL),
6198 .num_ips = ctx->addresses_best_num,
6199 .ips = ctx->addresses_best,
6200 .apply_expected = True
6203 .type = WREPL_TYPE_SGROUP,
6204 .state = WREPL_STATE_ACTIVE,
6205 .node = WREPL_NODE_B,
6207 .num_ips = ctx->addresses_best_num,
6208 .ips = ctx->addresses_best,
6209 .apply_expected = True
6213 * mhomed,released vs. sgroup,active with different ip(s)
6216 .line = __location__,
6217 .name = _NBT_NAME("_MR_SA_DI", 0x00, NULL),
6221 .num_ips = ctx->addresses_best_num,
6222 .ips = ctx->addresses_best,
6223 .apply_expected = True
6226 .type = WREPL_TYPE_SGROUP,
6227 .state = WREPL_STATE_ACTIVE,
6228 .node = WREPL_NODE_B,
6230 .num_ips = ARRAY_SIZE(addresses_B_1),
6231 .ips = addresses_B_1,
6232 .apply_expected = True
6236 * mhomed,released vs. sgroup,tombstone with same ip(s)
6239 .line = __location__,
6240 .name = _NBT_NAME("_MR_ST_SI", 0x00, NULL),
6244 .num_ips = ctx->addresses_best_num,
6245 .ips = ctx->addresses_best,
6246 .apply_expected = True
6249 .type = WREPL_TYPE_SGROUP,
6250 .state = WREPL_STATE_TOMBSTONE,
6251 .node = WREPL_NODE_B,
6253 .num_ips = ctx->addresses_best_num,
6254 .ips = ctx->addresses_best,
6255 .apply_expected = True
6259 * mhomed,released vs. sgroup,tombstone with different ip(s)
6262 .line = __location__,
6263 .name = _NBT_NAME("_MR_ST_DI", 0x00, NULL),
6267 .num_ips = ctx->addresses_best_num,
6268 .ips = ctx->addresses_best,
6269 .apply_expected = True
6272 .type = WREPL_TYPE_SGROUP,
6273 .state = WREPL_STATE_TOMBSTONE,
6274 .node = WREPL_NODE_B,
6276 .num_ips = ARRAY_SIZE(addresses_B_1),
6277 .ips = addresses_B_1,
6278 .apply_expected = True
6282 * multi homed vs. multi homed section
6285 * mhomed,released vs. mhomed,active with same ip(s)
6288 .line = __location__,
6289 .name = _NBT_NAME("_MR_MA_SI", 0x00, NULL),
6293 .num_ips = ctx->addresses_best_num,
6294 .ips = ctx->addresses_best,
6295 .apply_expected = True
6298 .type = WREPL_TYPE_MHOMED,
6299 .state = WREPL_STATE_ACTIVE,
6300 .node = WREPL_NODE_B,
6302 .num_ips = ctx->addresses_best_num,
6303 .ips = ctx->addresses_best,
6304 .apply_expected = True
6308 * mhomed,released vs. mhomed,active with different ip(s)
6311 .line = __location__,
6312 .name = _NBT_NAME("_MR_MA_DI", 0x00, NULL),
6316 .num_ips = ctx->addresses_best_num,
6317 .ips = ctx->addresses_best,
6318 .apply_expected = True
6321 .type = WREPL_TYPE_MHOMED,
6322 .state = WREPL_STATE_ACTIVE,
6323 .node = WREPL_NODE_B,
6325 .num_ips = ARRAY_SIZE(addresses_B_1),
6326 .ips = addresses_B_1,
6327 .apply_expected = True
6331 * mhomed,released vs. mhomed,tombstone with same ip(s)
6334 .line = __location__,
6335 .name = _NBT_NAME("_MR_MT_SI", 0x00, NULL),
6339 .num_ips = ctx->addresses_best_num,
6340 .ips = ctx->addresses_best,
6341 .apply_expected = True
6344 .type = WREPL_TYPE_MHOMED,
6345 .state = WREPL_STATE_TOMBSTONE,
6346 .node = WREPL_NODE_B,
6348 .num_ips = ctx->addresses_best_num,
6349 .ips = ctx->addresses_best,
6350 .apply_expected = True
6354 * mhomed,released vs. mhomed,tombstone with different ip(s)
6357 .line = __location__,
6358 .name = _NBT_NAME("_MR_MT_DI", 0x00, NULL),
6362 .num_ips = ctx->addresses_best_num,
6363 .ips = ctx->addresses_best,
6364 .apply_expected = True
6367 .type = WREPL_TYPE_MHOMED,
6368 .state = WREPL_STATE_TOMBSTONE,
6369 .node = WREPL_NODE_B,
6371 .num_ips = ARRAY_SIZE(addresses_B_1),
6372 .ips = addresses_B_1,
6373 .apply_expected = True
6378 if (!ctx) return False;
6380 printf("Test Replica records vs. owned released records\n");
6382 for(i=0; ret && i < ARRAY_SIZE(records); i++) {
6383 printf("%s => %s\n", nbt_name_string(ctx, &records[i].name),
6384 (records[i].replica.apply_expected?"REPLACE":"NOT REPLACE"));
6389 name_register->in.name = records[i].name;
6390 name_register->in.dest_addr = ctx->address;
6391 name_register->in.address = records[i].wins.ips[0].ip;
6392 name_register->in.nb_flags = records[i].wins.nb_flags;
6393 name_register->in.register_demand= False;
6394 name_register->in.broadcast = False;
6395 name_register->in.multi_homed = records[i].wins.mhomed;
6396 name_register->in.ttl = 300000;
6397 name_register->in.timeout = 70;
6398 name_register->in.retries = 0;
6400 status = nbt_name_register(ctx->nbtsock, ctx, name_register);
6401 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
6402 printf("No response from %s for name register\n", ctx->address);
6405 if (!NT_STATUS_IS_OK(status)) {
6406 printf("Bad response from %s for name register - %s\n",
6407 ctx->address, nt_errstr(status));
6410 CHECK_VALUE(name_register->out.rcode, 0);
6411 CHECK_VALUE_STRING(name_register->out.reply_from, ctx->address);
6412 CHECK_VALUE(name_register->out.name.type, records[i].name.type);
6413 CHECK_VALUE_STRING(name_register->out.name.name, records[i].name.name);
6414 CHECK_VALUE_STRING(name_register->out.name.scope, records[i].name.scope);
6415 CHECK_VALUE_STRING(name_register->out.reply_addr, records[i].wins.ips[0].ip);
6417 /* release the record */
6418 release->in.name = records[i].name;
6419 release->in.dest_addr = ctx->address;
6420 release->in.address = records[i].wins.ips[0].ip;
6421 release->in.nb_flags = records[i].wins.nb_flags;
6422 release->in.broadcast = False;
6423 release->in.timeout = 30;
6424 release->in.retries = 0;
6426 status = nbt_name_release(ctx->nbtsock, ctx, release);
6427 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
6428 printf("No response from %s for name release\n", ctx->address);
6431 if (!NT_STATUS_IS_OK(status)) {
6432 printf("Bad response from %s for name query - %s\n",
6433 ctx->address, nt_errstr(status));
6436 CHECK_VALUE(release->out.rcode, 0);
6441 wins_name->name = &records[i].name;
6442 wins_name->flags = WREPL_NAME_FLAGS(records[i].replica.type,
6443 records[i].replica.state,
6444 records[i].replica.node,
6445 records[i].replica.is_static);
6446 wins_name->id = ++ctx->b.max_version;
6447 if (wins_name->flags & 2) {
6448 wins_name->addresses.addresses.num_ips = records[i].replica.num_ips;
6449 wins_name->addresses.addresses.ips = discard_const(records[i].replica.ips);
6451 wins_name->addresses.ip = records[i].replica.ips[0].ip;
6453 wins_name->unknown = "255.255.255.255";
6455 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
6456 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name,
6457 records[i].replica.apply_expected);
6459 if (records[i].replica.apply_expected) {
6460 wins_name->name = &records[i].name;
6461 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE,
6462 WREPL_STATE_TOMBSTONE,
6463 WREPL_NODE_B, False);
6464 wins_name->id = ++ctx->b.max_version;
6465 wins_name->addresses.ip = addresses_B_1[0].ip;
6466 wins_name->unknown = "255.255.255.255";
6468 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
6469 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name, True);
6471 release->in.name = records[i].name;
6472 release->in.dest_addr = ctx->address;
6473 release->in.address = records[i].wins.ips[0].ip;
6474 release->in.nb_flags = records[i].wins.nb_flags;
6475 release->in.broadcast = False;
6476 release->in.timeout = 30;
6477 release->in.retries = 0;
6479 status = nbt_name_release(ctx->nbtsock, ctx, release);
6480 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
6481 printf("No response from %s for name release\n", ctx->address);
6484 if (!NT_STATUS_IS_OK(status)) {
6485 printf("Bad response from %s for name query - %s\n",
6486 ctx->address, nt_errstr(status));
6489 CHECK_VALUE(release->out.rcode, 0);
6493 printf("conflict handled wrong or record[%u]: %s\n", i, records[i].line);
6501 struct test_conflict_owned_active_vs_replica_struct {
6502 const char *line; /* just better debugging */
6503 const char *section; /* just better debugging */
6504 struct nbt_name name;
6510 const struct wrepl_ip *ips;
6511 BOOL apply_expected;
6516 BOOL expect_release;
6519 /* when num_ips == 0, then .wins.ips are used */
6521 const struct wrepl_ip *ips;
6524 enum wrepl_name_type type;
6525 enum wrepl_name_state state;
6526 enum wrepl_name_node node;
6529 const struct wrepl_ip *ips;
6530 BOOL apply_expected;
6536 static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket *nbtsock,
6537 struct nbt_name_packet *req_packet,
6538 const struct nbt_peer_socket *src);
6540 static BOOL test_conflict_owned_active_vs_replica(struct test_wrepl_conflict_conn *ctx)
6544 struct wrepl_wins_name wins_name_;
6545 struct wrepl_wins_name *wins_name = &wins_name_;
6546 struct nbt_name_register name_register_;
6547 struct nbt_name_register *name_register = &name_register_;
6548 struct nbt_name_release release_;
6549 struct nbt_name_release *release = &release_;
6551 struct test_conflict_owned_active_vs_replica_struct records[] = {
6553 * unique vs. unique section
6556 * unique,active vs. unique,active with same ip(s), unchecked
6559 .line = __location__,
6560 .name = _NBT_NAME("_UA_UA_SI_U", 0x00, NULL),
6564 .num_ips = ctx->addresses_best_num,
6565 .ips = ctx->addresses_best,
6566 .apply_expected = True
6572 .type = WREPL_TYPE_UNIQUE,
6573 .state = WREPL_STATE_ACTIVE,
6574 .node = WREPL_NODE_B,
6576 .num_ips = ctx->addresses_best_num,
6577 .ips = ctx->addresses_best,
6578 .apply_expected = True
6582 * unique,active vs. unique,active with different ip(s), positive response
6585 .line = __location__,
6586 .name = _NBT_NAME("_UA_UA_DI_P", 0x00, NULL),
6590 .num_ips = ctx->addresses_best_num,
6591 .ips = ctx->addresses_best,
6592 .apply_expected = True
6599 .type = WREPL_TYPE_UNIQUE,
6600 .state = WREPL_STATE_ACTIVE,
6601 .node = WREPL_NODE_B,
6603 .num_ips = ARRAY_SIZE(addresses_B_1),
6604 .ips = addresses_B_1,
6605 .apply_expected = False
6609 * unique,active vs. unique,active with different ip(s), positive response other ips
6612 .line = __location__,
6613 .name = _NBT_NAME("_UA_UA_DI_O", 0x00, NULL),
6617 .num_ips = ctx->addresses_best_num,
6618 .ips = ctx->addresses_best,
6619 .apply_expected = True
6624 .num_ips = ARRAY_SIZE(addresses_A_3_4),
6625 .ips = addresses_A_3_4,
6628 .type = WREPL_TYPE_UNIQUE,
6629 .state = WREPL_STATE_ACTIVE,
6630 .node = WREPL_NODE_B,
6632 .num_ips = ARRAY_SIZE(addresses_B_1),
6633 .ips = addresses_B_1,
6634 .apply_expected = False
6638 * unique,active vs. unique,active with different ip(s), negative response
6641 .line = __location__,
6642 .name = _NBT_NAME("_UA_UA_DI_N", 0x00, NULL),
6646 .num_ips = ctx->addresses_best_num,
6647 .ips = ctx->addresses_best,
6648 .apply_expected = True
6655 .type = WREPL_TYPE_UNIQUE,
6656 .state = WREPL_STATE_ACTIVE,
6657 .node = WREPL_NODE_B,
6659 .num_ips = ARRAY_SIZE(addresses_B_1),
6660 .ips = addresses_B_1,
6661 .apply_expected = True
6665 * unique,active vs. unique,tombstone with same ip(s), unchecked
6668 .line = __location__,
6669 .name = _NBT_NAME("_UA_UT_SI_U", 0x00, NULL),
6673 .num_ips = ctx->addresses_best_num,
6674 .ips = ctx->addresses_best,
6675 .apply_expected = True
6681 .type = WREPL_TYPE_UNIQUE,
6682 .state = WREPL_STATE_TOMBSTONE,
6683 .node = WREPL_NODE_B,
6685 .num_ips = ctx->addresses_best_num,
6686 .ips = ctx->addresses_best,
6687 .apply_expected = False
6691 * unique,active vs. unique,tombstone with different ip(s), unchecked
6694 .line = __location__,
6695 .name = _NBT_NAME("_UA_UT_DI_U", 0x00, NULL),
6699 .num_ips = ctx->addresses_best_num,
6700 .ips = ctx->addresses_best,
6701 .apply_expected = True
6707 .type = WREPL_TYPE_UNIQUE,
6708 .state = WREPL_STATE_TOMBSTONE,
6709 .node = WREPL_NODE_B,
6711 .num_ips = ARRAY_SIZE(addresses_B_1),
6712 .ips = addresses_B_1,
6713 .apply_expected = False
6717 * unique vs. group section
6720 * unique,active vs. group,active with same ip(s), release expected
6723 .line = __location__,
6724 .name = _NBT_NAME("_UA_GA_SI_R", 0x00, NULL),
6728 .num_ips = ctx->addresses_best_num,
6729 .ips = ctx->addresses_best,
6730 .apply_expected = True
6734 .expect_release = True,
6737 .type = WREPL_TYPE_GROUP,
6738 .state = WREPL_STATE_ACTIVE,
6739 .node = WREPL_NODE_B,
6741 .num_ips = ctx->addresses_best_num,
6742 .ips = ctx->addresses_best,
6743 .apply_expected = True
6747 * unique,active vs. group,active with different ip(s), release expected
6750 .line = __location__,
6751 .name = _NBT_NAME("_UA_GA_DI_R", 0x00, NULL),
6755 .num_ips = ctx->addresses_best_num,
6756 .ips = ctx->addresses_best,
6757 .apply_expected = True
6761 .expect_release = True,
6764 .type = WREPL_TYPE_GROUP,
6765 .state = WREPL_STATE_ACTIVE,
6766 .node = WREPL_NODE_B,
6768 .num_ips = ARRAY_SIZE(addresses_B_1),
6769 .ips = addresses_B_1,
6770 .apply_expected = True
6774 * unique,active vs. group,tombstone with same ip(s), unchecked
6777 .line = __location__,
6778 .name = _NBT_NAME("_UA_GT_SI_U", 0x00, NULL),
6782 .num_ips = ctx->addresses_best_num,
6783 .ips = ctx->addresses_best,
6784 .apply_expected = True
6790 .type = WREPL_TYPE_GROUP,
6791 .state = WREPL_STATE_TOMBSTONE,
6792 .node = WREPL_NODE_B,
6794 .num_ips = ctx->addresses_best_num,
6795 .ips = ctx->addresses_best,
6796 .apply_expected = False
6800 * unique,active vs. group,tombstone with different ip(s), unchecked
6803 .line = __location__,
6804 .name = _NBT_NAME("_UA_GT_DI_U", 0x00, NULL),
6808 .num_ips = ctx->addresses_best_num,
6809 .ips = ctx->addresses_best,
6810 .apply_expected = True
6816 .type = WREPL_TYPE_GROUP,
6817 .state = WREPL_STATE_TOMBSTONE,
6818 .node = WREPL_NODE_B,
6820 .num_ips = ARRAY_SIZE(addresses_B_1),
6821 .ips = addresses_B_1,
6822 .apply_expected = False
6826 * unique vs. special group section
6829 * unique,active vs. sgroup,active with same ip(s), release expected
6832 .line = __location__,
6833 .name = _NBT_NAME("_UA_SA_SI_R", 0x00, NULL),
6837 .num_ips = ctx->addresses_best_num,
6838 .ips = ctx->addresses_best,
6839 .apply_expected = True
6843 .expect_release = True,
6846 .type = WREPL_TYPE_SGROUP,
6847 .state = WREPL_STATE_ACTIVE,
6848 .node = WREPL_NODE_B,
6850 .num_ips = ctx->addresses_best_num,
6851 .ips = ctx->addresses_best,
6852 .apply_expected = True
6856 * unique,active vs. group,active with different ip(s), release expected
6859 .line = __location__,
6860 .name = _NBT_NAME("_UA_SA_DI_R", 0x00, NULL),
6864 .num_ips = ctx->addresses_best_num,
6865 .ips = ctx->addresses_best,
6866 .apply_expected = True
6870 .expect_release = True,
6873 .type = WREPL_TYPE_SGROUP,
6874 .state = WREPL_STATE_ACTIVE,
6875 .node = WREPL_NODE_B,
6877 .num_ips = ARRAY_SIZE(addresses_B_1),
6878 .ips = addresses_B_1,
6879 .apply_expected = True
6883 * unique,active vs. sgroup,tombstone with same ip(s), unchecked
6886 .line = __location__,
6887 .name = _NBT_NAME("_UA_ST_SI_U", 0x00, NULL),
6891 .num_ips = ctx->addresses_best_num,
6892 .ips = ctx->addresses_best,
6893 .apply_expected = True
6899 .type = WREPL_TYPE_SGROUP,
6900 .state = WREPL_STATE_TOMBSTONE,
6901 .node = WREPL_NODE_B,
6903 .num_ips = ctx->addresses_best_num,
6904 .ips = ctx->addresses_best,
6905 .apply_expected = False
6909 * unique,active vs. sgroup,tombstone with different ip(s), unchecked
6912 .line = __location__,
6913 .name = _NBT_NAME("_UA_ST_DI_U", 0x00, NULL),
6917 .num_ips = ctx->addresses_best_num,
6918 .ips = ctx->addresses_best,
6919 .apply_expected = True
6925 .type = WREPL_TYPE_SGROUP,
6926 .state = WREPL_STATE_TOMBSTONE,
6927 .node = WREPL_NODE_B,
6929 .num_ips = ARRAY_SIZE(addresses_B_1),
6930 .ips = addresses_B_1,
6931 .apply_expected = False
6935 * unique vs. multi homed section
6938 * unique,active vs. mhomed,active with same ip(s), unchecked
6941 .line = __location__,
6942 .name = _NBT_NAME("_UA_MA_SI_U", 0x00, NULL),
6946 .num_ips = ctx->addresses_best_num,
6947 .ips = ctx->addresses_best,
6948 .apply_expected = True
6954 .type = WREPL_TYPE_MHOMED,
6955 .state = WREPL_STATE_ACTIVE,
6956 .node = WREPL_NODE_B,
6958 .num_ips = ctx->addresses_best_num,
6959 .ips = ctx->addresses_best,
6960 .apply_expected = True
6964 * unique,active vs. mhomed,active with superset ip(s), unchecked
6967 .line = __location__,
6968 .name = _NBT_NAME("_UA_MA_SP_U", 0x00, NULL),
6972 .num_ips = ctx->addresses_best_num,
6973 .ips = ctx->addresses_best,
6974 .apply_expected = True
6980 .type = WREPL_TYPE_MHOMED,
6981 .state = WREPL_STATE_ACTIVE,
6982 .node = WREPL_NODE_B,
6984 .num_ips = ctx->addresses_all_num,
6985 .ips = ctx->addresses_all,
6986 .apply_expected = True
6990 * unique,active vs. mhomed,active with different ip(s), positive response
6993 .line = __location__,
6994 .name = _NBT_NAME("_UA_MA_DI_P", 0x00, NULL),
6998 .num_ips = ctx->addresses_best_num,
6999 .ips = ctx->addresses_best,
7000 .apply_expected = True
7007 .type = WREPL_TYPE_MHOMED,
7008 .state = WREPL_STATE_ACTIVE,
7009 .node = WREPL_NODE_B,
7011 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7012 .ips = addresses_B_3_4,
7013 .apply_expected = False
7017 * unique,active vs. mhomed,active with different ip(s), positive response other ips
7020 .line = __location__,
7021 .name = _NBT_NAME("_UA_MA_DI_O", 0x00, NULL),
7025 .num_ips = ctx->addresses_best_num,
7026 .ips = ctx->addresses_best,
7027 .apply_expected = True
7032 .num_ips = ARRAY_SIZE(addresses_A_3_4),
7033 .ips = addresses_A_3_4,
7036 .type = WREPL_TYPE_MHOMED,
7037 .state = WREPL_STATE_ACTIVE,
7038 .node = WREPL_NODE_B,
7040 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7041 .ips = addresses_B_3_4,
7042 .apply_expected = False
7046 * unique,active vs. mhomed,active with different ip(s), negative response
7049 .line = __location__,
7050 .name = _NBT_NAME("_UA_MA_DI_N", 0x00, NULL),
7054 .num_ips = ctx->addresses_best_num,
7055 .ips = ctx->addresses_best,
7056 .apply_expected = True
7063 .type = WREPL_TYPE_MHOMED,
7064 .state = WREPL_STATE_ACTIVE,
7065 .node = WREPL_NODE_B,
7067 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7068 .ips = addresses_B_3_4,
7069 .apply_expected = True
7073 * unique,active vs. mhomed,tombstone with same ip(s), unchecked
7076 .line = __location__,
7077 .name = _NBT_NAME("_UA_MT_SI_U", 0x00, NULL),
7081 .num_ips = ctx->addresses_best_num,
7082 .ips = ctx->addresses_best,
7083 .apply_expected = True
7089 .type = WREPL_TYPE_MHOMED,
7090 .state = WREPL_STATE_TOMBSTONE,
7091 .node = WREPL_NODE_B,
7093 .num_ips = ctx->addresses_best_num,
7094 .ips = ctx->addresses_best,
7095 .apply_expected = False
7099 * unique,active vs. mhomed,tombstone with different ip(s), unchecked
7102 .line = __location__,
7103 .name = _NBT_NAME("_UA_MT_DI_U", 0x00, NULL),
7107 .num_ips = ctx->addresses_best_num,
7108 .ips = ctx->addresses_best,
7109 .apply_expected = True
7115 .type = WREPL_TYPE_MHOMED,
7116 .state = WREPL_STATE_TOMBSTONE,
7117 .node = WREPL_NODE_B,
7119 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7120 .ips = addresses_B_3_4,
7121 .apply_expected = False
7125 * normal group vs. unique section
7128 * group,active vs. unique,active with same ip(s), unchecked
7131 .line = __location__,
7132 .name = _NBT_NAME("_GA_UA_SI_U", 0x00, NULL),
7134 .nb_flags = NBT_NM_GROUP,
7136 .num_ips = ctx->addresses_best_num,
7137 .ips = ctx->addresses_best,
7138 .apply_expected = True
7144 .type = WREPL_TYPE_UNIQUE,
7145 .state = WREPL_STATE_ACTIVE,
7146 .node = WREPL_NODE_B,
7148 .num_ips = ctx->addresses_best_num,
7149 .ips = ctx->addresses_best,
7150 .apply_expected = False
7154 * group,active vs. unique,active with different ip(s), unchecked
7157 .line = __location__,
7158 .name = _NBT_NAME("_GA_UA_DI_U", 0x00, NULL),
7160 .nb_flags = NBT_NM_GROUP,
7162 .num_ips = ctx->addresses_best_num,
7163 .ips = ctx->addresses_best,
7164 .apply_expected = True
7170 .type = WREPL_TYPE_UNIQUE,
7171 .state = WREPL_STATE_ACTIVE,
7172 .node = WREPL_NODE_B,
7174 .num_ips = ARRAY_SIZE(addresses_B_1),
7175 .ips = addresses_B_1,
7176 .apply_expected = False
7180 * group,active vs. unique,tombstone with same ip(s), unchecked
7183 .line = __location__,
7184 .name = _NBT_NAME("_GA_UT_SI_U", 0x00, NULL),
7186 .nb_flags = NBT_NM_GROUP,
7188 .num_ips = ctx->addresses_best_num,
7189 .ips = ctx->addresses_best,
7190 .apply_expected = True
7196 .type = WREPL_TYPE_UNIQUE,
7197 .state = WREPL_STATE_TOMBSTONE,
7198 .node = WREPL_NODE_B,
7200 .num_ips = ctx->addresses_best_num,
7201 .ips = ctx->addresses_best,
7202 .apply_expected = False
7206 * group,active vs. unique,tombstone with different ip(s), unchecked
7209 .line = __location__,
7210 .name = _NBT_NAME("_GA_UT_DI_U", 0x00, NULL),
7212 .nb_flags = NBT_NM_GROUP,
7214 .num_ips = ctx->addresses_best_num,
7215 .ips = ctx->addresses_best,
7216 .apply_expected = True
7222 .type = WREPL_TYPE_UNIQUE,
7223 .state = WREPL_STATE_TOMBSTONE,
7224 .node = WREPL_NODE_B,
7226 .num_ips = ARRAY_SIZE(addresses_B_1),
7227 .ips = addresses_B_1,
7228 .apply_expected = False
7232 * normal group vs. normal group section
7235 * group,active vs. group,active with same ip(s), unchecked
7238 .line = __location__,
7239 .name = _NBT_NAME("_GA_GA_SI_U", 0x00, NULL),
7241 .nb_flags = NBT_NM_GROUP,
7243 .num_ips = ctx->addresses_best_num,
7244 .ips = ctx->addresses_best,
7245 .apply_expected = True
7251 .type = WREPL_TYPE_GROUP,
7252 .state = WREPL_STATE_ACTIVE,
7253 .node = WREPL_NODE_B,
7255 .num_ips = ctx->addresses_best_num,
7256 .ips = ctx->addresses_best,
7257 .apply_expected = True
7261 * group,active vs. group,active with different ip(s), unchecked
7264 .line = __location__,
7265 .name = _NBT_NAME("_GA_GA_DI_U", 0x00, NULL),
7267 .nb_flags = NBT_NM_GROUP,
7269 .num_ips = ctx->addresses_best_num,
7270 .ips = ctx->addresses_best,
7271 .apply_expected = True
7277 .type = WREPL_TYPE_GROUP,
7278 .state = WREPL_STATE_ACTIVE,
7279 .node = WREPL_NODE_B,
7281 .num_ips = ARRAY_SIZE(addresses_B_1),
7282 .ips = addresses_B_1,
7283 .apply_expected = True
7287 * group,active vs. group,tombstone with same ip(s), unchecked
7290 .line = __location__,
7291 .name = _NBT_NAME("_GA_GT_SI_U", 0x00, NULL),
7293 .nb_flags = NBT_NM_GROUP,
7295 .num_ips = ctx->addresses_best_num,
7296 .ips = ctx->addresses_best,
7297 .apply_expected = True
7303 .type = WREPL_TYPE_GROUP,
7304 .state = WREPL_STATE_TOMBSTONE,
7305 .node = WREPL_NODE_B,
7307 .num_ips = ctx->addresses_best_num,
7308 .ips = ctx->addresses_best,
7309 .apply_expected = False
7313 * group,active vs. group,tombstone with different ip(s), unchecked
7316 .line = __location__,
7317 .name = _NBT_NAME("_GA_GT_DI_U", 0x00, NULL),
7319 .nb_flags = NBT_NM_GROUP,
7321 .num_ips = ctx->addresses_best_num,
7322 .ips = ctx->addresses_best,
7323 .apply_expected = True
7329 .type = WREPL_TYPE_GROUP,
7330 .state = WREPL_STATE_TOMBSTONE,
7331 .node = WREPL_NODE_B,
7333 .num_ips = ARRAY_SIZE(addresses_B_1),
7334 .ips = addresses_B_1,
7335 .apply_expected = False
7339 * normal group vs. special group section
7342 * group,active vs. sgroup,active with same ip(s), unchecked
7345 .line = __location__,
7346 .name = _NBT_NAME("_GA_SA_SI_U", 0x00, NULL),
7348 .nb_flags = NBT_NM_GROUP,
7350 .num_ips = ctx->addresses_best_num,
7351 .ips = ctx->addresses_best,
7352 .apply_expected = True
7358 .type = WREPL_TYPE_SGROUP,
7359 .state = WREPL_STATE_ACTIVE,
7360 .node = WREPL_NODE_B,
7362 .num_ips = ctx->addresses_best_num,
7363 .ips = ctx->addresses_best,
7364 .apply_expected = False
7368 * group,active vs. sgroup,active with different ip(s), unchecked
7371 .line = __location__,
7372 .name = _NBT_NAME("_GA_SA_DI_U", 0x00, NULL),
7374 .nb_flags = NBT_NM_GROUP,
7376 .num_ips = ctx->addresses_best_num,
7377 .ips = ctx->addresses_best,
7378 .apply_expected = True
7384 .type = WREPL_TYPE_SGROUP,
7385 .state = WREPL_STATE_ACTIVE,
7386 .node = WREPL_NODE_B,
7388 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7389 .ips = addresses_B_3_4,
7390 .apply_expected = False
7394 * group,active vs. sgroup,tombstone with same ip(s), unchecked
7397 .line = __location__,
7398 .name = _NBT_NAME("_GA_ST_SI_U", 0x00, NULL),
7400 .nb_flags = NBT_NM_GROUP,
7402 .num_ips = ctx->addresses_best_num,
7403 .ips = ctx->addresses_best,
7404 .apply_expected = True
7410 .type = WREPL_TYPE_SGROUP,
7411 .state = WREPL_STATE_TOMBSTONE,
7412 .node = WREPL_NODE_B,
7414 .num_ips = ctx->addresses_best_num,
7415 .ips = ctx->addresses_best,
7416 .apply_expected = False
7420 * group,active vs. sgroup,tombstone with different ip(s), unchecked
7423 .line = __location__,
7424 .name = _NBT_NAME("_GA_ST_DI_U", 0x00, NULL),
7426 .nb_flags = NBT_NM_GROUP,
7428 .num_ips = ctx->addresses_best_num,
7429 .ips = ctx->addresses_best,
7430 .apply_expected = True
7436 .type = WREPL_TYPE_SGROUP,
7437 .state = WREPL_STATE_TOMBSTONE,
7438 .node = WREPL_NODE_B,
7440 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7441 .ips = addresses_B_3_4,
7442 .apply_expected = False
7446 * normal group vs. multi homed section
7449 * group,active vs. mhomed,active with same ip(s), unchecked
7452 .line = __location__,
7453 .name = _NBT_NAME("_GA_MA_SI_U", 0x00, NULL),
7455 .nb_flags = NBT_NM_GROUP,
7457 .num_ips = ctx->addresses_best_num,
7458 .ips = ctx->addresses_best,
7459 .apply_expected = True
7465 .type = WREPL_TYPE_MHOMED,
7466 .state = WREPL_STATE_ACTIVE,
7467 .node = WREPL_NODE_B,
7469 .num_ips = ctx->addresses_best_num,
7470 .ips = ctx->addresses_best,
7471 .apply_expected = False
7475 * group,active vs. mhomed,active with different ip(s), unchecked
7478 .line = __location__,
7479 .name = _NBT_NAME("_GA_MA_DI_U", 0x00, NULL),
7481 .nb_flags = NBT_NM_GROUP,
7483 .num_ips = ctx->addresses_best_num,
7484 .ips = ctx->addresses_best,
7485 .apply_expected = True
7491 .type = WREPL_TYPE_MHOMED,
7492 .state = WREPL_STATE_ACTIVE,
7493 .node = WREPL_NODE_B,
7495 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7496 .ips = addresses_B_3_4,
7497 .apply_expected = False
7501 * group,active vs. mhomed,tombstone with same ip(s), unchecked
7504 .line = __location__,
7505 .name = _NBT_NAME("_GA_MT_SI_U", 0x00, NULL),
7507 .nb_flags = NBT_NM_GROUP,
7509 .num_ips = ctx->addresses_best_num,
7510 .ips = ctx->addresses_best,
7511 .apply_expected = True
7517 .type = WREPL_TYPE_MHOMED,
7518 .state = WREPL_STATE_TOMBSTONE,
7519 .node = WREPL_NODE_B,
7521 .num_ips = ctx->addresses_best_num,
7522 .ips = ctx->addresses_best,
7523 .apply_expected = False
7527 * group,active vs. mhomed,tombstone with different ip(s), unchecked
7530 .line = __location__,
7531 .name = _NBT_NAME("_GA_MT_DI_U", 0x00, NULL),
7533 .nb_flags = NBT_NM_GROUP,
7535 .num_ips = ctx->addresses_best_num,
7536 .ips = ctx->addresses_best,
7537 .apply_expected = True
7543 .type = WREPL_TYPE_MHOMED,
7544 .state = WREPL_STATE_TOMBSTONE,
7545 .node = WREPL_NODE_B,
7547 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7548 .ips = addresses_B_3_4,
7549 .apply_expected = False
7553 * special group vs. unique section
7556 * sgroup,active vs. unique,active with same ip(s), unchecked
7559 .line = __location__,
7560 .name = _NBT_NAME("_SA_UA_SI_U", 0x1C, NULL),
7562 .nb_flags = NBT_NM_GROUP,
7564 .num_ips = ctx->addresses_best_num,
7565 .ips = ctx->addresses_best,
7566 .apply_expected = True
7572 .type = WREPL_TYPE_UNIQUE,
7573 .state = WREPL_STATE_ACTIVE,
7574 .node = WREPL_NODE_B,
7576 .num_ips = ctx->addresses_best_num,
7577 .ips = ctx->addresses_best,
7578 .apply_expected = False
7582 * sgroup,active vs. unique,active with different ip(s), unchecked
7585 .line = __location__,
7586 .name = _NBT_NAME("_SA_UA_DI_U", 0x1C, NULL),
7588 .nb_flags = NBT_NM_GROUP,
7590 .num_ips = ctx->addresses_best_num,
7591 .ips = ctx->addresses_best,
7592 .apply_expected = True
7598 .type = WREPL_TYPE_UNIQUE,
7599 .state = WREPL_STATE_ACTIVE,
7600 .node = WREPL_NODE_B,
7602 .num_ips = ARRAY_SIZE(addresses_B_1),
7603 .ips = addresses_B_1,
7604 .apply_expected = False
7608 * sgroup,active vs. unique,tombstone with same ip(s), unchecked
7611 .line = __location__,
7612 .name = _NBT_NAME("_SA_UT_SI_U", 0x1C, NULL),
7614 .nb_flags = NBT_NM_GROUP,
7616 .num_ips = ctx->addresses_best_num,
7617 .ips = ctx->addresses_best,
7618 .apply_expected = True
7624 .type = WREPL_TYPE_UNIQUE,
7625 .state = WREPL_STATE_TOMBSTONE,
7626 .node = WREPL_NODE_B,
7628 .num_ips = ctx->addresses_best_num,
7629 .ips = ctx->addresses_best,
7630 .apply_expected = False
7634 * sgroup,active vs. unique,tombstone with different ip(s), unchecked
7637 .line = __location__,
7638 .name = _NBT_NAME("_SA_UT_DI_U", 0x1C, NULL),
7640 .nb_flags = NBT_NM_GROUP,
7642 .num_ips = ctx->addresses_best_num,
7643 .ips = ctx->addresses_best,
7644 .apply_expected = True
7650 .type = WREPL_TYPE_UNIQUE,
7651 .state = WREPL_STATE_TOMBSTONE,
7652 .node = WREPL_NODE_B,
7654 .num_ips = ARRAY_SIZE(addresses_B_1),
7655 .ips = addresses_B_1,
7656 .apply_expected = False
7660 * special group vs. normal group section
7663 * sgroup,active vs. group,active with same ip(s), unchecked
7666 .line = __location__,
7667 .name = _NBT_NAME("_SA_GA_SI_U", 0x1C, NULL),
7669 .nb_flags = NBT_NM_GROUP,
7671 .num_ips = ctx->addresses_best_num,
7672 .ips = ctx->addresses_best,
7673 .apply_expected = True
7679 .type = WREPL_TYPE_GROUP,
7680 .state = WREPL_STATE_ACTIVE,
7681 .node = WREPL_NODE_B,
7683 .num_ips = ctx->addresses_best_num,
7684 .ips = ctx->addresses_best,
7685 .apply_expected = False
7689 * sgroup,active vs. group,active with different ip(s), unchecked
7692 .line = __location__,
7693 .name = _NBT_NAME("_SA_GA_DI_U", 0x1C, NULL),
7695 .nb_flags = NBT_NM_GROUP,
7697 .num_ips = ctx->addresses_best_num,
7698 .ips = ctx->addresses_best,
7699 .apply_expected = True
7705 .type = WREPL_TYPE_GROUP,
7706 .state = WREPL_STATE_ACTIVE,
7707 .node = WREPL_NODE_B,
7709 .num_ips = ARRAY_SIZE(addresses_B_1),
7710 .ips = addresses_B_1,
7711 .apply_expected = False
7715 * sgroup,active vs. group,tombstone with same ip(s), unchecked
7718 .line = __location__,
7719 .name = _NBT_NAME("_SA_GT_SI_U", 0x1C, NULL),
7721 .nb_flags = NBT_NM_GROUP,
7723 .num_ips = ctx->addresses_best_num,
7724 .ips = ctx->addresses_best,
7725 .apply_expected = True
7731 .type = WREPL_TYPE_GROUP,
7732 .state = WREPL_STATE_TOMBSTONE,
7733 .node = WREPL_NODE_B,
7735 .num_ips = ctx->addresses_best_num,
7736 .ips = ctx->addresses_best,
7737 .apply_expected = False
7741 * sgroup,active vs. group,tombstone with different ip(s), unchecked
7744 .line = __location__,
7745 .name = _NBT_NAME("_SA_GT_DI_U", 0x1C, NULL),
7747 .nb_flags = NBT_NM_GROUP,
7749 .num_ips = ctx->addresses_best_num,
7750 .ips = ctx->addresses_best,
7751 .apply_expected = True
7757 .type = WREPL_TYPE_GROUP,
7758 .state = WREPL_STATE_TOMBSTONE,
7759 .node = WREPL_NODE_B,
7761 .num_ips = ARRAY_SIZE(addresses_B_1),
7762 .ips = addresses_B_1,
7763 .apply_expected = False
7767 * special group vs. multi homed section
7770 * sgroup,active vs. mhomed,active with same ip(s), unchecked
7773 .line = __location__,
7774 .name = _NBT_NAME("_SA_MA_SI_U", 0x1C, NULL),
7776 .nb_flags = NBT_NM_GROUP,
7778 .num_ips = ctx->addresses_best_num,
7779 .ips = ctx->addresses_best,
7780 .apply_expected = True
7786 .type = WREPL_TYPE_MHOMED,
7787 .state = WREPL_STATE_ACTIVE,
7788 .node = WREPL_NODE_B,
7790 .num_ips = ctx->addresses_best_num,
7791 .ips = ctx->addresses_best,
7792 .apply_expected = False
7796 * sgroup,active vs. mhomed,active with different ip(s), unchecked
7799 .line = __location__,
7800 .name = _NBT_NAME("_SA_MA_DI_U", 0x1C, NULL),
7802 .nb_flags = NBT_NM_GROUP,
7804 .num_ips = ctx->addresses_best_num,
7805 .ips = ctx->addresses_best,
7806 .apply_expected = True
7812 .type = WREPL_TYPE_MHOMED,
7813 .state = WREPL_STATE_ACTIVE,
7814 .node = WREPL_NODE_B,
7816 .num_ips = ARRAY_SIZE(addresses_B_1),
7817 .ips = addresses_B_1,
7818 .apply_expected = False
7822 * sgroup,active vs. mhomed,tombstone with same ip(s), unchecked
7825 .line = __location__,
7826 .name = _NBT_NAME("_SA_MT_SI_U", 0x1C, NULL),
7828 .nb_flags = NBT_NM_GROUP,
7830 .num_ips = ctx->addresses_best_num,
7831 .ips = ctx->addresses_best,
7832 .apply_expected = True
7838 .type = WREPL_TYPE_MHOMED,
7839 .state = WREPL_STATE_TOMBSTONE,
7840 .node = WREPL_NODE_B,
7842 .num_ips = ctx->addresses_best_num,
7843 .ips = ctx->addresses_best,
7844 .apply_expected = False
7848 * sgroup,active vs. mhomed,tombstone with different ip(s), unchecked
7851 .line = __location__,
7852 .name = _NBT_NAME("_SA_MT_DI_U", 0x1C, NULL),
7854 .nb_flags = NBT_NM_GROUP,
7856 .num_ips = ctx->addresses_best_num,
7857 .ips = ctx->addresses_best,
7858 .apply_expected = True
7864 .type = WREPL_TYPE_MHOMED,
7865 .state = WREPL_STATE_TOMBSTONE,
7866 .node = WREPL_NODE_B,
7868 .num_ips = ARRAY_SIZE(addresses_B_1),
7869 .ips = addresses_B_1,
7870 .apply_expected = False
7874 * multi homed vs. unique section
7877 * mhomed,active vs. unique,active with same ip(s), unchecked
7880 .line = __location__,
7881 .name = _NBT_NAME("_MA_UA_SI_U", 0x00, NULL),
7885 .num_ips = ctx->addresses_best_num,
7886 .ips = ctx->addresses_best,
7887 .apply_expected = True
7893 .type = WREPL_TYPE_UNIQUE,
7894 .state = WREPL_STATE_ACTIVE,
7895 .node = WREPL_NODE_B,
7897 .num_ips = ctx->addresses_best_num,
7898 .ips = ctx->addresses_best,
7899 .apply_expected = True
7903 * mhomed,active vs. unique,active with different ip(s), positive response
7906 .line = __location__,
7907 .name = _NBT_NAME("_MA_UA_DI_P", 0x00, NULL),
7911 .num_ips = ctx->addresses_best_num,
7912 .ips = ctx->addresses_best,
7913 .apply_expected = True
7920 .type = WREPL_TYPE_UNIQUE,
7921 .state = WREPL_STATE_ACTIVE,
7922 .node = WREPL_NODE_B,
7924 .num_ips = ARRAY_SIZE(addresses_B_1),
7925 .ips = addresses_B_1,
7926 .apply_expected = False
7930 * mhomed,active vs. unique,active with different ip(s), positive response other ips
7933 .line = __location__,
7934 .name = _NBT_NAME("_MA_UA_DI_O", 0x00, NULL),
7938 .num_ips = ctx->addresses_best_num,
7939 .ips = ctx->addresses_best,
7940 .apply_expected = True
7945 .num_ips = ARRAY_SIZE(addresses_A_3_4),
7946 .ips = addresses_A_3_4,
7949 .type = WREPL_TYPE_UNIQUE,
7950 .state = WREPL_STATE_ACTIVE,
7951 .node = WREPL_NODE_B,
7953 .num_ips = ARRAY_SIZE(addresses_B_1),
7954 .ips = addresses_B_1,
7955 .apply_expected = False
7959 * mhomed,active vs. unique,active with different ip(s), negative response
7962 .line = __location__,
7963 .name = _NBT_NAME("_MA_UA_DI_N", 0x00, NULL),
7967 .num_ips = ctx->addresses_best_num,
7968 .ips = ctx->addresses_best,
7969 .apply_expected = True
7976 .type = WREPL_TYPE_UNIQUE,
7977 .state = WREPL_STATE_ACTIVE,
7978 .node = WREPL_NODE_B,
7980 .num_ips = ARRAY_SIZE(addresses_B_1),
7981 .ips = addresses_B_1,
7982 .apply_expected = True
7986 * mhomed,active vs. unique,tombstone with same ip(s), unchecked
7989 .line = __location__,
7990 .name = _NBT_NAME("_MA_UT_SI_U", 0x00, NULL),
7994 .num_ips = ctx->addresses_best_num,
7995 .ips = ctx->addresses_best,
7996 .apply_expected = True
8002 .type = WREPL_TYPE_UNIQUE,
8003 .state = WREPL_STATE_TOMBSTONE,
8004 .node = WREPL_NODE_B,
8006 .num_ips = ctx->addresses_best_num,
8007 .ips = ctx->addresses_best,
8008 .apply_expected = False
8012 * mhomed,active vs. unique,tombstone with different ip(s), unchecked
8015 .line = __location__,
8016 .name = _NBT_NAME("_MA_UT_DI_U", 0x00, NULL),
8020 .num_ips = ctx->addresses_best_num,
8021 .ips = ctx->addresses_best,
8022 .apply_expected = True
8028 .type = WREPL_TYPE_UNIQUE,
8029 .state = WREPL_STATE_TOMBSTONE,
8030 .node = WREPL_NODE_B,
8032 .num_ips = ARRAY_SIZE(addresses_B_1),
8033 .ips = addresses_B_1,
8034 .apply_expected = False
8038 * multi homed vs. normal group section
8041 * mhomed,active vs. group,active with same ip(s), release expected
8044 .line = __location__,
8045 .name = _NBT_NAME("_MA_GA_SI_R", 0x00, NULL),
8049 .num_ips = ctx->addresses_best_num,
8050 .ips = ctx->addresses_best,
8051 .apply_expected = True
8055 .expect_release = True,
8058 .type = WREPL_TYPE_GROUP,
8059 .state = WREPL_STATE_ACTIVE,
8060 .node = WREPL_NODE_B,
8062 .num_ips = ctx->addresses_best_num,
8063 .ips = ctx->addresses_best,
8064 .apply_expected = True
8068 * mhomed,active vs. group,active with different ip(s), release expected
8071 .line = __location__,
8072 .name = _NBT_NAME("_MA_GA_DI_R", 0x00, NULL),
8076 .num_ips = ctx->addresses_best_num,
8077 .ips = ctx->addresses_best,
8078 .apply_expected = True
8082 .expect_release = True,
8085 .type = WREPL_TYPE_GROUP,
8086 .state = WREPL_STATE_ACTIVE,
8087 .node = WREPL_NODE_B,
8089 .num_ips = ARRAY_SIZE(addresses_B_1),
8090 .ips = addresses_B_1,
8091 .apply_expected = True
8095 * mhomed,active vs. group,tombstone with same ip(s), unchecked
8098 .line = __location__,
8099 .name = _NBT_NAME("_MA_GT_SI_U", 0x00, NULL),
8103 .num_ips = ctx->addresses_best_num,
8104 .ips = ctx->addresses_best,
8105 .apply_expected = True
8111 .type = WREPL_TYPE_GROUP,
8112 .state = WREPL_STATE_TOMBSTONE,
8113 .node = WREPL_NODE_B,
8115 .num_ips = ctx->addresses_best_num,
8116 .ips = ctx->addresses_best,
8117 .apply_expected = False
8121 * mhomed,active vs. group,tombstone with different ip(s), unchecked
8124 .line = __location__,
8125 .name = _NBT_NAME("_MA_GT_DI_U", 0x00, NULL),
8129 .num_ips = ctx->addresses_best_num,
8130 .ips = ctx->addresses_best,
8131 .apply_expected = True
8137 .type = WREPL_TYPE_GROUP,
8138 .state = WREPL_STATE_TOMBSTONE,
8139 .node = WREPL_NODE_B,
8141 .num_ips = ARRAY_SIZE(addresses_B_1),
8142 .ips = addresses_B_1,
8143 .apply_expected = False
8147 * multi homed vs. special group section
8150 * mhomed,active vs. sgroup,active with same ip(s), release expected
8153 .line = __location__,
8154 .name = _NBT_NAME("_MA_SA_SI_R", 0x00, NULL),
8158 .num_ips = ctx->addresses_best_num,
8159 .ips = ctx->addresses_best,
8160 .apply_expected = True
8164 .expect_release = True,
8167 .type = WREPL_TYPE_SGROUP,
8168 .state = WREPL_STATE_ACTIVE,
8169 .node = WREPL_NODE_B,
8171 .num_ips = ctx->addresses_best_num,
8172 .ips = ctx->addresses_best,
8173 .apply_expected = True
8177 * mhomed,active vs. group,active with different ip(s), release expected
8180 .line = __location__,
8181 .name = _NBT_NAME("_MA_SA_DI_R", 0x00, NULL),
8185 .num_ips = ctx->addresses_best_num,
8186 .ips = ctx->addresses_best,
8187 .apply_expected = True
8191 .expect_release = True,
8194 .type = WREPL_TYPE_SGROUP,
8195 .state = WREPL_STATE_ACTIVE,
8196 .node = WREPL_NODE_B,
8198 .num_ips = ARRAY_SIZE(addresses_B_1),
8199 .ips = addresses_B_1,
8200 .apply_expected = True
8204 * mhomed,active vs. sgroup,tombstone with same ip(s), unchecked
8207 .line = __location__,
8208 .name = _NBT_NAME("_MA_ST_SI_U", 0x00, NULL),
8212 .num_ips = ctx->addresses_best_num,
8213 .ips = ctx->addresses_best,
8214 .apply_expected = True
8220 .type = WREPL_TYPE_SGROUP,
8221 .state = WREPL_STATE_TOMBSTONE,
8222 .node = WREPL_NODE_B,
8224 .num_ips = ctx->addresses_best_num,
8225 .ips = ctx->addresses_best,
8226 .apply_expected = False
8230 * mhomed,active vs. sgroup,tombstone with different ip(s), unchecked
8233 .line = __location__,
8234 .name = _NBT_NAME("_MA_ST_DI_U", 0x00, NULL),
8238 .num_ips = ctx->addresses_best_num,
8239 .ips = ctx->addresses_best,
8240 .apply_expected = True
8246 .type = WREPL_TYPE_SGROUP,
8247 .state = WREPL_STATE_TOMBSTONE,
8248 .node = WREPL_NODE_B,
8250 .num_ips = ARRAY_SIZE(addresses_B_1),
8251 .ips = addresses_B_1,
8252 .apply_expected = False
8256 * multi homed vs. multi homed section
8259 * mhomed,active vs. mhomed,active with same ip(s), unchecked
8262 .line = __location__,
8263 .name = _NBT_NAME("_MA_MA_SI_U", 0x00, NULL),
8267 .num_ips = ctx->addresses_best_num,
8268 .ips = ctx->addresses_best,
8269 .apply_expected = True
8275 .type = WREPL_TYPE_MHOMED,
8276 .state = WREPL_STATE_ACTIVE,
8277 .node = WREPL_NODE_B,
8279 .num_ips = ctx->addresses_best_num,
8280 .ips = ctx->addresses_best,
8281 .apply_expected = True
8285 * mhomed,active vs. mhomed,active with superset ip(s), unchecked
8288 .line = __location__,
8289 .name = _NBT_NAME("_MA_MA_SP_U", 0x00, NULL),
8293 .num_ips = ctx->addresses_best_num,
8294 .ips = ctx->addresses_best,
8295 .apply_expected = True
8301 .type = WREPL_TYPE_MHOMED,
8302 .state = WREPL_STATE_ACTIVE,
8303 .node = WREPL_NODE_B,
8305 .num_ips = ctx->addresses_all_num,
8306 .ips = ctx->addresses_all,
8307 .apply_expected = True
8311 * mhomed,active vs. mhomed,active with different ip(s), positive response
8314 .line = __location__,
8315 .name = _NBT_NAME("_MA_MA_DI_P", 0x00, NULL),
8319 .num_ips = ctx->addresses_best_num,
8320 .ips = ctx->addresses_best,
8321 .apply_expected = True
8328 .type = WREPL_TYPE_MHOMED,
8329 .state = WREPL_STATE_ACTIVE,
8330 .node = WREPL_NODE_B,
8332 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8333 .ips = addresses_B_3_4,
8334 .apply_expected = False
8338 * mhomed,active vs. mhomed,active with different ip(s), positive response other ips
8341 .line = __location__,
8342 .name = _NBT_NAME("_MA_MA_DI_O", 0x00, NULL),
8346 .num_ips = ctx->addresses_best_num,
8347 .ips = ctx->addresses_best,
8348 .apply_expected = True
8353 .num_ips = ARRAY_SIZE(addresses_A_3_4),
8354 .ips = addresses_A_3_4,
8357 .type = WREPL_TYPE_MHOMED,
8358 .state = WREPL_STATE_ACTIVE,
8359 .node = WREPL_NODE_B,
8361 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8362 .ips = addresses_B_3_4,
8363 .apply_expected = False
8367 * mhomed,active vs. mhomed,active with different ip(s), negative response
8370 .line = __location__,
8371 .name = _NBT_NAME("_MA_MA_DI_N", 0x00, NULL),
8375 .num_ips = ctx->addresses_best_num,
8376 .ips = ctx->addresses_best,
8377 .apply_expected = True
8384 .type = WREPL_TYPE_MHOMED,
8385 .state = WREPL_STATE_ACTIVE,
8386 .node = WREPL_NODE_B,
8388 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8389 .ips = addresses_B_3_4,
8390 .apply_expected = True
8394 * mhomed,active vs. mhomed,tombstone with same ip(s), unchecked
8397 .line = __location__,
8398 .name = _NBT_NAME("_MA_MT_SI_U", 0x00, NULL),
8402 .num_ips = ctx->addresses_best_num,
8403 .ips = ctx->addresses_best,
8404 .apply_expected = True
8410 .type = WREPL_TYPE_MHOMED,
8411 .state = WREPL_STATE_TOMBSTONE,
8412 .node = WREPL_NODE_B,
8414 .num_ips = ctx->addresses_best_num,
8415 .ips = ctx->addresses_best,
8416 .apply_expected = False
8420 * mhomed,active vs. mhomed,tombstone with different ip(s), unchecked
8423 .line = __location__,
8424 .name = _NBT_NAME("_MA_MT_DI_U", 0x00, NULL),
8428 .num_ips = ctx->addresses_best_num,
8429 .ips = ctx->addresses_best,
8430 .apply_expected = True
8436 .type = WREPL_TYPE_MHOMED,
8437 .state = WREPL_STATE_TOMBSTONE,
8438 .node = WREPL_NODE_B,
8440 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8441 .ips = addresses_B_3_4,
8442 .apply_expected = False
8446 * some more multi homed test, including merging
8449 * mhomed,active vs. mhomed,active with superset ip(s), unchecked
8452 .line = __location__,
8453 .section= "Test Replica vs. owned active: some more MHOMED combinations",
8454 .name = _NBT_NAME("_MA_MA_SP_U", 0x00, NULL),
8455 .skip = (ctx->addresses_all_num < 3),
8459 .num_ips = ctx->addresses_mhomed_num,
8460 .ips = ctx->addresses_mhomed,
8461 .apply_expected = True
8467 .type = WREPL_TYPE_MHOMED,
8468 .state = WREPL_STATE_ACTIVE,
8469 .node = WREPL_NODE_B,
8471 .num_ips = ctx->addresses_all_num,
8472 .ips = ctx->addresses_all,
8473 .apply_expected = True
8477 * mhomed,active vs. mhomed,active with same ips, unchecked
8480 .line = __location__,
8481 .name = _NBT_NAME("_MA_MA_SM_U", 0x00, NULL),
8482 .skip = (ctx->addresses_mhomed_num != 2),
8486 .num_ips = ctx->addresses_mhomed_num,
8487 .ips = ctx->addresses_mhomed,
8488 .apply_expected = True
8494 .type = WREPL_TYPE_MHOMED,
8495 .state = WREPL_STATE_ACTIVE,
8496 .node = WREPL_NODE_B,
8498 .num_ips = ctx->addresses_mhomed_num,
8499 .ips = ctx->addresses_mhomed,
8500 .apply_expected = True
8504 * mhomed,active vs. mhomed,active with subset ip(s), positive response
8507 .line = __location__,
8508 .name = _NBT_NAME("_MA_MA_SB_P", 0x00, NULL),
8509 .skip = (ctx->addresses_mhomed_num != 2),
8513 .num_ips = ctx->addresses_mhomed_num,
8514 .ips = ctx->addresses_mhomed,
8515 .apply_expected = True
8522 .type = WREPL_TYPE_MHOMED,
8523 .state = WREPL_STATE_ACTIVE,
8524 .node = WREPL_NODE_B,
8526 .num_ips = ctx->addresses_best_num,
8527 .ips = ctx->addresses_best,
8528 .mhomed_merge = True
8532 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with all addresses
8535 .line = __location__,
8536 .name = _NBT_NAME("_MA_MA_SB_A", 0x00, NULL),
8537 .skip = (ctx->addresses_all_num < 3),
8541 .num_ips = ctx->addresses_mhomed_num,
8542 .ips = ctx->addresses_mhomed,
8543 .apply_expected = True
8548 .num_ips = ctx->addresses_all_num,
8549 .ips = ctx->addresses_all,
8552 .type = WREPL_TYPE_MHOMED,
8553 .state = WREPL_STATE_ACTIVE,
8554 .node = WREPL_NODE_B,
8556 .num_ips = ctx->addresses_best_num,
8557 .ips = ctx->addresses_best,
8558 .mhomed_merge = True
8562 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with replicas addresses
8563 * TODO: check why the server sends a name release demand for one address?
8564 * the release demand has no effect to the database record...
8567 .line = __location__,
8568 .name = _NBT_NAME("_MA_MA_SB_PRA", 0x00, NULL),
8569 .skip = (ctx->addresses_all_num < 3),
8573 .num_ips = ctx->addresses_mhomed_num,
8574 .ips = ctx->addresses_mhomed,
8575 .apply_expected = True
8580 .num_ips = ctx->addresses_best_num,
8581 .ips = ctx->addresses_best,
8582 .late_release = True
8585 .type = WREPL_TYPE_MHOMED,
8586 .state = WREPL_STATE_ACTIVE,
8587 .node = WREPL_NODE_B,
8589 .num_ips = ctx->addresses_best_num,
8590 .ips = ctx->addresses_best,
8591 .apply_expected = False
8595 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with other addresses
8598 .line = __location__,
8599 .name = _NBT_NAME("_MA_MA_SB_O", 0x00, NULL),
8601 .skip = (ctx->addresses_all_num < 3),
8605 .num_ips = ctx->addresses_mhomed_num,
8606 .ips = ctx->addresses_mhomed,
8607 .apply_expected = True
8612 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8613 .ips = addresses_B_3_4,
8616 .type = WREPL_TYPE_MHOMED,
8617 .state = WREPL_STATE_ACTIVE,
8618 .node = WREPL_NODE_B,
8620 .num_ips = ctx->addresses_best_num,
8621 .ips = ctx->addresses_best,
8622 .apply_expected = False
8626 * mhomed,active vs. mhomed,active with subset ip(s), negative response
8629 .line = __location__,
8630 .name = _NBT_NAME("_MA_MA_SB_N", 0x00, NULL),
8631 .skip = (ctx->addresses_mhomed_num != 2),
8635 .num_ips = ctx->addresses_mhomed_num,
8636 .ips = ctx->addresses_mhomed,
8637 .apply_expected = True
8644 .type = WREPL_TYPE_MHOMED,
8645 .state = WREPL_STATE_ACTIVE,
8646 .node = WREPL_NODE_B,
8648 .num_ips = ctx->addresses_best_num,
8649 .ips = ctx->addresses_best,
8650 .apply_expected = True
8654 * some more multi homed and unique test, including merging
8657 * mhomed,active vs. unique,active with subset ip(s), positive response
8660 .line = __location__,
8661 .section= "Test Replica vs. owned active: some more UNIQUE,MHOMED combinations",
8662 .name = _NBT_NAME("_MA_UA_SB_P", 0x00, NULL),
8663 .skip = (ctx->addresses_all_num < 3),
8667 .num_ips = ctx->addresses_mhomed_num,
8668 .ips = ctx->addresses_mhomed,
8669 .apply_expected = True
8676 .type = WREPL_TYPE_UNIQUE,
8677 .state = WREPL_STATE_ACTIVE,
8678 .node = WREPL_NODE_B,
8680 .num_ips = ctx->addresses_best_num,
8681 .ips = ctx->addresses_best,
8682 .mhomed_merge = True
8686 * unique,active vs. unique,active with different ip(s), positive response, with all addresses
8689 .line = __location__,
8690 .name = _NBT_NAME("_UA_UA_DI_A", 0x00, NULL),
8691 .skip = (ctx->addresses_all_num < 3),
8695 .num_ips = ctx->addresses_best_num,
8696 .ips = ctx->addresses_best,
8697 .apply_expected = True
8702 .num_ips = ctx->addresses_all_num,
8703 .ips = ctx->addresses_all,
8706 .type = WREPL_TYPE_UNIQUE,
8707 .state = WREPL_STATE_ACTIVE,
8708 .node = WREPL_NODE_B,
8710 .num_ips = ctx->addresses_best2_num,
8711 .ips = ctx->addresses_best2,
8712 .mhomed_merge = True,
8716 * unique,active vs. mhomed,active with different ip(s), positive response, with all addresses
8719 .line = __location__,
8720 .name = _NBT_NAME("_UA_MA_DI_A", 0x00, NULL),
8721 .skip = (ctx->addresses_all_num < 3),
8725 .num_ips = ctx->addresses_best_num,
8726 .ips = ctx->addresses_best,
8727 .apply_expected = True
8732 .num_ips = ctx->addresses_all_num,
8733 .ips = ctx->addresses_all,
8736 .type = WREPL_TYPE_MHOMED,
8737 .state = WREPL_STATE_ACTIVE,
8738 .node = WREPL_NODE_B,
8740 .num_ips = ctx->addresses_best2_num,
8741 .ips = ctx->addresses_best2,
8742 .mhomed_merge = True,
8746 * special group vs. special group merging section
8749 * sgroup,active vs. sgroup,active with different ip(s)
8752 .line = __location__,
8753 .section= "Test Replica vs. owned active: SGROUP vs. SGROUP tests",
8754 .name = _NBT_NAME("_SA_SA_DI_U", 0x1C, NULL),
8755 .skip = (ctx->addresses_all_num < 3),
8757 .nb_flags = NBT_NM_GROUP,
8759 .num_ips = ctx->addresses_mhomed_num,
8760 .ips = ctx->addresses_mhomed,
8761 .apply_expected = True
8767 .type = WREPL_TYPE_SGROUP,
8768 .state = WREPL_STATE_ACTIVE,
8769 .node = WREPL_NODE_B,
8771 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8772 .ips = addresses_B_3_4,
8773 .sgroup_merge = True
8777 * sgroup,active vs. sgroup,active with same ip(s)
8780 .line = __location__,
8781 .name = _NBT_NAME("_SA_SA_SI_U", 0x1C, NULL),
8782 .skip = (ctx->addresses_all_num < 3),
8784 .nb_flags = NBT_NM_GROUP,
8786 .num_ips = ctx->addresses_mhomed_num,
8787 .ips = ctx->addresses_mhomed,
8788 .apply_expected = True
8794 .type = WREPL_TYPE_SGROUP,
8795 .state = WREPL_STATE_ACTIVE,
8796 .node = WREPL_NODE_B,
8798 .num_ips = ctx->addresses_mhomed_num,
8799 .ips = ctx->addresses_mhomed,
8800 .sgroup_merge = True
8804 * sgroup,active vs. sgroup,active with superset ip(s)
8807 .line = __location__,
8808 .name = _NBT_NAME("_SA_SA_SP_U", 0x1C, NULL),
8809 .skip = (ctx->addresses_all_num < 3),
8811 .nb_flags = NBT_NM_GROUP,
8813 .num_ips = ctx->addresses_mhomed_num,
8814 .ips = ctx->addresses_mhomed,
8815 .apply_expected = True
8821 .type = WREPL_TYPE_SGROUP,
8822 .state = WREPL_STATE_ACTIVE,
8823 .node = WREPL_NODE_B,
8825 .num_ips = ctx->addresses_all_num,
8826 .ips = ctx->addresses_all,
8827 .sgroup_merge = True
8831 * sgroup,active vs. sgroup,active with subset ip(s)
8834 .line = __location__,
8835 .name = _NBT_NAME("_SA_SA_SB_U", 0x1C, NULL),
8836 .skip = (ctx->addresses_all_num < 3),
8838 .nb_flags = NBT_NM_GROUP,
8840 .num_ips = ctx->addresses_mhomed_num,
8841 .ips = ctx->addresses_mhomed,
8842 .apply_expected = True
8848 .type = WREPL_TYPE_SGROUP,
8849 .state = WREPL_STATE_ACTIVE,
8850 .node = WREPL_NODE_B,
8852 .num_ips = ctx->addresses_best_num,
8853 .ips = ctx->addresses_best,
8854 .sgroup_merge = True
8858 * sgroup,active vs. sgroup,tombstone with different ip(s)
8861 .line = __location__,
8862 .name = _NBT_NAME("_SA_ST_DI_U", 0x1C, NULL),
8863 .skip = (ctx->addresses_all_num < 3),
8865 .nb_flags = NBT_NM_GROUP,
8867 .num_ips = ctx->addresses_mhomed_num,
8868 .ips = ctx->addresses_mhomed,
8869 .apply_expected = True
8875 .type = WREPL_TYPE_SGROUP,
8876 .state = WREPL_STATE_TOMBSTONE,
8877 .node = WREPL_NODE_B,
8879 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8880 .ips = addresses_B_3_4,
8881 .apply_expected = False
8885 * sgroup,active vs. sgroup,tombstone with same ip(s)
8888 .line = __location__,
8889 .name = _NBT_NAME("_SA_ST_SI_U", 0x1C, NULL),
8890 .skip = (ctx->addresses_all_num < 3),
8892 .nb_flags = NBT_NM_GROUP,
8894 .num_ips = ctx->addresses_mhomed_num,
8895 .ips = ctx->addresses_mhomed,
8896 .apply_expected = True
8902 .type = WREPL_TYPE_SGROUP,
8903 .state = WREPL_STATE_TOMBSTONE,
8904 .node = WREPL_NODE_B,
8906 .num_ips = ctx->addresses_mhomed_num,
8907 .ips = ctx->addresses_mhomed,
8908 .apply_expected = False
8912 * sgroup,active vs. sgroup,tombstone with superset ip(s)
8915 .line = __location__,
8916 .name = _NBT_NAME("_SA_ST_SP_U", 0x1C, NULL),
8917 .skip = (ctx->addresses_all_num < 3),
8919 .nb_flags = NBT_NM_GROUP,
8921 .num_ips = ctx->addresses_mhomed_num,
8922 .ips = ctx->addresses_mhomed,
8923 .apply_expected = True
8929 .type = WREPL_TYPE_SGROUP,
8930 .state = WREPL_STATE_TOMBSTONE,
8931 .node = WREPL_NODE_B,
8933 .num_ips = ctx->addresses_all_num,
8934 .ips = ctx->addresses_all,
8935 .apply_expected = False
8939 * sgroup,active vs. sgroup,tombstone with subset ip(s)
8942 .line = __location__,
8943 .name = _NBT_NAME("_SA_ST_SB_U", 0x1C, NULL),
8944 .skip = (ctx->addresses_all_num < 3),
8946 .nb_flags = NBT_NM_GROUP,
8948 .num_ips = ctx->addresses_mhomed_num,
8949 .ips = ctx->addresses_mhomed,
8950 .apply_expected = True
8956 .type = WREPL_TYPE_SGROUP,
8957 .state = WREPL_STATE_TOMBSTONE,
8958 .node = WREPL_NODE_B,
8960 .num_ips = ctx->addresses_best_num,
8961 .ips = ctx->addresses_best,
8962 .apply_expected = False
8967 if (!ctx) return False;
8969 if (!ctx->nbtsock_srv) {
8970 printf("SKIP: Test Replica records vs. owned active records: not bound to port[%d]\n",
8975 printf("Test Replica records vs. owned active records\n");
8977 for(i=0; ret && i < ARRAY_SIZE(records); i++) {
8979 struct test_conflict_owned_active_vs_replica_struct record = records[i];
8980 uint32_t j, count = 1;
8983 if (records[i].wins.mhomed || records[i].name.type == 0x1C) {
8984 count = records[i].wins.num_ips;
8987 if (records[i].section) {
8988 printf("%s\n", records[i].section);
8991 if (records[i].skip) {
8992 printf("%s => SKIPPED\n", nbt_name_string(ctx, &records[i].name));
8996 if (records[i].replica.mhomed_merge) {
8997 action = "MHOMED_MERGE";
8998 } else if (records[i].replica.sgroup_merge) {
8999 action = "SGROUP_MERGE";
9000 } else if (records[i].replica.apply_expected) {
9003 action = "NOT REPLACE";
9006 printf("%s => %s\n", nbt_name_string(ctx, &records[i].name), action);
9008 /* Prepare for multi homed registration */
9009 ZERO_STRUCT(records[i].defend);
9010 records[i].defend.timeout = 10;
9011 records[i].defend.positive = True;
9012 nbt_set_incoming_handler(ctx->nbtsock_srv,
9013 test_conflict_owned_active_vs_replica_handler,
9015 if (ctx->nbtsock_srv2) {
9016 nbt_set_incoming_handler(ctx->nbtsock_srv2,
9017 test_conflict_owned_active_vs_replica_handler,
9024 for (j=0; j < count; j++) {
9025 struct nbt_name_request *req;
9027 name_register->in.name = records[i].name;
9028 name_register->in.dest_addr = ctx->address;
9029 name_register->in.address = records[i].wins.ips[j].ip;
9030 name_register->in.nb_flags = records[i].wins.nb_flags;
9031 name_register->in.register_demand= False;
9032 name_register->in.broadcast = False;
9033 name_register->in.multi_homed = records[i].wins.mhomed;
9034 name_register->in.ttl = 300000;
9035 name_register->in.timeout = 70;
9036 name_register->in.retries = 0;
9038 req = nbt_name_register_send(ctx->nbtsock, name_register);
9040 /* push the request on the wire */
9041 event_loop_once(ctx->nbtsock->event_ctx);
9044 * if we register multiple addresses,
9045 * the server will do name queries to see if the old addresses
9048 if (records[i].wins.mhomed && j > 0) {
9049 end = timeval_current_ofs(records[i].defend.timeout,0);
9050 records[i].defend.ret = True;
9051 while (records[i].defend.timeout > 0) {
9052 event_loop_once(ctx->nbtsock_srv->event_ctx);
9053 if (timeval_expired(&end)) break;
9055 ret &= records[i].defend.ret;
9058 status = nbt_name_register_recv(req, ctx, name_register);
9059 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
9060 printf("No response from %s for name register\n", ctx->address);
9063 if (!NT_STATUS_IS_OK(status)) {
9064 printf("Bad response from %s for name register - %s\n",
9065 ctx->address, nt_errstr(status));
9068 CHECK_VALUE(name_register->out.rcode, 0);
9069 CHECK_VALUE_STRING(name_register->out.reply_from, ctx->address);
9070 CHECK_VALUE(name_register->out.name.type, records[i].name.type);
9071 CHECK_VALUE_STRING(name_register->out.name.name, records[i].name.name);
9072 CHECK_VALUE_STRING(name_register->out.name.scope, records[i].name.scope);
9073 CHECK_VALUE_STRING(name_register->out.reply_addr, records[i].wins.ips[j].ip);
9076 /* Prepare for the current test */
9077 records[i].defend = record.defend;
9078 nbt_set_incoming_handler(ctx->nbtsock_srv,
9079 test_conflict_owned_active_vs_replica_handler,
9081 if (ctx->nbtsock_srv2) {
9082 nbt_set_incoming_handler(ctx->nbtsock_srv2,
9083 test_conflict_owned_active_vs_replica_handler,
9090 wins_name->name = &records[i].name;
9091 wins_name->flags = WREPL_NAME_FLAGS(records[i].replica.type,
9092 records[i].replica.state,
9093 records[i].replica.node,
9094 records[i].replica.is_static);
9095 wins_name->id = ++ctx->b.max_version;
9096 if (wins_name->flags & 2) {
9097 wins_name->addresses.addresses.num_ips = records[i].replica.num_ips;
9098 wins_name->addresses.addresses.ips = discard_const(records[i].replica.ips);
9100 wins_name->addresses.ip = records[i].replica.ips[0].ip;
9102 wins_name->unknown = "255.255.255.255";
9104 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9107 * wait for the name query, which is handled in
9108 * test_conflict_owned_active_vs_replica_handler()
9110 end = timeval_current_ofs(records[i].defend.timeout,0);
9111 records[i].defend.ret = True;
9112 while (records[i].defend.timeout > 0) {
9113 event_loop_once(ctx->nbtsock_srv->event_ctx);
9114 if (timeval_expired(&end)) break;
9116 ret &= records[i].defend.ret;
9118 if (records[i].defend.late_release) {
9119 records[i].defend = record.defend;
9120 records[i].defend.expect_release = True;
9122 * wait for the name release demand, which is handled in
9123 * test_conflict_owned_active_vs_replica_handler()
9125 end = timeval_current_ofs(records[i].defend.timeout,0);
9126 records[i].defend.ret = True;
9127 while (records[i].defend.timeout > 0) {
9128 event_loop_once(ctx->nbtsock_srv->event_ctx);
9129 if (timeval_expired(&end)) break;
9131 ret &= records[i].defend.ret;
9134 if (records[i].replica.mhomed_merge) {
9135 ret &= test_wrepl_mhomed_merged(ctx, &ctx->c,
9136 records[i].wins.num_ips, records[i].wins.ips,
9138 records[i].replica.num_ips, records[i].replica.ips,
9140 } else if (records[i].replica.sgroup_merge) {
9141 ret &= test_wrepl_sgroup_merged(ctx, NULL,
9143 records[i].wins.num_ips, records[i].wins.ips,
9145 records[i].replica.num_ips, records[i].replica.ips,
9148 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name,
9149 records[i].replica.apply_expected);
9152 if (records[i].replica.apply_expected ||
9153 records[i].replica.mhomed_merge) {
9154 wins_name->name = &records[i].name;
9155 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE,
9156 WREPL_STATE_TOMBSTONE,
9157 WREPL_NODE_B, False);
9158 wins_name->id = ++ctx->b.max_version;
9159 wins_name->addresses.ip = addresses_B_1[0].ip;
9160 wins_name->unknown = "255.255.255.255";
9162 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9163 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name, True);
9165 for (j=0; j < count; j++) {
9166 struct nbt_name_socket *nbtsock = ctx->nbtsock;
9168 if (ctx->myaddr2 && strcmp(records[i].wins.ips[j].ip, ctx->myaddr2) == 0) {
9169 nbtsock = ctx->nbtsock2;
9172 release->in.name = records[i].name;
9173 release->in.dest_addr = ctx->address;
9174 release->in.address = records[i].wins.ips[j].ip;
9175 release->in.nb_flags = records[i].wins.nb_flags;
9176 release->in.broadcast = False;
9177 release->in.timeout = 30;
9178 release->in.retries = 0;
9180 status = nbt_name_release(nbtsock, ctx, release);
9181 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
9182 printf("No response from %s for name release\n", ctx->address);
9185 if (!NT_STATUS_IS_OK(status)) {
9186 printf("Bad response from %s for name query - %s\n",
9187 ctx->address, nt_errstr(status));
9190 CHECK_VALUE(release->out.rcode, 0);
9193 if (records[i].replica.sgroup_merge) {
9194 /* clean up the SGROUP record */
9195 wins_name->name = &records[i].name;
9196 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
9198 WREPL_NODE_B, False);
9199 wins_name->id = ++ctx->b.max_version;
9200 wins_name->addresses.addresses.num_ips = 0;
9201 wins_name->addresses.addresses.ips = NULL;
9202 wins_name->unknown = "255.255.255.255";
9203 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9205 /* take ownership of the SGROUP record */
9206 wins_name->name = &records[i].name;
9207 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
9209 WREPL_NODE_B, False);
9210 wins_name->id = ++ctx->b.max_version;
9211 wins_name->addresses.addresses.num_ips = ARRAY_SIZE(addresses_B_1);
9212 wins_name->addresses.addresses.ips = discard_const(addresses_B_1);
9213 wins_name->unknown = "255.255.255.255";
9214 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9215 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name, True);
9217 /* overwrite the SGROUP record with unique,tombstone */
9218 wins_name->name = &records[i].name;
9219 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE,
9220 WREPL_STATE_TOMBSTONE,
9221 WREPL_NODE_B, False);
9222 wins_name->id = ++ctx->b.max_version;
9223 wins_name->addresses.ip = addresses_A_1[0].ip;
9224 wins_name->unknown = "255.255.255.255";
9225 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9226 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name, True);
9232 printf("conflict handled wrong or record[%u]: %s\n", i, records[i].line);
9240 #define _NBT_ASSERT(v, correct) do { \
9241 if ((v) != (correct)) { \
9242 printf("(%s) Incorrect value %s=%d - should be %s (%d)\n", \
9243 __location__, #v, v, #correct, correct); \
9248 #define _NBT_ASSERT_STRING(v, correct) do { \
9249 if ( ((!v) && (correct)) || \
9250 ((v) && (!correct)) || \
9251 ((v) && (correct) && strcmp(v,correct) != 0)) { \
9252 printf("(%s) Incorrect value %s=%s - should be %s\n", \
9253 __location__, #v, v, correct); \
9258 static void test_conflict_owned_active_vs_replica_handler_query(struct nbt_name_socket *nbtsock,
9259 struct nbt_name_packet *req_packet,
9260 const struct nbt_peer_socket *src)
9262 struct nbt_name *name;
9263 struct nbt_name_packet *rep_packet;
9264 struct test_conflict_owned_active_vs_replica_struct *rec = nbtsock->incoming.private;
9266 _NBT_ASSERT(req_packet->qdcount, 1);
9267 _NBT_ASSERT(req_packet->questions[0].question_type, NBT_QTYPE_NETBIOS);
9268 _NBT_ASSERT(req_packet->questions[0].question_class, NBT_QCLASS_IP);
9270 name = &req_packet->questions[0].name;
9272 _NBT_ASSERT(name->type, rec->name.type);
9273 _NBT_ASSERT_STRING(name->name, rec->name.name);
9274 _NBT_ASSERT_STRING(name->scope, rec->name.scope);
9276 _NBT_ASSERT(rec->defend.expect_release, False);
9278 rep_packet = talloc_zero(nbtsock, struct nbt_name_packet);
9279 if (rep_packet == NULL) return;
9281 rep_packet->name_trn_id = req_packet->name_trn_id;
9282 rep_packet->ancount = 1;
9284 rep_packet->answers = talloc_array(rep_packet, struct nbt_res_rec, 1);
9285 if (rep_packet->answers == NULL) return;
9287 rep_packet->answers[0].name = *name;
9288 rep_packet->answers[0].rr_class = NBT_QCLASS_IP;
9289 rep_packet->answers[0].ttl = 0;
9291 if (rec->defend.positive) {
9292 uint32_t i, num_ips;
9293 const struct wrepl_ip *ips;
9295 if (rec->defend.num_ips > 0) {
9296 num_ips = rec->defend.num_ips;
9297 ips = rec->defend.ips;
9299 num_ips = rec->wins.num_ips;
9300 ips = rec->wins.ips;
9303 /* send a positive reply */
9304 rep_packet->operation =
9307 NBT_FLAG_AUTHORITIVE |
9308 NBT_FLAG_RECURSION_DESIRED |
9309 NBT_FLAG_RECURSION_AVAIL;
9311 rep_packet->answers[0].rr_type = NBT_QTYPE_NETBIOS;
9313 rep_packet->answers[0].rdata.netbios.length = num_ips*6;
9314 rep_packet->answers[0].rdata.netbios.addresses =
9315 talloc_array(rep_packet->answers, struct nbt_rdata_address, num_ips);
9316 if (rep_packet->answers[0].rdata.netbios.addresses == NULL) return;
9318 for (i=0; i < num_ips; i++) {
9319 struct nbt_rdata_address *addr =
9320 &rep_packet->answers[0].rdata.netbios.addresses[i];
9321 addr->nb_flags = rec->wins.nb_flags;
9322 addr->ipaddr = ips[i].ip;
9324 DEBUG(2,("Sending positive name query reply for %s to %s:%d\n",
9325 nbt_name_string(rep_packet, name), src->addr, src->port));
9327 /* send a negative reply */
9328 rep_packet->operation =
9331 NBT_FLAG_AUTHORITIVE |
9334 rep_packet->answers[0].rr_type = NBT_QTYPE_NULL;
9336 ZERO_STRUCT(rep_packet->answers[0].rdata);
9338 DEBUG(2,("Sending negative name query reply for %s to %s:%d\n",
9339 nbt_name_string(rep_packet, name), src->addr, src->port));
9342 nbt_name_reply_send(nbtsock, src, rep_packet);
9343 talloc_free(rep_packet);
9345 /* make sure we push the reply to the wire */
9346 event_loop_once(nbtsock->event_ctx);
9348 rec->defend.timeout = 0;
9349 rec->defend.ret = True;
9352 static void test_conflict_owned_active_vs_replica_handler_release(struct nbt_name_socket *nbtsock,
9353 struct nbt_name_packet *req_packet,
9354 const struct nbt_peer_socket *src)
9356 struct nbt_name *name;
9357 struct nbt_name_packet *rep_packet;
9358 struct test_conflict_owned_active_vs_replica_struct *rec = nbtsock->incoming.private;
9360 _NBT_ASSERT(req_packet->qdcount, 1);
9361 _NBT_ASSERT(req_packet->questions[0].question_type, NBT_QTYPE_NETBIOS);
9362 _NBT_ASSERT(req_packet->questions[0].question_class, NBT_QCLASS_IP);
9364 name = &req_packet->questions[0].name;
9366 _NBT_ASSERT(name->type, rec->name.type);
9367 _NBT_ASSERT_STRING(name->name, rec->name.name);
9368 _NBT_ASSERT_STRING(name->scope, rec->name.scope);
9370 _NBT_ASSERT(rec->defend.expect_release, True);
9372 rep_packet = talloc_zero(nbtsock, struct nbt_name_packet);
9373 if (rep_packet == NULL) return;
9375 rep_packet->name_trn_id = req_packet->name_trn_id;
9376 rep_packet->ancount = 1;
9377 rep_packet->operation =
9379 NBT_OPCODE_RELEASE |
9380 NBT_FLAG_AUTHORITIVE;
9382 rep_packet->answers = talloc_array(rep_packet, struct nbt_res_rec, 1);
9383 if (rep_packet->answers == NULL) return;
9385 rep_packet->answers[0].name = *name;
9386 rep_packet->answers[0].rr_type = NBT_QTYPE_NETBIOS;
9387 rep_packet->answers[0].rr_class = NBT_QCLASS_IP;
9388 rep_packet->answers[0].ttl = req_packet->additional[0].ttl;
9389 rep_packet->answers[0].rdata = req_packet->additional[0].rdata;
9391 DEBUG(2,("Sending name release reply for %s to %s:%d\n",
9392 nbt_name_string(rep_packet, name), src->addr, src->port));
9394 nbt_name_reply_send(nbtsock, src, rep_packet);
9395 talloc_free(rep_packet);
9397 /* make sure we push the reply to the wire */
9398 event_loop_once(nbtsock->event_ctx);
9400 rec->defend.timeout = 0;
9401 rec->defend.ret = True;
9404 static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket *nbtsock,
9405 struct nbt_name_packet *req_packet,
9406 const struct nbt_peer_socket *src)
9408 struct test_conflict_owned_active_vs_replica_struct *rec = nbtsock->incoming.private;
9410 rec->defend.ret = False;
9412 switch (req_packet->operation & NBT_OPCODE) {
9413 case NBT_OPCODE_QUERY:
9414 test_conflict_owned_active_vs_replica_handler_query(nbtsock, req_packet, src);
9416 case NBT_OPCODE_RELEASE:
9417 test_conflict_owned_active_vs_replica_handler_release(nbtsock, req_packet, src);
9420 printf("%s: unexpected incoming packet\n", __location__);
9426 test WINS replication operations
9428 BOOL torture_nbt_winsreplication_quick(void)
9430 const char *address;
9431 struct nbt_name name;
9432 TALLOC_CTX *mem_ctx = talloc_new(NULL);
9435 struct test_wrepl_conflict_conn *ctx;
9437 make_nbt_name_server(&name, lp_parm_string(-1, "torture", "host"));
9439 /* do an initial name resolution to find its IP */
9440 status = resolve_name(&name, mem_ctx, &address, NULL);
9441 if (!NT_STATUS_IS_OK(status)) {
9442 printf("Failed to resolve %s - %s\n",
9443 name.name, nt_errstr(status));
9444 talloc_free(mem_ctx);
9448 ret &= test_assoc_ctx1(mem_ctx, address);
9449 ret &= test_assoc_ctx2(mem_ctx, address);
9451 ret &= test_wins_replication(mem_ctx, address);
9453 ctx = test_create_conflict_ctx(mem_ctx, address);
9455 ret &= test_conflict_same_owner(ctx);
9457 talloc_free(mem_ctx);
9463 test WINS replication operations
9465 BOOL torture_nbt_winsreplication(void)
9467 const char *address;
9468 struct nbt_name name;
9469 TALLOC_CTX *mem_ctx = talloc_new(NULL);
9472 struct test_wrepl_conflict_conn *ctx;
9474 make_nbt_name_server(&name, lp_parm_string(-1, "torture", "host"));
9476 /* do an initial name resolution to find its IP */
9477 status = resolve_name(&name, mem_ctx, &address, NULL);
9478 if (!NT_STATUS_IS_OK(status)) {
9479 printf("Failed to resolve %s - %s\n",
9480 name.name, nt_errstr(status));
9481 talloc_free(mem_ctx);
9485 ret &= test_assoc_ctx1(mem_ctx, address);
9486 ret &= test_assoc_ctx2(mem_ctx, address);
9488 ret &= test_wins_replication(mem_ctx, address);
9490 ctx = test_create_conflict_ctx(mem_ctx, address);
9492 ret &= test_conflict_same_owner(ctx);
9493 ret &= test_conflict_different_owner(ctx);
9494 ret &= test_conflict_owned_released_vs_replica(ctx);
9495 ret &= test_conflict_owned_active_vs_replica(ctx);
9497 talloc_free(mem_ctx);