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, (long long)v, (long long)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 packet;
107 struct wrepl_send_ctrl ctrl;
108 struct wrepl_packet *rep_packet;
109 struct wrepl_associate_stop assoc_stop;
112 if (!lp_parm_bool(-1, "torture", "dangerous", False)) {
113 printf("winsrepl: cross connection assoc_ctx usage disabled - enable dangerous tests to use\n");
117 printf("Test if assoc_ctx is only valid on the conection it was created on\n");
119 wrepl_socket1 = wrepl_socket_init(mem_ctx, NULL);
120 wrepl_socket2 = wrepl_socket_init(mem_ctx, NULL);
122 printf("Setup 2 wrepl connections\n");
123 status = wrepl_connect(wrepl_socket1, NULL, address);
124 CHECK_STATUS(status, NT_STATUS_OK);
126 status = wrepl_connect(wrepl_socket2, NULL, address);
127 CHECK_STATUS(status, NT_STATUS_OK);
129 printf("Send a start association request (conn1)\n");
130 status = wrepl_associate(wrepl_socket1, &associate1);
131 CHECK_STATUS(status, NT_STATUS_OK);
133 printf("association context (conn1): 0x%x\n", associate1.out.assoc_ctx);
135 printf("Send a start association request (conn2)\n");
136 status = wrepl_associate(wrepl_socket2, &associate2);
137 CHECK_STATUS(status, NT_STATUS_OK);
139 printf("association context (conn2): 0x%x\n", associate2.out.assoc_ctx);
141 printf("Send a replication table query, with assoc 1 (conn2), the anwser should be on conn1\n");
143 packet.opcode = WREPL_OPCODE_BITS;
144 packet.assoc_ctx = associate1.out.assoc_ctx;
145 packet.mess_type = WREPL_REPLICATION;
146 packet.message.replication.command = WREPL_REPL_TABLE_QUERY;
148 ctrl.send_only = True;
149 req = wrepl_request_send(wrepl_socket2, &packet, &ctrl);
150 status = wrepl_request_recv(req, mem_ctx, &rep_packet);
151 CHECK_STATUS(status, NT_STATUS_OK);
153 printf("Send a association request (conn2), to make sure the last request was ignored\n");
154 status = wrepl_associate(wrepl_socket2, &associate2);
155 CHECK_STATUS(status, NT_STATUS_OK);
157 printf("Send a replication table query, with invalid assoc (conn1), receive answer from conn2\n");
158 pull_table.in.assoc_ctx = 0;
159 req = wrepl_pull_table_send(wrepl_socket1, &pull_table);
160 status = wrepl_request_recv(req, mem_ctx, &rep_packet);
161 CHECK_STATUS(status, NT_STATUS_OK);
163 printf("Send a association request (conn1), to make sure the last request was handled correct\n");
164 status = wrepl_associate(wrepl_socket1, &associate2);
165 CHECK_STATUS(status, NT_STATUS_OK);
167 assoc_stop.in.assoc_ctx = associate1.out.assoc_ctx;
168 assoc_stop.in.reason = 4;
169 printf("Send a association stop request (conn1), reson: %u\n", assoc_stop.in.reason);
170 status = wrepl_associate_stop(wrepl_socket1, &assoc_stop);
171 CHECK_STATUS(status, NT_STATUS_END_OF_FILE);
173 assoc_stop.in.assoc_ctx = associate2.out.assoc_ctx;
174 assoc_stop.in.reason = 0;
175 printf("Send a association stop request (conn2), reson: %u\n", assoc_stop.in.reason);
176 status = wrepl_associate_stop(wrepl_socket2, &assoc_stop);
177 CHECK_STATUS(status, NT_STATUS_OK);
180 printf("Close 2 wrepl connections\n");
181 talloc_free(wrepl_socket1);
182 talloc_free(wrepl_socket2);
187 test if we always get back the same assoc_ctx
189 static BOOL test_assoc_ctx2(TALLOC_CTX *mem_ctx, const char *address)
192 struct wrepl_socket *wrepl_socket;
193 struct wrepl_associate associate;
197 printf("Test if we always get back the same assoc_ctx\n");
199 wrepl_socket = wrepl_socket_init(mem_ctx, NULL);
201 printf("Setup wrepl connections\n");
202 status = wrepl_connect(wrepl_socket, NULL, address);
203 CHECK_STATUS(status, NT_STATUS_OK);
206 printf("Send 1st start association request\n");
207 status = wrepl_associate(wrepl_socket, &associate);
208 CHECK_STATUS(status, NT_STATUS_OK);
209 assoc_ctx1 = associate.out.assoc_ctx;
210 printf("1st association context: 0x%x\n", associate.out.assoc_ctx);
212 printf("Send 2nd start association request\n");
213 status = wrepl_associate(wrepl_socket, &associate);
214 CHECK_VALUE(associate.out.assoc_ctx, assoc_ctx1);
215 CHECK_STATUS(status, NT_STATUS_OK);
216 printf("2nd association context: 0x%x\n", associate.out.assoc_ctx);
218 printf("Send 3rd start association request\n");
219 status = wrepl_associate(wrepl_socket, &associate);
220 CHECK_VALUE(associate.out.assoc_ctx, assoc_ctx1);
221 CHECK_STATUS(status, NT_STATUS_OK);
222 printf("3rd association context: 0x%x\n", associate.out.assoc_ctx);
225 printf("Close wrepl connections\n");
226 talloc_free(wrepl_socket);
232 display a replication entry
234 static void display_entry(TALLOC_CTX *mem_ctx, struct wrepl_name *name)
238 printf("%s\n", nbt_name_string(mem_ctx, &name->name));
239 printf("\tTYPE:%u STATE:%u NODE:%u STATIC:%u VERSION_ID: %llu\n",
240 name->type, name->state, name->node, name->is_static, (long long)name->version_id);
241 printf("\tRAW_FLAGS: 0x%08X OWNER: %-15s\n",
242 name->raw_flags, name->owner);
243 for (i=0;i<name->num_addresses;i++) {
244 printf("\tADDR: %-15s OWNER: %-15s\n",
245 name->addresses[i].address, name->addresses[i].owner);
250 test a full replication dump from a WINS server
252 static BOOL test_wins_replication(TALLOC_CTX *mem_ctx, const char *address)
255 struct wrepl_socket *wrepl_socket;
258 struct wrepl_associate associate;
259 struct wrepl_pull_table pull_table;
260 struct wrepl_pull_names pull_names;
262 printf("Test one pull replication cycle\n");
264 wrepl_socket = wrepl_socket_init(mem_ctx, NULL);
266 printf("Setup wrepl connections\n");
267 status = wrepl_connect(wrepl_socket, NULL, address);
268 CHECK_STATUS(status, NT_STATUS_OK);
270 printf("Send a start association request\n");
272 status = wrepl_associate(wrepl_socket, &associate);
273 CHECK_STATUS(status, NT_STATUS_OK);
275 printf("association context: 0x%x\n", associate.out.assoc_ctx);
277 printf("Send a replication table query\n");
278 pull_table.in.assoc_ctx = associate.out.assoc_ctx;
280 status = wrepl_pull_table(wrepl_socket, mem_ctx, &pull_table);
281 if (NT_STATUS_EQUAL(NT_STATUS_NETWORK_ACCESS_DENIED,status)) {
282 struct wrepl_packet packet;
283 struct wrepl_request *req;
286 packet.opcode = WREPL_OPCODE_BITS;
287 packet.assoc_ctx = associate.out.assoc_ctx;
288 packet.mess_type = WREPL_STOP_ASSOCIATION;
289 packet.message.stop.reason = 0;
291 req = wrepl_request_send(wrepl_socket, &packet, NULL);
294 printf("failed - We are not a valid pull partner for the server\n");
298 CHECK_STATUS(status, NT_STATUS_OK);
300 printf("Found %d replication partners\n", pull_table.out.num_partners);
302 for (i=0;i<pull_table.out.num_partners;i++) {
303 struct wrepl_wins_owner *partner = &pull_table.out.partners[i];
304 printf("%s max_version=%6llu min_version=%6llu type=%d\n",
306 (long long)partner->max_version,
307 (long long)partner->min_version,
310 pull_names.in.assoc_ctx = associate.out.assoc_ctx;
311 pull_names.in.partner = *partner;
313 status = wrepl_pull_names(wrepl_socket, mem_ctx, &pull_names);
314 CHECK_STATUS(status, NT_STATUS_OK);
316 printf("Received %d names\n", pull_names.out.num_names);
318 for (j=0;j<pull_names.out.num_names;j++) {
319 display_entry(mem_ctx, &pull_names.out.names[j]);
324 printf("Close wrepl connections\n");
325 talloc_free(wrepl_socket);
329 struct test_wrepl_conflict_conn {
331 struct wrepl_socket *pull;
334 #define TEST_OWNER_A_ADDRESS "127.65.65.1"
335 #define TEST_ADDRESS_A_PREFIX "127.0.65"
336 #define TEST_OWNER_B_ADDRESS "127.66.66.1"
337 #define TEST_ADDRESS_B_PREFIX "127.0.66"
338 #define TEST_OWNER_X_ADDRESS "127.88.88.1"
339 #define TEST_ADDRESS_X_PREFIX "127.0.88"
341 struct wrepl_wins_owner a, b, c, x;
345 struct nbt_name_socket *nbtsock;
346 struct nbt_name_socket *nbtsock2;
348 struct nbt_name_socket *nbtsock_srv;
349 struct nbt_name_socket *nbtsock_srv2;
351 uint32_t addresses_best_num;
352 struct wrepl_ip *addresses_best;
354 uint32_t addresses_best2_num;
355 struct wrepl_ip *addresses_best2;
357 uint32_t addresses_all_num;
358 struct wrepl_ip *addresses_all;
360 uint32_t addresses_mhomed_num;
361 struct wrepl_ip *addresses_mhomed;
364 static const struct wrepl_ip addresses_A_1[] = {
366 .owner = TEST_OWNER_A_ADDRESS,
367 .ip = TEST_ADDRESS_A_PREFIX".1"
370 static const struct wrepl_ip addresses_A_2[] = {
372 .owner = TEST_OWNER_A_ADDRESS,
373 .ip = TEST_ADDRESS_A_PREFIX".2"
376 static const struct wrepl_ip addresses_A_3_4[] = {
378 .owner = TEST_OWNER_A_ADDRESS,
379 .ip = TEST_ADDRESS_A_PREFIX".3"
382 .owner = TEST_OWNER_A_ADDRESS,
383 .ip = TEST_ADDRESS_A_PREFIX".4"
386 static const struct wrepl_ip addresses_A_3_4_X_3_4[] = {
388 .owner = TEST_OWNER_A_ADDRESS,
389 .ip = TEST_ADDRESS_A_PREFIX".3"
392 .owner = TEST_OWNER_A_ADDRESS,
393 .ip = TEST_ADDRESS_A_PREFIX".4"
396 .owner = TEST_OWNER_X_ADDRESS,
397 .ip = TEST_ADDRESS_X_PREFIX".3"
400 .owner = TEST_OWNER_X_ADDRESS,
401 .ip = TEST_ADDRESS_X_PREFIX".4"
404 static const struct wrepl_ip addresses_A_3_4_B_3_4[] = {
406 .owner = TEST_OWNER_A_ADDRESS,
407 .ip = TEST_ADDRESS_A_PREFIX".3"
410 .owner = TEST_OWNER_A_ADDRESS,
411 .ip = TEST_ADDRESS_A_PREFIX".4"
414 .owner = TEST_OWNER_B_ADDRESS,
415 .ip = TEST_ADDRESS_B_PREFIX".3"
418 .owner = TEST_OWNER_B_ADDRESS,
419 .ip = TEST_ADDRESS_B_PREFIX".4"
422 static const struct wrepl_ip addresses_A_3_4_OWNER_B[] = {
424 .owner = TEST_OWNER_B_ADDRESS,
425 .ip = TEST_ADDRESS_A_PREFIX".3"
428 .owner = TEST_OWNER_B_ADDRESS,
429 .ip = TEST_ADDRESS_A_PREFIX".4"
432 static const struct wrepl_ip addresses_A_3_4_X_3_4_OWNER_B[] = {
434 .owner = TEST_OWNER_B_ADDRESS,
435 .ip = TEST_ADDRESS_A_PREFIX".3"
438 .owner = TEST_OWNER_B_ADDRESS,
439 .ip = TEST_ADDRESS_A_PREFIX".4"
442 .owner = TEST_OWNER_B_ADDRESS,
443 .ip = TEST_ADDRESS_X_PREFIX".3"
446 .owner = TEST_OWNER_B_ADDRESS,
447 .ip = TEST_ADDRESS_X_PREFIX".4"
451 static const struct wrepl_ip addresses_A_3_4_X_1_2[] = {
453 .owner = TEST_OWNER_A_ADDRESS,
454 .ip = TEST_ADDRESS_A_PREFIX".3"
457 .owner = TEST_OWNER_A_ADDRESS,
458 .ip = TEST_ADDRESS_A_PREFIX".4"
461 .owner = TEST_OWNER_X_ADDRESS,
462 .ip = TEST_ADDRESS_X_PREFIX".1"
465 .owner = TEST_OWNER_X_ADDRESS,
466 .ip = TEST_ADDRESS_X_PREFIX".2"
470 static const struct wrepl_ip addresses_B_1[] = {
472 .owner = TEST_OWNER_B_ADDRESS,
473 .ip = TEST_ADDRESS_B_PREFIX".1"
476 static const struct wrepl_ip addresses_B_2[] = {
478 .owner = TEST_OWNER_B_ADDRESS,
479 .ip = TEST_ADDRESS_B_PREFIX".2"
482 static const struct wrepl_ip addresses_B_3_4[] = {
484 .owner = TEST_OWNER_B_ADDRESS,
485 .ip = TEST_ADDRESS_B_PREFIX".3"
488 .owner = TEST_OWNER_B_ADDRESS,
489 .ip = TEST_ADDRESS_B_PREFIX".4"
492 static const struct wrepl_ip addresses_B_3_4_X_3_4[] = {
494 .owner = TEST_OWNER_B_ADDRESS,
495 .ip = TEST_ADDRESS_B_PREFIX".3"
498 .owner = TEST_OWNER_B_ADDRESS,
499 .ip = TEST_ADDRESS_B_PREFIX".4"
502 .owner = TEST_OWNER_X_ADDRESS,
503 .ip = TEST_ADDRESS_X_PREFIX".3"
506 .owner = TEST_OWNER_X_ADDRESS,
507 .ip = TEST_ADDRESS_X_PREFIX".4"
510 static const struct wrepl_ip addresses_B_3_4_X_1_2[] = {
512 .owner = TEST_OWNER_B_ADDRESS,
513 .ip = TEST_ADDRESS_B_PREFIX".3"
516 .owner = TEST_OWNER_B_ADDRESS,
517 .ip = TEST_ADDRESS_B_PREFIX".4"
520 .owner = TEST_OWNER_X_ADDRESS,
521 .ip = TEST_ADDRESS_X_PREFIX".1"
524 .owner = TEST_OWNER_X_ADDRESS,
525 .ip = TEST_ADDRESS_X_PREFIX".2"
529 static const struct wrepl_ip addresses_X_1_2[] = {
531 .owner = TEST_OWNER_X_ADDRESS,
532 .ip = TEST_ADDRESS_X_PREFIX".1"
535 .owner = TEST_OWNER_X_ADDRESS,
536 .ip = TEST_ADDRESS_X_PREFIX".2"
539 static const struct wrepl_ip addresses_X_3_4[] = {
541 .owner = TEST_OWNER_X_ADDRESS,
542 .ip = TEST_ADDRESS_X_PREFIX".3"
545 .owner = TEST_OWNER_X_ADDRESS,
546 .ip = TEST_ADDRESS_X_PREFIX".4"
550 static struct test_wrepl_conflict_conn *test_create_conflict_ctx(TALLOC_CTX *mem_ctx,
553 struct test_wrepl_conflict_conn *ctx;
554 struct wrepl_associate associate;
555 struct wrepl_pull_table pull_table;
559 ctx = talloc_zero(mem_ctx, struct test_wrepl_conflict_conn);
560 if (!ctx) return NULL;
562 ctx->address = address;
563 ctx->pull = wrepl_socket_init(ctx, NULL);
564 if (!ctx->pull) return NULL;
566 printf("Setup wrepl conflict pull connection\n");
567 status = wrepl_connect(ctx->pull, NULL, ctx->address);
568 if (!NT_STATUS_IS_OK(status)) return NULL;
570 status = wrepl_associate(ctx->pull, &associate);
571 if (!NT_STATUS_IS_OK(status)) return NULL;
573 ctx->pull_assoc = associate.out.assoc_ctx;
575 ctx->a.address = TEST_OWNER_A_ADDRESS;
576 ctx->a.max_version = 0;
577 ctx->a.min_version = 0;
580 ctx->b.address = TEST_OWNER_B_ADDRESS;
581 ctx->b.max_version = 0;
582 ctx->b.min_version = 0;
585 ctx->x.address = TEST_OWNER_X_ADDRESS;
586 ctx->x.max_version = 0;
587 ctx->x.min_version = 0;
590 ctx->c.address = address;
591 ctx->c.max_version = 0;
592 ctx->c.min_version = 0;
595 pull_table.in.assoc_ctx = ctx->pull_assoc;
596 status = wrepl_pull_table(ctx->pull, ctx->pull, &pull_table);
597 if (!NT_STATUS_IS_OK(status)) return NULL;
599 for (i=0; i < pull_table.out.num_partners; i++) {
600 if (strcmp(TEST_OWNER_A_ADDRESS,pull_table.out.partners[i].address)==0) {
601 ctx->a.max_version = pull_table.out.partners[i].max_version;
602 ctx->a.min_version = pull_table.out.partners[i].min_version;
604 if (strcmp(TEST_OWNER_B_ADDRESS,pull_table.out.partners[i].address)==0) {
605 ctx->b.max_version = pull_table.out.partners[i].max_version;
606 ctx->b.min_version = pull_table.out.partners[i].min_version;
608 if (strcmp(TEST_OWNER_X_ADDRESS,pull_table.out.partners[i].address)==0) {
609 ctx->x.max_version = pull_table.out.partners[i].max_version;
610 ctx->x.min_version = pull_table.out.partners[i].min_version;
612 if (strcmp(address,pull_table.out.partners[i].address)==0) {
613 ctx->c.max_version = pull_table.out.partners[i].max_version;
614 ctx->c.min_version = pull_table.out.partners[i].min_version;
618 talloc_free(pull_table.out.partners);
620 ctx->myaddr = talloc_strdup(mem_ctx, iface_best_ip(address));
621 if (!ctx->myaddr) return NULL;
623 for (i = 0; i < iface_count(); i++) {
624 if (strcmp(ctx->myaddr, iface_n_ip(i)) == 0) continue;
625 ctx->myaddr2 = talloc_strdup(mem_ctx, iface_n_ip(i));
626 if (!ctx->myaddr2) return NULL;
630 ctx->nbtsock = nbt_name_socket_init(ctx, NULL);
631 if (!ctx->nbtsock) return NULL;
633 status = socket_listen(ctx->nbtsock->sock, ctx->myaddr, 0, 0, 0);
634 if (!NT_STATUS_IS_OK(status)) return NULL;
636 ctx->nbtsock_srv = nbt_name_socket_init(ctx, NULL);
637 if (!ctx->nbtsock_srv) return NULL;
639 status = socket_listen(ctx->nbtsock_srv->sock, ctx->myaddr, lp_nbt_port(), 0, 0);
640 if (!NT_STATUS_IS_OK(status)) {
641 talloc_free(ctx->nbtsock_srv);
642 ctx->nbtsock_srv = NULL;
645 if (ctx->myaddr2 && ctx->nbtsock_srv) {
646 ctx->nbtsock2 = nbt_name_socket_init(ctx, NULL);
647 if (!ctx->nbtsock2) return NULL;
649 status = socket_listen(ctx->nbtsock2->sock, ctx->myaddr2, 0, 0, 0);
650 if (!NT_STATUS_IS_OK(status)) return NULL;
652 ctx->nbtsock_srv2 = nbt_name_socket_init(ctx, ctx->nbtsock_srv->event_ctx);
653 if (!ctx->nbtsock_srv2) return NULL;
655 status = socket_listen(ctx->nbtsock_srv2->sock, ctx->myaddr2, lp_nbt_port(), 0, 0);
656 if (!NT_STATUS_IS_OK(status)) {
657 talloc_free(ctx->nbtsock_srv2);
658 ctx->nbtsock_srv2 = NULL;
662 ctx->addresses_best_num = 1;
663 ctx->addresses_best = talloc_array(ctx, struct wrepl_ip, ctx->addresses_best_num);
664 if (!ctx->addresses_best) return NULL;
665 ctx->addresses_best[0].owner = ctx->b.address;
666 ctx->addresses_best[0].ip = ctx->myaddr;
668 ctx->addresses_all_num = iface_count();
669 ctx->addresses_all = talloc_array(ctx, struct wrepl_ip, ctx->addresses_all_num);
670 if (!ctx->addresses_all) return NULL;
671 for (i=0; i < ctx->addresses_all_num; i++) {
672 ctx->addresses_all[i].owner = ctx->b.address;
673 ctx->addresses_all[i].ip = talloc_strdup(ctx->addresses_all, iface_n_ip(i));
674 if (!ctx->addresses_all[i].ip) return NULL;
677 if (ctx->nbtsock_srv2) {
678 ctx->addresses_best2_num = 1;
679 ctx->addresses_best2 = talloc_array(ctx, struct wrepl_ip, ctx->addresses_best2_num);
680 if (!ctx->addresses_best2) return NULL;
681 ctx->addresses_best2[0].owner = ctx->b.address;
682 ctx->addresses_best2[0].ip = ctx->myaddr2;
684 ctx->addresses_mhomed_num = 2;
685 ctx->addresses_mhomed = talloc_array(ctx, struct wrepl_ip, ctx->addresses_mhomed_num);
686 if (!ctx->addresses_mhomed) return NULL;
687 ctx->addresses_mhomed[0].owner = ctx->b.address;
688 ctx->addresses_mhomed[0].ip = ctx->myaddr;
689 ctx->addresses_mhomed[1].owner = ctx->b.address;
690 ctx->addresses_mhomed[1].ip = ctx->myaddr2;
696 static BOOL test_wrepl_update_one(struct test_wrepl_conflict_conn *ctx,
697 const struct wrepl_wins_owner *owner,
698 const struct wrepl_wins_name *name)
701 struct wrepl_socket *wrepl_socket;
702 struct wrepl_associate associate;
703 struct wrepl_packet update_packet, repl_send;
704 struct wrepl_table *update;
705 struct wrepl_wins_owner wrepl_wins_owners[1];
706 struct wrepl_packet *repl_recv;
707 struct wrepl_wins_owner *send_request;
708 struct wrepl_send_reply *send_reply;
709 struct wrepl_wins_name wrepl_wins_names[1];
713 wrepl_socket = wrepl_socket_init(ctx, NULL);
715 status = wrepl_connect(wrepl_socket, NULL, ctx->address);
716 CHECK_STATUS(status, NT_STATUS_OK);
718 status = wrepl_associate(wrepl_socket, &associate);
719 CHECK_STATUS(status, NT_STATUS_OK);
720 assoc_ctx = associate.out.assoc_ctx;
722 /* now send a WREPL_REPL_UPDATE message */
723 ZERO_STRUCT(update_packet);
724 update_packet.opcode = WREPL_OPCODE_BITS;
725 update_packet.assoc_ctx = assoc_ctx;
726 update_packet.mess_type = WREPL_REPLICATION;
727 update_packet.message.replication.command = WREPL_REPL_UPDATE;
728 update = &update_packet.message.replication.info.table;
730 update->partner_count = ARRAY_SIZE(wrepl_wins_owners);
731 update->partners = wrepl_wins_owners;
732 update->initiator = "0.0.0.0";
734 wrepl_wins_owners[0] = *owner;
736 status = wrepl_request(wrepl_socket, wrepl_socket,
737 &update_packet, &repl_recv);
738 CHECK_STATUS(status, NT_STATUS_OK);
739 CHECK_VALUE(repl_recv->mess_type, WREPL_REPLICATION);
740 CHECK_VALUE(repl_recv->message.replication.command, WREPL_REPL_SEND_REQUEST);
741 send_request = &repl_recv->message.replication.info.owner;
743 ZERO_STRUCT(repl_send);
744 repl_send.opcode = WREPL_OPCODE_BITS;
745 repl_send.assoc_ctx = assoc_ctx;
746 repl_send.mess_type = WREPL_REPLICATION;
747 repl_send.message.replication.command = WREPL_REPL_SEND_REPLY;
748 send_reply = &repl_send.message.replication.info.reply;
750 send_reply->num_names = ARRAY_SIZE(wrepl_wins_names);
751 send_reply->names = wrepl_wins_names;
753 wrepl_wins_names[0] = *name;
755 status = wrepl_request(wrepl_socket, wrepl_socket,
756 &repl_send, &repl_recv);
757 CHECK_STATUS(status, NT_STATUS_OK);
758 CHECK_VALUE(repl_recv->mess_type, WREPL_STOP_ASSOCIATION);
759 CHECK_VALUE(repl_recv->message.stop.reason, 0);
762 talloc_free(wrepl_socket);
766 static BOOL test_wrepl_is_applied(struct test_wrepl_conflict_conn *ctx,
767 const struct wrepl_wins_owner *owner,
768 const struct wrepl_wins_name *name,
773 struct wrepl_pull_names pull_names;
774 struct wrepl_name *names;
776 pull_names.in.assoc_ctx = ctx->pull_assoc;
777 pull_names.in.partner = *owner;
778 pull_names.in.partner.min_version = pull_names.in.partner.max_version;
780 status = wrepl_pull_names(ctx->pull, ctx->pull, &pull_names);
781 CHECK_STATUS(status, NT_STATUS_OK);
782 CHECK_VALUE(pull_names.out.num_names, (expected?1:0));
784 names = pull_names.out.names;
787 uint32_t flags = WREPL_NAME_FLAGS(names[0].type,
791 CHECK_VALUE(names[0].name.type, name->name->type);
792 CHECK_VALUE_STRING(names[0].name.name, name->name->name);
793 CHECK_VALUE_STRING(names[0].name.scope, name->name->scope);
794 CHECK_VALUE(flags, name->flags);
795 CHECK_VALUE_UINT64(names[0].version_id, name->id);
798 CHECK_VALUE(names[0].num_addresses,
799 name->addresses.addresses.num_ips);
801 CHECK_VALUE(names[0].num_addresses, 1);
802 CHECK_VALUE_STRING(names[0].addresses[0].address,
807 talloc_free(pull_names.out.names);
811 static BOOL test_wrepl_mhomed_merged(struct test_wrepl_conflict_conn *ctx,
812 const struct wrepl_wins_owner *owner1,
813 uint32_t num_ips1, const struct wrepl_ip *ips1,
814 const struct wrepl_wins_owner *owner2,
815 uint32_t num_ips2, const struct wrepl_ip *ips2,
816 const struct wrepl_wins_name *name2)
820 struct wrepl_pull_names pull_names;
821 struct wrepl_name *names;
824 uint32_t num_ips = num_ips1 + num_ips2;
826 for (i = 0; i < num_ips2; i++) {
827 for (j = 0; j < num_ips1; j++) {
828 if (strcmp(ips2[i].ip,ips1[j].ip) == 0) {
835 pull_names.in.assoc_ctx = ctx->pull_assoc;
836 pull_names.in.partner = *owner2;
837 pull_names.in.partner.min_version = pull_names.in.partner.max_version;
839 status = wrepl_pull_names(ctx->pull, ctx->pull, &pull_names);
840 CHECK_STATUS(status, NT_STATUS_OK);
841 CHECK_VALUE(pull_names.out.num_names, 1);
843 names = pull_names.out.names;
845 flags = WREPL_NAME_FLAGS(names[0].type,
849 CHECK_VALUE(names[0].name.type, name2->name->type);
850 CHECK_VALUE_STRING(names[0].name.name, name2->name->name);
851 CHECK_VALUE_STRING(names[0].name.scope, name2->name->scope);
852 CHECK_VALUE(flags, name2->flags | WREPL_TYPE_MHOMED);
853 CHECK_VALUE_UINT64(names[0].version_id, name2->id);
855 CHECK_VALUE(names[0].num_addresses, num_ips);
857 for (i = 0; i < names[0].num_addresses; i++) {
858 const char *addr = names[0].addresses[i].address;
859 const char *owner = names[0].addresses[i].owner;
862 for (j = 0; j < num_ips2; j++) {
863 if (strcmp(addr, ips2[j].ip) == 0) {
865 CHECK_VALUE_STRING(owner, owner2->address);
872 for (j = 0; j < num_ips1; j++) {
873 if (strcmp(addr, ips1[j].ip) == 0) {
875 CHECK_VALUE_STRING(owner, owner1->address);
882 CHECK_VALUE_STRING(addr, "not found in address list");
885 talloc_free(pull_names.out.names);
889 static BOOL test_wrepl_sgroup_merged(struct test_wrepl_conflict_conn *ctx,
890 struct wrepl_wins_owner *merge_owner,
891 struct wrepl_wins_owner *owner1,
892 uint32_t num_ips1, const struct wrepl_ip *ips1,
893 struct wrepl_wins_owner *owner2,
894 uint32_t num_ips2, const struct wrepl_ip *ips2,
895 const struct wrepl_wins_name *name2)
899 struct wrepl_pull_names pull_names;
900 struct wrepl_name *names;
901 struct wrepl_name *name = NULL;
904 uint32_t num_ips = num_ips1 + num_ips2;
907 merge_owner = &ctx->c;
910 for (i = 0; i < num_ips1; i++) {
911 if (owner1 != &ctx->c && strcmp(ips1[i].owner,owner2->address) == 0) {
915 for (j = 0; j < num_ips2; j++) {
916 if (strcmp(ips1[i].ip,ips2[j].ip) == 0) {
924 pull_names.in.assoc_ctx = ctx->pull_assoc;
925 pull_names.in.partner = *merge_owner;
926 pull_names.in.partner.min_version = pull_names.in.partner.max_version;
927 pull_names.in.partner.max_version = 0;
929 status = wrepl_pull_names(ctx->pull, ctx->pull, &pull_names);
930 CHECK_STATUS(status, NT_STATUS_OK);
932 names = pull_names.out.names;
934 for (i = 0; i < pull_names.out.num_names; i++) {
935 if (names[i].name.type != name2->name->type) continue;
936 if (!names[i].name.name) continue;
937 if (strcmp(names[i].name.name, name2->name->name) != 0) continue;
938 if (names[i].name.scope) continue;
943 if (pull_names.out.num_names > 0) {
944 merge_owner->max_version = names[pull_names.out.num_names-1].version_id;
948 printf("%s: Name '%s' not found\n", __location__, nbt_name_string(ctx, name2->name));
952 flags = WREPL_NAME_FLAGS(name->type,
956 CHECK_VALUE(name->name.type, name2->name->type);
957 CHECK_VALUE_STRING(name->name.name, name2->name->name);
958 CHECK_VALUE_STRING(name->name.scope, name2->name->scope);
959 CHECK_VALUE(flags, name2->flags);
961 CHECK_VALUE(name->num_addresses, num_ips);
963 for (i = 0; i < name->num_addresses; i++) {
964 const char *addr = name->addresses[i].address;
965 const char *owner = name->addresses[i].owner;
968 for (j = 0; j < num_ips2; j++) {
969 if (strcmp(addr, ips2[j].ip) == 0) {
971 CHECK_VALUE_STRING(owner, ips2[j].owner);
978 for (j = 0; j < num_ips1; j++) {
979 if (strcmp(addr, ips1[j].ip) == 0) {
981 if (owner1 == &ctx->c) {
982 CHECK_VALUE_STRING(owner, owner1->address);
984 CHECK_VALUE_STRING(owner, ips1[j].owner);
992 CHECK_VALUE_STRING(addr, "not found in address list");
995 talloc_free(pull_names.out.names);
999 static BOOL test_conflict_same_owner(struct test_wrepl_conflict_conn *ctx)
1002 struct nbt_name name;
1003 struct wrepl_wins_name wins_name1;
1004 struct wrepl_wins_name wins_name2;
1005 struct wrepl_wins_name *wins_name_tmp;
1006 struct wrepl_wins_name *wins_name_last;
1007 struct wrepl_wins_name *wins_name_cur;
1009 uint8_t types[] = { 0x00, 0x1C };
1011 enum wrepl_name_type type;
1012 enum wrepl_name_state state;
1013 enum wrepl_name_node node;
1016 const struct wrepl_ip *ips;
1019 .type = WREPL_TYPE_GROUP,
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_1),
1031 .ips = addresses_A_1,
1033 .type = WREPL_TYPE_UNIQUE,
1034 .state = WREPL_STATE_ACTIVE,
1035 .node = WREPL_NODE_B,
1037 .num_ips = ARRAY_SIZE(addresses_A_2),
1038 .ips = addresses_A_2,
1040 .type = WREPL_TYPE_UNIQUE,
1041 .state = WREPL_STATE_ACTIVE,
1042 .node = WREPL_NODE_B,
1044 .num_ips = ARRAY_SIZE(addresses_A_1),
1045 .ips = addresses_A_1,
1047 .type = WREPL_TYPE_UNIQUE,
1048 .state = WREPL_STATE_ACTIVE,
1049 .node = WREPL_NODE_B,
1051 .num_ips = ARRAY_SIZE(addresses_A_2),
1052 .ips = addresses_A_2,
1054 .type = WREPL_TYPE_SGROUP,
1055 .state = WREPL_STATE_TOMBSTONE,
1056 .node = WREPL_NODE_B,
1058 .num_ips = ARRAY_SIZE(addresses_A_2),
1059 .ips = addresses_A_2,
1061 .type = WREPL_TYPE_MHOMED,
1062 .state = WREPL_STATE_TOMBSTONE,
1063 .node = WREPL_NODE_B,
1065 .num_ips = ARRAY_SIZE(addresses_A_1),
1066 .ips = addresses_A_1,
1068 .type = WREPL_TYPE_MHOMED,
1069 .state = WREPL_STATE_RELEASED,
1070 .node = WREPL_NODE_B,
1072 .num_ips = ARRAY_SIZE(addresses_A_2),
1073 .ips = addresses_A_2,
1075 .type = WREPL_TYPE_SGROUP,
1076 .state = WREPL_STATE_ACTIVE,
1077 .node = WREPL_NODE_B,
1079 .num_ips = ARRAY_SIZE(addresses_A_1),
1080 .ips = addresses_A_1,
1082 .type = WREPL_TYPE_SGROUP,
1083 .state = WREPL_STATE_ACTIVE,
1084 .node = WREPL_NODE_B,
1086 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1087 .ips = addresses_A_3_4,
1089 .type = WREPL_TYPE_SGROUP,
1090 .state = WREPL_STATE_TOMBSTONE,
1091 .node = WREPL_NODE_B,
1093 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1094 .ips = addresses_B_3_4,
1096 /* the last one should always be a unique,tomstone record! */
1097 .type = WREPL_TYPE_UNIQUE,
1098 .state = WREPL_STATE_TOMBSTONE,
1099 .node = WREPL_NODE_B,
1101 .num_ips = ARRAY_SIZE(addresses_A_1),
1102 .ips = addresses_A_1,
1106 name.name = "_SAME_OWNER_A";
1110 wins_name_tmp = NULL;
1111 wins_name_last = &wins_name2;
1112 wins_name_cur = &wins_name1;
1114 for (j=0; ret && j < ARRAY_SIZE(types); j++) {
1115 name.type = types[j];
1116 printf("Test Replica Conflicts with same owner[%s] for %s\n",
1117 nbt_name_string(ctx, &name), ctx->a.address);
1119 for(i=0; ret && i < ARRAY_SIZE(records); i++) {
1120 wins_name_tmp = wins_name_last;
1121 wins_name_last = wins_name_cur;
1122 wins_name_cur = wins_name_tmp;
1125 printf("%s,%s%s vs. %s,%s%s with %s ip(s) => %s\n",
1126 wrepl_name_type_string(records[i-1].type),
1127 wrepl_name_state_string(records[i-1].state),
1128 (records[i-1].is_static?",static":""),
1129 wrepl_name_type_string(records[i].type),
1130 wrepl_name_state_string(records[i].state),
1131 (records[i].is_static?",static":""),
1132 (records[i-1].ips==records[i].ips?"same":"different"),
1136 wins_name_cur->name = &name;
1137 wins_name_cur->flags = WREPL_NAME_FLAGS(records[i].type,
1140 records[i].is_static);
1141 wins_name_cur->id = ++ctx->a.max_version;
1142 if (wins_name_cur->flags & 2) {
1143 wins_name_cur->addresses.addresses.num_ips = records[i].num_ips;
1144 wins_name_cur->addresses.addresses.ips = discard_const(records[i].ips);
1146 wins_name_cur->addresses.ip = records[i].ips[0].ip;
1148 wins_name_cur->unknown = "255.255.255.255";
1150 ret &= test_wrepl_update_one(ctx, &ctx->a,wins_name_cur);
1151 if (records[i].state == WREPL_STATE_RELEASED) {
1152 ret &= test_wrepl_is_applied(ctx, &ctx->a, wins_name_last, False);
1153 ret &= test_wrepl_is_applied(ctx, &ctx->a, wins_name_cur, False);
1155 ret &= test_wrepl_is_applied(ctx, &ctx->a, wins_name_cur, True);
1158 /* the first one is a cleanup run */
1159 if (!ret && i == 0) ret = True;
1162 printf("conflict handled wrong or record[%u]: %s\n", i, __location__);
1170 static BOOL test_conflict_different_owner(struct test_wrepl_conflict_conn *ctx)
1173 struct wrepl_wins_name wins_name1;
1174 struct wrepl_wins_name wins_name2;
1175 struct wrepl_wins_name *wins_name_r1;
1176 struct wrepl_wins_name *wins_name_r2;
1179 const char *line; /* just better debugging */
1180 struct nbt_name name;
1181 const char *comment;
1182 BOOL extra; /* not the worst case, this is an extra test */
1185 struct wrepl_wins_owner *owner;
1186 enum wrepl_name_type type;
1187 enum wrepl_name_state state;
1188 enum wrepl_name_node node;
1191 const struct wrepl_ip *ips;
1192 BOOL apply_expected;
1194 struct wrepl_wins_owner *merge_owner;
1195 BOOL sgroup_cleanup;
1199 * NOTE: the first record and the last applied one
1200 * needs to be from the same owner,
1201 * to not conflict in the next smbtorture run!!!
1204 .line = __location__,
1205 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1209 .type = WREPL_TYPE_UNIQUE,
1210 .state = WREPL_STATE_TOMBSTONE,
1211 .node = WREPL_NODE_B,
1213 .num_ips = ARRAY_SIZE(addresses_B_1),
1214 .ips = addresses_B_1,
1215 .apply_expected = True /* ignored */
1219 .type = WREPL_TYPE_UNIQUE,
1220 .state = WREPL_STATE_TOMBSTONE,
1221 .node = WREPL_NODE_B,
1223 .num_ips = ARRAY_SIZE(addresses_A_1),
1224 .ips = addresses_A_1,
1225 .apply_expected = True /* ignored */
1230 * unique vs unique section
1233 * unique,active vs. unique,active
1234 * => should be replaced
1237 .line = __location__,
1238 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1241 .type = WREPL_TYPE_UNIQUE,
1242 .state = WREPL_STATE_ACTIVE,
1243 .node = WREPL_NODE_B,
1245 .num_ips = ARRAY_SIZE(addresses_A_1),
1246 .ips = addresses_A_1,
1247 .apply_expected = True
1251 .type = WREPL_TYPE_UNIQUE,
1252 .state = WREPL_STATE_ACTIVE,
1253 .node = WREPL_NODE_B,
1255 .num_ips = ARRAY_SIZE(addresses_B_1),
1256 .ips = addresses_B_1,
1257 .apply_expected = True
1262 * unique,active vs. unique,tombstone
1263 * => should NOT be replaced
1266 .line = __location__,
1267 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1270 .type = WREPL_TYPE_UNIQUE,
1271 .state = WREPL_STATE_ACTIVE,
1272 .node = WREPL_NODE_B,
1274 .num_ips = ARRAY_SIZE(addresses_B_1),
1275 .ips = addresses_B_1,
1276 .apply_expected = True
1280 .type = WREPL_TYPE_UNIQUE,
1281 .state = WREPL_STATE_TOMBSTONE,
1282 .node = WREPL_NODE_B,
1284 .num_ips = ARRAY_SIZE(addresses_B_1),
1285 .ips = addresses_B_1,
1286 .apply_expected = False
1291 * unique,released vs. unique,active
1292 * => should be replaced
1295 .line = __location__,
1296 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1299 .type = WREPL_TYPE_UNIQUE,
1300 .state = WREPL_STATE_RELEASED,
1301 .node = WREPL_NODE_B,
1303 .num_ips = ARRAY_SIZE(addresses_B_1),
1304 .ips = addresses_B_1,
1305 .apply_expected = False
1309 .type = WREPL_TYPE_UNIQUE,
1310 .state = WREPL_STATE_ACTIVE,
1311 .node = WREPL_NODE_B,
1313 .num_ips = ARRAY_SIZE(addresses_A_1),
1314 .ips = addresses_A_1,
1315 .apply_expected = True
1320 * unique,released vs. unique,tombstone
1321 * => should be replaced
1324 .line = __location__,
1325 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1328 .type = WREPL_TYPE_UNIQUE,
1329 .state = WREPL_STATE_RELEASED,
1330 .node = WREPL_NODE_B,
1332 .num_ips = ARRAY_SIZE(addresses_A_1),
1333 .ips = addresses_A_1,
1334 .apply_expected = False
1338 .type = WREPL_TYPE_UNIQUE,
1339 .state = WREPL_STATE_TOMBSTONE,
1340 .node = WREPL_NODE_B,
1342 .num_ips = ARRAY_SIZE(addresses_B_1),
1343 .ips = addresses_B_1,
1344 .apply_expected = True
1349 * unique,tombstone vs. unique,active
1350 * => should be replaced
1353 .line = __location__,
1354 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1357 .type = WREPL_TYPE_UNIQUE,
1358 .state = WREPL_STATE_TOMBSTONE,
1359 .node = WREPL_NODE_B,
1361 .num_ips = ARRAY_SIZE(addresses_B_1),
1362 .ips = addresses_B_1,
1363 .apply_expected = True
1367 .type = WREPL_TYPE_UNIQUE,
1368 .state = WREPL_STATE_ACTIVE,
1369 .node = WREPL_NODE_B,
1371 .num_ips = ARRAY_SIZE(addresses_A_1),
1372 .ips = addresses_A_1,
1373 .apply_expected = True
1378 * unique,tombstone vs. unique,tombstone
1379 * => should be replaced
1382 .line = __location__,
1383 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1386 .type = WREPL_TYPE_UNIQUE,
1387 .state = WREPL_STATE_TOMBSTONE,
1388 .node = WREPL_NODE_B,
1390 .num_ips = ARRAY_SIZE(addresses_A_1),
1391 .ips = addresses_A_1,
1392 .apply_expected = True
1396 .type = WREPL_TYPE_UNIQUE,
1397 .state = WREPL_STATE_TOMBSTONE,
1398 .node = WREPL_NODE_B,
1400 .num_ips = ARRAY_SIZE(addresses_B_1),
1401 .ips = addresses_B_1,
1402 .apply_expected = True
1408 * unique vs normal groups section,
1411 * unique,active vs. group,active
1412 * => should be replaced
1415 .line = __location__,
1416 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1419 .type = WREPL_TYPE_UNIQUE,
1420 .state = WREPL_STATE_ACTIVE,
1421 .node = WREPL_NODE_B,
1423 .num_ips = ARRAY_SIZE(addresses_B_1),
1424 .ips = addresses_B_1,
1425 .apply_expected = True
1429 .type = WREPL_TYPE_GROUP,
1430 .state = WREPL_STATE_ACTIVE,
1431 .node = WREPL_NODE_B,
1433 .num_ips = ARRAY_SIZE(addresses_A_1),
1434 .ips = addresses_A_1,
1435 .apply_expected = True
1440 * unique,active vs. group,tombstone
1441 * => should NOT be replaced
1444 .line = __location__,
1445 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1448 .type = WREPL_TYPE_UNIQUE,
1449 .state = WREPL_STATE_ACTIVE,
1450 .node = WREPL_NODE_B,
1452 .num_ips = ARRAY_SIZE(addresses_A_1),
1453 .ips = addresses_A_1,
1454 .apply_expected = True
1458 .type = WREPL_TYPE_GROUP,
1459 .state = WREPL_STATE_TOMBSTONE,
1460 .node = WREPL_NODE_B,
1462 .num_ips = ARRAY_SIZE(addresses_A_1),
1463 .ips = addresses_A_1,
1464 .apply_expected = False
1469 * unique,released vs. group,active
1470 * => should be replaced
1473 .line = __location__,
1474 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1477 .type = WREPL_TYPE_UNIQUE,
1478 .state = WREPL_STATE_RELEASED,
1479 .node = WREPL_NODE_B,
1481 .num_ips = ARRAY_SIZE(addresses_A_1),
1482 .ips = addresses_A_1,
1483 .apply_expected = False
1487 .type = WREPL_TYPE_GROUP,
1488 .state = WREPL_STATE_ACTIVE,
1489 .node = WREPL_NODE_B,
1491 .num_ips = ARRAY_SIZE(addresses_B_1),
1492 .ips = addresses_B_1,
1493 .apply_expected = True
1498 * unique,released vs. group,tombstone
1499 * => should be replaced
1502 .line = __location__,
1503 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1506 .type = WREPL_TYPE_UNIQUE,
1507 .state = WREPL_STATE_RELEASED,
1508 .node = WREPL_NODE_B,
1510 .num_ips = ARRAY_SIZE(addresses_B_1),
1511 .ips = addresses_B_1,
1512 .apply_expected = False
1516 .type = WREPL_TYPE_GROUP,
1517 .state = WREPL_STATE_TOMBSTONE,
1518 .node = WREPL_NODE_B,
1520 .num_ips = ARRAY_SIZE(addresses_A_1),
1521 .ips = addresses_A_1,
1522 .apply_expected = True
1527 * unique,tombstone vs. group,active
1528 * => should be replaced
1531 .line = __location__,
1532 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1535 .type = WREPL_TYPE_UNIQUE,
1536 .state = WREPL_STATE_TOMBSTONE,
1537 .node = WREPL_NODE_B,
1539 .num_ips = ARRAY_SIZE(addresses_A_1),
1540 .ips = addresses_A_1,
1541 .apply_expected = True
1545 .type = WREPL_TYPE_GROUP,
1546 .state = WREPL_STATE_ACTIVE,
1547 .node = WREPL_NODE_B,
1549 .num_ips = ARRAY_SIZE(addresses_B_1),
1550 .ips = addresses_B_1,
1551 .apply_expected = True
1556 * unique,tombstone vs. group,tombstone
1557 * => should be replaced
1560 .line = __location__,
1561 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1564 .type = WREPL_TYPE_UNIQUE,
1565 .state = WREPL_STATE_TOMBSTONE,
1566 .node = WREPL_NODE_B,
1568 .num_ips = ARRAY_SIZE(addresses_B_1),
1569 .ips = addresses_B_1,
1570 .apply_expected = True
1574 .type = WREPL_TYPE_GROUP,
1575 .state = WREPL_STATE_TOMBSTONE,
1576 .node = WREPL_NODE_B,
1578 .num_ips = ARRAY_SIZE(addresses_A_1),
1579 .ips = addresses_A_1,
1580 .apply_expected = True
1585 * unique vs special groups section,
1588 * unique,active vs. sgroup,active
1589 * => should NOT be replaced
1592 .line = __location__,
1593 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1596 .type = WREPL_TYPE_UNIQUE,
1597 .state = WREPL_STATE_ACTIVE,
1598 .node = WREPL_NODE_B,
1600 .num_ips = ARRAY_SIZE(addresses_A_1),
1601 .ips = addresses_A_1,
1602 .apply_expected = True
1606 .type = WREPL_TYPE_SGROUP,
1607 .state = WREPL_STATE_ACTIVE,
1608 .node = WREPL_NODE_B,
1610 .num_ips = ARRAY_SIZE(addresses_A_1),
1611 .ips = addresses_A_1,
1612 .apply_expected = False
1617 * unique,active vs. sgroup,tombstone
1618 * => should NOT be replaced
1621 .line = __location__,
1622 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1625 .type = WREPL_TYPE_UNIQUE,
1626 .state = WREPL_STATE_ACTIVE,
1627 .node = WREPL_NODE_B,
1629 .num_ips = ARRAY_SIZE(addresses_A_1),
1630 .ips = addresses_A_1,
1631 .apply_expected = True
1635 .type = WREPL_TYPE_SGROUP,
1636 .state = WREPL_STATE_TOMBSTONE,
1637 .node = WREPL_NODE_B,
1639 .num_ips = ARRAY_SIZE(addresses_A_1),
1640 .ips = addresses_A_1,
1641 .apply_expected = False
1646 * unique,released vs. sgroup,active
1647 * => should be replaced
1650 .line = __location__,
1651 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1654 .type = WREPL_TYPE_UNIQUE,
1655 .state = WREPL_STATE_RELEASED,
1656 .node = WREPL_NODE_B,
1658 .num_ips = ARRAY_SIZE(addresses_A_1),
1659 .ips = addresses_A_1,
1660 .apply_expected = False
1664 .type = WREPL_TYPE_SGROUP,
1665 .state = WREPL_STATE_ACTIVE,
1666 .node = WREPL_NODE_B,
1668 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1669 .ips = addresses_B_3_4,
1670 .apply_expected = True
1675 * unique,released vs. sgroup,tombstone
1676 * => should be replaced
1679 .line = __location__,
1680 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1683 .type = WREPL_TYPE_UNIQUE,
1684 .state = WREPL_STATE_RELEASED,
1685 .node = WREPL_NODE_B,
1687 .num_ips = ARRAY_SIZE(addresses_B_1),
1688 .ips = addresses_B_1,
1689 .apply_expected = False
1693 .type = WREPL_TYPE_SGROUP,
1694 .state = WREPL_STATE_TOMBSTONE,
1695 .node = WREPL_NODE_B,
1697 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1698 .ips = addresses_A_3_4,
1699 .apply_expected = True
1704 * unique,tombstone vs. sgroup,active
1705 * => should be replaced
1708 .line = __location__,
1709 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1712 .type = WREPL_TYPE_UNIQUE,
1713 .state = WREPL_STATE_TOMBSTONE,
1714 .node = WREPL_NODE_B,
1716 .num_ips = ARRAY_SIZE(addresses_A_1),
1717 .ips = addresses_A_1,
1718 .apply_expected = True
1722 .type = WREPL_TYPE_SGROUP,
1723 .state = WREPL_STATE_ACTIVE,
1724 .node = WREPL_NODE_B,
1726 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1727 .ips = addresses_B_3_4,
1728 .apply_expected = True
1733 * unique,tombstone vs. sgroup,tombstone
1734 * => should be replaced
1737 .line = __location__,
1738 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1741 .type = WREPL_TYPE_UNIQUE,
1742 .state = WREPL_STATE_TOMBSTONE,
1743 .node = WREPL_NODE_B,
1745 .num_ips = ARRAY_SIZE(addresses_B_1),
1746 .ips = addresses_B_1,
1747 .apply_expected = True
1751 .type = WREPL_TYPE_SGROUP,
1752 .state = WREPL_STATE_TOMBSTONE,
1753 .node = WREPL_NODE_B,
1755 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1756 .ips = addresses_A_3_4,
1757 .apply_expected = True
1762 * unique vs multi homed section,
1765 * unique,active vs. mhomed,active
1766 * => should be replaced
1769 .line = __location__,
1770 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1773 .type = WREPL_TYPE_UNIQUE,
1774 .state = WREPL_STATE_ACTIVE,
1775 .node = WREPL_NODE_B,
1777 .num_ips = ARRAY_SIZE(addresses_A_1),
1778 .ips = addresses_A_1,
1779 .apply_expected = True
1783 .type = WREPL_TYPE_MHOMED,
1784 .state = WREPL_STATE_ACTIVE,
1785 .node = WREPL_NODE_B,
1787 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1788 .ips = addresses_B_3_4,
1789 .apply_expected = True
1794 * unique,active vs. mhomed,tombstone
1795 * => should NOT be replaced
1798 .line = __location__,
1799 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1802 .type = WREPL_TYPE_UNIQUE,
1803 .state = WREPL_STATE_ACTIVE,
1804 .node = WREPL_NODE_B,
1806 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1807 .ips = addresses_B_3_4,
1808 .apply_expected = True
1812 .type = WREPL_TYPE_MHOMED,
1813 .state = WREPL_STATE_TOMBSTONE,
1814 .node = WREPL_NODE_B,
1816 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1817 .ips = addresses_B_3_4,
1818 .apply_expected = False
1823 * unique,released vs. mhomed,active
1824 * => should be replaced
1827 .line = __location__,
1828 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1831 .type = WREPL_TYPE_UNIQUE,
1832 .state = WREPL_STATE_RELEASED,
1833 .node = WREPL_NODE_B,
1835 .num_ips = ARRAY_SIZE(addresses_B_1),
1836 .ips = addresses_B_1,
1837 .apply_expected = False
1841 .type = WREPL_TYPE_MHOMED,
1842 .state = WREPL_STATE_ACTIVE,
1843 .node = WREPL_NODE_B,
1845 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1846 .ips = addresses_A_3_4,
1847 .apply_expected = True
1852 * unique,released vs. mhomed,tombstone
1853 * => should be replaced
1856 .line = __location__,
1857 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1860 .type = WREPL_TYPE_UNIQUE,
1861 .state = WREPL_STATE_RELEASED,
1862 .node = WREPL_NODE_B,
1864 .num_ips = ARRAY_SIZE(addresses_A_1),
1865 .ips = addresses_A_1,
1866 .apply_expected = False
1870 .type = WREPL_TYPE_MHOMED,
1871 .state = WREPL_STATE_TOMBSTONE,
1872 .node = WREPL_NODE_B,
1874 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1875 .ips = addresses_B_3_4,
1876 .apply_expected = True
1881 * unique,tombstone vs. mhomed,active
1882 * => should be replaced
1885 .line = __location__,
1886 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1889 .type = WREPL_TYPE_UNIQUE,
1890 .state = WREPL_STATE_TOMBSTONE,
1891 .node = WREPL_NODE_B,
1893 .num_ips = ARRAY_SIZE(addresses_B_1),
1894 .ips = addresses_B_1,
1895 .apply_expected = True
1899 .type = WREPL_TYPE_MHOMED,
1900 .state = WREPL_STATE_ACTIVE,
1901 .node = WREPL_NODE_B,
1903 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1904 .ips = addresses_A_3_4,
1905 .apply_expected = True
1910 * unique,tombstone vs. mhomed,tombstone
1911 * => should be replaced
1914 .line = __location__,
1915 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1918 .type = WREPL_TYPE_UNIQUE,
1919 .state = WREPL_STATE_TOMBSTONE,
1920 .node = WREPL_NODE_B,
1922 .num_ips = ARRAY_SIZE(addresses_A_1),
1923 .ips = addresses_A_1,
1924 .apply_expected = True
1928 .type = WREPL_TYPE_MHOMED,
1929 .state = WREPL_STATE_TOMBSTONE,
1930 .node = WREPL_NODE_B,
1932 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1933 .ips = addresses_B_3_4,
1934 .apply_expected = True
1939 * normal groups vs unique section,
1942 * group,active vs. unique,active
1943 * => should NOT be replaced
1946 .line = __location__,
1947 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1950 .type = WREPL_TYPE_GROUP,
1951 .state = WREPL_STATE_ACTIVE,
1952 .node = WREPL_NODE_B,
1954 .num_ips = ARRAY_SIZE(addresses_A_1),
1955 .ips = addresses_A_1,
1956 .apply_expected = True
1960 .type = WREPL_TYPE_UNIQUE,
1961 .state = WREPL_STATE_ACTIVE,
1962 .node = WREPL_NODE_B,
1964 .num_ips = ARRAY_SIZE(addresses_A_1),
1965 .ips = addresses_A_1,
1966 .apply_expected = False
1971 * group,active vs. unique,tombstone
1972 * => should NOT be replaced
1975 .line = __location__,
1976 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1979 .type = WREPL_TYPE_GROUP,
1980 .state = WREPL_STATE_ACTIVE,
1981 .node = WREPL_NODE_B,
1983 .num_ips = ARRAY_SIZE(addresses_A_1),
1984 .ips = addresses_A_1,
1985 .apply_expected = True
1989 .type = WREPL_TYPE_UNIQUE,
1990 .state = WREPL_STATE_TOMBSTONE,
1991 .node = WREPL_NODE_B,
1993 .num_ips = ARRAY_SIZE(addresses_A_1),
1994 .ips = addresses_A_1,
1995 .apply_expected = False
2000 * group,released vs. unique,active
2001 * => should NOT be replaced
2004 .line = __location__,
2005 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2008 .type = WREPL_TYPE_GROUP,
2009 .state = WREPL_STATE_RELEASED,
2010 .node = WREPL_NODE_B,
2012 .num_ips = ARRAY_SIZE(addresses_A_1),
2013 .ips = addresses_A_1,
2014 .apply_expected = False
2018 .type = WREPL_TYPE_UNIQUE,
2019 .state = WREPL_STATE_ACTIVE,
2020 .node = WREPL_NODE_B,
2022 .num_ips = ARRAY_SIZE(addresses_A_1),
2023 .ips = addresses_A_1,
2024 .apply_expected = False
2029 * group,released vs. unique,tombstone
2030 * => should NOT be replaced
2033 .line = __location__,
2034 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2037 .type = WREPL_TYPE_GROUP,
2038 .state = WREPL_STATE_RELEASED,
2039 .node = WREPL_NODE_B,
2041 .num_ips = ARRAY_SIZE(addresses_A_1),
2042 .ips = addresses_A_1,
2043 .apply_expected = False
2047 .type = WREPL_TYPE_UNIQUE,
2048 .state = WREPL_STATE_TOMBSTONE,
2049 .node = WREPL_NODE_B,
2051 .num_ips = ARRAY_SIZE(addresses_A_1),
2052 .ips = addresses_A_1,
2053 .apply_expected = False
2058 * group,tombstone vs. unique,active
2059 * => should NOT be replaced
2062 .line = __location__,
2063 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2066 .type = WREPL_TYPE_GROUP,
2067 .state = WREPL_STATE_TOMBSTONE,
2068 .node = WREPL_NODE_B,
2070 .num_ips = ARRAY_SIZE(addresses_A_1),
2071 .ips = addresses_A_1,
2072 .apply_expected = True
2076 .type = WREPL_TYPE_UNIQUE,
2077 .state = WREPL_STATE_ACTIVE,
2078 .node = WREPL_NODE_B,
2080 .num_ips = ARRAY_SIZE(addresses_A_1),
2081 .ips = addresses_A_1,
2082 .apply_expected = False
2087 * group,tombstone vs. unique,tombstone
2088 * => should NOT be replaced
2091 .line = __location__,
2092 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2095 .type = WREPL_TYPE_GROUP,
2096 .state = WREPL_STATE_TOMBSTONE,
2097 .node = WREPL_NODE_B,
2099 .num_ips = ARRAY_SIZE(addresses_A_1),
2100 .ips = addresses_A_1,
2101 .apply_expected = True
2105 .type = WREPL_TYPE_UNIQUE,
2106 .state = WREPL_STATE_TOMBSTONE,
2107 .node = WREPL_NODE_B,
2109 .num_ips = ARRAY_SIZE(addresses_A_1),
2110 .ips = addresses_A_1,
2111 .apply_expected = False
2116 * normal groups vs normal groups section,
2119 * group,active vs. group,active
2120 * => should NOT be replaced
2123 .line = __location__,
2124 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2127 .type = WREPL_TYPE_GROUP,
2128 .state = WREPL_STATE_ACTIVE,
2129 .node = WREPL_NODE_B,
2131 .num_ips = ARRAY_SIZE(addresses_A_1),
2132 .ips = addresses_A_1,
2133 .apply_expected = True
2137 .type = WREPL_TYPE_GROUP,
2138 .state = WREPL_STATE_ACTIVE,
2139 .node = WREPL_NODE_B,
2141 .num_ips = ARRAY_SIZE(addresses_A_1),
2142 .ips = addresses_A_1,
2143 .apply_expected = False
2148 * group,active vs. group,tombstone
2149 * => should NOT be replaced
2152 .line = __location__,
2153 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2156 .type = WREPL_TYPE_GROUP,
2157 .state = WREPL_STATE_ACTIVE,
2158 .node = WREPL_NODE_B,
2160 .num_ips = ARRAY_SIZE(addresses_A_1),
2161 .ips = addresses_A_1,
2162 .apply_expected = True
2166 .type = WREPL_TYPE_GROUP,
2167 .state = WREPL_STATE_TOMBSTONE,
2168 .node = WREPL_NODE_B,
2170 .num_ips = ARRAY_SIZE(addresses_A_1),
2171 .ips = addresses_A_1,
2172 .apply_expected = False
2177 * group,released vs. group,active
2178 * => should be replaced
2181 .line = __location__,
2182 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2185 .type = WREPL_TYPE_GROUP,
2186 .state = WREPL_STATE_RELEASED,
2187 .node = WREPL_NODE_B,
2189 .num_ips = ARRAY_SIZE(addresses_A_1),
2190 .ips = addresses_A_1,
2191 .apply_expected = False
2195 .type = WREPL_TYPE_GROUP,
2196 .state = WREPL_STATE_ACTIVE,
2197 .node = WREPL_NODE_B,
2199 .num_ips = ARRAY_SIZE(addresses_B_1),
2200 .ips = addresses_B_1,
2201 .apply_expected = True
2206 * group,released vs. group,tombstone
2207 * => should be replaced
2210 .line = __location__,
2211 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2214 .type = WREPL_TYPE_GROUP,
2215 .state = WREPL_STATE_RELEASED,
2216 .node = WREPL_NODE_B,
2218 .num_ips = ARRAY_SIZE(addresses_A_1),
2219 .ips = addresses_A_1,
2220 .apply_expected = False
2224 .type = WREPL_TYPE_GROUP,
2225 .state = WREPL_STATE_TOMBSTONE,
2226 .node = WREPL_NODE_B,
2228 .num_ips = ARRAY_SIZE(addresses_B_1),
2229 .ips = addresses_B_1,
2230 .apply_expected = True
2235 * group,tombstone vs. group,active
2236 * => should be replaced
2239 .line = __location__,
2240 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2243 .type = WREPL_TYPE_GROUP,
2244 .state = WREPL_STATE_TOMBSTONE,
2245 .node = WREPL_NODE_B,
2247 .num_ips = ARRAY_SIZE(addresses_B_1),
2248 .ips = addresses_B_1,
2249 .apply_expected = True
2253 .type = WREPL_TYPE_GROUP,
2254 .state = WREPL_STATE_ACTIVE,
2255 .node = WREPL_NODE_B,
2257 .num_ips = ARRAY_SIZE(addresses_A_1),
2258 .ips = addresses_A_1,
2259 .apply_expected = True
2264 * group,tombstone vs. group,tombstone
2265 * => should be replaced
2268 .line = __location__,
2269 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2272 .type = WREPL_TYPE_GROUP,
2273 .state = WREPL_STATE_TOMBSTONE,
2274 .node = WREPL_NODE_B,
2276 .num_ips = ARRAY_SIZE(addresses_A_1),
2277 .ips = addresses_A_1,
2278 .apply_expected = True
2282 .type = WREPL_TYPE_GROUP,
2283 .state = WREPL_STATE_TOMBSTONE,
2284 .node = WREPL_NODE_B,
2286 .num_ips = ARRAY_SIZE(addresses_B_1),
2287 .ips = addresses_B_1,
2288 .apply_expected = True
2293 * normal groups vs special groups section,
2296 * group,active vs. sgroup,active
2297 * => should NOT be replaced
2300 .line = __location__,
2301 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2304 .type = WREPL_TYPE_GROUP,
2305 .state = WREPL_STATE_ACTIVE,
2306 .node = WREPL_NODE_B,
2308 .num_ips = ARRAY_SIZE(addresses_B_1),
2309 .ips = addresses_B_1,
2310 .apply_expected = True
2314 .type = WREPL_TYPE_SGROUP,
2315 .state = WREPL_STATE_ACTIVE,
2316 .node = WREPL_NODE_B,
2318 .num_ips = ARRAY_SIZE(addresses_B_1),
2319 .ips = addresses_B_1,
2320 .apply_expected = False
2325 * group,active vs. sgroup,tombstone
2326 * => should NOT be replaced
2329 .line = __location__,
2330 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2333 .type = WREPL_TYPE_GROUP,
2334 .state = WREPL_STATE_ACTIVE,
2335 .node = WREPL_NODE_B,
2337 .num_ips = ARRAY_SIZE(addresses_B_1),
2338 .ips = addresses_B_1,
2339 .apply_expected = True
2343 .type = WREPL_TYPE_SGROUP,
2344 .state = WREPL_STATE_TOMBSTONE,
2345 .node = WREPL_NODE_B,
2347 .num_ips = ARRAY_SIZE(addresses_B_1),
2348 .ips = addresses_B_1,
2349 .apply_expected = False
2354 * group,released vs. sgroup,active
2355 * => should be replaced
2358 .line = __location__,
2359 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2362 .type = WREPL_TYPE_GROUP,
2363 .state = WREPL_STATE_RELEASED,
2364 .node = WREPL_NODE_B,
2366 .num_ips = ARRAY_SIZE(addresses_A_1),
2367 .ips = addresses_A_1,
2368 .apply_expected = False
2372 .type = WREPL_TYPE_SGROUP,
2373 .state = WREPL_STATE_ACTIVE,
2374 .node = WREPL_NODE_B,
2376 .num_ips = ARRAY_SIZE(addresses_B_1),
2377 .ips = addresses_B_1,
2378 .apply_expected = True
2383 * group,released vs. sgroup,tombstone
2384 * => should NOT be replaced
2387 .line = __location__,
2388 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2391 .type = WREPL_TYPE_GROUP,
2392 .state = WREPL_STATE_RELEASED,
2393 .node = WREPL_NODE_B,
2395 .num_ips = ARRAY_SIZE(addresses_B_1),
2396 .ips = addresses_B_1,
2397 .apply_expected = False
2401 .type = WREPL_TYPE_SGROUP,
2402 .state = WREPL_STATE_TOMBSTONE,
2403 .node = WREPL_NODE_B,
2405 .num_ips = ARRAY_SIZE(addresses_B_1),
2406 .ips = addresses_B_1,
2407 .apply_expected = False
2412 * group,tombstone vs. sgroup,active
2413 * => should be replaced
2416 .line = __location__,
2417 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2420 .type = WREPL_TYPE_GROUP,
2421 .state = WREPL_STATE_TOMBSTONE,
2422 .node = WREPL_NODE_B,
2424 .num_ips = ARRAY_SIZE(addresses_B_1),
2425 .ips = addresses_B_1,
2426 .apply_expected = True
2430 .type = WREPL_TYPE_SGROUP,
2431 .state = WREPL_STATE_ACTIVE,
2432 .node = WREPL_NODE_B,
2434 .num_ips = ARRAY_SIZE(addresses_A_1),
2435 .ips = addresses_A_1,
2436 .apply_expected = True
2441 * group,tombstone vs. sgroup,tombstone
2442 * => should be replaced
2445 .line = __location__,
2446 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2449 .type = WREPL_TYPE_GROUP,
2450 .state = WREPL_STATE_TOMBSTONE,
2451 .node = WREPL_NODE_B,
2453 .num_ips = ARRAY_SIZE(addresses_A_1),
2454 .ips = addresses_A_1,
2455 .apply_expected = True
2459 .type = WREPL_TYPE_SGROUP,
2460 .state = WREPL_STATE_TOMBSTONE,
2461 .node = WREPL_NODE_B,
2463 .num_ips = ARRAY_SIZE(addresses_B_1),
2464 .ips = addresses_B_1,
2465 .apply_expected = True
2470 * normal groups vs multi homed section,
2473 * group,active vs. mhomed,active
2474 * => should NOT be replaced
2477 .line = __location__,
2478 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2481 .type = WREPL_TYPE_GROUP,
2482 .state = WREPL_STATE_ACTIVE,
2483 .node = WREPL_NODE_B,
2485 .num_ips = ARRAY_SIZE(addresses_B_1),
2486 .ips = addresses_B_1,
2487 .apply_expected = True
2491 .type = WREPL_TYPE_MHOMED,
2492 .state = WREPL_STATE_ACTIVE,
2493 .node = WREPL_NODE_B,
2495 .num_ips = ARRAY_SIZE(addresses_B_1),
2496 .ips = addresses_B_1,
2497 .apply_expected = False
2502 * group,active vs. mhomed,tombstone
2503 * => should NOT be replaced
2506 .line = __location__,
2507 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2510 .type = WREPL_TYPE_GROUP,
2511 .state = WREPL_STATE_ACTIVE,
2512 .node = WREPL_NODE_B,
2514 .num_ips = ARRAY_SIZE(addresses_B_1),
2515 .ips = addresses_B_1,
2516 .apply_expected = True
2520 .type = WREPL_TYPE_MHOMED,
2521 .state = WREPL_STATE_TOMBSTONE,
2522 .node = WREPL_NODE_B,
2524 .num_ips = ARRAY_SIZE(addresses_B_1),
2525 .ips = addresses_B_1,
2526 .apply_expected = False
2531 * group,released vs. mhomed,active
2532 * => should NOT be replaced
2535 .line = __location__,
2536 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2539 .type = WREPL_TYPE_GROUP,
2540 .state = WREPL_STATE_RELEASED,
2541 .node = WREPL_NODE_B,
2543 .num_ips = ARRAY_SIZE(addresses_B_1),
2544 .ips = addresses_B_1,
2545 .apply_expected = False
2549 .type = WREPL_TYPE_MHOMED,
2550 .state = WREPL_STATE_ACTIVE,
2551 .node = WREPL_NODE_B,
2553 .num_ips = ARRAY_SIZE(addresses_B_1),
2554 .ips = addresses_B_1,
2555 .apply_expected = False
2560 * group,released vs. mhomed,tombstone
2561 * => should NOT be replaced
2564 .line = __location__,
2565 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2568 .type = WREPL_TYPE_GROUP,
2569 .state = WREPL_STATE_RELEASED,
2570 .node = WREPL_NODE_B,
2572 .num_ips = ARRAY_SIZE(addresses_B_1),
2573 .ips = addresses_B_1,
2574 .apply_expected = False
2578 .type = WREPL_TYPE_MHOMED,
2579 .state = WREPL_STATE_TOMBSTONE,
2580 .node = WREPL_NODE_B,
2582 .num_ips = ARRAY_SIZE(addresses_B_1),
2583 .ips = addresses_B_1,
2584 .apply_expected = False
2589 * group,tombstone vs. mhomed,active
2590 * => should be replaced
2593 .line = __location__,
2594 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2597 .type = WREPL_TYPE_GROUP,
2598 .state = WREPL_STATE_TOMBSTONE,
2599 .node = WREPL_NODE_B,
2601 .num_ips = ARRAY_SIZE(addresses_B_1),
2602 .ips = addresses_B_1,
2603 .apply_expected = True
2607 .type = WREPL_TYPE_MHOMED,
2608 .state = WREPL_STATE_ACTIVE,
2609 .node = WREPL_NODE_B,
2611 .num_ips = ARRAY_SIZE(addresses_A_1),
2612 .ips = addresses_A_1,
2613 .apply_expected = True
2618 * group,tombstone vs. mhomed,tombstone
2619 * => should be replaced
2622 .line = __location__,
2623 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2626 .type = WREPL_TYPE_GROUP,
2627 .state = WREPL_STATE_TOMBSTONE,
2628 .node = WREPL_NODE_B,
2630 .num_ips = ARRAY_SIZE(addresses_A_1),
2631 .ips = addresses_A_1,
2632 .apply_expected = True
2636 .type = WREPL_TYPE_MHOMED,
2637 .state = WREPL_STATE_TOMBSTONE,
2638 .node = WREPL_NODE_B,
2640 .num_ips = ARRAY_SIZE(addresses_B_1),
2641 .ips = addresses_B_1,
2642 .apply_expected = True
2647 * special groups vs unique section,
2650 * sgroup,active vs. unique,active
2651 * => should NOT be replaced
2654 .line = __location__,
2655 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2658 .type = WREPL_TYPE_SGROUP,
2659 .state = WREPL_STATE_ACTIVE,
2660 .node = WREPL_NODE_B,
2662 .num_ips = ARRAY_SIZE(addresses_B_1),
2663 .ips = addresses_B_1,
2664 .apply_expected = True
2668 .type = WREPL_TYPE_UNIQUE,
2669 .state = WREPL_STATE_ACTIVE,
2670 .node = WREPL_NODE_B,
2672 .num_ips = ARRAY_SIZE(addresses_B_1),
2673 .ips = addresses_B_1,
2674 .apply_expected = False
2679 * sgroup,active vs. unique,tombstone
2680 * => should NOT be replaced
2683 .line = __location__,
2684 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2687 .type = WREPL_TYPE_SGROUP,
2688 .state = WREPL_STATE_ACTIVE,
2689 .node = WREPL_NODE_B,
2691 .num_ips = ARRAY_SIZE(addresses_B_1),
2692 .ips = addresses_B_1,
2693 .apply_expected = True
2697 .type = WREPL_TYPE_UNIQUE,
2698 .state = WREPL_STATE_TOMBSTONE,
2699 .node = WREPL_NODE_B,
2701 .num_ips = ARRAY_SIZE(addresses_B_1),
2702 .ips = addresses_B_1,
2703 .apply_expected = False
2708 * sgroup,released vs. unique,active
2709 * => should be replaced
2712 .line = __location__,
2713 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2716 .type = WREPL_TYPE_SGROUP,
2717 .state = WREPL_STATE_RELEASED,
2718 .node = WREPL_NODE_B,
2720 .num_ips = ARRAY_SIZE(addresses_B_1),
2721 .ips = addresses_B_1,
2722 .apply_expected = False
2726 .type = WREPL_TYPE_UNIQUE,
2727 .state = WREPL_STATE_ACTIVE,
2728 .node = WREPL_NODE_B,
2730 .num_ips = ARRAY_SIZE(addresses_A_1),
2731 .ips = addresses_A_1,
2732 .apply_expected = True
2737 * sgroup,released vs. unique,tombstone
2738 * => should be replaced
2741 .line = __location__,
2742 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2745 .type = WREPL_TYPE_SGROUP,
2746 .state = WREPL_STATE_RELEASED,
2747 .node = WREPL_NODE_B,
2749 .num_ips = ARRAY_SIZE(addresses_A_1),
2750 .ips = addresses_A_1,
2751 .apply_expected = False
2755 .type = WREPL_TYPE_UNIQUE,
2756 .state = WREPL_STATE_TOMBSTONE,
2757 .node = WREPL_NODE_B,
2759 .num_ips = ARRAY_SIZE(addresses_B_1),
2760 .ips = addresses_B_1,
2761 .apply_expected = True
2766 * sgroup,tombstone vs. unique,active
2767 * => should be replaced
2770 .line = __location__,
2771 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2774 .type = WREPL_TYPE_SGROUP,
2775 .state = WREPL_STATE_TOMBSTONE,
2776 .node = WREPL_NODE_B,
2778 .num_ips = ARRAY_SIZE(addresses_A_1),
2779 .ips = addresses_A_1,
2780 .apply_expected = True
2784 .type = WREPL_TYPE_UNIQUE,
2785 .state = WREPL_STATE_ACTIVE,
2786 .node = WREPL_NODE_B,
2788 .num_ips = ARRAY_SIZE(addresses_B_1),
2789 .ips = addresses_B_1,
2790 .apply_expected = True
2795 * sgroup,tombstone vs. unique,tombstone
2796 * => should be replaced
2799 .line = __location__,
2800 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2803 .type = WREPL_TYPE_SGROUP,
2804 .state = WREPL_STATE_TOMBSTONE,
2805 .node = WREPL_NODE_B,
2807 .num_ips = ARRAY_SIZE(addresses_B_1),
2808 .ips = addresses_B_1,
2809 .apply_expected = True
2813 .type = WREPL_TYPE_UNIQUE,
2814 .state = WREPL_STATE_TOMBSTONE,
2815 .node = WREPL_NODE_B,
2817 .num_ips = ARRAY_SIZE(addresses_A_1),
2818 .ips = addresses_A_1,
2819 .apply_expected = True
2824 * special groups vs normal group section,
2827 * sgroup,active vs. group,active
2828 * => should NOT be replaced
2831 .line = __location__,
2832 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2835 .type = WREPL_TYPE_SGROUP,
2836 .state = WREPL_STATE_ACTIVE,
2837 .node = WREPL_NODE_B,
2839 .num_ips = ARRAY_SIZE(addresses_A_1),
2840 .ips = addresses_A_1,
2841 .apply_expected = True
2845 .type = WREPL_TYPE_GROUP,
2846 .state = WREPL_STATE_ACTIVE,
2847 .node = WREPL_NODE_B,
2849 .num_ips = ARRAY_SIZE(addresses_A_1),
2850 .ips = addresses_A_1,
2851 .apply_expected = False
2856 * sgroup,active vs. group,tombstone
2857 * => should NOT be replaced
2860 .line = __location__,
2861 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2864 .type = WREPL_TYPE_SGROUP,
2865 .state = WREPL_STATE_ACTIVE,
2866 .node = WREPL_NODE_B,
2868 .num_ips = ARRAY_SIZE(addresses_A_1),
2869 .ips = addresses_A_1,
2870 .apply_expected = True
2874 .type = WREPL_TYPE_GROUP,
2875 .state = WREPL_STATE_TOMBSTONE,
2876 .node = WREPL_NODE_B,
2878 .num_ips = ARRAY_SIZE(addresses_A_1),
2879 .ips = addresses_A_1,
2880 .apply_expected = False
2885 * sgroup,released vs. group,active
2886 * => should be replaced
2889 .line = __location__,
2890 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2893 .type = WREPL_TYPE_SGROUP,
2894 .state = WREPL_STATE_RELEASED,
2895 .node = WREPL_NODE_B,
2897 .num_ips = ARRAY_SIZE(addresses_A_1),
2898 .ips = addresses_A_1,
2899 .apply_expected = False
2903 .type = WREPL_TYPE_GROUP,
2904 .state = WREPL_STATE_ACTIVE,
2905 .node = WREPL_NODE_B,
2907 .num_ips = ARRAY_SIZE(addresses_B_1),
2908 .ips = addresses_B_1,
2909 .apply_expected = True
2914 * sgroup,released vs. group,tombstone
2915 * => should be replaced
2918 .line = __location__,
2919 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2922 .type = WREPL_TYPE_SGROUP,
2923 .state = WREPL_STATE_RELEASED,
2924 .node = WREPL_NODE_B,
2926 .num_ips = ARRAY_SIZE(addresses_B_1),
2927 .ips = addresses_B_1,
2928 .apply_expected = False
2932 .type = WREPL_TYPE_GROUP,
2933 .state = WREPL_STATE_TOMBSTONE,
2934 .node = WREPL_NODE_B,
2936 .num_ips = ARRAY_SIZE(addresses_A_1),
2937 .ips = addresses_A_1,
2938 .apply_expected = True
2943 * sgroup,tombstone vs. group,active
2944 * => should NOT be replaced
2947 .line = __location__,
2948 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2951 .type = WREPL_TYPE_SGROUP,
2952 .state = WREPL_STATE_TOMBSTONE,
2953 .node = WREPL_NODE_B,
2955 .num_ips = ARRAY_SIZE(addresses_A_1),
2956 .ips = addresses_A_1,
2957 .apply_expected = True
2961 .type = WREPL_TYPE_GROUP,
2962 .state = WREPL_STATE_ACTIVE,
2963 .node = WREPL_NODE_B,
2965 .num_ips = ARRAY_SIZE(addresses_B_1),
2966 .ips = addresses_B_1,
2967 .apply_expected = True
2972 * sgroup,tombstone vs. group,tombstone
2973 * => should NOT be replaced
2976 .line = __location__,
2977 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2980 .type = WREPL_TYPE_SGROUP,
2981 .state = WREPL_STATE_TOMBSTONE,
2982 .node = WREPL_NODE_B,
2984 .num_ips = ARRAY_SIZE(addresses_B_1),
2985 .ips = addresses_B_1,
2986 .apply_expected = True
2990 .type = WREPL_TYPE_GROUP,
2991 .state = WREPL_STATE_TOMBSTONE,
2992 .node = WREPL_NODE_B,
2994 .num_ips = ARRAY_SIZE(addresses_A_1),
2995 .ips = addresses_A_1,
2996 .apply_expected = True
3001 * special groups (not active) vs special group section,
3004 * sgroup,released vs. sgroup,active
3005 * => should be replaced
3008 .line = __location__,
3009 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3012 .type = WREPL_TYPE_SGROUP,
3013 .state = WREPL_STATE_RELEASED,
3014 .node = WREPL_NODE_B,
3016 .num_ips = ARRAY_SIZE(addresses_A_1),
3017 .ips = addresses_A_1,
3018 .apply_expected = False
3022 .type = WREPL_TYPE_SGROUP,
3023 .state = WREPL_STATE_ACTIVE,
3024 .node = WREPL_NODE_B,
3026 .num_ips = ARRAY_SIZE(addresses_B_1),
3027 .ips = addresses_B_1,
3028 .apply_expected = True
3033 * sgroup,released vs. sgroup,tombstone
3034 * => should be replaced
3037 .line = __location__,
3038 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3041 .type = WREPL_TYPE_SGROUP,
3042 .state = WREPL_STATE_RELEASED,
3043 .node = WREPL_NODE_B,
3045 .num_ips = ARRAY_SIZE(addresses_B_1),
3046 .ips = addresses_B_1,
3047 .apply_expected = False
3051 .type = WREPL_TYPE_SGROUP,
3052 .state = WREPL_STATE_TOMBSTONE,
3053 .node = WREPL_NODE_B,
3055 .num_ips = ARRAY_SIZE(addresses_A_1),
3056 .ips = addresses_A_1,
3057 .apply_expected = True
3062 * sgroup,tombstone vs. sgroup,active
3063 * => should NOT be replaced
3066 .line = __location__,
3067 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3070 .type = WREPL_TYPE_SGROUP,
3071 .state = WREPL_STATE_TOMBSTONE,
3072 .node = WREPL_NODE_B,
3074 .num_ips = ARRAY_SIZE(addresses_A_1),
3075 .ips = addresses_A_1,
3076 .apply_expected = True
3080 .type = WREPL_TYPE_SGROUP,
3081 .state = WREPL_STATE_ACTIVE,
3082 .node = WREPL_NODE_B,
3084 .num_ips = ARRAY_SIZE(addresses_B_1),
3085 .ips = addresses_B_1,
3086 .apply_expected = True
3091 * sgroup,tombstone vs. sgroup,tombstone
3092 * => should NOT be replaced
3095 .line = __location__,
3096 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3099 .type = WREPL_TYPE_SGROUP,
3100 .state = WREPL_STATE_TOMBSTONE,
3101 .node = WREPL_NODE_B,
3103 .num_ips = ARRAY_SIZE(addresses_B_1),
3104 .ips = addresses_B_1,
3105 .apply_expected = True
3109 .type = WREPL_TYPE_SGROUP,
3110 .state = WREPL_STATE_TOMBSTONE,
3111 .node = WREPL_NODE_B,
3113 .num_ips = ARRAY_SIZE(addresses_A_1),
3114 .ips = addresses_A_1,
3115 .apply_expected = True
3120 * special groups vs multi homed section,
3123 * sgroup,active vs. mhomed,active
3124 * => should NOT be replaced
3127 .line = __location__,
3128 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3131 .type = WREPL_TYPE_SGROUP,
3132 .state = WREPL_STATE_ACTIVE,
3133 .node = WREPL_NODE_B,
3135 .num_ips = ARRAY_SIZE(addresses_A_1),
3136 .ips = addresses_A_1,
3137 .apply_expected = True
3141 .type = WREPL_TYPE_MHOMED,
3142 .state = WREPL_STATE_ACTIVE,
3143 .node = WREPL_NODE_B,
3145 .num_ips = ARRAY_SIZE(addresses_A_1),
3146 .ips = addresses_A_1,
3147 .apply_expected = False
3152 * sgroup,active vs. mhomed,tombstone
3153 * => should NOT be replaced
3156 .line = __location__,
3157 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3160 .type = WREPL_TYPE_SGROUP,
3161 .state = WREPL_STATE_ACTIVE,
3162 .node = WREPL_NODE_B,
3164 .num_ips = ARRAY_SIZE(addresses_A_1),
3165 .ips = addresses_A_1,
3166 .apply_expected = True
3170 .type = WREPL_TYPE_MHOMED,
3171 .state = WREPL_STATE_TOMBSTONE,
3172 .node = WREPL_NODE_B,
3174 .num_ips = ARRAY_SIZE(addresses_A_1),
3175 .ips = addresses_A_1,
3176 .apply_expected = False
3181 * sgroup,released vs. mhomed,active
3182 * => should be replaced
3185 .line = __location__,
3186 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3189 .type = WREPL_TYPE_SGROUP,
3190 .state = WREPL_STATE_RELEASED,
3191 .node = WREPL_NODE_B,
3193 .num_ips = ARRAY_SIZE(addresses_A_1),
3194 .ips = addresses_A_1,
3195 .apply_expected = False
3199 .type = WREPL_TYPE_MHOMED,
3200 .state = WREPL_STATE_ACTIVE,
3201 .node = WREPL_NODE_B,
3203 .num_ips = ARRAY_SIZE(addresses_B_1),
3204 .ips = addresses_B_1,
3205 .apply_expected = True
3210 * sgroup,released vs. mhomed,tombstone
3211 * => should be replaced
3214 .line = __location__,
3215 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3218 .type = WREPL_TYPE_SGROUP,
3219 .state = WREPL_STATE_RELEASED,
3220 .node = WREPL_NODE_B,
3222 .num_ips = ARRAY_SIZE(addresses_B_1),
3223 .ips = addresses_B_1,
3224 .apply_expected = False
3228 .type = WREPL_TYPE_MHOMED,
3229 .state = WREPL_STATE_TOMBSTONE,
3230 .node = WREPL_NODE_B,
3232 .num_ips = ARRAY_SIZE(addresses_A_1),
3233 .ips = addresses_A_1,
3234 .apply_expected = True
3239 * sgroup,tombstone vs. mhomed,active
3240 * => should be replaced
3243 .line = __location__,
3244 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3247 .type = WREPL_TYPE_SGROUP,
3248 .state = WREPL_STATE_TOMBSTONE,
3249 .node = WREPL_NODE_B,
3251 .num_ips = ARRAY_SIZE(addresses_A_1),
3252 .ips = addresses_A_1,
3253 .apply_expected = True
3257 .type = WREPL_TYPE_MHOMED,
3258 .state = WREPL_STATE_ACTIVE,
3259 .node = WREPL_NODE_B,
3261 .num_ips = ARRAY_SIZE(addresses_B_1),
3262 .ips = addresses_B_1,
3263 .apply_expected = True
3268 * sgroup,tombstone vs. mhomed,tombstone
3269 * => should be replaced
3272 .line = __location__,
3273 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3276 .type = WREPL_TYPE_SGROUP,
3277 .state = WREPL_STATE_TOMBSTONE,
3278 .node = WREPL_NODE_B,
3280 .num_ips = ARRAY_SIZE(addresses_B_1),
3281 .ips = addresses_B_1,
3282 .apply_expected = True
3286 .type = WREPL_TYPE_MHOMED,
3287 .state = WREPL_STATE_TOMBSTONE,
3288 .node = WREPL_NODE_B,
3290 .num_ips = ARRAY_SIZE(addresses_A_1),
3291 .ips = addresses_A_1,
3292 .apply_expected = True
3297 * multi homed vs. unique section,
3300 * mhomed,active vs. unique,active
3301 * => should be replaced
3304 .line = __location__,
3305 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3308 .type = WREPL_TYPE_MHOMED,
3309 .state = WREPL_STATE_ACTIVE,
3310 .node = WREPL_NODE_B,
3312 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3313 .ips = addresses_A_3_4,
3314 .apply_expected = True
3318 .type = WREPL_TYPE_UNIQUE,
3319 .state = WREPL_STATE_ACTIVE,
3320 .node = WREPL_NODE_B,
3322 .num_ips = ARRAY_SIZE(addresses_B_1),
3323 .ips = addresses_B_1,
3324 .apply_expected = True
3329 * mhomed,active vs. unique,tombstone
3330 * => should NOT be replaced
3333 .line = __location__,
3334 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3337 .type = WREPL_TYPE_MHOMED,
3338 .state = WREPL_STATE_ACTIVE,
3339 .node = WREPL_NODE_B,
3341 .num_ips = ARRAY_SIZE(addresses_B_1),
3342 .ips = addresses_B_1,
3343 .apply_expected = True
3347 .type = WREPL_TYPE_UNIQUE,
3348 .state = WREPL_STATE_TOMBSTONE,
3349 .node = WREPL_NODE_B,
3351 .num_ips = ARRAY_SIZE(addresses_B_1),
3352 .ips = addresses_B_1,
3353 .apply_expected = False
3358 * mhomed,released vs. unique,active
3359 * => should be replaced
3362 .line = __location__,
3363 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3366 .type = WREPL_TYPE_MHOMED,
3367 .state = WREPL_STATE_RELEASED,
3368 .node = WREPL_NODE_B,
3370 .num_ips = ARRAY_SIZE(addresses_A_1),
3371 .ips = addresses_A_1,
3372 .apply_expected = False
3376 .type = WREPL_TYPE_UNIQUE,
3377 .state = WREPL_STATE_ACTIVE,
3378 .node = WREPL_NODE_B,
3380 .num_ips = ARRAY_SIZE(addresses_B_1),
3381 .ips = addresses_B_1,
3382 .apply_expected = True
3387 * mhomed,released vs. uinique,tombstone
3388 * => should be replaced
3391 .line = __location__,
3392 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3395 .type = WREPL_TYPE_MHOMED,
3396 .state = WREPL_STATE_RELEASED,
3397 .node = WREPL_NODE_B,
3399 .num_ips = ARRAY_SIZE(addresses_B_1),
3400 .ips = addresses_B_1,
3401 .apply_expected = False
3405 .type = WREPL_TYPE_UNIQUE,
3406 .state = WREPL_STATE_TOMBSTONE,
3407 .node = WREPL_NODE_B,
3409 .num_ips = ARRAY_SIZE(addresses_A_1),
3410 .ips = addresses_A_1,
3411 .apply_expected = True
3416 * mhomed,tombstone vs. unique,active
3417 * => should be replaced
3420 .line = __location__,
3421 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3424 .type = WREPL_TYPE_MHOMED,
3425 .state = WREPL_STATE_TOMBSTONE,
3426 .node = WREPL_NODE_B,
3428 .num_ips = ARRAY_SIZE(addresses_A_1),
3429 .ips = addresses_A_1,
3430 .apply_expected = True
3434 .type = WREPL_TYPE_UNIQUE,
3435 .state = WREPL_STATE_ACTIVE,
3436 .node = WREPL_NODE_B,
3438 .num_ips = ARRAY_SIZE(addresses_B_1),
3439 .ips = addresses_B_1,
3440 .apply_expected = True
3445 * mhomed,tombstone vs. uinique,tombstone
3446 * => should be replaced
3449 .line = __location__,
3450 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3453 .type = WREPL_TYPE_MHOMED,
3454 .state = WREPL_STATE_TOMBSTONE,
3455 .node = WREPL_NODE_B,
3457 .num_ips = ARRAY_SIZE(addresses_B_1),
3458 .ips = addresses_B_1,
3459 .apply_expected = True
3463 .type = WREPL_TYPE_UNIQUE,
3464 .state = WREPL_STATE_TOMBSTONE,
3465 .node = WREPL_NODE_B,
3467 .num_ips = ARRAY_SIZE(addresses_A_1),
3468 .ips = addresses_A_1,
3469 .apply_expected = True
3474 * multi homed vs. normal group section,
3477 * mhomed,active vs. group,active
3478 * => should be replaced
3481 .line = __location__,
3482 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3485 .type = WREPL_TYPE_MHOMED,
3486 .state = WREPL_STATE_ACTIVE,
3487 .node = WREPL_NODE_B,
3489 .num_ips = ARRAY_SIZE(addresses_A_1),
3490 .ips = addresses_A_1,
3491 .apply_expected = True
3495 .type = WREPL_TYPE_GROUP,
3496 .state = WREPL_STATE_ACTIVE,
3497 .node = WREPL_NODE_B,
3499 .num_ips = ARRAY_SIZE(addresses_B_1),
3500 .ips = addresses_B_1,
3501 .apply_expected = True
3506 * mhomed,active vs. group,tombstone
3507 * => should NOT be replaced
3510 .line = __location__,
3511 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3514 .type = WREPL_TYPE_MHOMED,
3515 .state = WREPL_STATE_ACTIVE,
3516 .node = WREPL_NODE_B,
3518 .num_ips = ARRAY_SIZE(addresses_B_1),
3519 .ips = addresses_B_1,
3520 .apply_expected = True
3524 .type = WREPL_TYPE_GROUP,
3525 .state = WREPL_STATE_TOMBSTONE,
3526 .node = WREPL_NODE_B,
3528 .num_ips = ARRAY_SIZE(addresses_B_1),
3529 .ips = addresses_B_1,
3530 .apply_expected = False
3535 * mhomed,released vs. group,active
3536 * => should be replaced
3539 .line = __location__,
3540 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3543 .type = WREPL_TYPE_MHOMED,
3544 .state = WREPL_STATE_RELEASED,
3545 .node = WREPL_NODE_B,
3547 .num_ips = ARRAY_SIZE(addresses_B_1),
3548 .ips = addresses_B_1,
3549 .apply_expected = False
3553 .type = WREPL_TYPE_GROUP,
3554 .state = WREPL_STATE_ACTIVE,
3555 .node = WREPL_NODE_B,
3557 .num_ips = ARRAY_SIZE(addresses_A_1),
3558 .ips = addresses_A_1,
3559 .apply_expected = True
3564 * mhomed,released vs. group,tombstone
3565 * => should be replaced
3568 .line = __location__,
3569 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3572 .type = WREPL_TYPE_MHOMED,
3573 .state = WREPL_STATE_RELEASED,
3574 .node = WREPL_NODE_B,
3576 .num_ips = ARRAY_SIZE(addresses_A_1),
3577 .ips = addresses_A_1,
3578 .apply_expected = False
3582 .type = WREPL_TYPE_GROUP,
3583 .state = WREPL_STATE_TOMBSTONE,
3584 .node = WREPL_NODE_B,
3586 .num_ips = ARRAY_SIZE(addresses_B_1),
3587 .ips = addresses_B_1,
3588 .apply_expected = True
3593 * mhomed,tombstone vs. group,active
3594 * => should be replaced
3597 .line = __location__,
3598 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3601 .type = WREPL_TYPE_MHOMED,
3602 .state = WREPL_STATE_TOMBSTONE,
3603 .node = WREPL_NODE_B,
3605 .num_ips = ARRAY_SIZE(addresses_B_1),
3606 .ips = addresses_B_1,
3607 .apply_expected = True
3611 .type = WREPL_TYPE_GROUP,
3612 .state = WREPL_STATE_ACTIVE,
3613 .node = WREPL_NODE_B,
3615 .num_ips = ARRAY_SIZE(addresses_A_1),
3616 .ips = addresses_A_1,
3617 .apply_expected = True
3622 * mhomed,tombstone vs. group,tombstone
3623 * => should be replaced
3626 .line = __location__,
3627 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3630 .type = WREPL_TYPE_MHOMED,
3631 .state = WREPL_STATE_TOMBSTONE,
3632 .node = WREPL_NODE_B,
3634 .num_ips = ARRAY_SIZE(addresses_A_1),
3635 .ips = addresses_A_1,
3636 .apply_expected = True
3640 .type = WREPL_TYPE_GROUP,
3641 .state = WREPL_STATE_TOMBSTONE,
3642 .node = WREPL_NODE_B,
3644 .num_ips = ARRAY_SIZE(addresses_B_1),
3645 .ips = addresses_B_1,
3646 .apply_expected = True
3651 * multi homed vs. special group section,
3654 * mhomed,active vs. sgroup,active
3655 * => should NOT be replaced
3658 .line = __location__,
3659 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3662 .type = WREPL_TYPE_MHOMED,
3663 .state = WREPL_STATE_ACTIVE,
3664 .node = WREPL_NODE_B,
3666 .num_ips = ARRAY_SIZE(addresses_A_1),
3667 .ips = addresses_A_1,
3668 .apply_expected = True
3672 .type = WREPL_TYPE_SGROUP,
3673 .state = WREPL_STATE_ACTIVE,
3674 .node = WREPL_NODE_B,
3676 .num_ips = ARRAY_SIZE(addresses_A_1),
3677 .ips = addresses_A_1,
3678 .apply_expected = False
3683 * mhomed,active vs. sgroup,tombstone
3684 * => should NOT be replaced
3687 .line = __location__,
3688 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3691 .type = WREPL_TYPE_MHOMED,
3692 .state = WREPL_STATE_ACTIVE,
3693 .node = WREPL_NODE_B,
3695 .num_ips = ARRAY_SIZE(addresses_A_1),
3696 .ips = addresses_A_1,
3697 .apply_expected = True
3701 .type = WREPL_TYPE_SGROUP,
3702 .state = WREPL_STATE_TOMBSTONE,
3703 .node = WREPL_NODE_B,
3705 .num_ips = ARRAY_SIZE(addresses_A_1),
3706 .ips = addresses_A_1,
3707 .apply_expected = False
3712 * mhomed,released vs. sgroup,active
3713 * => should be replaced
3716 .line = __location__,
3717 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3720 .type = WREPL_TYPE_MHOMED,
3721 .state = WREPL_STATE_RELEASED,
3722 .node = WREPL_NODE_B,
3724 .num_ips = ARRAY_SIZE(addresses_A_1),
3725 .ips = addresses_A_1,
3726 .apply_expected = False
3730 .type = WREPL_TYPE_SGROUP,
3731 .state = WREPL_STATE_ACTIVE,
3732 .node = WREPL_NODE_B,
3734 .num_ips = ARRAY_SIZE(addresses_B_1),
3735 .ips = addresses_B_1,
3736 .apply_expected = True
3741 * mhomed,released vs. sgroup,tombstone
3742 * => should be replaced
3745 .line = __location__,
3746 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3749 .type = WREPL_TYPE_MHOMED,
3750 .state = WREPL_STATE_RELEASED,
3751 .node = WREPL_NODE_B,
3753 .num_ips = ARRAY_SIZE(addresses_B_1),
3754 .ips = addresses_B_1,
3755 .apply_expected = False
3759 .type = WREPL_TYPE_SGROUP,
3760 .state = WREPL_STATE_TOMBSTONE,
3761 .node = WREPL_NODE_B,
3763 .num_ips = ARRAY_SIZE(addresses_A_1),
3764 .ips = addresses_A_1,
3765 .apply_expected = True
3770 * mhomed,tombstone vs. sgroup,active
3771 * => should be replaced
3774 .line = __location__,
3775 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3778 .type = WREPL_TYPE_MHOMED,
3779 .state = WREPL_STATE_TOMBSTONE,
3780 .node = WREPL_NODE_B,
3782 .num_ips = ARRAY_SIZE(addresses_A_1),
3783 .ips = addresses_A_1,
3784 .apply_expected = True
3788 .type = WREPL_TYPE_SGROUP,
3789 .state = WREPL_STATE_ACTIVE,
3790 .node = WREPL_NODE_B,
3792 .num_ips = ARRAY_SIZE(addresses_B_1),
3793 .ips = addresses_B_1,
3794 .apply_expected = True
3799 * mhomed,tombstone vs. sgroup,tombstone
3800 * => should be replaced
3803 .line = __location__,
3804 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3807 .type = WREPL_TYPE_MHOMED,
3808 .state = WREPL_STATE_TOMBSTONE,
3809 .node = WREPL_NODE_B,
3811 .num_ips = ARRAY_SIZE(addresses_B_1),
3812 .ips = addresses_B_1,
3813 .apply_expected = True
3817 .type = WREPL_TYPE_SGROUP,
3818 .state = WREPL_STATE_TOMBSTONE,
3819 .node = WREPL_NODE_B,
3821 .num_ips = ARRAY_SIZE(addresses_A_1),
3822 .ips = addresses_A_1,
3823 .apply_expected = True
3828 * multi homed vs. mlti homed section,
3831 * mhomed,active vs. mhomed,active
3832 * => should be replaced
3835 .line = __location__,
3836 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3839 .type = WREPL_TYPE_MHOMED,
3840 .state = WREPL_STATE_ACTIVE,
3841 .node = WREPL_NODE_B,
3843 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3844 .ips = addresses_A_3_4,
3845 .apply_expected = True
3849 .type = WREPL_TYPE_MHOMED,
3850 .state = WREPL_STATE_ACTIVE,
3851 .node = WREPL_NODE_B,
3853 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3854 .ips = addresses_B_3_4,
3855 .apply_expected = True
3860 * mhomed,active vs. mhomed,tombstone
3861 * => should NOT be replaced
3864 .line = __location__,
3865 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3868 .type = WREPL_TYPE_MHOMED,
3869 .state = WREPL_STATE_ACTIVE,
3870 .node = WREPL_NODE_B,
3872 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3873 .ips = addresses_B_3_4,
3874 .apply_expected = True
3878 .type = WREPL_TYPE_MHOMED,
3879 .state = WREPL_STATE_TOMBSTONE,
3880 .node = WREPL_NODE_B,
3882 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3883 .ips = addresses_B_3_4,
3884 .apply_expected = False
3889 * mhomed,released vs. mhomed,active
3890 * => should be replaced
3893 .line = __location__,
3894 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3897 .type = WREPL_TYPE_MHOMED,
3898 .state = WREPL_STATE_RELEASED,
3899 .node = WREPL_NODE_B,
3901 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3902 .ips = addresses_B_3_4,
3903 .apply_expected = False
3907 .type = WREPL_TYPE_MHOMED,
3908 .state = WREPL_STATE_ACTIVE,
3909 .node = WREPL_NODE_B,
3911 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3912 .ips = addresses_A_3_4,
3913 .apply_expected = True
3918 * mhomed,released vs. mhomed,tombstone
3919 * => should be replaced
3922 .line = __location__,
3923 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3926 .type = WREPL_TYPE_MHOMED,
3927 .state = WREPL_STATE_RELEASED,
3928 .node = WREPL_NODE_B,
3930 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3931 .ips = addresses_A_3_4,
3932 .apply_expected = False
3936 .type = WREPL_TYPE_MHOMED,
3937 .state = WREPL_STATE_TOMBSTONE,
3938 .node = WREPL_NODE_B,
3940 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3941 .ips = addresses_B_3_4,
3942 .apply_expected = True
3947 * mhomed,tombstone vs. mhomed,active
3948 * => should be replaced
3951 .line = __location__,
3952 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3955 .type = WREPL_TYPE_MHOMED,
3956 .state = WREPL_STATE_TOMBSTONE,
3957 .node = WREPL_NODE_B,
3959 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3960 .ips = addresses_B_3_4,
3961 .apply_expected = True
3965 .type = WREPL_TYPE_MHOMED,
3966 .state = WREPL_STATE_ACTIVE,
3967 .node = WREPL_NODE_B,
3969 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3970 .ips = addresses_A_3_4,
3971 .apply_expected = True
3976 * mhomed,tombstone vs. mhomed,tombstone
3977 * => should be replaced
3980 .line = __location__,
3981 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3984 .type = WREPL_TYPE_MHOMED,
3985 .state = WREPL_STATE_TOMBSTONE,
3986 .node = WREPL_NODE_B,
3988 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3989 .ips = addresses_A_3_4,
3990 .apply_expected = True
3994 .type = WREPL_TYPE_MHOMED,
3995 .state = WREPL_STATE_TOMBSTONE,
3996 .node = WREPL_NODE_B,
3998 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3999 .ips = addresses_B_3_4,
4000 .apply_expected = True
4004 .line = __location__,
4005 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4009 .type = WREPL_TYPE_UNIQUE,
4010 .state = WREPL_STATE_TOMBSTONE,
4011 .node = WREPL_NODE_B,
4013 .num_ips = ARRAY_SIZE(addresses_B_1),
4014 .ips = addresses_B_1,
4015 .apply_expected = True,
4019 .type = WREPL_TYPE_UNIQUE,
4020 .state = WREPL_STATE_TOMBSTONE,
4021 .node = WREPL_NODE_B,
4023 .num_ips = ARRAY_SIZE(addresses_A_1),
4024 .ips = addresses_A_1,
4025 .apply_expected = True,
4029 * special group vs special group section,
4032 * sgroup,active vs. sgroup,active same addresses
4033 * => should be NOT replaced
4036 .line = __location__,
4037 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4038 .comment= "A:A_3_4 vs. B:A_3_4",
4042 .type = WREPL_TYPE_SGROUP,
4043 .state = WREPL_STATE_ACTIVE,
4044 .node = WREPL_NODE_B,
4046 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4047 .ips = addresses_A_3_4,
4048 .apply_expected = True
4052 .type = WREPL_TYPE_SGROUP,
4053 .state = WREPL_STATE_ACTIVE,
4054 .node = WREPL_NODE_B,
4056 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4057 .ips = addresses_A_3_4,
4058 .apply_expected = False,
4059 .sgroup_cleanup = True
4063 * sgroup,active vs. sgroup,active same addresses
4064 * => should be NOT replaced
4067 .line = __location__,
4068 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4069 .comment= "A:A_3_4 vs. B:NULL",
4073 .type = WREPL_TYPE_SGROUP,
4074 .state = WREPL_STATE_ACTIVE,
4075 .node = WREPL_NODE_B,
4077 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4078 .ips = addresses_A_3_4,
4079 .apply_expected = True
4083 .type = WREPL_TYPE_SGROUP,
4084 .state = WREPL_STATE_ACTIVE,
4085 .node = WREPL_NODE_B,
4089 .apply_expected = False,
4090 .sgroup_cleanup = True
4094 * sgroup,active vs. sgroup,active subset addresses, special case...
4095 * => should NOT be replaced
4098 .line = __location__,
4099 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4100 .comment= "A:A_3_4_X_3_4 vs. B:A_3_4",
4104 .type = WREPL_TYPE_SGROUP,
4105 .state = WREPL_STATE_ACTIVE,
4106 .node = WREPL_NODE_B,
4108 .num_ips = ARRAY_SIZE(addresses_A_3_4_X_3_4),
4109 .ips = addresses_A_3_4_X_3_4,
4110 .apply_expected = True,
4114 .type = WREPL_TYPE_SGROUP,
4115 .state = WREPL_STATE_ACTIVE,
4116 .node = WREPL_NODE_B,
4118 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4119 .ips = addresses_A_3_4,
4120 .apply_expected = False,
4124 .line = __location__,
4125 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4129 .type = WREPL_TYPE_SGROUP,
4130 .state = WREPL_STATE_ACTIVE,
4131 .node = WREPL_NODE_B,
4135 .apply_expected = False,
4139 .type = WREPL_TYPE_SGROUP,
4140 .state = WREPL_STATE_ACTIVE,
4141 .node = WREPL_NODE_B,
4145 .apply_expected = False,
4149 * sgroup,active vs. sgroup,active different addresses, but owner changed
4150 * => should be replaced
4153 .line = __location__,
4154 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4155 .comment= "A:B_3_4 vs. B:A_3_4",
4159 .type = WREPL_TYPE_SGROUP,
4160 .state = WREPL_STATE_ACTIVE,
4161 .node = WREPL_NODE_B,
4163 .num_ips = ARRAY_SIZE(addresses_B_3_4),
4164 .ips = addresses_B_3_4,
4165 .apply_expected = True,
4169 .type = WREPL_TYPE_SGROUP,
4170 .state = WREPL_STATE_ACTIVE,
4171 .node = WREPL_NODE_B,
4173 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4174 .ips = addresses_A_3_4,
4175 .apply_expected = True,
4176 .sgroup_cleanup = True
4180 * sgroup,active vs. sgroup,active different addresses, but owner changed
4181 * => should be replaced
4184 .line = __location__,
4185 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4186 .comment= "A:A_3_4 vs. B:A_3_4_OWNER_B",
4190 .type = WREPL_TYPE_SGROUP,
4191 .state = WREPL_STATE_ACTIVE,
4192 .node = WREPL_NODE_B,
4194 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4195 .ips = addresses_A_3_4,
4196 .apply_expected = True,
4200 .type = WREPL_TYPE_SGROUP,
4201 .state = WREPL_STATE_ACTIVE,
4202 .node = WREPL_NODE_B,
4204 .num_ips = ARRAY_SIZE(addresses_A_3_4_OWNER_B),
4205 .ips = addresses_A_3_4_OWNER_B,
4206 .apply_expected = True,
4207 .sgroup_cleanup = True
4211 * sgroup,active vs. sgroup,active different addresses, but owner changed
4212 * => should be replaced
4215 .line = __location__,
4216 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4217 .comment= "A:A_3_4_OWNER_B vs. B:A_3_4",
4221 .type = WREPL_TYPE_SGROUP,
4222 .state = WREPL_STATE_ACTIVE,
4223 .node = WREPL_NODE_B,
4225 .num_ips = ARRAY_SIZE(addresses_A_3_4_OWNER_B),
4226 .ips = addresses_A_3_4_OWNER_B,
4227 .apply_expected = True,
4231 .type = WREPL_TYPE_SGROUP,
4232 .state = WREPL_STATE_ACTIVE,
4233 .node = WREPL_NODE_B,
4235 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4236 .ips = addresses_A_3_4,
4237 .apply_expected = True,
4238 .sgroup_cleanup = True
4242 * sgroup,active vs. sgroup,active different addresses
4243 * => should be merged
4246 .line = __location__,
4247 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4248 .comment= "A:A_3_4 vs. B:B_3_4 => C:A_3_4_B_3_4",
4252 .type = WREPL_TYPE_SGROUP,
4253 .state = WREPL_STATE_ACTIVE,
4254 .node = WREPL_NODE_B,
4256 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4257 .ips = addresses_A_3_4,
4258 .apply_expected = True,
4262 .type = WREPL_TYPE_SGROUP,
4263 .state = WREPL_STATE_ACTIVE,
4264 .node = WREPL_NODE_B,
4266 .num_ips = ARRAY_SIZE(addresses_B_3_4),
4267 .ips = addresses_B_3_4,
4268 .sgroup_merge = True,
4269 .sgroup_cleanup = True,
4273 * sgroup,active vs. sgroup,active different addresses, special case...
4274 * => should be merged
4277 .line = __location__,
4278 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4279 .comment= "A:B_3_4_X_3_4 vs. B:A_3_4 => B:A_3_4_X_3_4",
4283 .type = WREPL_TYPE_SGROUP,
4284 .state = WREPL_STATE_ACTIVE,
4285 .node = WREPL_NODE_B,
4287 .num_ips = ARRAY_SIZE(addresses_B_3_4_X_3_4),
4288 .ips = addresses_B_3_4_X_3_4,
4289 .apply_expected = True,
4293 .type = WREPL_TYPE_SGROUP,
4294 .state = WREPL_STATE_ACTIVE,
4295 .node = WREPL_NODE_B,
4297 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4298 .ips = addresses_A_3_4,
4299 .sgroup_merge = True,
4300 .merge_owner = &ctx->b,
4301 .sgroup_cleanup = False
4305 .line = __location__,
4306 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4310 .type = WREPL_TYPE_SGROUP,
4311 .state = WREPL_STATE_ACTIVE,
4312 .node = WREPL_NODE_B,
4314 .num_ips = ARRAY_SIZE(addresses_A_3_4_X_3_4_OWNER_B),
4315 .ips = addresses_A_3_4_X_3_4_OWNER_B,
4316 .apply_expected = True,
4320 .type = WREPL_TYPE_SGROUP,
4321 .state = WREPL_STATE_ACTIVE,
4322 .node = WREPL_NODE_B,
4326 .apply_expected = False,
4330 * sgroup,active vs. sgroup,active different addresses, special case...
4331 * => should be merged
4334 .line = __location__,
4335 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4336 .comment= "A:X_3_4 vs. B:A_3_4 => C:A_3_4_X_3_4",
4340 .type = WREPL_TYPE_SGROUP,
4341 .state = WREPL_STATE_ACTIVE,
4342 .node = WREPL_NODE_B,
4344 .num_ips = ARRAY_SIZE(addresses_X_3_4),
4345 .ips = addresses_X_3_4,
4346 .apply_expected = True,
4350 .type = WREPL_TYPE_SGROUP,
4351 .state = WREPL_STATE_ACTIVE,
4352 .node = WREPL_NODE_B,
4354 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4355 .ips = addresses_A_3_4,
4356 .sgroup_merge = True,
4357 .sgroup_cleanup = False
4361 .line = __location__,
4362 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4366 .type = WREPL_TYPE_SGROUP,
4367 .state = WREPL_STATE_ACTIVE,
4368 .node = WREPL_NODE_B,
4372 .apply_expected = False,
4376 .type = WREPL_TYPE_SGROUP,
4377 .state = WREPL_STATE_ACTIVE,
4378 .node = WREPL_NODE_B,
4382 .apply_expected = False,
4386 * sgroup,active vs. sgroup,active different addresses, special case...
4387 * => should be merged
4390 .line = __location__,
4391 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4392 .comment= "A:A_3_4_X_3_4 vs. B:A_3_4_OWNER_B => B:A_3_4_OWNER_B_X_3_4",
4396 .type = WREPL_TYPE_SGROUP,
4397 .state = WREPL_STATE_ACTIVE,
4398 .node = WREPL_NODE_B,
4400 .num_ips = ARRAY_SIZE(addresses_A_3_4_X_3_4),
4401 .ips = addresses_A_3_4_X_3_4,
4402 .apply_expected = True,
4406 .type = WREPL_TYPE_SGROUP,
4407 .state = WREPL_STATE_ACTIVE,
4408 .node = WREPL_NODE_B,
4410 .num_ips = ARRAY_SIZE(addresses_A_3_4_OWNER_B),
4411 .ips = addresses_A_3_4_OWNER_B,
4412 .sgroup_merge = True,
4413 .merge_owner = &ctx->b,
4417 .line = __location__,
4418 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4422 .type = WREPL_TYPE_SGROUP,
4423 .state = WREPL_STATE_ACTIVE,
4424 .node = WREPL_NODE_B,
4428 .apply_expected = False,
4432 .type = WREPL_TYPE_SGROUP,
4433 .state = WREPL_STATE_ACTIVE,
4434 .node = WREPL_NODE_B,
4438 .apply_expected = False,
4442 * sgroup,active vs. sgroup,active partly different addresses, special case...
4443 * => should be merged
4446 .line = __location__,
4447 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4448 .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",
4452 .type = WREPL_TYPE_SGROUP,
4453 .state = WREPL_STATE_ACTIVE,
4454 .node = WREPL_NODE_B,
4456 .num_ips = ARRAY_SIZE(addresses_B_3_4_X_3_4),
4457 .ips = addresses_B_3_4_X_3_4,
4458 .apply_expected = True,
4462 .type = WREPL_TYPE_SGROUP,
4463 .state = WREPL_STATE_ACTIVE,
4464 .node = WREPL_NODE_B,
4466 .num_ips = ARRAY_SIZE(addresses_B_3_4_X_1_2),
4467 .ips = addresses_B_3_4_X_1_2,
4468 .sgroup_merge = True,
4469 .sgroup_cleanup = False
4473 .line = __location__,
4474 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4478 .type = WREPL_TYPE_SGROUP,
4479 .state = WREPL_STATE_ACTIVE,
4480 .node = WREPL_NODE_B,
4484 .apply_expected = False,
4488 .type = WREPL_TYPE_SGROUP,
4489 .state = WREPL_STATE_ACTIVE,
4490 .node = WREPL_NODE_B,
4494 .apply_expected = False,
4498 * sgroup,active vs. sgroup,active different addresses, special case...
4499 * => should be merged
4502 .line = __location__,
4503 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4504 .comment= "A:A_3_4_B_3_4 vs. B:NULL => B:A_3_4",
4508 .type = WREPL_TYPE_SGROUP,
4509 .state = WREPL_STATE_ACTIVE,
4510 .node = WREPL_NODE_B,
4512 .num_ips = ARRAY_SIZE(addresses_A_3_4_B_3_4),
4513 .ips = addresses_A_3_4_B_3_4,
4514 .apply_expected = True,
4518 .type = WREPL_TYPE_SGROUP,
4519 .state = WREPL_STATE_ACTIVE,
4520 .node = WREPL_NODE_B,
4524 .sgroup_merge = True,
4525 .merge_owner = &ctx->b,
4526 .sgroup_cleanup = True
4530 .line = __location__,
4531 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4535 .type = WREPL_TYPE_SGROUP,
4536 .state = WREPL_STATE_ACTIVE,
4537 .node = WREPL_NODE_B,
4541 .apply_expected = False,
4545 .type = WREPL_TYPE_UNIQUE,
4546 .state = WREPL_STATE_TOMBSTONE,
4547 .node = WREPL_NODE_B,
4549 .num_ips = ARRAY_SIZE(addresses_A_1),
4550 .ips = addresses_A_1,
4551 .apply_expected = True,
4555 * sgroup,active vs. sgroup,active different addresses, special case...
4556 * => should be merged
4559 .line = __location__,
4560 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4561 .comment= "A:B_3_4_X_3_4 vs. B:NULL => B:X_3_4",
4565 .type = WREPL_TYPE_SGROUP,
4566 .state = WREPL_STATE_ACTIVE,
4567 .node = WREPL_NODE_B,
4569 .num_ips = ARRAY_SIZE(addresses_B_3_4_X_3_4),
4570 .ips = addresses_B_3_4_X_3_4,
4571 .apply_expected = True,
4575 .type = WREPL_TYPE_SGROUP,
4576 .state = WREPL_STATE_ACTIVE,
4577 .node = WREPL_NODE_B,
4581 .sgroup_merge = True,
4582 .merge_owner = &ctx->b,
4583 .sgroup_cleanup = True
4587 .line = __location__,
4588 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4592 .type = WREPL_TYPE_SGROUP,
4593 .state = WREPL_STATE_ACTIVE,
4594 .node = WREPL_NODE_B,
4598 .apply_expected = False,
4602 .type = WREPL_TYPE_UNIQUE,
4603 .state = WREPL_STATE_TOMBSTONE,
4604 .node = WREPL_NODE_B,
4606 .num_ips = ARRAY_SIZE(addresses_A_1),
4607 .ips = addresses_A_1,
4608 .apply_expected = True,
4612 * This should be the last record in this array,
4613 * we need to make sure the we leave a tombstoned unique entry
4617 .line = __location__,
4618 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4622 .type = WREPL_TYPE_UNIQUE,
4623 .state = WREPL_STATE_TOMBSTONE,
4624 .node = WREPL_NODE_B,
4626 .num_ips = ARRAY_SIZE(addresses_A_1),
4627 .ips = addresses_A_1,
4628 .apply_expected = True
4632 .type = WREPL_TYPE_UNIQUE,
4633 .state = WREPL_STATE_TOMBSTONE,
4634 .node = WREPL_NODE_B,
4636 .num_ips = ARRAY_SIZE(addresses_A_1),
4637 .ips = addresses_A_1,
4638 .apply_expected = True
4640 }}; /* do not add entries here, this should be the last record! */
4642 wins_name_r1 = &wins_name1;
4643 wins_name_r2 = &wins_name2;
4645 printf("Test Replica Conflicts with different owners\n");
4647 for(i=0; ret && i < ARRAY_SIZE(records); i++) {
4649 if (!records[i].extra && !records[i].cleanup) {
4650 /* we should test the worst cases */
4651 if (records[i].r2.apply_expected && records[i].r1.ips==records[i].r2.ips) {
4652 printf("(%s) Programmer error, invalid record[%u]: %s\n",
4653 __location__, i, records[i].line);
4655 } else if (!records[i].r2.apply_expected && records[i].r1.ips!=records[i].r2.ips) {
4656 printf("(%s) Programmer error, invalid record[%u]: %s\n",
4657 __location__, i, records[i].line);
4662 if (!records[i].cleanup) {
4663 const char *expected;
4666 if (records[i].r2.sgroup_merge) {
4667 expected = "SGROUP_MERGE";
4668 } else if (records[i].r2.apply_expected) {
4669 expected = "REPLACE";
4671 expected = "NOT REPLACE";
4674 if (!records[i].r1.ips && !records[i].r2.ips) {
4675 ips = "with no ip(s)";
4676 } else if (records[i].r1.ips==records[i].r2.ips) {
4677 ips = "with same ip(s)";
4679 ips = "with different ip(s)";
4682 printf("%s,%s%s vs. %s,%s%s %s => %s\n",
4683 wrepl_name_type_string(records[i].r1.type),
4684 wrepl_name_state_string(records[i].r1.state),
4685 (records[i].r1.is_static?",static":""),
4686 wrepl_name_type_string(records[i].r2.type),
4687 wrepl_name_state_string(records[i].r2.state),
4688 (records[i].r2.is_static?",static":""),
4689 (records[i].comment?records[i].comment:ips),
4696 wins_name_r1->name = &records[i].name;
4697 wins_name_r1->flags = WREPL_NAME_FLAGS(records[i].r1.type,
4698 records[i].r1.state,
4700 records[i].r1.is_static);
4701 wins_name_r1->id = ++records[i].r1.owner->max_version;
4702 if (wins_name_r1->flags & 2) {
4703 wins_name_r1->addresses.addresses.num_ips = records[i].r1.num_ips;
4704 wins_name_r1->addresses.addresses.ips = discard_const(records[i].r1.ips);
4706 wins_name_r1->addresses.ip = records[i].r1.ips[0].ip;
4708 wins_name_r1->unknown = "255.255.255.255";
4711 ret &= test_wrepl_update_one(ctx, records[i].r1.owner, wins_name_r1);
4712 ret &= test_wrepl_is_applied(ctx, records[i].r1.owner,
4713 wins_name_r1, records[i].r1.apply_expected);
4718 wins_name_r2->name = &records[i].name;
4719 wins_name_r2->flags = WREPL_NAME_FLAGS(records[i].r2.type,
4720 records[i].r2.state,
4722 records[i].r2.is_static);
4723 wins_name_r2->id = ++records[i].r2.owner->max_version;
4724 if (wins_name_r2->flags & 2) {
4725 wins_name_r2->addresses.addresses.num_ips = records[i].r2.num_ips;
4726 wins_name_r2->addresses.addresses.ips = discard_const(records[i].r2.ips);
4728 wins_name_r2->addresses.ip = records[i].r2.ips[0].ip;
4730 wins_name_r2->unknown = "255.255.255.255";
4733 ret &= test_wrepl_update_one(ctx, records[i].r2.owner, wins_name_r2);
4734 if (records[i].r1.state == WREPL_STATE_RELEASED) {
4735 ret &= test_wrepl_is_applied(ctx, records[i].r1.owner,
4736 wins_name_r1, False);
4737 } else if (records[i].r2.sgroup_merge) {
4738 ret &= test_wrepl_sgroup_merged(ctx, records[i].r2.merge_owner,
4739 records[i].r1.owner,
4740 records[i].r1.num_ips, records[i].r1.ips,
4741 records[i].r2.owner,
4742 records[i].r2.num_ips, records[i].r2.ips,
4744 } else if (records[i].r1.owner != records[i].r2.owner) {
4746 _expected = (records[i].r1.apply_expected && !records[i].r2.apply_expected);
4747 ret &= test_wrepl_is_applied(ctx, records[i].r1.owner,
4748 wins_name_r1, _expected);
4750 if (records[i].r2.state == WREPL_STATE_RELEASED) {
4751 ret &= test_wrepl_is_applied(ctx, records[i].r2.owner,
4752 wins_name_r2, False);
4753 } else if (!records[i].r2.sgroup_merge) {
4754 ret &= test_wrepl_is_applied(ctx, records[i].r2.owner,
4755 wins_name_r2, records[i].r2.apply_expected);
4758 if (records[i].r2.sgroup_cleanup) {
4760 printf("failed before sgroup_cleanup record[%u]: %s\n", i, records[i].line);
4764 /* clean up the SGROUP record */
4765 wins_name_r1->name = &records[i].name;
4766 wins_name_r1->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
4768 WREPL_NODE_B, False);
4769 wins_name_r1->id = ++records[i].r1.owner->max_version;
4770 wins_name_r1->addresses.addresses.num_ips = 0;
4771 wins_name_r1->addresses.addresses.ips = NULL;
4772 wins_name_r1->unknown = "255.255.255.255";
4773 ret &= test_wrepl_update_one(ctx, records[i].r1.owner, wins_name_r1);
4775 /* here we test how names from an owner are deleted */
4776 if (records[i].r2.sgroup_merge && records[i].r2.num_ips) {
4777 ret &= test_wrepl_sgroup_merged(ctx, NULL,
4778 records[i].r2.owner,
4779 records[i].r2.num_ips, records[i].r2.ips,
4780 records[i].r1.owner,
4785 /* clean up the SGROUP record */
4786 wins_name_r2->name = &records[i].name;
4787 wins_name_r2->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
4789 WREPL_NODE_B, False);
4790 wins_name_r2->id = ++records[i].r2.owner->max_version;
4791 wins_name_r2->addresses.addresses.num_ips = 0;
4792 wins_name_r2->addresses.addresses.ips = NULL;
4793 wins_name_r2->unknown = "255.255.255.255";
4794 ret &= test_wrepl_update_one(ctx, records[i].r2.owner, wins_name_r2);
4796 /* take ownership of the SGROUP record */
4797 wins_name_r2->name = &records[i].name;
4798 wins_name_r2->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
4800 WREPL_NODE_B, False);
4801 wins_name_r2->id = ++records[i].r2.owner->max_version;
4802 wins_name_r2->addresses.addresses.num_ips = ARRAY_SIZE(addresses_B_1);
4803 wins_name_r2->addresses.addresses.ips = discard_const(addresses_B_1);
4804 wins_name_r2->unknown = "255.255.255.255";
4805 ret &= test_wrepl_update_one(ctx, records[i].r2.owner, wins_name_r2);
4806 ret &= test_wrepl_is_applied(ctx, records[i].r2.owner, wins_name_r2, True);
4808 /* overwrite the SGROUP record with unique,tombstone */
4809 wins_name_r2->name = &records[i].name;
4810 wins_name_r2->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
4811 WREPL_STATE_TOMBSTONE,
4812 WREPL_NODE_B, False);
4813 wins_name_r2->id = ++records[i].r2.owner->max_version;
4814 wins_name_r2->addresses.addresses.num_ips = ARRAY_SIZE(addresses_B_1);
4815 wins_name_r2->addresses.addresses.ips = discard_const(addresses_B_1);
4816 wins_name_r2->unknown = "255.255.255.255";
4817 ret &= test_wrepl_update_one(ctx, records[i].r2.owner, wins_name_r2);
4818 ret &= test_wrepl_is_applied(ctx, records[i].r2.owner, wins_name_r2, True);
4821 printf("failed in sgroup_cleanup record[%u]: %s\n", i, records[i].line);
4826 /* the first one is a cleanup run */
4827 if (!ret && i == 0) ret = True;
4830 printf("conflict handled wrong or record[%u]: %s\n", i, records[i].line);
4838 static BOOL test_conflict_owned_released_vs_replica(struct test_wrepl_conflict_conn *ctx)
4842 struct wrepl_wins_name wins_name_;
4843 struct wrepl_wins_name *wins_name = &wins_name_;
4844 struct nbt_name_register name_register_;
4845 struct nbt_name_register *name_register = &name_register_;
4846 struct nbt_name_release release_;
4847 struct nbt_name_release *release = &release_;
4850 const char *line; /* just better debugging */
4851 struct nbt_name name;
4856 const struct wrepl_ip *ips;
4857 BOOL apply_expected;
4860 enum wrepl_name_type type;
4861 enum wrepl_name_state state;
4862 enum wrepl_name_node node;
4865 const struct wrepl_ip *ips;
4866 BOOL apply_expected;
4870 * unique vs. unique section
4873 * unique,released vs. unique,active with same ip(s)
4876 .line = __location__,
4877 .name = _NBT_NAME("_UR_UA_SI", 0x00, NULL),
4881 .num_ips = ctx->addresses_best_num,
4882 .ips = ctx->addresses_best,
4883 .apply_expected = True
4886 .type = WREPL_TYPE_UNIQUE,
4887 .state = WREPL_STATE_ACTIVE,
4888 .node = WREPL_NODE_B,
4890 .num_ips = ctx->addresses_best_num,
4891 .ips = ctx->addresses_best,
4892 .apply_expected = True
4896 * unique,released vs. unique,active with different ip(s)
4899 .line = __location__,
4900 .name = _NBT_NAME("_UR_UA_DI", 0x00, NULL),
4904 .num_ips = ctx->addresses_best_num,
4905 .ips = ctx->addresses_best,
4906 .apply_expected = True
4909 .type = WREPL_TYPE_UNIQUE,
4910 .state = WREPL_STATE_ACTIVE,
4911 .node = WREPL_NODE_B,
4913 .num_ips = ARRAY_SIZE(addresses_B_1),
4914 .ips = addresses_B_1,
4915 .apply_expected = True
4919 * unique,released vs. unique,tombstone with same ip(s)
4922 .line = __location__,
4923 .name = _NBT_NAME("_UR_UT_SI", 0x00, NULL),
4927 .num_ips = ctx->addresses_best_num,
4928 .ips = ctx->addresses_best,
4929 .apply_expected = True
4932 .type = WREPL_TYPE_UNIQUE,
4933 .state = WREPL_STATE_TOMBSTONE,
4934 .node = WREPL_NODE_B,
4936 .num_ips = ctx->addresses_best_num,
4937 .ips = ctx->addresses_best,
4938 .apply_expected = True
4942 * unique,released vs. unique,tombstone with different ip(s)
4945 .line = __location__,
4946 .name = _NBT_NAME("_UR_UT_DI", 0x00, NULL),
4950 .num_ips = ctx->addresses_best_num,
4951 .ips = ctx->addresses_best,
4952 .apply_expected = True
4955 .type = WREPL_TYPE_UNIQUE,
4956 .state = WREPL_STATE_TOMBSTONE,
4957 .node = WREPL_NODE_B,
4959 .num_ips = ARRAY_SIZE(addresses_B_1),
4960 .ips = addresses_B_1,
4961 .apply_expected = True
4965 * unique vs. group section
4968 * unique,released vs. group,active with same ip(s)
4971 .line = __location__,
4972 .name = _NBT_NAME("_UR_GA_SI", 0x00, NULL),
4976 .num_ips = ctx->addresses_best_num,
4977 .ips = ctx->addresses_best,
4978 .apply_expected = True
4981 .type = WREPL_TYPE_GROUP,
4982 .state = WREPL_STATE_ACTIVE,
4983 .node = WREPL_NODE_B,
4985 .num_ips = ctx->addresses_best_num,
4986 .ips = ctx->addresses_best,
4987 .apply_expected = True
4991 * unique,released vs. group,active with different ip(s)
4994 .line = __location__,
4995 .name = _NBT_NAME("_UR_GA_DI", 0x00, NULL),
4999 .num_ips = ctx->addresses_best_num,
5000 .ips = ctx->addresses_best,
5001 .apply_expected = True
5004 .type = WREPL_TYPE_GROUP,
5005 .state = WREPL_STATE_ACTIVE,
5006 .node = WREPL_NODE_B,
5008 .num_ips = ARRAY_SIZE(addresses_B_1),
5009 .ips = addresses_B_1,
5010 .apply_expected = True
5014 * unique,released vs. group,tombstone with same ip(s)
5017 .line = __location__,
5018 .name = _NBT_NAME("_UR_GT_SI", 0x00, NULL),
5022 .num_ips = ctx->addresses_best_num,
5023 .ips = ctx->addresses_best,
5024 .apply_expected = True
5027 .type = WREPL_TYPE_GROUP,
5028 .state = WREPL_STATE_TOMBSTONE,
5029 .node = WREPL_NODE_B,
5031 .num_ips = ctx->addresses_best_num,
5032 .ips = ctx->addresses_best,
5033 .apply_expected = True
5037 * unique,released vs. group,tombstone with different ip(s)
5040 .line = __location__,
5041 .name = _NBT_NAME("_UR_GT_DI", 0x00, NULL),
5045 .num_ips = ctx->addresses_best_num,
5046 .ips = ctx->addresses_best,
5047 .apply_expected = True
5050 .type = WREPL_TYPE_GROUP,
5051 .state = WREPL_STATE_TOMBSTONE,
5052 .node = WREPL_NODE_B,
5054 .num_ips = ARRAY_SIZE(addresses_B_1),
5055 .ips = addresses_B_1,
5056 .apply_expected = True
5060 * unique vs. special group section
5063 * unique,released vs. sgroup,active with same ip(s)
5066 .line = __location__,
5067 .name = _NBT_NAME("_UR_SA_SI", 0x00, NULL),
5071 .num_ips = ctx->addresses_best_num,
5072 .ips = ctx->addresses_best,
5073 .apply_expected = True
5076 .type = WREPL_TYPE_SGROUP,
5077 .state = WREPL_STATE_ACTIVE,
5078 .node = WREPL_NODE_B,
5080 .num_ips = ctx->addresses_best_num,
5081 .ips = ctx->addresses_best,
5082 .apply_expected = True
5086 * unique,released vs. sgroup,active with different ip(s)
5089 .line = __location__,
5090 .name = _NBT_NAME("_UR_SA_DI", 0x00, NULL),
5094 .num_ips = ctx->addresses_best_num,
5095 .ips = ctx->addresses_best,
5096 .apply_expected = True
5099 .type = WREPL_TYPE_SGROUP,
5100 .state = WREPL_STATE_ACTIVE,
5101 .node = WREPL_NODE_B,
5103 .num_ips = ARRAY_SIZE(addresses_B_1),
5104 .ips = addresses_B_1,
5105 .apply_expected = True
5109 * unique,released vs. sgroup,tombstone with same ip(s)
5112 .line = __location__,
5113 .name = _NBT_NAME("_UR_ST_SI", 0x00, NULL),
5117 .num_ips = ctx->addresses_best_num,
5118 .ips = ctx->addresses_best,
5119 .apply_expected = True
5122 .type = WREPL_TYPE_SGROUP,
5123 .state = WREPL_STATE_TOMBSTONE,
5124 .node = WREPL_NODE_B,
5126 .num_ips = ctx->addresses_best_num,
5127 .ips = ctx->addresses_best,
5128 .apply_expected = True
5132 * unique,released vs. sgroup,tombstone with different ip(s)
5135 .line = __location__,
5136 .name = _NBT_NAME("_UR_ST_DI", 0x00, NULL),
5140 .num_ips = ctx->addresses_best_num,
5141 .ips = ctx->addresses_best,
5142 .apply_expected = True
5145 .type = WREPL_TYPE_SGROUP,
5146 .state = WREPL_STATE_TOMBSTONE,
5147 .node = WREPL_NODE_B,
5149 .num_ips = ARRAY_SIZE(addresses_B_1),
5150 .ips = addresses_B_1,
5151 .apply_expected = True
5155 * unique vs. multi homed section
5158 * unique,released vs. mhomed,active with same ip(s)
5161 .line = __location__,
5162 .name = _NBT_NAME("_UR_MA_SI", 0x00, NULL),
5166 .num_ips = ctx->addresses_best_num,
5167 .ips = ctx->addresses_best,
5168 .apply_expected = True
5171 .type = WREPL_TYPE_MHOMED,
5172 .state = WREPL_STATE_ACTIVE,
5173 .node = WREPL_NODE_B,
5175 .num_ips = ctx->addresses_best_num,
5176 .ips = ctx->addresses_best,
5177 .apply_expected = True
5181 * unique,released vs. mhomed,active with different ip(s)
5184 .line = __location__,
5185 .name = _NBT_NAME("_UR_MA_DI", 0x00, NULL),
5189 .num_ips = ctx->addresses_best_num,
5190 .ips = ctx->addresses_best,
5191 .apply_expected = True
5194 .type = WREPL_TYPE_MHOMED,
5195 .state = WREPL_STATE_ACTIVE,
5196 .node = WREPL_NODE_B,
5198 .num_ips = ARRAY_SIZE(addresses_B_1),
5199 .ips = addresses_B_1,
5200 .apply_expected = True
5204 * unique,released vs. mhomed,tombstone with same ip(s)
5207 .line = __location__,
5208 .name = _NBT_NAME("_UR_MT_SI", 0x00, NULL),
5212 .num_ips = ctx->addresses_best_num,
5213 .ips = ctx->addresses_best,
5214 .apply_expected = True
5217 .type = WREPL_TYPE_MHOMED,
5218 .state = WREPL_STATE_TOMBSTONE,
5219 .node = WREPL_NODE_B,
5221 .num_ips = ctx->addresses_best_num,
5222 .ips = ctx->addresses_best,
5223 .apply_expected = True
5227 * unique,released vs. mhomed,tombstone with different ip(s)
5230 .line = __location__,
5231 .name = _NBT_NAME("_UR_MT_DI", 0x00, NULL),
5235 .num_ips = ctx->addresses_best_num,
5236 .ips = ctx->addresses_best,
5237 .apply_expected = True
5240 .type = WREPL_TYPE_MHOMED,
5241 .state = WREPL_STATE_TOMBSTONE,
5242 .node = WREPL_NODE_B,
5244 .num_ips = ARRAY_SIZE(addresses_B_1),
5245 .ips = addresses_B_1,
5246 .apply_expected = True
5250 * group vs. unique section
5253 * group,released vs. unique,active with same ip(s)
5256 .line = __location__,
5257 .name = _NBT_NAME("_GR_UA_SI", 0x00, NULL),
5259 .nb_flags = NBT_NM_GROUP,
5261 .num_ips = ctx->addresses_best_num,
5262 .ips = ctx->addresses_best,
5263 .apply_expected = True
5266 .type = WREPL_TYPE_UNIQUE,
5267 .state = WREPL_STATE_ACTIVE,
5268 .node = WREPL_NODE_B,
5270 .num_ips = ctx->addresses_best_num,
5271 .ips = ctx->addresses_best,
5272 .apply_expected = False
5276 * group,released vs. unique,active with different ip(s)
5279 .line = __location__,
5280 .name = _NBT_NAME("_GR_UA_DI", 0x00, NULL),
5282 .nb_flags = NBT_NM_GROUP,
5284 .num_ips = ctx->addresses_best_num,
5285 .ips = ctx->addresses_best,
5286 .apply_expected = True
5289 .type = WREPL_TYPE_UNIQUE,
5290 .state = WREPL_STATE_ACTIVE,
5291 .node = WREPL_NODE_B,
5293 .num_ips = ARRAY_SIZE(addresses_B_1),
5294 .ips = addresses_B_1,
5295 .apply_expected = False
5299 * group,released vs. unique,tombstone with same ip(s)
5302 .line = __location__,
5303 .name = _NBT_NAME("_GR_UT_SI", 0x00, NULL),
5305 .nb_flags = NBT_NM_GROUP,
5307 .num_ips = ctx->addresses_best_num,
5308 .ips = ctx->addresses_best,
5309 .apply_expected = True
5312 .type = WREPL_TYPE_UNIQUE,
5313 .state = WREPL_STATE_TOMBSTONE,
5314 .node = WREPL_NODE_B,
5316 .num_ips = ctx->addresses_best_num,
5317 .ips = ctx->addresses_best,
5318 .apply_expected = False
5322 * group,released vs. unique,tombstone with different ip(s)
5325 .line = __location__,
5326 .name = _NBT_NAME("_GR_UT_DI", 0x00, NULL),
5328 .nb_flags = NBT_NM_GROUP,
5330 .num_ips = ctx->addresses_best_num,
5331 .ips = ctx->addresses_best,
5332 .apply_expected = True
5335 .type = WREPL_TYPE_UNIQUE,
5336 .state = WREPL_STATE_TOMBSTONE,
5337 .node = WREPL_NODE_B,
5339 .num_ips = ARRAY_SIZE(addresses_B_1),
5340 .ips = addresses_B_1,
5341 .apply_expected = False
5345 * group vs. group section
5348 * group,released vs. group,active with same ip(s)
5351 .line = __location__,
5352 .name = _NBT_NAME("_GR_GA_SI", 0x00, NULL),
5354 .nb_flags = NBT_NM_GROUP,
5356 .num_ips = ctx->addresses_best_num,
5357 .ips = ctx->addresses_best,
5358 .apply_expected = True
5361 .type = WREPL_TYPE_GROUP,
5362 .state = WREPL_STATE_ACTIVE,
5363 .node = WREPL_NODE_B,
5365 .num_ips = ctx->addresses_best_num,
5366 .ips = ctx->addresses_best,
5367 .apply_expected = True
5371 * group,released vs. group,active with different ip(s)
5374 .line = __location__,
5375 .name = _NBT_NAME("_GR_GA_DI", 0x00, NULL),
5377 .nb_flags = NBT_NM_GROUP,
5379 .num_ips = ctx->addresses_best_num,
5380 .ips = ctx->addresses_best,
5381 .apply_expected = True
5384 .type = WREPL_TYPE_GROUP,
5385 .state = WREPL_STATE_ACTIVE,
5386 .node = WREPL_NODE_B,
5388 .num_ips = ARRAY_SIZE(addresses_B_1),
5389 .ips = addresses_B_1,
5390 .apply_expected = True
5394 * group,released vs. group,tombstone with same ip(s)
5397 .line = __location__,
5398 .name = _NBT_NAME("_GR_GT_SI", 0x00, NULL),
5400 .nb_flags = NBT_NM_GROUP,
5402 .num_ips = ctx->addresses_best_num,
5403 .ips = ctx->addresses_best,
5404 .apply_expected = True
5407 .type = WREPL_TYPE_GROUP,
5408 .state = WREPL_STATE_TOMBSTONE,
5409 .node = WREPL_NODE_B,
5411 .num_ips = ctx->addresses_best_num,
5412 .ips = ctx->addresses_best,
5413 .apply_expected = True
5417 * group,released vs. group,tombstone with different ip(s)
5420 .line = __location__,
5421 .name = _NBT_NAME("_GR_GT_DI", 0x00, NULL),
5423 .nb_flags = NBT_NM_GROUP,
5425 .num_ips = ctx->addresses_best_num,
5426 .ips = ctx->addresses_best,
5427 .apply_expected = True
5430 .type = WREPL_TYPE_GROUP,
5431 .state = WREPL_STATE_TOMBSTONE,
5432 .node = WREPL_NODE_B,
5434 .num_ips = ARRAY_SIZE(addresses_B_1),
5435 .ips = addresses_B_1,
5436 .apply_expected = True
5440 * group vs. special group section
5443 * group,released vs. sgroup,active with same ip(s)
5446 .line = __location__,
5447 .name = _NBT_NAME("_GR_SA_SI", 0x00, NULL),
5449 .nb_flags = NBT_NM_GROUP,
5451 .num_ips = ctx->addresses_best_num,
5452 .ips = ctx->addresses_best,
5453 .apply_expected = True
5456 .type = WREPL_TYPE_SGROUP,
5457 .state = WREPL_STATE_ACTIVE,
5458 .node = WREPL_NODE_B,
5460 .num_ips = ctx->addresses_best_num,
5461 .ips = ctx->addresses_best,
5462 .apply_expected = False
5466 * group,released vs. sgroup,active with different ip(s)
5469 .line = __location__,
5470 .name = _NBT_NAME("_GR_SA_DI", 0x00, NULL),
5472 .nb_flags = NBT_NM_GROUP,
5474 .num_ips = ctx->addresses_best_num,
5475 .ips = ctx->addresses_best,
5476 .apply_expected = True
5479 .type = WREPL_TYPE_SGROUP,
5480 .state = WREPL_STATE_ACTIVE,
5481 .node = WREPL_NODE_B,
5483 .num_ips = ARRAY_SIZE(addresses_B_1),
5484 .ips = addresses_B_1,
5485 .apply_expected = False
5489 * group,released vs. sgroup,tombstone with same ip(s)
5492 .line = __location__,
5493 .name = _NBT_NAME("_GR_ST_SI", 0x00, NULL),
5495 .nb_flags = NBT_NM_GROUP,
5497 .num_ips = ctx->addresses_best_num,
5498 .ips = ctx->addresses_best,
5499 .apply_expected = True
5502 .type = WREPL_TYPE_SGROUP,
5503 .state = WREPL_STATE_TOMBSTONE,
5504 .node = WREPL_NODE_B,
5506 .num_ips = ctx->addresses_best_num,
5507 .ips = ctx->addresses_best,
5508 .apply_expected = False
5512 * group,released vs. sgroup,tombstone with different ip(s)
5515 .line = __location__,
5516 .name = _NBT_NAME("_GR_ST_DI", 0x00, NULL),
5518 .nb_flags = NBT_NM_GROUP,
5520 .num_ips = ctx->addresses_best_num,
5521 .ips = ctx->addresses_best,
5522 .apply_expected = True
5525 .type = WREPL_TYPE_SGROUP,
5526 .state = WREPL_STATE_TOMBSTONE,
5527 .node = WREPL_NODE_B,
5529 .num_ips = ARRAY_SIZE(addresses_B_1),
5530 .ips = addresses_B_1,
5531 .apply_expected = False
5535 * group vs. multi homed section
5538 * group,released vs. mhomed,active with same ip(s)
5541 .line = __location__,
5542 .name = _NBT_NAME("_GR_MA_SI", 0x00, NULL),
5544 .nb_flags = NBT_NM_GROUP,
5546 .num_ips = ctx->addresses_best_num,
5547 .ips = ctx->addresses_best,
5548 .apply_expected = True
5551 .type = WREPL_TYPE_MHOMED,
5552 .state = WREPL_STATE_ACTIVE,
5553 .node = WREPL_NODE_B,
5555 .num_ips = ctx->addresses_best_num,
5556 .ips = ctx->addresses_best,
5557 .apply_expected = False
5561 * group,released vs. mhomed,active with different ip(s)
5564 .line = __location__,
5565 .name = _NBT_NAME("_GR_MA_DI", 0x00, NULL),
5567 .nb_flags = NBT_NM_GROUP,
5569 .num_ips = ctx->addresses_best_num,
5570 .ips = ctx->addresses_best,
5571 .apply_expected = True
5574 .type = WREPL_TYPE_MHOMED,
5575 .state = WREPL_STATE_ACTIVE,
5576 .node = WREPL_NODE_B,
5578 .num_ips = ARRAY_SIZE(addresses_B_1),
5579 .ips = addresses_B_1,
5580 .apply_expected = False
5584 * group,released vs. mhomed,tombstone with same ip(s)
5587 .line = __location__,
5588 .name = _NBT_NAME("_GR_MT_SI", 0x00, NULL),
5590 .nb_flags = NBT_NM_GROUP,
5592 .num_ips = ctx->addresses_best_num,
5593 .ips = ctx->addresses_best,
5594 .apply_expected = True
5597 .type = WREPL_TYPE_MHOMED,
5598 .state = WREPL_STATE_TOMBSTONE,
5599 .node = WREPL_NODE_B,
5601 .num_ips = ctx->addresses_best_num,
5602 .ips = ctx->addresses_best,
5603 .apply_expected = False
5607 * group,released vs. mhomed,tombstone with different ip(s)
5610 .line = __location__,
5611 .name = _NBT_NAME("_GR_MT_DI", 0x00, NULL),
5613 .nb_flags = NBT_NM_GROUP,
5615 .num_ips = ctx->addresses_best_num,
5616 .ips = ctx->addresses_best,
5617 .apply_expected = True
5620 .type = WREPL_TYPE_MHOMED,
5621 .state = WREPL_STATE_TOMBSTONE,
5622 .node = WREPL_NODE_B,
5624 .num_ips = ARRAY_SIZE(addresses_B_1),
5625 .ips = addresses_B_1,
5626 .apply_expected = False
5630 * special group vs. unique section
5633 * sgroup,released vs. unique,active with same ip(s)
5636 .line = __location__,
5637 .name = _NBT_NAME("_SR_UA_SI", 0x1C, NULL),
5639 .nb_flags = NBT_NM_GROUP,
5641 .num_ips = ctx->addresses_best_num,
5642 .ips = ctx->addresses_best,
5643 .apply_expected = True
5646 .type = WREPL_TYPE_UNIQUE,
5647 .state = WREPL_STATE_ACTIVE,
5648 .node = WREPL_NODE_B,
5650 .num_ips = ctx->addresses_best_num,
5651 .ips = ctx->addresses_best,
5652 .apply_expected = True
5656 * sgroup,released vs. unique,active with different ip(s)
5659 .line = __location__,
5660 .name = _NBT_NAME("_SR_UA_DI", 0x1C, NULL),
5662 .nb_flags = NBT_NM_GROUP,
5664 .num_ips = ctx->addresses_best_num,
5665 .ips = ctx->addresses_best,
5666 .apply_expected = True
5669 .type = WREPL_TYPE_UNIQUE,
5670 .state = WREPL_STATE_ACTIVE,
5671 .node = WREPL_NODE_B,
5673 .num_ips = ARRAY_SIZE(addresses_B_1),
5674 .ips = addresses_B_1,
5675 .apply_expected = True
5679 * sgroup,released vs. unique,tombstone with same ip(s)
5682 .line = __location__,
5683 .name = _NBT_NAME("_SR_UT_SI", 0x1C, NULL),
5685 .nb_flags = NBT_NM_GROUP,
5687 .num_ips = ctx->addresses_best_num,
5688 .ips = ctx->addresses_best,
5689 .apply_expected = True
5692 .type = WREPL_TYPE_UNIQUE,
5693 .state = WREPL_STATE_TOMBSTONE,
5694 .node = WREPL_NODE_B,
5696 .num_ips = ctx->addresses_best_num,
5697 .ips = ctx->addresses_best,
5698 .apply_expected = True
5702 * sgroup,released vs. unique,tombstone with different ip(s)
5705 .line = __location__,
5706 .name = _NBT_NAME("_SR_UT_DI", 0x1C, NULL),
5708 .nb_flags = NBT_NM_GROUP,
5710 .num_ips = ctx->addresses_best_num,
5711 .ips = ctx->addresses_best,
5712 .apply_expected = True
5715 .type = WREPL_TYPE_UNIQUE,
5716 .state = WREPL_STATE_TOMBSTONE,
5717 .node = WREPL_NODE_B,
5719 .num_ips = ARRAY_SIZE(addresses_B_1),
5720 .ips = addresses_B_1,
5721 .apply_expected = True
5725 * special group vs. group section
5728 * sgroup,released vs. group,active with same ip(s)
5731 .line = __location__,
5732 .name = _NBT_NAME("_SR_GA_SI", 0x1C, NULL),
5734 .nb_flags = NBT_NM_GROUP,
5736 .num_ips = ctx->addresses_best_num,
5737 .ips = ctx->addresses_best,
5738 .apply_expected = True
5741 .type = WREPL_TYPE_GROUP,
5742 .state = WREPL_STATE_ACTIVE,
5743 .node = WREPL_NODE_B,
5745 .num_ips = ctx->addresses_best_num,
5746 .ips = ctx->addresses_best,
5747 .apply_expected = True
5751 * sgroup,released vs. group,active with different ip(s)
5754 .line = __location__,
5755 .name = _NBT_NAME("_SR_GA_DI", 0x1C, NULL),
5757 .nb_flags = NBT_NM_GROUP,
5759 .num_ips = ctx->addresses_best_num,
5760 .ips = ctx->addresses_best,
5761 .apply_expected = True
5764 .type = WREPL_TYPE_GROUP,
5765 .state = WREPL_STATE_ACTIVE,
5766 .node = WREPL_NODE_B,
5768 .num_ips = ARRAY_SIZE(addresses_B_1),
5769 .ips = addresses_B_1,
5770 .apply_expected = True
5774 * sgroup,released vs. group,tombstone with same ip(s)
5777 .line = __location__,
5778 .name = _NBT_NAME("_SR_GT_SI", 0x1C, NULL),
5780 .nb_flags = NBT_NM_GROUP,
5782 .num_ips = ctx->addresses_best_num,
5783 .ips = ctx->addresses_best,
5784 .apply_expected = True
5787 .type = WREPL_TYPE_GROUP,
5788 .state = WREPL_STATE_TOMBSTONE,
5789 .node = WREPL_NODE_B,
5791 .num_ips = ctx->addresses_best_num,
5792 .ips = ctx->addresses_best,
5793 .apply_expected = True
5797 * sgroup,released vs. group,tombstone with different ip(s)
5800 .line = __location__,
5801 .name = _NBT_NAME("_SR_GT_DI", 0x1C, NULL),
5803 .nb_flags = NBT_NM_GROUP,
5805 .num_ips = ctx->addresses_best_num,
5806 .ips = ctx->addresses_best,
5807 .apply_expected = True
5810 .type = WREPL_TYPE_GROUP,
5811 .state = WREPL_STATE_TOMBSTONE,
5812 .node = WREPL_NODE_B,
5814 .num_ips = ARRAY_SIZE(addresses_B_1),
5815 .ips = addresses_B_1,
5816 .apply_expected = True
5820 * special group vs. special group section
5823 * sgroup,released vs. sgroup,active with same ip(s)
5826 .line = __location__,
5827 .name = _NBT_NAME("_SR_SA_SI", 0x1C, NULL),
5829 .nb_flags = NBT_NM_GROUP,
5831 .num_ips = ctx->addresses_best_num,
5832 .ips = ctx->addresses_best,
5833 .apply_expected = True
5836 .type = WREPL_TYPE_SGROUP,
5837 .state = WREPL_STATE_ACTIVE,
5838 .node = WREPL_NODE_B,
5840 .num_ips = ctx->addresses_best_num,
5841 .ips = ctx->addresses_best,
5842 .apply_expected = True
5846 * sgroup,released vs. sgroup,active with different ip(s)
5849 .line = __location__,
5850 .name = _NBT_NAME("_SR_SA_DI", 0x1C, NULL),
5852 .nb_flags = NBT_NM_GROUP,
5854 .num_ips = ctx->addresses_best_num,
5855 .ips = ctx->addresses_best,
5856 .apply_expected = True
5859 .type = WREPL_TYPE_SGROUP,
5860 .state = WREPL_STATE_ACTIVE,
5861 .node = WREPL_NODE_B,
5863 .num_ips = ARRAY_SIZE(addresses_B_1),
5864 .ips = addresses_B_1,
5865 .apply_expected = True
5869 * sgroup,released vs. sgroup,tombstone with same ip(s)
5872 .line = __location__,
5873 .name = _NBT_NAME("_SR_ST_SI", 0x1C, NULL),
5875 .nb_flags = NBT_NM_GROUP,
5877 .num_ips = ctx->addresses_best_num,
5878 .ips = ctx->addresses_best,
5879 .apply_expected = True
5882 .type = WREPL_TYPE_SGROUP,
5883 .state = WREPL_STATE_TOMBSTONE,
5884 .node = WREPL_NODE_B,
5886 .num_ips = ctx->addresses_best_num,
5887 .ips = ctx->addresses_best,
5888 .apply_expected = True
5892 * sgroup,released vs. sgroup,tombstone with different ip(s)
5895 .line = __location__,
5896 .name = _NBT_NAME("_SR_ST_DI", 0x1C, NULL),
5898 .nb_flags = NBT_NM_GROUP,
5900 .num_ips = ctx->addresses_best_num,
5901 .ips = ctx->addresses_best,
5902 .apply_expected = True
5905 .type = WREPL_TYPE_SGROUP,
5906 .state = WREPL_STATE_TOMBSTONE,
5907 .node = WREPL_NODE_B,
5909 .num_ips = ARRAY_SIZE(addresses_B_1),
5910 .ips = addresses_B_1,
5911 .apply_expected = True
5915 * special group vs. multi homed section
5918 * sgroup,released vs. mhomed,active with same ip(s)
5921 .line = __location__,
5922 .name = _NBT_NAME("_SR_MA_SI", 0x1C, NULL),
5924 .nb_flags = NBT_NM_GROUP,
5926 .num_ips = ctx->addresses_best_num,
5927 .ips = ctx->addresses_best,
5928 .apply_expected = True
5931 .type = WREPL_TYPE_MHOMED,
5932 .state = WREPL_STATE_ACTIVE,
5933 .node = WREPL_NODE_B,
5935 .num_ips = ctx->addresses_best_num,
5936 .ips = ctx->addresses_best,
5937 .apply_expected = True
5941 * sgroup,released vs. mhomed,active with different ip(s)
5944 .line = __location__,
5945 .name = _NBT_NAME("_SR_MA_DI", 0x1C, NULL),
5947 .nb_flags = NBT_NM_GROUP,
5949 .num_ips = ctx->addresses_best_num,
5950 .ips = ctx->addresses_best,
5951 .apply_expected = True
5954 .type = WREPL_TYPE_MHOMED,
5955 .state = WREPL_STATE_ACTIVE,
5956 .node = WREPL_NODE_B,
5958 .num_ips = ARRAY_SIZE(addresses_B_1),
5959 .ips = addresses_B_1,
5960 .apply_expected = True
5964 * sgroup,released vs. mhomed,tombstone with same ip(s)
5967 .line = __location__,
5968 .name = _NBT_NAME("_SR_MT_SI", 0x1C, NULL),
5970 .nb_flags = NBT_NM_GROUP,
5972 .num_ips = ctx->addresses_best_num,
5973 .ips = ctx->addresses_best,
5974 .apply_expected = True
5977 .type = WREPL_TYPE_MHOMED,
5978 .state = WREPL_STATE_TOMBSTONE,
5979 .node = WREPL_NODE_B,
5981 .num_ips = ctx->addresses_best_num,
5982 .ips = ctx->addresses_best,
5983 .apply_expected = True
5987 * sgroup,released vs. mhomed,tombstone with different ip(s)
5990 .line = __location__,
5991 .name = _NBT_NAME("_SR_MT_DI", 0x1C, NULL),
5993 .nb_flags = NBT_NM_GROUP,
5995 .num_ips = ctx->addresses_best_num,
5996 .ips = ctx->addresses_best,
5997 .apply_expected = True
6000 .type = WREPL_TYPE_MHOMED,
6001 .state = WREPL_STATE_TOMBSTONE,
6002 .node = WREPL_NODE_B,
6004 .num_ips = ARRAY_SIZE(addresses_B_1),
6005 .ips = addresses_B_1,
6006 .apply_expected = True
6010 * multi homed vs. unique section
6013 * mhomed,released vs. unique,active with same ip(s)
6016 .line = __location__,
6017 .name = _NBT_NAME("_MR_UA_SI", 0x00, NULL),
6021 .num_ips = ctx->addresses_best_num,
6022 .ips = ctx->addresses_best,
6023 .apply_expected = True
6026 .type = WREPL_TYPE_UNIQUE,
6027 .state = WREPL_STATE_ACTIVE,
6028 .node = WREPL_NODE_B,
6030 .num_ips = ctx->addresses_best_num,
6031 .ips = ctx->addresses_best,
6032 .apply_expected = True
6036 * mhomed,released vs. unique,active with different ip(s)
6039 .line = __location__,
6040 .name = _NBT_NAME("_MR_UA_DI", 0x00, NULL),
6044 .num_ips = ctx->addresses_best_num,
6045 .ips = ctx->addresses_best,
6046 .apply_expected = True
6049 .type = WREPL_TYPE_UNIQUE,
6050 .state = WREPL_STATE_ACTIVE,
6051 .node = WREPL_NODE_B,
6053 .num_ips = ARRAY_SIZE(addresses_B_1),
6054 .ips = addresses_B_1,
6055 .apply_expected = True
6059 * mhomed,released vs. unique,tombstone with same ip(s)
6062 .line = __location__,
6063 .name = _NBT_NAME("_MR_UT_SI", 0x00, NULL),
6067 .num_ips = ctx->addresses_best_num,
6068 .ips = ctx->addresses_best,
6069 .apply_expected = True
6072 .type = WREPL_TYPE_UNIQUE,
6073 .state = WREPL_STATE_TOMBSTONE,
6074 .node = WREPL_NODE_B,
6076 .num_ips = ctx->addresses_best_num,
6077 .ips = ctx->addresses_best,
6078 .apply_expected = True
6082 * mhomed,released vs. unique,tombstone with different ip(s)
6085 .line = __location__,
6086 .name = _NBT_NAME("_MR_UT_DI", 0x00, NULL),
6090 .num_ips = ctx->addresses_best_num,
6091 .ips = ctx->addresses_best,
6092 .apply_expected = True
6095 .type = WREPL_TYPE_UNIQUE,
6096 .state = WREPL_STATE_TOMBSTONE,
6097 .node = WREPL_NODE_B,
6099 .num_ips = ARRAY_SIZE(addresses_B_1),
6100 .ips = addresses_B_1,
6101 .apply_expected = True
6105 * multi homed vs. group section
6108 * mhomed,released vs. group,active with same ip(s)
6111 .line = __location__,
6112 .name = _NBT_NAME("_MR_GA_SI", 0x00, NULL),
6116 .num_ips = ctx->addresses_best_num,
6117 .ips = ctx->addresses_best,
6118 .apply_expected = True
6121 .type = WREPL_TYPE_GROUP,
6122 .state = WREPL_STATE_ACTIVE,
6123 .node = WREPL_NODE_B,
6125 .num_ips = ctx->addresses_best_num,
6126 .ips = ctx->addresses_best,
6127 .apply_expected = True
6131 * mhomed,released vs. group,active with different ip(s)
6134 .line = __location__,
6135 .name = _NBT_NAME("_MR_GA_DI", 0x00, NULL),
6139 .num_ips = ctx->addresses_best_num,
6140 .ips = ctx->addresses_best,
6141 .apply_expected = True
6144 .type = WREPL_TYPE_GROUP,
6145 .state = WREPL_STATE_ACTIVE,
6146 .node = WREPL_NODE_B,
6148 .num_ips = ARRAY_SIZE(addresses_B_1),
6149 .ips = addresses_B_1,
6150 .apply_expected = True
6154 * mhomed,released vs. group,tombstone with same ip(s)
6157 .line = __location__,
6158 .name = _NBT_NAME("_MR_GT_SI", 0x00, NULL),
6162 .num_ips = ctx->addresses_best_num,
6163 .ips = ctx->addresses_best,
6164 .apply_expected = True
6167 .type = WREPL_TYPE_GROUP,
6168 .state = WREPL_STATE_TOMBSTONE,
6169 .node = WREPL_NODE_B,
6171 .num_ips = ctx->addresses_best_num,
6172 .ips = ctx->addresses_best,
6173 .apply_expected = True
6177 * mhomed,released vs. group,tombstone with different ip(s)
6180 .line = __location__,
6181 .name = _NBT_NAME("_MR_GT_DI", 0x00, NULL),
6185 .num_ips = ctx->addresses_best_num,
6186 .ips = ctx->addresses_best,
6187 .apply_expected = True
6190 .type = WREPL_TYPE_GROUP,
6191 .state = WREPL_STATE_TOMBSTONE,
6192 .node = WREPL_NODE_B,
6194 .num_ips = ARRAY_SIZE(addresses_B_1),
6195 .ips = addresses_B_1,
6196 .apply_expected = True
6200 * multi homed vs. special group section
6203 * mhomed,released vs. sgroup,active with same ip(s)
6206 .line = __location__,
6207 .name = _NBT_NAME("_MR_SA_SI", 0x00, NULL),
6211 .num_ips = ctx->addresses_best_num,
6212 .ips = ctx->addresses_best,
6213 .apply_expected = True
6216 .type = WREPL_TYPE_SGROUP,
6217 .state = WREPL_STATE_ACTIVE,
6218 .node = WREPL_NODE_B,
6220 .num_ips = ctx->addresses_best_num,
6221 .ips = ctx->addresses_best,
6222 .apply_expected = True
6226 * mhomed,released vs. sgroup,active with different ip(s)
6229 .line = __location__,
6230 .name = _NBT_NAME("_MR_SA_DI", 0x00, NULL),
6234 .num_ips = ctx->addresses_best_num,
6235 .ips = ctx->addresses_best,
6236 .apply_expected = True
6239 .type = WREPL_TYPE_SGROUP,
6240 .state = WREPL_STATE_ACTIVE,
6241 .node = WREPL_NODE_B,
6243 .num_ips = ARRAY_SIZE(addresses_B_1),
6244 .ips = addresses_B_1,
6245 .apply_expected = True
6249 * mhomed,released vs. sgroup,tombstone with same ip(s)
6252 .line = __location__,
6253 .name = _NBT_NAME("_MR_ST_SI", 0x00, NULL),
6257 .num_ips = ctx->addresses_best_num,
6258 .ips = ctx->addresses_best,
6259 .apply_expected = True
6262 .type = WREPL_TYPE_SGROUP,
6263 .state = WREPL_STATE_TOMBSTONE,
6264 .node = WREPL_NODE_B,
6266 .num_ips = ctx->addresses_best_num,
6267 .ips = ctx->addresses_best,
6268 .apply_expected = True
6272 * mhomed,released vs. sgroup,tombstone with different ip(s)
6275 .line = __location__,
6276 .name = _NBT_NAME("_MR_ST_DI", 0x00, NULL),
6280 .num_ips = ctx->addresses_best_num,
6281 .ips = ctx->addresses_best,
6282 .apply_expected = True
6285 .type = WREPL_TYPE_SGROUP,
6286 .state = WREPL_STATE_TOMBSTONE,
6287 .node = WREPL_NODE_B,
6289 .num_ips = ARRAY_SIZE(addresses_B_1),
6290 .ips = addresses_B_1,
6291 .apply_expected = True
6295 * multi homed vs. multi homed section
6298 * mhomed,released vs. mhomed,active with same ip(s)
6301 .line = __location__,
6302 .name = _NBT_NAME("_MR_MA_SI", 0x00, NULL),
6306 .num_ips = ctx->addresses_best_num,
6307 .ips = ctx->addresses_best,
6308 .apply_expected = True
6311 .type = WREPL_TYPE_MHOMED,
6312 .state = WREPL_STATE_ACTIVE,
6313 .node = WREPL_NODE_B,
6315 .num_ips = ctx->addresses_best_num,
6316 .ips = ctx->addresses_best,
6317 .apply_expected = True
6321 * mhomed,released vs. mhomed,active with different ip(s)
6324 .line = __location__,
6325 .name = _NBT_NAME("_MR_MA_DI", 0x00, NULL),
6329 .num_ips = ctx->addresses_best_num,
6330 .ips = ctx->addresses_best,
6331 .apply_expected = True
6334 .type = WREPL_TYPE_MHOMED,
6335 .state = WREPL_STATE_ACTIVE,
6336 .node = WREPL_NODE_B,
6338 .num_ips = ARRAY_SIZE(addresses_B_1),
6339 .ips = addresses_B_1,
6340 .apply_expected = True
6344 * mhomed,released vs. mhomed,tombstone with same ip(s)
6347 .line = __location__,
6348 .name = _NBT_NAME("_MR_MT_SI", 0x00, NULL),
6352 .num_ips = ctx->addresses_best_num,
6353 .ips = ctx->addresses_best,
6354 .apply_expected = True
6357 .type = WREPL_TYPE_MHOMED,
6358 .state = WREPL_STATE_TOMBSTONE,
6359 .node = WREPL_NODE_B,
6361 .num_ips = ctx->addresses_best_num,
6362 .ips = ctx->addresses_best,
6363 .apply_expected = True
6367 * mhomed,released vs. mhomed,tombstone with different ip(s)
6370 .line = __location__,
6371 .name = _NBT_NAME("_MR_MT_DI", 0x00, NULL),
6375 .num_ips = ctx->addresses_best_num,
6376 .ips = ctx->addresses_best,
6377 .apply_expected = True
6380 .type = WREPL_TYPE_MHOMED,
6381 .state = WREPL_STATE_TOMBSTONE,
6382 .node = WREPL_NODE_B,
6384 .num_ips = ARRAY_SIZE(addresses_B_1),
6385 .ips = addresses_B_1,
6386 .apply_expected = True
6391 printf("Test Replica records vs. owned released records\n");
6393 for(i=0; ret && i < ARRAY_SIZE(records); i++) {
6394 printf("%s => %s\n", nbt_name_string(ctx, &records[i].name),
6395 (records[i].replica.apply_expected?"REPLACE":"NOT REPLACE"));
6400 name_register->in.name = records[i].name;
6401 name_register->in.dest_addr = ctx->address;
6402 name_register->in.address = records[i].wins.ips[0].ip;
6403 name_register->in.nb_flags = records[i].wins.nb_flags;
6404 name_register->in.register_demand= False;
6405 name_register->in.broadcast = False;
6406 name_register->in.multi_homed = records[i].wins.mhomed;
6407 name_register->in.ttl = 300000;
6408 name_register->in.timeout = 70;
6409 name_register->in.retries = 0;
6411 status = nbt_name_register(ctx->nbtsock, ctx, name_register);
6412 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
6413 printf("No response from %s for name register\n", ctx->address);
6416 if (!NT_STATUS_IS_OK(status)) {
6417 printf("Bad response from %s for name register - %s\n",
6418 ctx->address, nt_errstr(status));
6421 CHECK_VALUE(name_register->out.rcode, 0);
6422 CHECK_VALUE_STRING(name_register->out.reply_from, ctx->address);
6423 CHECK_VALUE(name_register->out.name.type, records[i].name.type);
6424 CHECK_VALUE_STRING(name_register->out.name.name, records[i].name.name);
6425 CHECK_VALUE_STRING(name_register->out.name.scope, records[i].name.scope);
6426 CHECK_VALUE_STRING(name_register->out.reply_addr, records[i].wins.ips[0].ip);
6428 /* release the record */
6429 release->in.name = records[i].name;
6430 release->in.dest_addr = ctx->address;
6431 release->in.address = records[i].wins.ips[0].ip;
6432 release->in.nb_flags = records[i].wins.nb_flags;
6433 release->in.broadcast = False;
6434 release->in.timeout = 30;
6435 release->in.retries = 0;
6437 status = nbt_name_release(ctx->nbtsock, ctx, release);
6438 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
6439 printf("No response from %s for name release\n", ctx->address);
6442 if (!NT_STATUS_IS_OK(status)) {
6443 printf("Bad response from %s for name query - %s\n",
6444 ctx->address, nt_errstr(status));
6447 CHECK_VALUE(release->out.rcode, 0);
6452 wins_name->name = &records[i].name;
6453 wins_name->flags = WREPL_NAME_FLAGS(records[i].replica.type,
6454 records[i].replica.state,
6455 records[i].replica.node,
6456 records[i].replica.is_static);
6457 wins_name->id = ++ctx->b.max_version;
6458 if (wins_name->flags & 2) {
6459 wins_name->addresses.addresses.num_ips = records[i].replica.num_ips;
6460 wins_name->addresses.addresses.ips = discard_const(records[i].replica.ips);
6462 wins_name->addresses.ip = records[i].replica.ips[0].ip;
6464 wins_name->unknown = "255.255.255.255";
6466 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
6467 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name,
6468 records[i].replica.apply_expected);
6470 if (records[i].replica.apply_expected) {
6471 wins_name->name = &records[i].name;
6472 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE,
6473 WREPL_STATE_TOMBSTONE,
6474 WREPL_NODE_B, False);
6475 wins_name->id = ++ctx->b.max_version;
6476 wins_name->addresses.ip = addresses_B_1[0].ip;
6477 wins_name->unknown = "255.255.255.255";
6479 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
6480 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name, True);
6482 release->in.name = records[i].name;
6483 release->in.dest_addr = ctx->address;
6484 release->in.address = records[i].wins.ips[0].ip;
6485 release->in.nb_flags = records[i].wins.nb_flags;
6486 release->in.broadcast = False;
6487 release->in.timeout = 30;
6488 release->in.retries = 0;
6490 status = nbt_name_release(ctx->nbtsock, ctx, release);
6491 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
6492 printf("No response from %s for name release\n", ctx->address);
6495 if (!NT_STATUS_IS_OK(status)) {
6496 printf("Bad response from %s for name query - %s\n",
6497 ctx->address, nt_errstr(status));
6500 CHECK_VALUE(release->out.rcode, 0);
6504 printf("conflict handled wrong or record[%u]: %s\n", i, records[i].line);
6512 struct test_conflict_owned_active_vs_replica_struct {
6513 const char *line; /* just better debugging */
6514 const char *section; /* just better debugging */
6515 struct nbt_name name;
6516 const char *comment;
6522 const struct wrepl_ip *ips;
6523 BOOL apply_expected;
6528 BOOL expect_release;
6531 /* when num_ips == 0, then .wins.ips are used */
6533 const struct wrepl_ip *ips;
6536 enum wrepl_name_type type;
6537 enum wrepl_name_state state;
6538 enum wrepl_name_node node;
6541 const struct wrepl_ip *ips;
6542 BOOL apply_expected;
6548 static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket *nbtsock,
6549 struct nbt_name_packet *req_packet,
6550 const struct nbt_peer_socket *src);
6552 static BOOL test_conflict_owned_active_vs_replica(struct test_wrepl_conflict_conn *ctx)
6556 struct wrepl_wins_name wins_name_;
6557 struct wrepl_wins_name *wins_name = &wins_name_;
6558 struct nbt_name_register name_register_;
6559 struct nbt_name_register *name_register = &name_register_;
6560 struct nbt_name_release release_;
6561 struct nbt_name_release *release = &release_;
6563 struct test_conflict_owned_active_vs_replica_struct records[] = {
6565 * unique vs. unique section
6568 * unique,active vs. unique,active with same ip(s), unchecked
6571 .line = __location__,
6572 .name = _NBT_NAME("_UA_UA_SI_U", 0x00, NULL),
6576 .num_ips = ctx->addresses_best_num,
6577 .ips = ctx->addresses_best,
6578 .apply_expected = True
6584 .type = WREPL_TYPE_UNIQUE,
6585 .state = WREPL_STATE_ACTIVE,
6586 .node = WREPL_NODE_B,
6588 .num_ips = ctx->addresses_best_num,
6589 .ips = ctx->addresses_best,
6590 .apply_expected = True
6594 * unique,active vs. unique,active with different ip(s), positive response
6597 .line = __location__,
6598 .name = _NBT_NAME("_UA_UA_DI_P", 0x00, NULL),
6602 .num_ips = ctx->addresses_best_num,
6603 .ips = ctx->addresses_best,
6604 .apply_expected = True
6611 .type = WREPL_TYPE_UNIQUE,
6612 .state = WREPL_STATE_ACTIVE,
6613 .node = WREPL_NODE_B,
6615 .num_ips = ARRAY_SIZE(addresses_B_1),
6616 .ips = addresses_B_1,
6617 .apply_expected = False
6621 * unique,active vs. unique,active with different ip(s), positive response other ips
6624 .line = __location__,
6625 .name = _NBT_NAME("_UA_UA_DI_O", 0x00, NULL),
6629 .num_ips = ctx->addresses_best_num,
6630 .ips = ctx->addresses_best,
6631 .apply_expected = True
6636 .num_ips = ARRAY_SIZE(addresses_A_3_4),
6637 .ips = addresses_A_3_4,
6640 .type = WREPL_TYPE_UNIQUE,
6641 .state = WREPL_STATE_ACTIVE,
6642 .node = WREPL_NODE_B,
6644 .num_ips = ARRAY_SIZE(addresses_B_1),
6645 .ips = addresses_B_1,
6646 .apply_expected = False
6650 * unique,active vs. unique,active with different ip(s), negative response
6653 .line = __location__,
6654 .name = _NBT_NAME("_UA_UA_DI_N", 0x00, NULL),
6658 .num_ips = ctx->addresses_best_num,
6659 .ips = ctx->addresses_best,
6660 .apply_expected = True
6667 .type = WREPL_TYPE_UNIQUE,
6668 .state = WREPL_STATE_ACTIVE,
6669 .node = WREPL_NODE_B,
6671 .num_ips = ARRAY_SIZE(addresses_B_1),
6672 .ips = addresses_B_1,
6673 .apply_expected = True
6677 * unique,active vs. unique,tombstone with same ip(s), unchecked
6680 .line = __location__,
6681 .name = _NBT_NAME("_UA_UT_SI_U", 0x00, NULL),
6685 .num_ips = ctx->addresses_best_num,
6686 .ips = ctx->addresses_best,
6687 .apply_expected = True
6693 .type = WREPL_TYPE_UNIQUE,
6694 .state = WREPL_STATE_TOMBSTONE,
6695 .node = WREPL_NODE_B,
6697 .num_ips = ctx->addresses_best_num,
6698 .ips = ctx->addresses_best,
6699 .apply_expected = False
6703 * unique,active vs. unique,tombstone with different ip(s), unchecked
6706 .line = __location__,
6707 .name = _NBT_NAME("_UA_UT_DI_U", 0x00, NULL),
6711 .num_ips = ctx->addresses_best_num,
6712 .ips = ctx->addresses_best,
6713 .apply_expected = True
6719 .type = WREPL_TYPE_UNIQUE,
6720 .state = WREPL_STATE_TOMBSTONE,
6721 .node = WREPL_NODE_B,
6723 .num_ips = ARRAY_SIZE(addresses_B_1),
6724 .ips = addresses_B_1,
6725 .apply_expected = False
6729 * unique vs. group section
6732 * unique,active vs. group,active with same ip(s), release expected
6735 .line = __location__,
6736 .name = _NBT_NAME("_UA_GA_SI_R", 0x00, NULL),
6740 .num_ips = ctx->addresses_best_num,
6741 .ips = ctx->addresses_best,
6742 .apply_expected = True
6746 .expect_release = True,
6749 .type = WREPL_TYPE_GROUP,
6750 .state = WREPL_STATE_ACTIVE,
6751 .node = WREPL_NODE_B,
6753 .num_ips = ctx->addresses_best_num,
6754 .ips = ctx->addresses_best,
6755 .apply_expected = True
6759 * unique,active vs. group,active with different ip(s), release expected
6762 .line = __location__,
6763 .name = _NBT_NAME("_UA_GA_DI_R", 0x00, NULL),
6767 .num_ips = ctx->addresses_best_num,
6768 .ips = ctx->addresses_best,
6769 .apply_expected = True
6773 .expect_release = True,
6776 .type = WREPL_TYPE_GROUP,
6777 .state = WREPL_STATE_ACTIVE,
6778 .node = WREPL_NODE_B,
6780 .num_ips = ARRAY_SIZE(addresses_B_1),
6781 .ips = addresses_B_1,
6782 .apply_expected = True
6786 * unique,active vs. group,tombstone with same ip(s), unchecked
6789 .line = __location__,
6790 .name = _NBT_NAME("_UA_GT_SI_U", 0x00, NULL),
6794 .num_ips = ctx->addresses_best_num,
6795 .ips = ctx->addresses_best,
6796 .apply_expected = True
6802 .type = WREPL_TYPE_GROUP,
6803 .state = WREPL_STATE_TOMBSTONE,
6804 .node = WREPL_NODE_B,
6806 .num_ips = ctx->addresses_best_num,
6807 .ips = ctx->addresses_best,
6808 .apply_expected = False
6812 * unique,active vs. group,tombstone with different ip(s), unchecked
6815 .line = __location__,
6816 .name = _NBT_NAME("_UA_GT_DI_U", 0x00, NULL),
6820 .num_ips = ctx->addresses_best_num,
6821 .ips = ctx->addresses_best,
6822 .apply_expected = True
6828 .type = WREPL_TYPE_GROUP,
6829 .state = WREPL_STATE_TOMBSTONE,
6830 .node = WREPL_NODE_B,
6832 .num_ips = ARRAY_SIZE(addresses_B_1),
6833 .ips = addresses_B_1,
6834 .apply_expected = False
6838 * unique vs. special group section
6841 * unique,active vs. sgroup,active with same ip(s), release expected
6844 .line = __location__,
6845 .name = _NBT_NAME("_UA_SA_SI_R", 0x00, NULL),
6849 .num_ips = ctx->addresses_best_num,
6850 .ips = ctx->addresses_best,
6851 .apply_expected = True
6855 .expect_release = True,
6858 .type = WREPL_TYPE_SGROUP,
6859 .state = WREPL_STATE_ACTIVE,
6860 .node = WREPL_NODE_B,
6862 .num_ips = ctx->addresses_best_num,
6863 .ips = ctx->addresses_best,
6864 .apply_expected = True
6868 * unique,active vs. group,active with different ip(s), release expected
6871 .line = __location__,
6872 .name = _NBT_NAME("_UA_SA_DI_R", 0x00, NULL),
6876 .num_ips = ctx->addresses_best_num,
6877 .ips = ctx->addresses_best,
6878 .apply_expected = True
6882 .expect_release = True,
6885 .type = WREPL_TYPE_SGROUP,
6886 .state = WREPL_STATE_ACTIVE,
6887 .node = WREPL_NODE_B,
6889 .num_ips = ARRAY_SIZE(addresses_B_1),
6890 .ips = addresses_B_1,
6891 .apply_expected = True
6895 * unique,active vs. sgroup,tombstone with same ip(s), unchecked
6898 .line = __location__,
6899 .name = _NBT_NAME("_UA_ST_SI_U", 0x00, NULL),
6903 .num_ips = ctx->addresses_best_num,
6904 .ips = ctx->addresses_best,
6905 .apply_expected = True
6911 .type = WREPL_TYPE_SGROUP,
6912 .state = WREPL_STATE_TOMBSTONE,
6913 .node = WREPL_NODE_B,
6915 .num_ips = ctx->addresses_best_num,
6916 .ips = ctx->addresses_best,
6917 .apply_expected = False
6921 * unique,active vs. sgroup,tombstone with different ip(s), unchecked
6924 .line = __location__,
6925 .name = _NBT_NAME("_UA_ST_DI_U", 0x00, NULL),
6929 .num_ips = ctx->addresses_best_num,
6930 .ips = ctx->addresses_best,
6931 .apply_expected = True
6937 .type = WREPL_TYPE_SGROUP,
6938 .state = WREPL_STATE_TOMBSTONE,
6939 .node = WREPL_NODE_B,
6941 .num_ips = ARRAY_SIZE(addresses_B_1),
6942 .ips = addresses_B_1,
6943 .apply_expected = False
6947 * unique vs. multi homed section
6950 * unique,active vs. mhomed,active with same ip(s), unchecked
6953 .line = __location__,
6954 .name = _NBT_NAME("_UA_MA_SI_U", 0x00, NULL),
6958 .num_ips = ctx->addresses_best_num,
6959 .ips = ctx->addresses_best,
6960 .apply_expected = True
6966 .type = WREPL_TYPE_MHOMED,
6967 .state = WREPL_STATE_ACTIVE,
6968 .node = WREPL_NODE_B,
6970 .num_ips = ctx->addresses_best_num,
6971 .ips = ctx->addresses_best,
6972 .apply_expected = True
6976 * unique,active vs. mhomed,active with superset ip(s), unchecked
6979 .line = __location__,
6980 .name = _NBT_NAME("_UA_MA_SP_U", 0x00, NULL),
6984 .num_ips = ctx->addresses_best_num,
6985 .ips = ctx->addresses_best,
6986 .apply_expected = True
6992 .type = WREPL_TYPE_MHOMED,
6993 .state = WREPL_STATE_ACTIVE,
6994 .node = WREPL_NODE_B,
6996 .num_ips = ctx->addresses_all_num,
6997 .ips = ctx->addresses_all,
6998 .apply_expected = True
7002 * unique,active vs. mhomed,active with different ip(s), positive response
7005 .line = __location__,
7006 .name = _NBT_NAME("_UA_MA_DI_P", 0x00, NULL),
7010 .num_ips = ctx->addresses_best_num,
7011 .ips = ctx->addresses_best,
7012 .apply_expected = True
7019 .type = WREPL_TYPE_MHOMED,
7020 .state = WREPL_STATE_ACTIVE,
7021 .node = WREPL_NODE_B,
7023 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7024 .ips = addresses_B_3_4,
7025 .apply_expected = False
7029 * unique,active vs. mhomed,active with different ip(s), positive response other ips
7032 .line = __location__,
7033 .name = _NBT_NAME("_UA_MA_DI_O", 0x00, NULL),
7037 .num_ips = ctx->addresses_best_num,
7038 .ips = ctx->addresses_best,
7039 .apply_expected = True
7044 .num_ips = ARRAY_SIZE(addresses_A_3_4),
7045 .ips = addresses_A_3_4,
7048 .type = WREPL_TYPE_MHOMED,
7049 .state = WREPL_STATE_ACTIVE,
7050 .node = WREPL_NODE_B,
7052 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7053 .ips = addresses_B_3_4,
7054 .apply_expected = False
7058 * unique,active vs. mhomed,active with different ip(s), negative response
7061 .line = __location__,
7062 .name = _NBT_NAME("_UA_MA_DI_N", 0x00, NULL),
7066 .num_ips = ctx->addresses_best_num,
7067 .ips = ctx->addresses_best,
7068 .apply_expected = True
7075 .type = WREPL_TYPE_MHOMED,
7076 .state = WREPL_STATE_ACTIVE,
7077 .node = WREPL_NODE_B,
7079 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7080 .ips = addresses_B_3_4,
7081 .apply_expected = True
7085 * unique,active vs. mhomed,tombstone with same ip(s), unchecked
7088 .line = __location__,
7089 .name = _NBT_NAME("_UA_MT_SI_U", 0x00, NULL),
7093 .num_ips = ctx->addresses_best_num,
7094 .ips = ctx->addresses_best,
7095 .apply_expected = True
7101 .type = WREPL_TYPE_MHOMED,
7102 .state = WREPL_STATE_TOMBSTONE,
7103 .node = WREPL_NODE_B,
7105 .num_ips = ctx->addresses_best_num,
7106 .ips = ctx->addresses_best,
7107 .apply_expected = False
7111 * unique,active vs. mhomed,tombstone with different ip(s), unchecked
7114 .line = __location__,
7115 .name = _NBT_NAME("_UA_MT_DI_U", 0x00, NULL),
7119 .num_ips = ctx->addresses_best_num,
7120 .ips = ctx->addresses_best,
7121 .apply_expected = True
7127 .type = WREPL_TYPE_MHOMED,
7128 .state = WREPL_STATE_TOMBSTONE,
7129 .node = WREPL_NODE_B,
7131 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7132 .ips = addresses_B_3_4,
7133 .apply_expected = False
7137 * normal group vs. unique section
7140 * group,active vs. unique,active with same ip(s), unchecked
7143 .line = __location__,
7144 .name = _NBT_NAME("_GA_UA_SI_U", 0x00, NULL),
7146 .nb_flags = NBT_NM_GROUP,
7148 .num_ips = ctx->addresses_best_num,
7149 .ips = ctx->addresses_best,
7150 .apply_expected = True
7156 .type = WREPL_TYPE_UNIQUE,
7157 .state = WREPL_STATE_ACTIVE,
7158 .node = WREPL_NODE_B,
7160 .num_ips = ctx->addresses_best_num,
7161 .ips = ctx->addresses_best,
7162 .apply_expected = False
7166 * group,active vs. unique,active with different ip(s), unchecked
7169 .line = __location__,
7170 .name = _NBT_NAME("_GA_UA_DI_U", 0x00, NULL),
7172 .nb_flags = NBT_NM_GROUP,
7174 .num_ips = ctx->addresses_best_num,
7175 .ips = ctx->addresses_best,
7176 .apply_expected = True
7182 .type = WREPL_TYPE_UNIQUE,
7183 .state = WREPL_STATE_ACTIVE,
7184 .node = WREPL_NODE_B,
7186 .num_ips = ARRAY_SIZE(addresses_B_1),
7187 .ips = addresses_B_1,
7188 .apply_expected = False
7192 * group,active vs. unique,tombstone with same ip(s), unchecked
7195 .line = __location__,
7196 .name = _NBT_NAME("_GA_UT_SI_U", 0x00, NULL),
7198 .nb_flags = NBT_NM_GROUP,
7200 .num_ips = ctx->addresses_best_num,
7201 .ips = ctx->addresses_best,
7202 .apply_expected = True
7208 .type = WREPL_TYPE_UNIQUE,
7209 .state = WREPL_STATE_TOMBSTONE,
7210 .node = WREPL_NODE_B,
7212 .num_ips = ctx->addresses_best_num,
7213 .ips = ctx->addresses_best,
7214 .apply_expected = False
7218 * group,active vs. unique,tombstone with different ip(s), unchecked
7221 .line = __location__,
7222 .name = _NBT_NAME("_GA_UT_DI_U", 0x00, NULL),
7224 .nb_flags = NBT_NM_GROUP,
7226 .num_ips = ctx->addresses_best_num,
7227 .ips = ctx->addresses_best,
7228 .apply_expected = True
7234 .type = WREPL_TYPE_UNIQUE,
7235 .state = WREPL_STATE_TOMBSTONE,
7236 .node = WREPL_NODE_B,
7238 .num_ips = ARRAY_SIZE(addresses_B_1),
7239 .ips = addresses_B_1,
7240 .apply_expected = False
7244 * normal group vs. normal group section
7247 * group,active vs. group,active with same ip(s), unchecked
7250 .line = __location__,
7251 .name = _NBT_NAME("_GA_GA_SI_U", 0x00, NULL),
7253 .nb_flags = NBT_NM_GROUP,
7255 .num_ips = ctx->addresses_best_num,
7256 .ips = ctx->addresses_best,
7257 .apply_expected = True
7263 .type = WREPL_TYPE_GROUP,
7264 .state = WREPL_STATE_ACTIVE,
7265 .node = WREPL_NODE_B,
7267 .num_ips = ctx->addresses_best_num,
7268 .ips = ctx->addresses_best,
7269 .apply_expected = True
7273 * group,active vs. group,active with different ip(s), unchecked
7276 .line = __location__,
7277 .name = _NBT_NAME("_GA_GA_DI_U", 0x00, NULL),
7279 .nb_flags = NBT_NM_GROUP,
7281 .num_ips = ctx->addresses_best_num,
7282 .ips = ctx->addresses_best,
7283 .apply_expected = True
7289 .type = WREPL_TYPE_GROUP,
7290 .state = WREPL_STATE_ACTIVE,
7291 .node = WREPL_NODE_B,
7293 .num_ips = ARRAY_SIZE(addresses_B_1),
7294 .ips = addresses_B_1,
7295 .apply_expected = True
7299 * group,active vs. group,tombstone with same ip(s), unchecked
7302 .line = __location__,
7303 .name = _NBT_NAME("_GA_GT_SI_U", 0x00, NULL),
7305 .nb_flags = NBT_NM_GROUP,
7307 .num_ips = ctx->addresses_best_num,
7308 .ips = ctx->addresses_best,
7309 .apply_expected = True
7315 .type = WREPL_TYPE_GROUP,
7316 .state = WREPL_STATE_TOMBSTONE,
7317 .node = WREPL_NODE_B,
7319 .num_ips = ctx->addresses_best_num,
7320 .ips = ctx->addresses_best,
7321 .apply_expected = False
7325 * group,active vs. group,tombstone with different ip(s), unchecked
7328 .line = __location__,
7329 .name = _NBT_NAME("_GA_GT_DI_U", 0x00, NULL),
7331 .nb_flags = NBT_NM_GROUP,
7333 .num_ips = ctx->addresses_best_num,
7334 .ips = ctx->addresses_best,
7335 .apply_expected = True
7341 .type = WREPL_TYPE_GROUP,
7342 .state = WREPL_STATE_TOMBSTONE,
7343 .node = WREPL_NODE_B,
7345 .num_ips = ARRAY_SIZE(addresses_B_1),
7346 .ips = addresses_B_1,
7347 .apply_expected = False
7351 * normal group vs. special group section
7354 * group,active vs. sgroup,active with same ip(s), unchecked
7357 .line = __location__,
7358 .name = _NBT_NAME("_GA_SA_SI_U", 0x00, NULL),
7360 .nb_flags = NBT_NM_GROUP,
7362 .num_ips = ctx->addresses_best_num,
7363 .ips = ctx->addresses_best,
7364 .apply_expected = True
7370 .type = WREPL_TYPE_SGROUP,
7371 .state = WREPL_STATE_ACTIVE,
7372 .node = WREPL_NODE_B,
7374 .num_ips = ctx->addresses_best_num,
7375 .ips = ctx->addresses_best,
7376 .apply_expected = False
7380 * group,active vs. sgroup,active with different ip(s), unchecked
7383 .line = __location__,
7384 .name = _NBT_NAME("_GA_SA_DI_U", 0x00, NULL),
7386 .nb_flags = NBT_NM_GROUP,
7388 .num_ips = ctx->addresses_best_num,
7389 .ips = ctx->addresses_best,
7390 .apply_expected = True
7396 .type = WREPL_TYPE_SGROUP,
7397 .state = WREPL_STATE_ACTIVE,
7398 .node = WREPL_NODE_B,
7400 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7401 .ips = addresses_B_3_4,
7402 .apply_expected = False
7406 * group,active vs. sgroup,tombstone with same ip(s), unchecked
7409 .line = __location__,
7410 .name = _NBT_NAME("_GA_ST_SI_U", 0x00, NULL),
7412 .nb_flags = NBT_NM_GROUP,
7414 .num_ips = ctx->addresses_best_num,
7415 .ips = ctx->addresses_best,
7416 .apply_expected = True
7422 .type = WREPL_TYPE_SGROUP,
7423 .state = WREPL_STATE_TOMBSTONE,
7424 .node = WREPL_NODE_B,
7426 .num_ips = ctx->addresses_best_num,
7427 .ips = ctx->addresses_best,
7428 .apply_expected = False
7432 * group,active vs. sgroup,tombstone with different ip(s), unchecked
7435 .line = __location__,
7436 .name = _NBT_NAME("_GA_ST_DI_U", 0x00, NULL),
7438 .nb_flags = NBT_NM_GROUP,
7440 .num_ips = ctx->addresses_best_num,
7441 .ips = ctx->addresses_best,
7442 .apply_expected = True
7448 .type = WREPL_TYPE_SGROUP,
7449 .state = WREPL_STATE_TOMBSTONE,
7450 .node = WREPL_NODE_B,
7452 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7453 .ips = addresses_B_3_4,
7454 .apply_expected = False
7458 * normal group vs. multi homed section
7461 * group,active vs. mhomed,active with same ip(s), unchecked
7464 .line = __location__,
7465 .name = _NBT_NAME("_GA_MA_SI_U", 0x00, NULL),
7467 .nb_flags = NBT_NM_GROUP,
7469 .num_ips = ctx->addresses_best_num,
7470 .ips = ctx->addresses_best,
7471 .apply_expected = True
7477 .type = WREPL_TYPE_MHOMED,
7478 .state = WREPL_STATE_ACTIVE,
7479 .node = WREPL_NODE_B,
7481 .num_ips = ctx->addresses_best_num,
7482 .ips = ctx->addresses_best,
7483 .apply_expected = False
7487 * group,active vs. mhomed,active with different ip(s), unchecked
7490 .line = __location__,
7491 .name = _NBT_NAME("_GA_MA_DI_U", 0x00, NULL),
7493 .nb_flags = NBT_NM_GROUP,
7495 .num_ips = ctx->addresses_best_num,
7496 .ips = ctx->addresses_best,
7497 .apply_expected = True
7503 .type = WREPL_TYPE_MHOMED,
7504 .state = WREPL_STATE_ACTIVE,
7505 .node = WREPL_NODE_B,
7507 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7508 .ips = addresses_B_3_4,
7509 .apply_expected = False
7513 * group,active vs. mhomed,tombstone with same ip(s), unchecked
7516 .line = __location__,
7517 .name = _NBT_NAME("_GA_MT_SI_U", 0x00, NULL),
7519 .nb_flags = NBT_NM_GROUP,
7521 .num_ips = ctx->addresses_best_num,
7522 .ips = ctx->addresses_best,
7523 .apply_expected = True
7529 .type = WREPL_TYPE_MHOMED,
7530 .state = WREPL_STATE_TOMBSTONE,
7531 .node = WREPL_NODE_B,
7533 .num_ips = ctx->addresses_best_num,
7534 .ips = ctx->addresses_best,
7535 .apply_expected = False
7539 * group,active vs. mhomed,tombstone with different ip(s), unchecked
7542 .line = __location__,
7543 .name = _NBT_NAME("_GA_MT_DI_U", 0x00, NULL),
7545 .nb_flags = NBT_NM_GROUP,
7547 .num_ips = ctx->addresses_best_num,
7548 .ips = ctx->addresses_best,
7549 .apply_expected = True
7555 .type = WREPL_TYPE_MHOMED,
7556 .state = WREPL_STATE_TOMBSTONE,
7557 .node = WREPL_NODE_B,
7559 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7560 .ips = addresses_B_3_4,
7561 .apply_expected = False
7565 * special group vs. unique section
7568 * sgroup,active vs. unique,active with same ip(s), unchecked
7571 .line = __location__,
7572 .name = _NBT_NAME("_SA_UA_SI_U", 0x1C, NULL),
7574 .nb_flags = NBT_NM_GROUP,
7576 .num_ips = ctx->addresses_best_num,
7577 .ips = ctx->addresses_best,
7578 .apply_expected = True
7584 .type = WREPL_TYPE_UNIQUE,
7585 .state = WREPL_STATE_ACTIVE,
7586 .node = WREPL_NODE_B,
7588 .num_ips = ctx->addresses_best_num,
7589 .ips = ctx->addresses_best,
7590 .apply_expected = False
7594 * sgroup,active vs. unique,active with different ip(s), unchecked
7597 .line = __location__,
7598 .name = _NBT_NAME("_SA_UA_DI_U", 0x1C, NULL),
7600 .nb_flags = NBT_NM_GROUP,
7602 .num_ips = ctx->addresses_best_num,
7603 .ips = ctx->addresses_best,
7604 .apply_expected = True
7610 .type = WREPL_TYPE_UNIQUE,
7611 .state = WREPL_STATE_ACTIVE,
7612 .node = WREPL_NODE_B,
7614 .num_ips = ARRAY_SIZE(addresses_B_1),
7615 .ips = addresses_B_1,
7616 .apply_expected = False
7620 * sgroup,active vs. unique,tombstone with same ip(s), unchecked
7623 .line = __location__,
7624 .name = _NBT_NAME("_SA_UT_SI_U", 0x1C, NULL),
7626 .nb_flags = NBT_NM_GROUP,
7628 .num_ips = ctx->addresses_best_num,
7629 .ips = ctx->addresses_best,
7630 .apply_expected = True
7636 .type = WREPL_TYPE_UNIQUE,
7637 .state = WREPL_STATE_TOMBSTONE,
7638 .node = WREPL_NODE_B,
7640 .num_ips = ctx->addresses_best_num,
7641 .ips = ctx->addresses_best,
7642 .apply_expected = False
7646 * sgroup,active vs. unique,tombstone with different ip(s), unchecked
7649 .line = __location__,
7650 .name = _NBT_NAME("_SA_UT_DI_U", 0x1C, NULL),
7652 .nb_flags = NBT_NM_GROUP,
7654 .num_ips = ctx->addresses_best_num,
7655 .ips = ctx->addresses_best,
7656 .apply_expected = True
7662 .type = WREPL_TYPE_UNIQUE,
7663 .state = WREPL_STATE_TOMBSTONE,
7664 .node = WREPL_NODE_B,
7666 .num_ips = ARRAY_SIZE(addresses_B_1),
7667 .ips = addresses_B_1,
7668 .apply_expected = False
7672 * special group vs. normal group section
7675 * sgroup,active vs. group,active with same ip(s), unchecked
7678 .line = __location__,
7679 .name = _NBT_NAME("_SA_GA_SI_U", 0x1C, NULL),
7681 .nb_flags = NBT_NM_GROUP,
7683 .num_ips = ctx->addresses_best_num,
7684 .ips = ctx->addresses_best,
7685 .apply_expected = True
7691 .type = WREPL_TYPE_GROUP,
7692 .state = WREPL_STATE_ACTIVE,
7693 .node = WREPL_NODE_B,
7695 .num_ips = ctx->addresses_best_num,
7696 .ips = ctx->addresses_best,
7697 .apply_expected = False
7701 * sgroup,active vs. group,active with different ip(s), unchecked
7704 .line = __location__,
7705 .name = _NBT_NAME("_SA_GA_DI_U", 0x1C, NULL),
7707 .nb_flags = NBT_NM_GROUP,
7709 .num_ips = ctx->addresses_best_num,
7710 .ips = ctx->addresses_best,
7711 .apply_expected = True
7717 .type = WREPL_TYPE_GROUP,
7718 .state = WREPL_STATE_ACTIVE,
7719 .node = WREPL_NODE_B,
7721 .num_ips = ARRAY_SIZE(addresses_B_1),
7722 .ips = addresses_B_1,
7723 .apply_expected = False
7727 * sgroup,active vs. group,tombstone with same ip(s), unchecked
7730 .line = __location__,
7731 .name = _NBT_NAME("_SA_GT_SI_U", 0x1C, NULL),
7733 .nb_flags = NBT_NM_GROUP,
7735 .num_ips = ctx->addresses_best_num,
7736 .ips = ctx->addresses_best,
7737 .apply_expected = True
7743 .type = WREPL_TYPE_GROUP,
7744 .state = WREPL_STATE_TOMBSTONE,
7745 .node = WREPL_NODE_B,
7747 .num_ips = ctx->addresses_best_num,
7748 .ips = ctx->addresses_best,
7749 .apply_expected = False
7753 * sgroup,active vs. group,tombstone with different ip(s), unchecked
7756 .line = __location__,
7757 .name = _NBT_NAME("_SA_GT_DI_U", 0x1C, NULL),
7759 .nb_flags = NBT_NM_GROUP,
7761 .num_ips = ctx->addresses_best_num,
7762 .ips = ctx->addresses_best,
7763 .apply_expected = True
7769 .type = WREPL_TYPE_GROUP,
7770 .state = WREPL_STATE_TOMBSTONE,
7771 .node = WREPL_NODE_B,
7773 .num_ips = ARRAY_SIZE(addresses_B_1),
7774 .ips = addresses_B_1,
7775 .apply_expected = False
7779 * special group vs. multi homed section
7782 * sgroup,active vs. mhomed,active with same ip(s), unchecked
7785 .line = __location__,
7786 .name = _NBT_NAME("_SA_MA_SI_U", 0x1C, NULL),
7788 .nb_flags = NBT_NM_GROUP,
7790 .num_ips = ctx->addresses_best_num,
7791 .ips = ctx->addresses_best,
7792 .apply_expected = True
7798 .type = WREPL_TYPE_MHOMED,
7799 .state = WREPL_STATE_ACTIVE,
7800 .node = WREPL_NODE_B,
7802 .num_ips = ctx->addresses_best_num,
7803 .ips = ctx->addresses_best,
7804 .apply_expected = False
7808 * sgroup,active vs. mhomed,active with different ip(s), unchecked
7811 .line = __location__,
7812 .name = _NBT_NAME("_SA_MA_DI_U", 0x1C, NULL),
7814 .nb_flags = NBT_NM_GROUP,
7816 .num_ips = ctx->addresses_best_num,
7817 .ips = ctx->addresses_best,
7818 .apply_expected = True
7824 .type = WREPL_TYPE_MHOMED,
7825 .state = WREPL_STATE_ACTIVE,
7826 .node = WREPL_NODE_B,
7828 .num_ips = ARRAY_SIZE(addresses_B_1),
7829 .ips = addresses_B_1,
7830 .apply_expected = False
7834 * sgroup,active vs. mhomed,tombstone with same ip(s), unchecked
7837 .line = __location__,
7838 .name = _NBT_NAME("_SA_MT_SI_U", 0x1C, NULL),
7840 .nb_flags = NBT_NM_GROUP,
7842 .num_ips = ctx->addresses_best_num,
7843 .ips = ctx->addresses_best,
7844 .apply_expected = True
7850 .type = WREPL_TYPE_MHOMED,
7851 .state = WREPL_STATE_TOMBSTONE,
7852 .node = WREPL_NODE_B,
7854 .num_ips = ctx->addresses_best_num,
7855 .ips = ctx->addresses_best,
7856 .apply_expected = False
7860 * sgroup,active vs. mhomed,tombstone with different ip(s), unchecked
7863 .line = __location__,
7864 .name = _NBT_NAME("_SA_MT_DI_U", 0x1C, NULL),
7866 .nb_flags = NBT_NM_GROUP,
7868 .num_ips = ctx->addresses_best_num,
7869 .ips = ctx->addresses_best,
7870 .apply_expected = True
7876 .type = WREPL_TYPE_MHOMED,
7877 .state = WREPL_STATE_TOMBSTONE,
7878 .node = WREPL_NODE_B,
7880 .num_ips = ARRAY_SIZE(addresses_B_1),
7881 .ips = addresses_B_1,
7882 .apply_expected = False
7886 * multi homed vs. unique section
7889 * mhomed,active vs. unique,active with same ip(s), unchecked
7892 .line = __location__,
7893 .name = _NBT_NAME("_MA_UA_SI_U", 0x00, NULL),
7897 .num_ips = ctx->addresses_best_num,
7898 .ips = ctx->addresses_best,
7899 .apply_expected = True
7905 .type = WREPL_TYPE_UNIQUE,
7906 .state = WREPL_STATE_ACTIVE,
7907 .node = WREPL_NODE_B,
7909 .num_ips = ctx->addresses_best_num,
7910 .ips = ctx->addresses_best,
7911 .apply_expected = True
7915 * mhomed,active vs. unique,active with different ip(s), positive response
7918 .line = __location__,
7919 .name = _NBT_NAME("_MA_UA_DI_P", 0x00, NULL),
7923 .num_ips = ctx->addresses_best_num,
7924 .ips = ctx->addresses_best,
7925 .apply_expected = True
7932 .type = WREPL_TYPE_UNIQUE,
7933 .state = WREPL_STATE_ACTIVE,
7934 .node = WREPL_NODE_B,
7936 .num_ips = ARRAY_SIZE(addresses_B_1),
7937 .ips = addresses_B_1,
7938 .apply_expected = False
7942 * mhomed,active vs. unique,active with different ip(s), positive response other ips
7945 .line = __location__,
7946 .name = _NBT_NAME("_MA_UA_DI_O", 0x00, NULL),
7950 .num_ips = ctx->addresses_best_num,
7951 .ips = ctx->addresses_best,
7952 .apply_expected = True
7957 .num_ips = ARRAY_SIZE(addresses_A_3_4),
7958 .ips = addresses_A_3_4,
7961 .type = WREPL_TYPE_UNIQUE,
7962 .state = WREPL_STATE_ACTIVE,
7963 .node = WREPL_NODE_B,
7965 .num_ips = ARRAY_SIZE(addresses_B_1),
7966 .ips = addresses_B_1,
7967 .apply_expected = False
7971 * mhomed,active vs. unique,active with different ip(s), negative response
7974 .line = __location__,
7975 .name = _NBT_NAME("_MA_UA_DI_N", 0x00, NULL),
7979 .num_ips = ctx->addresses_best_num,
7980 .ips = ctx->addresses_best,
7981 .apply_expected = True
7988 .type = WREPL_TYPE_UNIQUE,
7989 .state = WREPL_STATE_ACTIVE,
7990 .node = WREPL_NODE_B,
7992 .num_ips = ARRAY_SIZE(addresses_B_1),
7993 .ips = addresses_B_1,
7994 .apply_expected = True
7998 * mhomed,active vs. unique,tombstone with same ip(s), unchecked
8001 .line = __location__,
8002 .name = _NBT_NAME("_MA_UT_SI_U", 0x00, NULL),
8006 .num_ips = ctx->addresses_best_num,
8007 .ips = ctx->addresses_best,
8008 .apply_expected = True
8014 .type = WREPL_TYPE_UNIQUE,
8015 .state = WREPL_STATE_TOMBSTONE,
8016 .node = WREPL_NODE_B,
8018 .num_ips = ctx->addresses_best_num,
8019 .ips = ctx->addresses_best,
8020 .apply_expected = False
8024 * mhomed,active vs. unique,tombstone with different ip(s), unchecked
8027 .line = __location__,
8028 .name = _NBT_NAME("_MA_UT_DI_U", 0x00, NULL),
8032 .num_ips = ctx->addresses_best_num,
8033 .ips = ctx->addresses_best,
8034 .apply_expected = True
8040 .type = WREPL_TYPE_UNIQUE,
8041 .state = WREPL_STATE_TOMBSTONE,
8042 .node = WREPL_NODE_B,
8044 .num_ips = ARRAY_SIZE(addresses_B_1),
8045 .ips = addresses_B_1,
8046 .apply_expected = False
8050 * multi homed vs. normal group section
8053 * mhomed,active vs. group,active with same ip(s), release expected
8056 .line = __location__,
8057 .name = _NBT_NAME("_MA_GA_SI_R", 0x00, NULL),
8061 .num_ips = ctx->addresses_best_num,
8062 .ips = ctx->addresses_best,
8063 .apply_expected = True
8067 .expect_release = True,
8070 .type = WREPL_TYPE_GROUP,
8071 .state = WREPL_STATE_ACTIVE,
8072 .node = WREPL_NODE_B,
8074 .num_ips = ctx->addresses_best_num,
8075 .ips = ctx->addresses_best,
8076 .apply_expected = True
8080 * mhomed,active vs. group,active with different ip(s), release expected
8083 .line = __location__,
8084 .name = _NBT_NAME("_MA_GA_DI_R", 0x00, NULL),
8088 .num_ips = ctx->addresses_best_num,
8089 .ips = ctx->addresses_best,
8090 .apply_expected = True
8094 .expect_release = True,
8097 .type = WREPL_TYPE_GROUP,
8098 .state = WREPL_STATE_ACTIVE,
8099 .node = WREPL_NODE_B,
8101 .num_ips = ARRAY_SIZE(addresses_B_1),
8102 .ips = addresses_B_1,
8103 .apply_expected = True
8107 * mhomed,active vs. group,tombstone with same ip(s), unchecked
8110 .line = __location__,
8111 .name = _NBT_NAME("_MA_GT_SI_U", 0x00, NULL),
8115 .num_ips = ctx->addresses_best_num,
8116 .ips = ctx->addresses_best,
8117 .apply_expected = True
8123 .type = WREPL_TYPE_GROUP,
8124 .state = WREPL_STATE_TOMBSTONE,
8125 .node = WREPL_NODE_B,
8127 .num_ips = ctx->addresses_best_num,
8128 .ips = ctx->addresses_best,
8129 .apply_expected = False
8133 * mhomed,active vs. group,tombstone with different ip(s), unchecked
8136 .line = __location__,
8137 .name = _NBT_NAME("_MA_GT_DI_U", 0x00, NULL),
8141 .num_ips = ctx->addresses_best_num,
8142 .ips = ctx->addresses_best,
8143 .apply_expected = True
8149 .type = WREPL_TYPE_GROUP,
8150 .state = WREPL_STATE_TOMBSTONE,
8151 .node = WREPL_NODE_B,
8153 .num_ips = ARRAY_SIZE(addresses_B_1),
8154 .ips = addresses_B_1,
8155 .apply_expected = False
8159 * multi homed vs. special group section
8162 * mhomed,active vs. sgroup,active with same ip(s), release expected
8165 .line = __location__,
8166 .name = _NBT_NAME("_MA_SA_SI_R", 0x00, NULL),
8170 .num_ips = ctx->addresses_best_num,
8171 .ips = ctx->addresses_best,
8172 .apply_expected = True
8176 .expect_release = True,
8179 .type = WREPL_TYPE_SGROUP,
8180 .state = WREPL_STATE_ACTIVE,
8181 .node = WREPL_NODE_B,
8183 .num_ips = ctx->addresses_best_num,
8184 .ips = ctx->addresses_best,
8185 .apply_expected = True
8189 * mhomed,active vs. group,active with different ip(s), release expected
8192 .line = __location__,
8193 .name = _NBT_NAME("_MA_SA_DI_R", 0x00, NULL),
8197 .num_ips = ctx->addresses_best_num,
8198 .ips = ctx->addresses_best,
8199 .apply_expected = True
8203 .expect_release = True,
8206 .type = WREPL_TYPE_SGROUP,
8207 .state = WREPL_STATE_ACTIVE,
8208 .node = WREPL_NODE_B,
8210 .num_ips = ARRAY_SIZE(addresses_B_1),
8211 .ips = addresses_B_1,
8212 .apply_expected = True
8216 * mhomed,active vs. sgroup,tombstone with same ip(s), unchecked
8219 .line = __location__,
8220 .name = _NBT_NAME("_MA_ST_SI_U", 0x00, NULL),
8224 .num_ips = ctx->addresses_best_num,
8225 .ips = ctx->addresses_best,
8226 .apply_expected = True
8232 .type = WREPL_TYPE_SGROUP,
8233 .state = WREPL_STATE_TOMBSTONE,
8234 .node = WREPL_NODE_B,
8236 .num_ips = ctx->addresses_best_num,
8237 .ips = ctx->addresses_best,
8238 .apply_expected = False
8242 * mhomed,active vs. sgroup,tombstone with different ip(s), unchecked
8245 .line = __location__,
8246 .name = _NBT_NAME("_MA_ST_DI_U", 0x00, NULL),
8250 .num_ips = ctx->addresses_best_num,
8251 .ips = ctx->addresses_best,
8252 .apply_expected = True
8258 .type = WREPL_TYPE_SGROUP,
8259 .state = WREPL_STATE_TOMBSTONE,
8260 .node = WREPL_NODE_B,
8262 .num_ips = ARRAY_SIZE(addresses_B_1),
8263 .ips = addresses_B_1,
8264 .apply_expected = False
8268 * multi homed vs. multi homed section
8271 * mhomed,active vs. mhomed,active with same ip(s), unchecked
8274 .line = __location__,
8275 .name = _NBT_NAME("_MA_MA_SI_U", 0x00, NULL),
8279 .num_ips = ctx->addresses_best_num,
8280 .ips = ctx->addresses_best,
8281 .apply_expected = True
8287 .type = WREPL_TYPE_MHOMED,
8288 .state = WREPL_STATE_ACTIVE,
8289 .node = WREPL_NODE_B,
8291 .num_ips = ctx->addresses_best_num,
8292 .ips = ctx->addresses_best,
8293 .apply_expected = True
8297 * mhomed,active vs. mhomed,active with superset ip(s), unchecked
8300 .line = __location__,
8301 .name = _NBT_NAME("_MA_MA_SP_U", 0x00, NULL),
8305 .num_ips = ctx->addresses_best_num,
8306 .ips = ctx->addresses_best,
8307 .apply_expected = True
8313 .type = WREPL_TYPE_MHOMED,
8314 .state = WREPL_STATE_ACTIVE,
8315 .node = WREPL_NODE_B,
8317 .num_ips = ctx->addresses_all_num,
8318 .ips = ctx->addresses_all,
8319 .apply_expected = True
8323 * mhomed,active vs. mhomed,active with different ip(s), positive response
8326 .line = __location__,
8327 .name = _NBT_NAME("_MA_MA_DI_P", 0x00, NULL),
8331 .num_ips = ctx->addresses_best_num,
8332 .ips = ctx->addresses_best,
8333 .apply_expected = True
8340 .type = WREPL_TYPE_MHOMED,
8341 .state = WREPL_STATE_ACTIVE,
8342 .node = WREPL_NODE_B,
8344 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8345 .ips = addresses_B_3_4,
8346 .apply_expected = False
8350 * mhomed,active vs. mhomed,active with different ip(s), positive response other ips
8353 .line = __location__,
8354 .name = _NBT_NAME("_MA_MA_DI_O", 0x00, NULL),
8358 .num_ips = ctx->addresses_best_num,
8359 .ips = ctx->addresses_best,
8360 .apply_expected = True
8365 .num_ips = ARRAY_SIZE(addresses_A_3_4),
8366 .ips = addresses_A_3_4,
8369 .type = WREPL_TYPE_MHOMED,
8370 .state = WREPL_STATE_ACTIVE,
8371 .node = WREPL_NODE_B,
8373 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8374 .ips = addresses_B_3_4,
8375 .apply_expected = False
8379 * mhomed,active vs. mhomed,active with different ip(s), negative response
8382 .line = __location__,
8383 .name = _NBT_NAME("_MA_MA_DI_N", 0x00, NULL),
8387 .num_ips = ctx->addresses_best_num,
8388 .ips = ctx->addresses_best,
8389 .apply_expected = True
8396 .type = WREPL_TYPE_MHOMED,
8397 .state = WREPL_STATE_ACTIVE,
8398 .node = WREPL_NODE_B,
8400 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8401 .ips = addresses_B_3_4,
8402 .apply_expected = True
8406 * mhomed,active vs. mhomed,tombstone with same ip(s), unchecked
8409 .line = __location__,
8410 .name = _NBT_NAME("_MA_MT_SI_U", 0x00, NULL),
8414 .num_ips = ctx->addresses_best_num,
8415 .ips = ctx->addresses_best,
8416 .apply_expected = True
8422 .type = WREPL_TYPE_MHOMED,
8423 .state = WREPL_STATE_TOMBSTONE,
8424 .node = WREPL_NODE_B,
8426 .num_ips = ctx->addresses_best_num,
8427 .ips = ctx->addresses_best,
8428 .apply_expected = False
8432 * mhomed,active vs. mhomed,tombstone with different ip(s), unchecked
8435 .line = __location__,
8436 .name = _NBT_NAME("_MA_MT_DI_U", 0x00, NULL),
8440 .num_ips = ctx->addresses_best_num,
8441 .ips = ctx->addresses_best,
8442 .apply_expected = True
8448 .type = WREPL_TYPE_MHOMED,
8449 .state = WREPL_STATE_TOMBSTONE,
8450 .node = WREPL_NODE_B,
8452 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8453 .ips = addresses_B_3_4,
8454 .apply_expected = False
8458 * some more multi homed test, including merging
8461 * mhomed,active vs. mhomed,active with superset ip(s), unchecked
8464 .line = __location__,
8465 .section= "Test Replica vs. owned active: some more MHOMED combinations",
8466 .name = _NBT_NAME("_MA_MA_SP_U", 0x00, NULL),
8467 .comment= "C:MHOMED vs. B:ALL => B:ALL",
8468 .skip = (ctx->addresses_all_num < 3),
8472 .num_ips = ctx->addresses_mhomed_num,
8473 .ips = ctx->addresses_mhomed,
8474 .apply_expected = True
8480 .type = WREPL_TYPE_MHOMED,
8481 .state = WREPL_STATE_ACTIVE,
8482 .node = WREPL_NODE_B,
8484 .num_ips = ctx->addresses_all_num,
8485 .ips = ctx->addresses_all,
8486 .apply_expected = True
8490 * mhomed,active vs. mhomed,active with same ips, unchecked
8493 .line = __location__,
8494 .name = _NBT_NAME("_MA_MA_SM_U", 0x00, NULL),
8495 .comment= "C:MHOMED vs. B:MHOMED => B:MHOMED",
8496 .skip = (ctx->addresses_mhomed_num < 2),
8500 .num_ips = ctx->addresses_mhomed_num,
8501 .ips = ctx->addresses_mhomed,
8502 .apply_expected = True
8508 .type = WREPL_TYPE_MHOMED,
8509 .state = WREPL_STATE_ACTIVE,
8510 .node = WREPL_NODE_B,
8512 .num_ips = ctx->addresses_mhomed_num,
8513 .ips = ctx->addresses_mhomed,
8514 .apply_expected = True
8518 * mhomed,active vs. mhomed,active with subset ip(s), positive response
8521 .line = __location__,
8522 .name = _NBT_NAME("_MA_MA_SB_P", 0x00, NULL),
8523 .comment= "C:MHOMED vs. B:BEST (C:MHOMED) => B:MHOMED",
8524 .skip = (ctx->addresses_mhomed_num < 2),
8528 .num_ips = ctx->addresses_mhomed_num,
8529 .ips = ctx->addresses_mhomed,
8530 .apply_expected = True
8537 .type = WREPL_TYPE_MHOMED,
8538 .state = WREPL_STATE_ACTIVE,
8539 .node = WREPL_NODE_B,
8541 .num_ips = ctx->addresses_best_num,
8542 .ips = ctx->addresses_best,
8543 .mhomed_merge = True
8547 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with all addresses
8550 .line = __location__,
8551 .name = _NBT_NAME("_MA_MA_SB_A", 0x00, NULL),
8552 .comment= "C:MHOMED vs. B:BEST (C:ALL) => B:MHOMED",
8553 .skip = (ctx->addresses_all_num < 3),
8557 .num_ips = ctx->addresses_mhomed_num,
8558 .ips = ctx->addresses_mhomed,
8559 .apply_expected = True
8564 .num_ips = ctx->addresses_all_num,
8565 .ips = ctx->addresses_all,
8568 .type = WREPL_TYPE_MHOMED,
8569 .state = WREPL_STATE_ACTIVE,
8570 .node = WREPL_NODE_B,
8572 .num_ips = ctx->addresses_best_num,
8573 .ips = ctx->addresses_best,
8574 .mhomed_merge = True
8578 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with replicas addresses
8579 * TODO: check why the server sends a name release demand for one address?
8580 * the release demand has no effect to the database record...
8583 .line = __location__,
8584 .name = _NBT_NAME("_MA_MA_SB_PRA", 0x00, NULL),
8585 .comment= "C:MHOMED vs. B:BEST (C:BEST) => C:MHOMED",
8586 .skip = (ctx->addresses_all_num < 2),
8590 .num_ips = ctx->addresses_mhomed_num,
8591 .ips = ctx->addresses_mhomed,
8592 .apply_expected = True
8597 .num_ips = ctx->addresses_best_num,
8598 .ips = ctx->addresses_best,
8599 .late_release = True
8602 .type = WREPL_TYPE_MHOMED,
8603 .state = WREPL_STATE_ACTIVE,
8604 .node = WREPL_NODE_B,
8606 .num_ips = ctx->addresses_best_num,
8607 .ips = ctx->addresses_best,
8608 .apply_expected = False
8612 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with other addresses
8615 .line = __location__,
8616 .name = _NBT_NAME("_MA_MA_SB_O", 0x00, NULL),
8617 .comment= "C:MHOMED vs. B:BEST (B:B_3_4) =>C:MHOMED",
8618 .skip = (ctx->addresses_all_num < 2),
8622 .num_ips = ctx->addresses_mhomed_num,
8623 .ips = ctx->addresses_mhomed,
8624 .apply_expected = True
8629 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8630 .ips = addresses_B_3_4,
8633 .type = WREPL_TYPE_MHOMED,
8634 .state = WREPL_STATE_ACTIVE,
8635 .node = WREPL_NODE_B,
8637 .num_ips = ctx->addresses_best_num,
8638 .ips = ctx->addresses_best,
8639 .apply_expected = False
8643 * mhomed,active vs. mhomed,active with subset ip(s), negative response
8646 .line = __location__,
8647 .name = _NBT_NAME("_MA_MA_SB_N", 0x00, NULL),
8648 .comment= "C:MHOMED vs. B:BEST (NEGATIVE) => B:BEST",
8649 .skip = (ctx->addresses_mhomed_num < 2),
8653 .num_ips = ctx->addresses_mhomed_num,
8654 .ips = ctx->addresses_mhomed,
8655 .apply_expected = True
8662 .type = WREPL_TYPE_MHOMED,
8663 .state = WREPL_STATE_ACTIVE,
8664 .node = WREPL_NODE_B,
8666 .num_ips = ctx->addresses_best_num,
8667 .ips = ctx->addresses_best,
8668 .apply_expected = True
8672 * some more multi homed and unique test, including merging
8675 * mhomed,active vs. unique,active with subset ip(s), positive response
8678 .line = __location__,
8679 .section= "Test Replica vs. owned active: some more UNIQUE,MHOMED combinations",
8680 .name = _NBT_NAME("_MA_UA_SB_P", 0x00, NULL),
8681 .comment= "C:MHOMED vs. B:UNIQUE,BEST (C:MHOMED) => B:MHOMED",
8682 .skip = (ctx->addresses_all_num < 2),
8686 .num_ips = ctx->addresses_mhomed_num,
8687 .ips = ctx->addresses_mhomed,
8688 .apply_expected = True
8695 .type = WREPL_TYPE_UNIQUE,
8696 .state = WREPL_STATE_ACTIVE,
8697 .node = WREPL_NODE_B,
8699 .num_ips = ctx->addresses_best_num,
8700 .ips = ctx->addresses_best,
8701 .mhomed_merge = True
8705 * unique,active vs. unique,active with different ip(s), positive response, with replicas address
8706 * TODO: check why the server sends a name release demand for one address?
8707 * the release demand has no effect to the database record...
8710 .line = __location__,
8711 .name = _NBT_NAME("_UA_UA_DI_PRA", 0x00, NULL),
8712 .comment= "C:BEST vs. B:BEST2 (C:BEST2,LR:BEST2) => C:BEST",
8713 .skip = (ctx->addresses_all_num < 2),
8717 .num_ips = ctx->addresses_best_num,
8718 .ips = ctx->addresses_best,
8719 .apply_expected = True
8724 .num_ips = ctx->addresses_best2_num,
8725 .ips = ctx->addresses_best2,
8726 .late_release = True
8729 .type = WREPL_TYPE_UNIQUE,
8730 .state = WREPL_STATE_ACTIVE,
8731 .node = WREPL_NODE_B,
8733 .num_ips = ctx->addresses_best2_num,
8734 .ips = ctx->addresses_best2,
8735 .apply_expected = False,
8739 * unique,active vs. unique,active with different ip(s), positive response, with all addresses
8742 .line = __location__,
8743 .name = _NBT_NAME("_UA_UA_DI_A", 0x00, NULL),
8744 .comment= "C:BEST vs. B:BEST2 (C:ALL) => B:MHOMED",
8745 .skip = (ctx->addresses_all_num < 3),
8749 .num_ips = ctx->addresses_best_num,
8750 .ips = ctx->addresses_best,
8751 .apply_expected = True
8756 .num_ips = ctx->addresses_all_num,
8757 .ips = ctx->addresses_all,
8760 .type = WREPL_TYPE_UNIQUE,
8761 .state = WREPL_STATE_ACTIVE,
8762 .node = WREPL_NODE_B,
8764 .num_ips = ctx->addresses_best2_num,
8765 .ips = ctx->addresses_best2,
8766 .mhomed_merge = True,
8770 * unique,active vs. mhomed,active with different ip(s), positive response, with all addresses
8773 .line = __location__,
8774 .name = _NBT_NAME("_UA_MA_DI_A", 0x00, NULL),
8775 .comment= "C:BEST vs. B:BEST2 (C:ALL) => B:MHOMED",
8776 .skip = (ctx->addresses_all_num < 3),
8780 .num_ips = ctx->addresses_best_num,
8781 .ips = ctx->addresses_best,
8782 .apply_expected = True
8787 .num_ips = ctx->addresses_all_num,
8788 .ips = ctx->addresses_all,
8791 .type = WREPL_TYPE_MHOMED,
8792 .state = WREPL_STATE_ACTIVE,
8793 .node = WREPL_NODE_B,
8795 .num_ips = ctx->addresses_best2_num,
8796 .ips = ctx->addresses_best2,
8797 .mhomed_merge = True,
8801 * special group vs. special group merging section
8804 * sgroup,active vs. sgroup,active with different ip(s)
8807 .line = __location__,
8808 .section= "Test Replica vs. owned active: SGROUP vs. SGROUP tests",
8809 .name = _NBT_NAME("_SA_SA_DI_U", 0x1C, NULL),
8810 .skip = (ctx->addresses_all_num < 3),
8812 .nb_flags = NBT_NM_GROUP,
8814 .num_ips = ctx->addresses_mhomed_num,
8815 .ips = ctx->addresses_mhomed,
8816 .apply_expected = True
8822 .type = WREPL_TYPE_SGROUP,
8823 .state = WREPL_STATE_ACTIVE,
8824 .node = WREPL_NODE_B,
8826 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8827 .ips = addresses_B_3_4,
8828 .sgroup_merge = True
8832 * sgroup,active vs. sgroup,active with same ip(s)
8835 .line = __location__,
8836 .name = _NBT_NAME("_SA_SA_SI_U", 0x1C, NULL),
8837 .skip = (ctx->addresses_all_num < 3),
8839 .nb_flags = NBT_NM_GROUP,
8841 .num_ips = ctx->addresses_mhomed_num,
8842 .ips = ctx->addresses_mhomed,
8843 .apply_expected = True
8849 .type = WREPL_TYPE_SGROUP,
8850 .state = WREPL_STATE_ACTIVE,
8851 .node = WREPL_NODE_B,
8853 .num_ips = ctx->addresses_mhomed_num,
8854 .ips = ctx->addresses_mhomed,
8855 .sgroup_merge = True
8859 * sgroup,active vs. sgroup,active with superset ip(s)
8862 .line = __location__,
8863 .name = _NBT_NAME("_SA_SA_SP_U", 0x1C, NULL),
8864 .skip = (ctx->addresses_all_num < 3),
8866 .nb_flags = NBT_NM_GROUP,
8868 .num_ips = ctx->addresses_mhomed_num,
8869 .ips = ctx->addresses_mhomed,
8870 .apply_expected = True
8876 .type = WREPL_TYPE_SGROUP,
8877 .state = WREPL_STATE_ACTIVE,
8878 .node = WREPL_NODE_B,
8880 .num_ips = ctx->addresses_all_num,
8881 .ips = ctx->addresses_all,
8882 .sgroup_merge = True
8886 * sgroup,active vs. sgroup,active with subset ip(s)
8889 .line = __location__,
8890 .name = _NBT_NAME("_SA_SA_SB_U", 0x1C, NULL),
8891 .skip = (ctx->addresses_all_num < 3),
8893 .nb_flags = NBT_NM_GROUP,
8895 .num_ips = ctx->addresses_mhomed_num,
8896 .ips = ctx->addresses_mhomed,
8897 .apply_expected = True
8903 .type = WREPL_TYPE_SGROUP,
8904 .state = WREPL_STATE_ACTIVE,
8905 .node = WREPL_NODE_B,
8907 .num_ips = ctx->addresses_best_num,
8908 .ips = ctx->addresses_best,
8909 .sgroup_merge = True
8913 * sgroup,active vs. sgroup,tombstone with different ip(s)
8916 .line = __location__,
8917 .name = _NBT_NAME("_SA_ST_DI_U", 0x1C, NULL),
8918 .skip = (ctx->addresses_all_num < 3),
8920 .nb_flags = NBT_NM_GROUP,
8922 .num_ips = ctx->addresses_mhomed_num,
8923 .ips = ctx->addresses_mhomed,
8924 .apply_expected = True
8930 .type = WREPL_TYPE_SGROUP,
8931 .state = WREPL_STATE_TOMBSTONE,
8932 .node = WREPL_NODE_B,
8934 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8935 .ips = addresses_B_3_4,
8936 .apply_expected = False
8940 * sgroup,active vs. sgroup,tombstone with same ip(s)
8943 .line = __location__,
8944 .name = _NBT_NAME("_SA_ST_SI_U", 0x1C, NULL),
8945 .skip = (ctx->addresses_all_num < 3),
8947 .nb_flags = NBT_NM_GROUP,
8949 .num_ips = ctx->addresses_mhomed_num,
8950 .ips = ctx->addresses_mhomed,
8951 .apply_expected = True
8957 .type = WREPL_TYPE_SGROUP,
8958 .state = WREPL_STATE_TOMBSTONE,
8959 .node = WREPL_NODE_B,
8961 .num_ips = ctx->addresses_mhomed_num,
8962 .ips = ctx->addresses_mhomed,
8963 .apply_expected = False
8967 * sgroup,active vs. sgroup,tombstone with superset ip(s)
8970 .line = __location__,
8971 .name = _NBT_NAME("_SA_ST_SP_U", 0x1C, NULL),
8972 .skip = (ctx->addresses_all_num < 3),
8974 .nb_flags = NBT_NM_GROUP,
8976 .num_ips = ctx->addresses_mhomed_num,
8977 .ips = ctx->addresses_mhomed,
8978 .apply_expected = True
8984 .type = WREPL_TYPE_SGROUP,
8985 .state = WREPL_STATE_TOMBSTONE,
8986 .node = WREPL_NODE_B,
8988 .num_ips = ctx->addresses_all_num,
8989 .ips = ctx->addresses_all,
8990 .apply_expected = False
8994 * sgroup,active vs. sgroup,tombstone with subset ip(s)
8997 .line = __location__,
8998 .name = _NBT_NAME("_SA_ST_SB_U", 0x1C, NULL),
8999 .skip = (ctx->addresses_all_num < 3),
9001 .nb_flags = NBT_NM_GROUP,
9003 .num_ips = ctx->addresses_mhomed_num,
9004 .ips = ctx->addresses_mhomed,
9005 .apply_expected = True
9011 .type = WREPL_TYPE_SGROUP,
9012 .state = WREPL_STATE_TOMBSTONE,
9013 .node = WREPL_NODE_B,
9015 .num_ips = ctx->addresses_best_num,
9016 .ips = ctx->addresses_best,
9017 .apply_expected = False
9022 if (!ctx->nbtsock_srv) {
9023 printf("SKIP: Test Replica records vs. owned active records: not bound to port[%d]\n",
9028 printf("Test Replica records vs. owned active records\n");
9030 for(i=0; ret && i < ARRAY_SIZE(records); i++) {
9032 struct test_conflict_owned_active_vs_replica_struct record = records[i];
9033 uint32_t j, count = 1;
9036 if (records[i].wins.mhomed || records[i].name.type == 0x1C) {
9037 count = records[i].wins.num_ips;
9040 if (records[i].section) {
9041 printf("%s\n", records[i].section);
9044 if (records[i].skip) {
9045 printf("%s => SKIPPED\n", nbt_name_string(ctx, &records[i].name));
9049 if (records[i].replica.mhomed_merge) {
9050 action = "MHOMED_MERGE";
9051 } else if (records[i].replica.sgroup_merge) {
9052 action = "SGROUP_MERGE";
9053 } else if (records[i].replica.apply_expected) {
9056 action = "NOT REPLACE";
9059 printf("%s%s%s => %s\n",
9060 nbt_name_string(ctx, &records[i].name),
9061 (records[i].comment?": ":""),
9062 (records[i].comment?records[i].comment:""),
9065 /* Prepare for multi homed registration */
9066 ZERO_STRUCT(records[i].defend);
9067 records[i].defend.timeout = 10;
9068 records[i].defend.positive = True;
9069 nbt_set_incoming_handler(ctx->nbtsock_srv,
9070 test_conflict_owned_active_vs_replica_handler,
9072 if (ctx->nbtsock_srv2) {
9073 nbt_set_incoming_handler(ctx->nbtsock_srv2,
9074 test_conflict_owned_active_vs_replica_handler,
9081 for (j=0; j < count; j++) {
9082 struct nbt_name_request *req;
9084 name_register->in.name = records[i].name;
9085 name_register->in.dest_addr = ctx->address;
9086 name_register->in.address = records[i].wins.ips[j].ip;
9087 name_register->in.nb_flags = records[i].wins.nb_flags;
9088 name_register->in.register_demand= False;
9089 name_register->in.broadcast = False;
9090 name_register->in.multi_homed = records[i].wins.mhomed;
9091 name_register->in.ttl = 300000;
9092 name_register->in.timeout = 70;
9093 name_register->in.retries = 0;
9095 req = nbt_name_register_send(ctx->nbtsock, name_register);
9097 /* push the request on the wire */
9098 event_loop_once(ctx->nbtsock->event_ctx);
9101 * if we register multiple addresses,
9102 * the server will do name queries to see if the old addresses
9105 if (records[i].wins.mhomed && j > 0) {
9106 end = timeval_current_ofs(records[i].defend.timeout,0);
9107 records[i].defend.ret = True;
9108 while (records[i].defend.timeout > 0) {
9109 event_loop_once(ctx->nbtsock_srv->event_ctx);
9110 if (timeval_expired(&end)) break;
9112 ret &= records[i].defend.ret;
9115 status = nbt_name_register_recv(req, ctx, name_register);
9116 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
9117 printf("No response from %s for name register\n", ctx->address);
9120 if (!NT_STATUS_IS_OK(status)) {
9121 printf("Bad response from %s for name register - %s\n",
9122 ctx->address, nt_errstr(status));
9125 CHECK_VALUE(name_register->out.rcode, 0);
9126 CHECK_VALUE_STRING(name_register->out.reply_from, ctx->address);
9127 CHECK_VALUE(name_register->out.name.type, records[i].name.type);
9128 CHECK_VALUE_STRING(name_register->out.name.name, records[i].name.name);
9129 CHECK_VALUE_STRING(name_register->out.name.scope, records[i].name.scope);
9130 CHECK_VALUE_STRING(name_register->out.reply_addr, records[i].wins.ips[j].ip);
9133 /* Prepare for the current test */
9134 records[i].defend = record.defend;
9135 nbt_set_incoming_handler(ctx->nbtsock_srv,
9136 test_conflict_owned_active_vs_replica_handler,
9138 if (ctx->nbtsock_srv2) {
9139 nbt_set_incoming_handler(ctx->nbtsock_srv2,
9140 test_conflict_owned_active_vs_replica_handler,
9147 wins_name->name = &records[i].name;
9148 wins_name->flags = WREPL_NAME_FLAGS(records[i].replica.type,
9149 records[i].replica.state,
9150 records[i].replica.node,
9151 records[i].replica.is_static);
9152 wins_name->id = ++ctx->b.max_version;
9153 if (wins_name->flags & 2) {
9154 wins_name->addresses.addresses.num_ips = records[i].replica.num_ips;
9155 wins_name->addresses.addresses.ips = discard_const(records[i].replica.ips);
9157 wins_name->addresses.ip = records[i].replica.ips[0].ip;
9159 wins_name->unknown = "255.255.255.255";
9161 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9164 * wait for the name query, which is handled in
9165 * test_conflict_owned_active_vs_replica_handler()
9167 end = timeval_current_ofs(records[i].defend.timeout,0);
9168 records[i].defend.ret = True;
9169 while (records[i].defend.timeout > 0) {
9170 event_loop_once(ctx->nbtsock_srv->event_ctx);
9171 if (timeval_expired(&end)) break;
9173 ret &= records[i].defend.ret;
9175 if (records[i].defend.late_release) {
9176 records[i].defend = record.defend;
9177 records[i].defend.expect_release = True;
9179 * wait for the name release demand, which is handled in
9180 * test_conflict_owned_active_vs_replica_handler()
9182 end = timeval_current_ofs(records[i].defend.timeout,0);
9183 records[i].defend.ret = True;
9184 while (records[i].defend.timeout > 0) {
9185 event_loop_once(ctx->nbtsock_srv->event_ctx);
9186 if (timeval_expired(&end)) break;
9188 ret &= records[i].defend.ret;
9191 if (records[i].replica.mhomed_merge) {
9192 ret &= test_wrepl_mhomed_merged(ctx, &ctx->c,
9193 records[i].wins.num_ips, records[i].wins.ips,
9195 records[i].replica.num_ips, records[i].replica.ips,
9197 } else if (records[i].replica.sgroup_merge) {
9198 ret &= test_wrepl_sgroup_merged(ctx, NULL,
9200 records[i].wins.num_ips, records[i].wins.ips,
9202 records[i].replica.num_ips, records[i].replica.ips,
9205 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name,
9206 records[i].replica.apply_expected);
9209 if (records[i].replica.apply_expected ||
9210 records[i].replica.mhomed_merge) {
9211 wins_name->name = &records[i].name;
9212 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE,
9213 WREPL_STATE_TOMBSTONE,
9214 WREPL_NODE_B, False);
9215 wins_name->id = ++ctx->b.max_version;
9216 wins_name->addresses.ip = addresses_B_1[0].ip;
9217 wins_name->unknown = "255.255.255.255";
9219 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9220 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name, True);
9222 for (j=0; j < count; j++) {
9223 struct nbt_name_socket *nbtsock = ctx->nbtsock;
9225 if (ctx->myaddr2 && strcmp(records[i].wins.ips[j].ip, ctx->myaddr2) == 0) {
9226 nbtsock = ctx->nbtsock2;
9229 release->in.name = records[i].name;
9230 release->in.dest_addr = ctx->address;
9231 release->in.address = records[i].wins.ips[j].ip;
9232 release->in.nb_flags = records[i].wins.nb_flags;
9233 release->in.broadcast = False;
9234 release->in.timeout = 30;
9235 release->in.retries = 0;
9237 status = nbt_name_release(nbtsock, ctx, release);
9238 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
9239 printf("No response from %s for name release\n", ctx->address);
9242 if (!NT_STATUS_IS_OK(status)) {
9243 printf("Bad response from %s for name query - %s\n",
9244 ctx->address, nt_errstr(status));
9247 CHECK_VALUE(release->out.rcode, 0);
9250 if (records[i].replica.sgroup_merge) {
9251 /* clean up the SGROUP record */
9252 wins_name->name = &records[i].name;
9253 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
9255 WREPL_NODE_B, False);
9256 wins_name->id = ++ctx->b.max_version;
9257 wins_name->addresses.addresses.num_ips = 0;
9258 wins_name->addresses.addresses.ips = NULL;
9259 wins_name->unknown = "255.255.255.255";
9260 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9262 /* take ownership of the SGROUP record */
9263 wins_name->name = &records[i].name;
9264 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
9266 WREPL_NODE_B, False);
9267 wins_name->id = ++ctx->b.max_version;
9268 wins_name->addresses.addresses.num_ips = ARRAY_SIZE(addresses_B_1);
9269 wins_name->addresses.addresses.ips = discard_const(addresses_B_1);
9270 wins_name->unknown = "255.255.255.255";
9271 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9272 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name, True);
9274 /* overwrite the SGROUP record with unique,tombstone */
9275 wins_name->name = &records[i].name;
9276 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE,
9277 WREPL_STATE_TOMBSTONE,
9278 WREPL_NODE_B, False);
9279 wins_name->id = ++ctx->b.max_version;
9280 wins_name->addresses.ip = addresses_A_1[0].ip;
9281 wins_name->unknown = "255.255.255.255";
9282 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9283 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name, True);
9289 printf("conflict handled wrong or record[%u]: %s\n", i, records[i].line);
9297 #define _NBT_ASSERT(v, correct) do { \
9298 if ((v) != (correct)) { \
9299 printf("(%s) Incorrect value %s=%d - should be %s (%d)\n", \
9300 __location__, #v, v, #correct, correct); \
9305 #define _NBT_ASSERT_STRING(v, correct) do { \
9306 if ( ((!v) && (correct)) || \
9307 ((v) && (!correct)) || \
9308 ((v) && (correct) && strcmp(v,correct) != 0)) { \
9309 printf("(%s) Incorrect value %s=%s - should be %s\n", \
9310 __location__, #v, v, correct); \
9315 static void test_conflict_owned_active_vs_replica_handler_query(struct nbt_name_socket *nbtsock,
9316 struct nbt_name_packet *req_packet,
9317 const struct nbt_peer_socket *src)
9319 struct nbt_name *name;
9320 struct nbt_name_packet *rep_packet;
9321 struct test_conflict_owned_active_vs_replica_struct *rec = nbtsock->incoming.private;
9323 _NBT_ASSERT(req_packet->qdcount, 1);
9324 _NBT_ASSERT(req_packet->questions[0].question_type, NBT_QTYPE_NETBIOS);
9325 _NBT_ASSERT(req_packet->questions[0].question_class, NBT_QCLASS_IP);
9327 name = &req_packet->questions[0].name;
9329 _NBT_ASSERT(name->type, rec->name.type);
9330 _NBT_ASSERT_STRING(name->name, rec->name.name);
9331 _NBT_ASSERT_STRING(name->scope, rec->name.scope);
9333 _NBT_ASSERT(rec->defend.expect_release, False);
9335 rep_packet = talloc_zero(nbtsock, struct nbt_name_packet);
9336 if (rep_packet == NULL) return;
9338 rep_packet->name_trn_id = req_packet->name_trn_id;
9339 rep_packet->ancount = 1;
9341 rep_packet->answers = talloc_array(rep_packet, struct nbt_res_rec, 1);
9342 if (rep_packet->answers == NULL) return;
9344 rep_packet->answers[0].name = *name;
9345 rep_packet->answers[0].rr_class = NBT_QCLASS_IP;
9346 rep_packet->answers[0].ttl = 0;
9348 if (rec->defend.positive) {
9349 uint32_t i, num_ips;
9350 const struct wrepl_ip *ips;
9352 if (rec->defend.num_ips > 0) {
9353 num_ips = rec->defend.num_ips;
9354 ips = rec->defend.ips;
9356 num_ips = rec->wins.num_ips;
9357 ips = rec->wins.ips;
9360 /* send a positive reply */
9361 rep_packet->operation =
9364 NBT_FLAG_AUTHORITIVE |
9365 NBT_FLAG_RECURSION_DESIRED |
9366 NBT_FLAG_RECURSION_AVAIL;
9368 rep_packet->answers[0].rr_type = NBT_QTYPE_NETBIOS;
9370 rep_packet->answers[0].rdata.netbios.length = num_ips*6;
9371 rep_packet->answers[0].rdata.netbios.addresses =
9372 talloc_array(rep_packet->answers, struct nbt_rdata_address, num_ips);
9373 if (rep_packet->answers[0].rdata.netbios.addresses == NULL) return;
9375 for (i=0; i < num_ips; i++) {
9376 struct nbt_rdata_address *addr =
9377 &rep_packet->answers[0].rdata.netbios.addresses[i];
9378 addr->nb_flags = rec->wins.nb_flags;
9379 addr->ipaddr = ips[i].ip;
9381 DEBUG(2,("Sending positive name query reply for %s to %s:%d\n",
9382 nbt_name_string(rep_packet, name), src->addr, src->port));
9384 /* send a negative reply */
9385 rep_packet->operation =
9388 NBT_FLAG_AUTHORITIVE |
9391 rep_packet->answers[0].rr_type = NBT_QTYPE_NULL;
9393 ZERO_STRUCT(rep_packet->answers[0].rdata);
9395 DEBUG(2,("Sending negative name query reply for %s to %s:%d\n",
9396 nbt_name_string(rep_packet, name), src->addr, src->port));
9399 nbt_name_reply_send(nbtsock, src, rep_packet);
9400 talloc_free(rep_packet);
9402 /* make sure we push the reply to the wire */
9403 event_loop_once(nbtsock->event_ctx);
9406 rec->defend.timeout = 0;
9407 rec->defend.ret = True;
9410 static void test_conflict_owned_active_vs_replica_handler_release(struct nbt_name_socket *nbtsock,
9411 struct nbt_name_packet *req_packet,
9412 const struct nbt_peer_socket *src)
9414 struct nbt_name *name;
9415 struct nbt_name_packet *rep_packet;
9416 struct test_conflict_owned_active_vs_replica_struct *rec = nbtsock->incoming.private;
9418 _NBT_ASSERT(req_packet->qdcount, 1);
9419 _NBT_ASSERT(req_packet->questions[0].question_type, NBT_QTYPE_NETBIOS);
9420 _NBT_ASSERT(req_packet->questions[0].question_class, NBT_QCLASS_IP);
9422 name = &req_packet->questions[0].name;
9424 _NBT_ASSERT(name->type, rec->name.type);
9425 _NBT_ASSERT_STRING(name->name, rec->name.name);
9426 _NBT_ASSERT_STRING(name->scope, rec->name.scope);
9428 _NBT_ASSERT(rec->defend.expect_release, True);
9430 rep_packet = talloc_zero(nbtsock, struct nbt_name_packet);
9431 if (rep_packet == NULL) return;
9433 rep_packet->name_trn_id = req_packet->name_trn_id;
9434 rep_packet->ancount = 1;
9435 rep_packet->operation =
9437 NBT_OPCODE_RELEASE |
9438 NBT_FLAG_AUTHORITIVE;
9440 rep_packet->answers = talloc_array(rep_packet, struct nbt_res_rec, 1);
9441 if (rep_packet->answers == NULL) return;
9443 rep_packet->answers[0].name = *name;
9444 rep_packet->answers[0].rr_type = NBT_QTYPE_NETBIOS;
9445 rep_packet->answers[0].rr_class = NBT_QCLASS_IP;
9446 rep_packet->answers[0].ttl = req_packet->additional[0].ttl;
9447 rep_packet->answers[0].rdata = req_packet->additional[0].rdata;
9449 DEBUG(2,("Sending name release reply for %s to %s:%d\n",
9450 nbt_name_string(rep_packet, name), src->addr, src->port));
9452 nbt_name_reply_send(nbtsock, src, rep_packet);
9453 talloc_free(rep_packet);
9455 /* make sure we push the reply to the wire */
9456 event_loop_once(nbtsock->event_ctx);
9459 rec->defend.timeout = 0;
9460 rec->defend.ret = True;
9463 static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket *nbtsock,
9464 struct nbt_name_packet *req_packet,
9465 const struct nbt_peer_socket *src)
9467 struct test_conflict_owned_active_vs_replica_struct *rec = nbtsock->incoming.private;
9469 rec->defend.ret = False;
9471 switch (req_packet->operation & NBT_OPCODE) {
9472 case NBT_OPCODE_QUERY:
9473 test_conflict_owned_active_vs_replica_handler_query(nbtsock, req_packet, src);
9475 case NBT_OPCODE_RELEASE:
9476 test_conflict_owned_active_vs_replica_handler_release(nbtsock, req_packet, src);
9479 printf("%s: unexpected incoming packet\n", __location__);
9485 test WINS replication operations
9487 BOOL torture_nbt_winsreplication(void)
9489 const char *address;
9490 struct nbt_name name;
9491 TALLOC_CTX *mem_ctx = talloc_new(NULL);
9494 struct test_wrepl_conflict_conn *ctx;
9496 make_nbt_name_server(&name, lp_parm_string(-1, "torture", "host"));
9498 /* do an initial name resolution to find its IP */
9499 status = resolve_name(&name, mem_ctx, &address, NULL);
9500 if (!NT_STATUS_IS_OK(status)) {
9501 printf("Failed to resolve %s - %s\n",
9502 name.name, nt_errstr(status));
9503 talloc_free(mem_ctx);
9507 ret &= test_assoc_ctx1(mem_ctx, address);
9508 ret &= test_assoc_ctx2(mem_ctx, address);
9510 ret &= test_wins_replication(mem_ctx, address);
9512 ctx = test_create_conflict_ctx(mem_ctx, address);
9513 if (!ctx) return False;
9515 ret &= test_conflict_same_owner(ctx);
9516 ret &= test_conflict_different_owner(ctx);
9517 ret &= test_conflict_owned_released_vs_replica(ctx);
9518 ret &= test_conflict_owned_active_vs_replica(ctx);
9520 talloc_free(mem_ctx);