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 *rep_packet;
107 struct wrepl_associate_stop assoc_stop;
110 if (!lp_parm_bool(-1, "torture", "dangerous", False)) {
111 printf("winsrepl: cross connection assoc_ctx usage disabled - enable dangerous tests to use\n");
115 printf("Test if assoc_ctx is only valid on the conection it was created on\n");
117 wrepl_socket1 = wrepl_socket_init(mem_ctx, NULL);
118 wrepl_socket2 = wrepl_socket_init(mem_ctx, NULL);
120 printf("Setup 2 wrepl connections\n");
121 status = wrepl_connect(wrepl_socket1, NULL, address);
122 CHECK_STATUS(status, NT_STATUS_OK);
124 status = wrepl_connect(wrepl_socket2, NULL, address);
125 CHECK_STATUS(status, NT_STATUS_OK);
127 printf("Send a start association request (conn1)\n");
128 status = wrepl_associate(wrepl_socket1, &associate1);
129 CHECK_STATUS(status, NT_STATUS_OK);
131 printf("association context (conn1): 0x%x\n", associate1.out.assoc_ctx);
133 printf("Send a start association request (conn2)\n");
134 status = wrepl_associate(wrepl_socket2, &associate2);
135 CHECK_STATUS(status, NT_STATUS_OK);
137 printf("association context (conn2): 0x%x\n", associate2.out.assoc_ctx);
139 printf("Send a replication table query, with assoc 1 (conn2), the anwser should be on conn1\n");
140 pull_table.in.assoc_ctx = associate1.out.assoc_ctx;
141 req = wrepl_pull_table_send(wrepl_socket2, &pull_table);
142 req->send_only = True;
143 status = wrepl_request_recv(req, mem_ctx, &rep_packet);
144 CHECK_STATUS(status, NT_STATUS_OK);
146 printf("Send a association request (conn2), to make sure the last request was ignored\n");
147 status = wrepl_associate(wrepl_socket2, &associate2);
148 CHECK_STATUS(status, NT_STATUS_OK);
150 printf("Send a replication table query, with invalid assoc (conn1), receive answer from conn2\n");
151 pull_table.in.assoc_ctx = 0;
152 req = wrepl_pull_table_send(wrepl_socket1, &pull_table);
153 status = wrepl_request_recv(req, mem_ctx, &rep_packet);
154 CHECK_STATUS(status, NT_STATUS_OK);
156 printf("Send a association request (conn1), to make sure the last request was handled correct\n");
157 status = wrepl_associate(wrepl_socket1, &associate2);
158 CHECK_STATUS(status, NT_STATUS_OK);
160 assoc_stop.in.assoc_ctx = associate1.out.assoc_ctx;
161 assoc_stop.in.reason = 4;
162 printf("Send a association stop request (conn1), reson: %u\n", assoc_stop.in.reason);
163 status = wrepl_associate_stop(wrepl_socket1, &assoc_stop);
164 CHECK_STATUS(status, NT_STATUS_END_OF_FILE);
166 assoc_stop.in.assoc_ctx = associate2.out.assoc_ctx;
167 assoc_stop.in.reason = 0;
168 printf("Send a association stop request (conn2), reson: %u\n", assoc_stop.in.reason);
169 status = wrepl_associate_stop(wrepl_socket2, &assoc_stop);
170 CHECK_STATUS(status, NT_STATUS_OK);
173 printf("Close 2 wrepl connections\n");
174 talloc_free(wrepl_socket1);
175 talloc_free(wrepl_socket2);
180 test if we always get back the same assoc_ctx
182 static BOOL test_assoc_ctx2(TALLOC_CTX *mem_ctx, const char *address)
185 struct wrepl_socket *wrepl_socket;
186 struct wrepl_associate associate;
190 printf("Test if we always get back the same assoc_ctx\n");
192 wrepl_socket = wrepl_socket_init(mem_ctx, NULL);
194 printf("Setup wrepl connections\n");
195 status = wrepl_connect(wrepl_socket, NULL, address);
196 CHECK_STATUS(status, NT_STATUS_OK);
199 printf("Send 1st start association request\n");
200 status = wrepl_associate(wrepl_socket, &associate);
201 CHECK_STATUS(status, NT_STATUS_OK);
202 assoc_ctx1 = associate.out.assoc_ctx;
203 printf("1st association context: 0x%x\n", associate.out.assoc_ctx);
205 printf("Send 2nd start association request\n");
206 status = wrepl_associate(wrepl_socket, &associate);
207 CHECK_VALUE(associate.out.assoc_ctx, assoc_ctx1);
208 CHECK_STATUS(status, NT_STATUS_OK);
209 printf("2nd association context: 0x%x\n", associate.out.assoc_ctx);
211 printf("Send 3rd start association request\n");
212 status = wrepl_associate(wrepl_socket, &associate);
213 CHECK_VALUE(associate.out.assoc_ctx, assoc_ctx1);
214 CHECK_STATUS(status, NT_STATUS_OK);
215 printf("3rd association context: 0x%x\n", associate.out.assoc_ctx);
218 printf("Close wrepl connections\n");
219 talloc_free(wrepl_socket);
225 display a replication entry
227 static void display_entry(TALLOC_CTX *mem_ctx, struct wrepl_name *name)
231 printf("%s\n", nbt_name_string(mem_ctx, &name->name));
232 printf("\tTYPE:%u STATE:%u NODE:%u STATIC:%u VERSION_ID: %llu\n",
233 name->type, name->state, name->node, name->is_static, (long long)name->version_id);
234 printf("\tRAW_FLAGS: 0x%08X OWNER: %-15s\n",
235 name->raw_flags, name->owner);
236 for (i=0;i<name->num_addresses;i++) {
237 printf("\tADDR: %-15s OWNER: %-15s\n",
238 name->addresses[i].address, name->addresses[i].owner);
243 test a full replication dump from a WINS server
245 static BOOL test_wins_replication(TALLOC_CTX *mem_ctx, const char *address)
248 struct wrepl_socket *wrepl_socket;
251 struct wrepl_associate associate;
252 struct wrepl_pull_table pull_table;
253 struct wrepl_pull_names pull_names;
255 printf("Test one pull replication cycle\n");
257 wrepl_socket = wrepl_socket_init(mem_ctx, NULL);
259 printf("Setup wrepl connections\n");
260 status = wrepl_connect(wrepl_socket, NULL, address);
261 CHECK_STATUS(status, NT_STATUS_OK);
263 printf("Send a start association request\n");
265 status = wrepl_associate(wrepl_socket, &associate);
266 CHECK_STATUS(status, NT_STATUS_OK);
268 printf("association context: 0x%x\n", associate.out.assoc_ctx);
270 printf("Send a replication table query\n");
271 pull_table.in.assoc_ctx = associate.out.assoc_ctx;
273 status = wrepl_pull_table(wrepl_socket, mem_ctx, &pull_table);
274 if (NT_STATUS_EQUAL(NT_STATUS_NETWORK_ACCESS_DENIED,status)) {
275 struct wrepl_packet packet;
276 struct wrepl_request *req;
279 packet.opcode = WREPL_OPCODE_BITS;
280 packet.assoc_ctx = associate.out.assoc_ctx;
281 packet.mess_type = WREPL_STOP_ASSOCIATION;
282 packet.message.stop.reason = 0;
284 req = wrepl_request_send(wrepl_socket, &packet);
287 printf("failed - We are not a valid pull partner for the server\n");
291 CHECK_STATUS(status, NT_STATUS_OK);
293 printf("Found %d replication partners\n", pull_table.out.num_partners);
295 for (i=0;i<pull_table.out.num_partners;i++) {
296 struct wrepl_wins_owner *partner = &pull_table.out.partners[i];
297 printf("%s max_version=%6llu min_version=%6llu type=%d\n",
299 (long long)partner->max_version,
300 (long long)partner->min_version,
303 pull_names.in.assoc_ctx = associate.out.assoc_ctx;
304 pull_names.in.partner = *partner;
306 status = wrepl_pull_names(wrepl_socket, mem_ctx, &pull_names);
307 CHECK_STATUS(status, NT_STATUS_OK);
309 printf("Received %d names\n", pull_names.out.num_names);
311 for (j=0;j<pull_names.out.num_names;j++) {
312 display_entry(mem_ctx, &pull_names.out.names[j]);
317 printf("Close wrepl connections\n");
318 talloc_free(wrepl_socket);
322 struct test_wrepl_conflict_conn {
324 struct wrepl_socket *pull;
327 #define TEST_OWNER_A_ADDRESS "127.65.65.1"
328 #define TEST_ADDRESS_A_PREFIX "127.0.65"
329 #define TEST_OWNER_B_ADDRESS "127.66.66.1"
330 #define TEST_ADDRESS_B_PREFIX "127.0.66"
331 #define TEST_OWNER_X_ADDRESS "127.88.88.1"
332 #define TEST_ADDRESS_X_PREFIX "127.0.88"
334 struct wrepl_wins_owner a, b, c, x;
338 struct nbt_name_socket *nbtsock;
339 struct nbt_name_socket *nbtsock2;
341 struct nbt_name_socket *nbtsock_srv;
342 struct nbt_name_socket *nbtsock_srv2;
344 uint32_t addresses_best_num;
345 struct wrepl_ip *addresses_best;
347 uint32_t addresses_best2_num;
348 struct wrepl_ip *addresses_best2;
350 uint32_t addresses_all_num;
351 struct wrepl_ip *addresses_all;
353 uint32_t addresses_mhomed_num;
354 struct wrepl_ip *addresses_mhomed;
357 static const struct wrepl_ip addresses_A_1[] = {
359 .owner = TEST_OWNER_A_ADDRESS,
360 .ip = TEST_ADDRESS_A_PREFIX".1"
363 static const struct wrepl_ip addresses_A_2[] = {
365 .owner = TEST_OWNER_A_ADDRESS,
366 .ip = TEST_ADDRESS_A_PREFIX".2"
369 static const struct wrepl_ip addresses_A_3_4[] = {
371 .owner = TEST_OWNER_A_ADDRESS,
372 .ip = TEST_ADDRESS_A_PREFIX".3"
375 .owner = TEST_OWNER_A_ADDRESS,
376 .ip = TEST_ADDRESS_A_PREFIX".4"
379 static const struct wrepl_ip addresses_A_3_4_X_3_4[] = {
381 .owner = TEST_OWNER_A_ADDRESS,
382 .ip = TEST_ADDRESS_A_PREFIX".3"
385 .owner = TEST_OWNER_A_ADDRESS,
386 .ip = TEST_ADDRESS_A_PREFIX".4"
389 .owner = TEST_OWNER_X_ADDRESS,
390 .ip = TEST_ADDRESS_X_PREFIX".3"
393 .owner = TEST_OWNER_X_ADDRESS,
394 .ip = TEST_ADDRESS_X_PREFIX".4"
397 static const struct wrepl_ip addresses_A_3_4_B_3_4[] = {
399 .owner = TEST_OWNER_A_ADDRESS,
400 .ip = TEST_ADDRESS_A_PREFIX".3"
403 .owner = TEST_OWNER_A_ADDRESS,
404 .ip = TEST_ADDRESS_A_PREFIX".4"
407 .owner = TEST_OWNER_B_ADDRESS,
408 .ip = TEST_ADDRESS_B_PREFIX".3"
411 .owner = TEST_OWNER_B_ADDRESS,
412 .ip = TEST_ADDRESS_B_PREFIX".4"
415 static const struct wrepl_ip addresses_A_3_4_OWNER_B[] = {
417 .owner = TEST_OWNER_B_ADDRESS,
418 .ip = TEST_ADDRESS_A_PREFIX".3"
421 .owner = TEST_OWNER_B_ADDRESS,
422 .ip = TEST_ADDRESS_A_PREFIX".4"
425 static const struct wrepl_ip addresses_A_3_4_X_3_4_OWNER_B[] = {
427 .owner = TEST_OWNER_B_ADDRESS,
428 .ip = TEST_ADDRESS_A_PREFIX".3"
431 .owner = TEST_OWNER_B_ADDRESS,
432 .ip = TEST_ADDRESS_A_PREFIX".4"
435 .owner = TEST_OWNER_B_ADDRESS,
436 .ip = TEST_ADDRESS_X_PREFIX".3"
439 .owner = TEST_OWNER_B_ADDRESS,
440 .ip = TEST_ADDRESS_X_PREFIX".4"
444 static const struct wrepl_ip addresses_A_3_4_X_1_2[] = {
446 .owner = TEST_OWNER_A_ADDRESS,
447 .ip = TEST_ADDRESS_A_PREFIX".3"
450 .owner = TEST_OWNER_A_ADDRESS,
451 .ip = TEST_ADDRESS_A_PREFIX".4"
454 .owner = TEST_OWNER_X_ADDRESS,
455 .ip = TEST_ADDRESS_X_PREFIX".1"
458 .owner = TEST_OWNER_X_ADDRESS,
459 .ip = TEST_ADDRESS_X_PREFIX".2"
463 static const struct wrepl_ip addresses_B_1[] = {
465 .owner = TEST_OWNER_B_ADDRESS,
466 .ip = TEST_ADDRESS_B_PREFIX".1"
469 static const struct wrepl_ip addresses_B_2[] = {
471 .owner = TEST_OWNER_B_ADDRESS,
472 .ip = TEST_ADDRESS_B_PREFIX".2"
475 static const struct wrepl_ip addresses_B_3_4[] = {
477 .owner = TEST_OWNER_B_ADDRESS,
478 .ip = TEST_ADDRESS_B_PREFIX".3"
481 .owner = TEST_OWNER_B_ADDRESS,
482 .ip = TEST_ADDRESS_B_PREFIX".4"
485 static const struct wrepl_ip addresses_B_3_4_X_3_4[] = {
487 .owner = TEST_OWNER_B_ADDRESS,
488 .ip = TEST_ADDRESS_B_PREFIX".3"
491 .owner = TEST_OWNER_B_ADDRESS,
492 .ip = TEST_ADDRESS_B_PREFIX".4"
495 .owner = TEST_OWNER_X_ADDRESS,
496 .ip = TEST_ADDRESS_X_PREFIX".3"
499 .owner = TEST_OWNER_X_ADDRESS,
500 .ip = TEST_ADDRESS_X_PREFIX".4"
503 static const struct wrepl_ip addresses_B_3_4_X_1_2[] = {
505 .owner = TEST_OWNER_B_ADDRESS,
506 .ip = TEST_ADDRESS_B_PREFIX".3"
509 .owner = TEST_OWNER_B_ADDRESS,
510 .ip = TEST_ADDRESS_B_PREFIX".4"
513 .owner = TEST_OWNER_X_ADDRESS,
514 .ip = TEST_ADDRESS_X_PREFIX".1"
517 .owner = TEST_OWNER_X_ADDRESS,
518 .ip = TEST_ADDRESS_X_PREFIX".2"
522 static const struct wrepl_ip addresses_X_1_2[] = {
524 .owner = TEST_OWNER_X_ADDRESS,
525 .ip = TEST_ADDRESS_X_PREFIX".1"
528 .owner = TEST_OWNER_X_ADDRESS,
529 .ip = TEST_ADDRESS_X_PREFIX".2"
532 static const struct wrepl_ip addresses_X_3_4[] = {
534 .owner = TEST_OWNER_X_ADDRESS,
535 .ip = TEST_ADDRESS_X_PREFIX".3"
538 .owner = TEST_OWNER_X_ADDRESS,
539 .ip = TEST_ADDRESS_X_PREFIX".4"
543 static struct test_wrepl_conflict_conn *test_create_conflict_ctx(TALLOC_CTX *mem_ctx,
546 struct test_wrepl_conflict_conn *ctx;
547 struct wrepl_associate associate;
548 struct wrepl_pull_table pull_table;
552 ctx = talloc_zero(mem_ctx, struct test_wrepl_conflict_conn);
553 if (!ctx) return NULL;
555 ctx->address = address;
556 ctx->pull = wrepl_socket_init(ctx, NULL);
557 if (!ctx->pull) return NULL;
559 printf("Setup wrepl conflict pull connection\n");
560 status = wrepl_connect(ctx->pull, NULL, ctx->address);
561 if (!NT_STATUS_IS_OK(status)) return NULL;
563 status = wrepl_associate(ctx->pull, &associate);
564 if (!NT_STATUS_IS_OK(status)) return NULL;
566 ctx->pull_assoc = associate.out.assoc_ctx;
568 ctx->a.address = TEST_OWNER_A_ADDRESS;
569 ctx->a.max_version = 0;
570 ctx->a.min_version = 0;
573 ctx->b.address = TEST_OWNER_B_ADDRESS;
574 ctx->b.max_version = 0;
575 ctx->b.min_version = 0;
578 ctx->x.address = TEST_OWNER_X_ADDRESS;
579 ctx->x.max_version = 0;
580 ctx->x.min_version = 0;
583 ctx->c.address = address;
584 ctx->c.max_version = 0;
585 ctx->c.min_version = 0;
588 pull_table.in.assoc_ctx = ctx->pull_assoc;
589 status = wrepl_pull_table(ctx->pull, ctx->pull, &pull_table);
590 if (!NT_STATUS_IS_OK(status)) return NULL;
592 for (i=0; i < pull_table.out.num_partners; i++) {
593 if (strcmp(TEST_OWNER_A_ADDRESS,pull_table.out.partners[i].address)==0) {
594 ctx->a.max_version = pull_table.out.partners[i].max_version;
595 ctx->a.min_version = pull_table.out.partners[i].min_version;
597 if (strcmp(TEST_OWNER_B_ADDRESS,pull_table.out.partners[i].address)==0) {
598 ctx->b.max_version = pull_table.out.partners[i].max_version;
599 ctx->b.min_version = pull_table.out.partners[i].min_version;
601 if (strcmp(TEST_OWNER_X_ADDRESS,pull_table.out.partners[i].address)==0) {
602 ctx->x.max_version = pull_table.out.partners[i].max_version;
603 ctx->x.min_version = pull_table.out.partners[i].min_version;
605 if (strcmp(address,pull_table.out.partners[i].address)==0) {
606 ctx->c.max_version = pull_table.out.partners[i].max_version;
607 ctx->c.min_version = pull_table.out.partners[i].min_version;
611 talloc_free(pull_table.out.partners);
613 ctx->myaddr = talloc_strdup(mem_ctx, iface_best_ip(address));
614 if (!ctx->myaddr) return NULL;
616 for (i = 0; i < iface_count(); i++) {
617 if (strcmp(ctx->myaddr, iface_n_ip(i)) == 0) continue;
618 ctx->myaddr2 = talloc_strdup(mem_ctx, iface_n_ip(i));
619 if (!ctx->myaddr2) return NULL;
623 ctx->nbtsock = nbt_name_socket_init(ctx, NULL);
624 if (!ctx->nbtsock) return NULL;
626 status = socket_listen(ctx->nbtsock->sock, ctx->myaddr, 0, 0, 0);
627 if (!NT_STATUS_IS_OK(status)) return NULL;
629 ctx->nbtsock_srv = nbt_name_socket_init(ctx, NULL);
630 if (!ctx->nbtsock_srv) return NULL;
632 status = socket_listen(ctx->nbtsock_srv->sock, ctx->myaddr, lp_nbt_port(), 0, 0);
633 if (!NT_STATUS_IS_OK(status)) {
634 talloc_free(ctx->nbtsock_srv);
635 ctx->nbtsock_srv = NULL;
638 if (ctx->myaddr2 && ctx->nbtsock_srv) {
639 ctx->nbtsock2 = nbt_name_socket_init(ctx, NULL);
640 if (!ctx->nbtsock2) return NULL;
642 status = socket_listen(ctx->nbtsock2->sock, ctx->myaddr2, 0, 0, 0);
643 if (!NT_STATUS_IS_OK(status)) return NULL;
645 ctx->nbtsock_srv2 = nbt_name_socket_init(ctx, ctx->nbtsock_srv->event_ctx);
646 if (!ctx->nbtsock_srv2) return NULL;
648 status = socket_listen(ctx->nbtsock_srv2->sock, ctx->myaddr2, lp_nbt_port(), 0, 0);
649 if (!NT_STATUS_IS_OK(status)) {
650 talloc_free(ctx->nbtsock_srv2);
651 ctx->nbtsock_srv2 = NULL;
655 ctx->addresses_best_num = 1;
656 ctx->addresses_best = talloc_array(ctx, struct wrepl_ip, ctx->addresses_best_num);
657 if (!ctx->addresses_best) return NULL;
658 ctx->addresses_best[0].owner = ctx->b.address;
659 ctx->addresses_best[0].ip = ctx->myaddr;
661 ctx->addresses_all_num = iface_count();
662 ctx->addresses_all = talloc_array(ctx, struct wrepl_ip, ctx->addresses_all_num);
663 if (!ctx->addresses_all) return NULL;
664 for (i=0; i < ctx->addresses_all_num; i++) {
665 ctx->addresses_all[i].owner = ctx->b.address;
666 ctx->addresses_all[i].ip = talloc_strdup(ctx->addresses_all, iface_n_ip(i));
667 if (!ctx->addresses_all[i].ip) return NULL;
670 if (ctx->nbtsock_srv2) {
671 ctx->addresses_best2_num = 1;
672 ctx->addresses_best2 = talloc_array(ctx, struct wrepl_ip, ctx->addresses_best2_num);
673 if (!ctx->addresses_best2) return NULL;
674 ctx->addresses_best2[0].owner = ctx->b.address;
675 ctx->addresses_best2[0].ip = ctx->myaddr2;
677 ctx->addresses_mhomed_num = 2;
678 ctx->addresses_mhomed = talloc_array(ctx, struct wrepl_ip, ctx->addresses_mhomed_num);
679 if (!ctx->addresses_mhomed) return NULL;
680 ctx->addresses_mhomed[0].owner = ctx->b.address;
681 ctx->addresses_mhomed[0].ip = ctx->myaddr;
682 ctx->addresses_mhomed[1].owner = ctx->b.address;
683 ctx->addresses_mhomed[1].ip = ctx->myaddr2;
689 static BOOL test_wrepl_update_one(struct test_wrepl_conflict_conn *ctx,
690 const struct wrepl_wins_owner *owner,
691 const struct wrepl_wins_name *name)
694 struct wrepl_socket *wrepl_socket;
695 struct wrepl_associate associate;
696 struct wrepl_packet update_packet, repl_send;
697 struct wrepl_table *update;
698 struct wrepl_wins_owner wrepl_wins_owners[1];
699 struct wrepl_packet *repl_recv;
700 struct wrepl_wins_owner *send_request;
701 struct wrepl_send_reply *send_reply;
702 struct wrepl_wins_name wrepl_wins_names[1];
706 wrepl_socket = wrepl_socket_init(ctx, NULL);
708 status = wrepl_connect(wrepl_socket, NULL, ctx->address);
709 CHECK_STATUS(status, NT_STATUS_OK);
711 status = wrepl_associate(wrepl_socket, &associate);
712 CHECK_STATUS(status, NT_STATUS_OK);
713 assoc_ctx = associate.out.assoc_ctx;
715 /* now send a WREPL_REPL_UPDATE message */
716 ZERO_STRUCT(update_packet);
717 update_packet.opcode = WREPL_OPCODE_BITS;
718 update_packet.assoc_ctx = assoc_ctx;
719 update_packet.mess_type = WREPL_REPLICATION;
720 update_packet.message.replication.command = WREPL_REPL_UPDATE;
721 update = &update_packet.message.replication.info.table;
723 update->partner_count = ARRAY_SIZE(wrepl_wins_owners);
724 update->partners = wrepl_wins_owners;
725 update->initiator = "0.0.0.0";
727 wrepl_wins_owners[0] = *owner;
729 status = wrepl_request(wrepl_socket, wrepl_socket,
730 &update_packet, &repl_recv);
731 CHECK_STATUS(status, NT_STATUS_OK);
732 CHECK_VALUE(repl_recv->mess_type, WREPL_REPLICATION);
733 CHECK_VALUE(repl_recv->message.replication.command, WREPL_REPL_SEND_REQUEST);
734 send_request = &repl_recv->message.replication.info.owner;
736 ZERO_STRUCT(repl_send);
737 repl_send.opcode = WREPL_OPCODE_BITS;
738 repl_send.assoc_ctx = assoc_ctx;
739 repl_send.mess_type = WREPL_REPLICATION;
740 repl_send.message.replication.command = WREPL_REPL_SEND_REPLY;
741 send_reply = &repl_send.message.replication.info.reply;
743 send_reply->num_names = ARRAY_SIZE(wrepl_wins_names);
744 send_reply->names = wrepl_wins_names;
746 wrepl_wins_names[0] = *name;
748 status = wrepl_request(wrepl_socket, wrepl_socket,
749 &repl_send, &repl_recv);
750 CHECK_STATUS(status, NT_STATUS_OK);
751 CHECK_VALUE(repl_recv->mess_type, WREPL_STOP_ASSOCIATION);
752 CHECK_VALUE(repl_recv->message.stop.reason, 0);
755 talloc_free(wrepl_socket);
759 static BOOL test_wrepl_is_applied(struct test_wrepl_conflict_conn *ctx,
760 const struct wrepl_wins_owner *owner,
761 const struct wrepl_wins_name *name,
766 struct wrepl_pull_names pull_names;
767 struct wrepl_name *names;
769 pull_names.in.assoc_ctx = ctx->pull_assoc;
770 pull_names.in.partner = *owner;
771 pull_names.in.partner.min_version = pull_names.in.partner.max_version;
773 status = wrepl_pull_names(ctx->pull, ctx->pull, &pull_names);
774 CHECK_STATUS(status, NT_STATUS_OK);
775 CHECK_VALUE(pull_names.out.num_names, (expected?1:0));
777 names = pull_names.out.names;
780 uint32_t flags = WREPL_NAME_FLAGS(names[0].type,
784 CHECK_VALUE(names[0].name.type, name->name->type);
785 CHECK_VALUE_STRING(names[0].name.name, name->name->name);
786 CHECK_VALUE_STRING(names[0].name.scope, name->name->scope);
787 CHECK_VALUE(flags, name->flags);
788 CHECK_VALUE_UINT64(names[0].version_id, name->id);
791 CHECK_VALUE(names[0].num_addresses,
792 name->addresses.addresses.num_ips);
794 CHECK_VALUE(names[0].num_addresses, 1);
795 CHECK_VALUE_STRING(names[0].addresses[0].address,
800 talloc_free(pull_names.out.names);
804 static BOOL test_wrepl_mhomed_merged(struct test_wrepl_conflict_conn *ctx,
805 const struct wrepl_wins_owner *owner1,
806 uint32_t num_ips1, const struct wrepl_ip *ips1,
807 const struct wrepl_wins_owner *owner2,
808 uint32_t num_ips2, const struct wrepl_ip *ips2,
809 const struct wrepl_wins_name *name2)
813 struct wrepl_pull_names pull_names;
814 struct wrepl_name *names;
817 uint32_t num_ips = num_ips1 + num_ips2;
819 for (i = 0; i < num_ips2; i++) {
820 for (j = 0; j < num_ips1; j++) {
821 if (strcmp(ips2[i].ip,ips1[j].ip) == 0) {
828 pull_names.in.assoc_ctx = ctx->pull_assoc;
829 pull_names.in.partner = *owner2;
830 pull_names.in.partner.min_version = pull_names.in.partner.max_version;
832 status = wrepl_pull_names(ctx->pull, ctx->pull, &pull_names);
833 CHECK_STATUS(status, NT_STATUS_OK);
834 CHECK_VALUE(pull_names.out.num_names, 1);
836 names = pull_names.out.names;
838 flags = WREPL_NAME_FLAGS(names[0].type,
842 CHECK_VALUE(names[0].name.type, name2->name->type);
843 CHECK_VALUE_STRING(names[0].name.name, name2->name->name);
844 CHECK_VALUE_STRING(names[0].name.scope, name2->name->scope);
845 CHECK_VALUE(flags, name2->flags | WREPL_TYPE_MHOMED);
846 CHECK_VALUE_UINT64(names[0].version_id, name2->id);
848 CHECK_VALUE(names[0].num_addresses, num_ips);
850 for (i = 0; i < names[0].num_addresses; i++) {
851 const char *addr = names[0].addresses[i].address;
852 const char *owner = names[0].addresses[i].owner;
855 for (j = 0; j < num_ips2; j++) {
856 if (strcmp(addr, ips2[j].ip) == 0) {
858 CHECK_VALUE_STRING(owner, owner2->address);
865 for (j = 0; j < num_ips1; j++) {
866 if (strcmp(addr, ips1[j].ip) == 0) {
868 CHECK_VALUE_STRING(owner, owner1->address);
875 CHECK_VALUE_STRING(addr, "not found in address list");
878 talloc_free(pull_names.out.names);
882 static BOOL test_wrepl_sgroup_merged(struct test_wrepl_conflict_conn *ctx,
883 struct wrepl_wins_owner *merge_owner,
884 struct wrepl_wins_owner *owner1,
885 uint32_t num_ips1, const struct wrepl_ip *ips1,
886 struct wrepl_wins_owner *owner2,
887 uint32_t num_ips2, const struct wrepl_ip *ips2,
888 const struct wrepl_wins_name *name2)
892 struct wrepl_pull_names pull_names;
893 struct wrepl_name *names;
894 struct wrepl_name *name = NULL;
897 uint32_t num_ips = num_ips1 + num_ips2;
900 merge_owner = &ctx->c;
903 for (i = 0; i < num_ips1; i++) {
904 if (owner1 != &ctx->c && strcmp(ips1[i].owner,owner2->address) == 0) {
908 for (j = 0; j < num_ips2; j++) {
909 if (strcmp(ips1[i].ip,ips2[j].ip) == 0) {
917 pull_names.in.assoc_ctx = ctx->pull_assoc;
918 pull_names.in.partner = *merge_owner;
919 pull_names.in.partner.min_version = pull_names.in.partner.max_version;
920 pull_names.in.partner.max_version = 0;
922 status = wrepl_pull_names(ctx->pull, ctx->pull, &pull_names);
923 CHECK_STATUS(status, NT_STATUS_OK);
925 names = pull_names.out.names;
927 for (i = 0; i < pull_names.out.num_names; i++) {
928 if (names[i].name.type != name2->name->type) continue;
929 if (!names[i].name.name) continue;
930 if (strcmp(names[i].name.name, name2->name->name) != 0) continue;
931 if (names[i].name.scope) continue;
936 if (pull_names.out.num_names > 0) {
937 merge_owner->max_version = names[pull_names.out.num_names-1].version_id;
941 printf("%s: Name '%s' not found\n", __location__, nbt_name_string(ctx, name2->name));
945 flags = WREPL_NAME_FLAGS(name->type,
949 CHECK_VALUE(name->name.type, name2->name->type);
950 CHECK_VALUE_STRING(name->name.name, name2->name->name);
951 CHECK_VALUE_STRING(name->name.scope, name2->name->scope);
952 CHECK_VALUE(flags, name2->flags);
954 CHECK_VALUE(name->num_addresses, num_ips);
956 for (i = 0; i < name->num_addresses; i++) {
957 const char *addr = name->addresses[i].address;
958 const char *owner = name->addresses[i].owner;
961 for (j = 0; j < num_ips2; j++) {
962 if (strcmp(addr, ips2[j].ip) == 0) {
964 CHECK_VALUE_STRING(owner, ips2[j].owner);
971 for (j = 0; j < num_ips1; j++) {
972 if (strcmp(addr, ips1[j].ip) == 0) {
974 if (owner1 == &ctx->c) {
975 CHECK_VALUE_STRING(owner, owner1->address);
977 CHECK_VALUE_STRING(owner, ips1[j].owner);
985 CHECK_VALUE_STRING(addr, "not found in address list");
988 talloc_free(pull_names.out.names);
992 static BOOL test_conflict_same_owner(struct test_wrepl_conflict_conn *ctx)
995 struct nbt_name name;
996 struct wrepl_wins_name wins_name1;
997 struct wrepl_wins_name wins_name2;
998 struct wrepl_wins_name *wins_name_tmp;
999 struct wrepl_wins_name *wins_name_last;
1000 struct wrepl_wins_name *wins_name_cur;
1002 uint8_t types[] = { 0x00, 0x1C };
1004 enum wrepl_name_type type;
1005 enum wrepl_name_state state;
1006 enum wrepl_name_node node;
1009 const struct wrepl_ip *ips;
1012 .type = WREPL_TYPE_GROUP,
1013 .state = WREPL_STATE_ACTIVE,
1014 .node = WREPL_NODE_B,
1016 .num_ips = ARRAY_SIZE(addresses_A_1),
1017 .ips = addresses_A_1,
1019 .type = WREPL_TYPE_UNIQUE,
1020 .state = WREPL_STATE_ACTIVE,
1021 .node = WREPL_NODE_B,
1023 .num_ips = ARRAY_SIZE(addresses_A_1),
1024 .ips = addresses_A_1,
1026 .type = WREPL_TYPE_UNIQUE,
1027 .state = WREPL_STATE_ACTIVE,
1028 .node = WREPL_NODE_B,
1030 .num_ips = ARRAY_SIZE(addresses_A_2),
1031 .ips = addresses_A_2,
1033 .type = WREPL_TYPE_UNIQUE,
1034 .state = WREPL_STATE_ACTIVE,
1035 .node = WREPL_NODE_B,
1037 .num_ips = ARRAY_SIZE(addresses_A_1),
1038 .ips = addresses_A_1,
1040 .type = WREPL_TYPE_UNIQUE,
1041 .state = WREPL_STATE_ACTIVE,
1042 .node = WREPL_NODE_B,
1044 .num_ips = ARRAY_SIZE(addresses_A_2),
1045 .ips = addresses_A_2,
1047 .type = WREPL_TYPE_SGROUP,
1048 .state = WREPL_STATE_TOMBSTONE,
1049 .node = WREPL_NODE_B,
1051 .num_ips = ARRAY_SIZE(addresses_A_2),
1052 .ips = addresses_A_2,
1054 .type = WREPL_TYPE_MHOMED,
1055 .state = WREPL_STATE_TOMBSTONE,
1056 .node = WREPL_NODE_B,
1058 .num_ips = ARRAY_SIZE(addresses_A_1),
1059 .ips = addresses_A_1,
1061 .type = WREPL_TYPE_MHOMED,
1062 .state = WREPL_STATE_RELEASED,
1063 .node = WREPL_NODE_B,
1065 .num_ips = ARRAY_SIZE(addresses_A_2),
1066 .ips = addresses_A_2,
1068 .type = WREPL_TYPE_SGROUP,
1069 .state = WREPL_STATE_ACTIVE,
1070 .node = WREPL_NODE_B,
1072 .num_ips = ARRAY_SIZE(addresses_A_1),
1073 .ips = addresses_A_1,
1075 .type = WREPL_TYPE_SGROUP,
1076 .state = WREPL_STATE_ACTIVE,
1077 .node = WREPL_NODE_B,
1079 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1080 .ips = addresses_A_3_4,
1082 .type = WREPL_TYPE_SGROUP,
1083 .state = WREPL_STATE_TOMBSTONE,
1084 .node = WREPL_NODE_B,
1086 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1087 .ips = addresses_B_3_4,
1089 /* the last one should always be a unique,tomstone record! */
1090 .type = WREPL_TYPE_UNIQUE,
1091 .state = WREPL_STATE_TOMBSTONE,
1092 .node = WREPL_NODE_B,
1094 .num_ips = ARRAY_SIZE(addresses_A_1),
1095 .ips = addresses_A_1,
1099 if (!ctx) return False;
1101 name.name = "_SAME_OWNER_A";
1105 wins_name_tmp = NULL;
1106 wins_name_last = &wins_name2;
1107 wins_name_cur = &wins_name1;
1109 for (j=0; ret && j < ARRAY_SIZE(types); j++) {
1110 name.type = types[j];
1111 printf("Test Replica Conflicts with same owner[%s] for %s\n",
1112 nbt_name_string(ctx, &name), ctx->a.address);
1114 for(i=0; ret && i < ARRAY_SIZE(records); i++) {
1115 wins_name_tmp = wins_name_last;
1116 wins_name_last = wins_name_cur;
1117 wins_name_cur = wins_name_tmp;
1120 printf("%s,%s%s vs. %s,%s%s with %s ip(s) => %s\n",
1121 wrepl_name_type_string(records[i-1].type),
1122 wrepl_name_state_string(records[i-1].state),
1123 (records[i-1].is_static?",static":""),
1124 wrepl_name_type_string(records[i].type),
1125 wrepl_name_state_string(records[i].state),
1126 (records[i].is_static?",static":""),
1127 (records[i-1].ips==records[i].ips?"same":"different"),
1131 wins_name_cur->name = &name;
1132 wins_name_cur->flags = WREPL_NAME_FLAGS(records[i].type,
1135 records[i].is_static);
1136 wins_name_cur->id = ++ctx->a.max_version;
1137 if (wins_name_cur->flags & 2) {
1138 wins_name_cur->addresses.addresses.num_ips = records[i].num_ips;
1139 wins_name_cur->addresses.addresses.ips = discard_const(records[i].ips);
1141 wins_name_cur->addresses.ip = records[i].ips[0].ip;
1143 wins_name_cur->unknown = "255.255.255.255";
1145 ret &= test_wrepl_update_one(ctx, &ctx->a,wins_name_cur);
1146 if (records[i].state == WREPL_STATE_RELEASED) {
1147 ret &= test_wrepl_is_applied(ctx, &ctx->a, wins_name_last, False);
1148 ret &= test_wrepl_is_applied(ctx, &ctx->a, wins_name_cur, False);
1150 ret &= test_wrepl_is_applied(ctx, &ctx->a, wins_name_cur, True);
1153 /* the first one is a cleanup run */
1154 if (!ret && i == 0) ret = True;
1157 printf("conflict handled wrong or record[%u]: %s\n", i, __location__);
1165 static BOOL test_conflict_different_owner(struct test_wrepl_conflict_conn *ctx)
1168 struct wrepl_wins_name wins_name1;
1169 struct wrepl_wins_name wins_name2;
1170 struct wrepl_wins_name *wins_name_r1;
1171 struct wrepl_wins_name *wins_name_r2;
1174 const char *line; /* just better debugging */
1175 struct nbt_name name;
1176 const char *comment;
1177 BOOL extra; /* not the worst case, this is an extra test */
1180 struct wrepl_wins_owner *owner;
1181 enum wrepl_name_type type;
1182 enum wrepl_name_state state;
1183 enum wrepl_name_node node;
1186 const struct wrepl_ip *ips;
1187 BOOL apply_expected;
1189 struct wrepl_wins_owner *merge_owner;
1190 BOOL sgroup_cleanup;
1194 * NOTE: the first record and the last applied one
1195 * needs to be from the same owner,
1196 * to not conflict in the next smbtorture run!!!
1199 .line = __location__,
1200 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1204 .type = WREPL_TYPE_UNIQUE,
1205 .state = WREPL_STATE_TOMBSTONE,
1206 .node = WREPL_NODE_B,
1208 .num_ips = ARRAY_SIZE(addresses_B_1),
1209 .ips = addresses_B_1,
1210 .apply_expected = True /* ignored */
1214 .type = WREPL_TYPE_UNIQUE,
1215 .state = WREPL_STATE_TOMBSTONE,
1216 .node = WREPL_NODE_B,
1218 .num_ips = ARRAY_SIZE(addresses_A_1),
1219 .ips = addresses_A_1,
1220 .apply_expected = True /* ignored */
1225 * unique vs unique section
1228 * unique,active vs. unique,active
1229 * => should be replaced
1232 .line = __location__,
1233 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1236 .type = WREPL_TYPE_UNIQUE,
1237 .state = WREPL_STATE_ACTIVE,
1238 .node = WREPL_NODE_B,
1240 .num_ips = ARRAY_SIZE(addresses_A_1),
1241 .ips = addresses_A_1,
1242 .apply_expected = True
1246 .type = WREPL_TYPE_UNIQUE,
1247 .state = WREPL_STATE_ACTIVE,
1248 .node = WREPL_NODE_B,
1250 .num_ips = ARRAY_SIZE(addresses_B_1),
1251 .ips = addresses_B_1,
1252 .apply_expected = True
1257 * unique,active vs. unique,tombstone
1258 * => should NOT be replaced
1261 .line = __location__,
1262 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1265 .type = WREPL_TYPE_UNIQUE,
1266 .state = WREPL_STATE_ACTIVE,
1267 .node = WREPL_NODE_B,
1269 .num_ips = ARRAY_SIZE(addresses_B_1),
1270 .ips = addresses_B_1,
1271 .apply_expected = True
1275 .type = WREPL_TYPE_UNIQUE,
1276 .state = WREPL_STATE_TOMBSTONE,
1277 .node = WREPL_NODE_B,
1279 .num_ips = ARRAY_SIZE(addresses_B_1),
1280 .ips = addresses_B_1,
1281 .apply_expected = False
1286 * unique,released vs. unique,active
1287 * => should be replaced
1290 .line = __location__,
1291 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1294 .type = WREPL_TYPE_UNIQUE,
1295 .state = WREPL_STATE_RELEASED,
1296 .node = WREPL_NODE_B,
1298 .num_ips = ARRAY_SIZE(addresses_B_1),
1299 .ips = addresses_B_1,
1300 .apply_expected = False
1304 .type = WREPL_TYPE_UNIQUE,
1305 .state = WREPL_STATE_ACTIVE,
1306 .node = WREPL_NODE_B,
1308 .num_ips = ARRAY_SIZE(addresses_A_1),
1309 .ips = addresses_A_1,
1310 .apply_expected = True
1315 * unique,released vs. unique,tombstone
1316 * => should be replaced
1319 .line = __location__,
1320 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1323 .type = WREPL_TYPE_UNIQUE,
1324 .state = WREPL_STATE_RELEASED,
1325 .node = WREPL_NODE_B,
1327 .num_ips = ARRAY_SIZE(addresses_A_1),
1328 .ips = addresses_A_1,
1329 .apply_expected = False
1333 .type = WREPL_TYPE_UNIQUE,
1334 .state = WREPL_STATE_TOMBSTONE,
1335 .node = WREPL_NODE_B,
1337 .num_ips = ARRAY_SIZE(addresses_B_1),
1338 .ips = addresses_B_1,
1339 .apply_expected = True
1344 * unique,tombstone vs. unique,active
1345 * => should be replaced
1348 .line = __location__,
1349 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1352 .type = WREPL_TYPE_UNIQUE,
1353 .state = WREPL_STATE_TOMBSTONE,
1354 .node = WREPL_NODE_B,
1356 .num_ips = ARRAY_SIZE(addresses_B_1),
1357 .ips = addresses_B_1,
1358 .apply_expected = True
1362 .type = WREPL_TYPE_UNIQUE,
1363 .state = WREPL_STATE_ACTIVE,
1364 .node = WREPL_NODE_B,
1366 .num_ips = ARRAY_SIZE(addresses_A_1),
1367 .ips = addresses_A_1,
1368 .apply_expected = True
1373 * unique,tombstone vs. unique,tombstone
1374 * => should be replaced
1377 .line = __location__,
1378 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1381 .type = WREPL_TYPE_UNIQUE,
1382 .state = WREPL_STATE_TOMBSTONE,
1383 .node = WREPL_NODE_B,
1385 .num_ips = ARRAY_SIZE(addresses_A_1),
1386 .ips = addresses_A_1,
1387 .apply_expected = True
1391 .type = WREPL_TYPE_UNIQUE,
1392 .state = WREPL_STATE_TOMBSTONE,
1393 .node = WREPL_NODE_B,
1395 .num_ips = ARRAY_SIZE(addresses_B_1),
1396 .ips = addresses_B_1,
1397 .apply_expected = True
1403 * unique vs normal groups section,
1406 * unique,active vs. group,active
1407 * => should be replaced
1410 .line = __location__,
1411 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1414 .type = WREPL_TYPE_UNIQUE,
1415 .state = WREPL_STATE_ACTIVE,
1416 .node = WREPL_NODE_B,
1418 .num_ips = ARRAY_SIZE(addresses_B_1),
1419 .ips = addresses_B_1,
1420 .apply_expected = True
1424 .type = WREPL_TYPE_GROUP,
1425 .state = WREPL_STATE_ACTIVE,
1426 .node = WREPL_NODE_B,
1428 .num_ips = ARRAY_SIZE(addresses_A_1),
1429 .ips = addresses_A_1,
1430 .apply_expected = True
1435 * unique,active vs. group,tombstone
1436 * => should NOT be replaced
1439 .line = __location__,
1440 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1443 .type = WREPL_TYPE_UNIQUE,
1444 .state = WREPL_STATE_ACTIVE,
1445 .node = WREPL_NODE_B,
1447 .num_ips = ARRAY_SIZE(addresses_A_1),
1448 .ips = addresses_A_1,
1449 .apply_expected = True
1453 .type = WREPL_TYPE_GROUP,
1454 .state = WREPL_STATE_TOMBSTONE,
1455 .node = WREPL_NODE_B,
1457 .num_ips = ARRAY_SIZE(addresses_A_1),
1458 .ips = addresses_A_1,
1459 .apply_expected = False
1464 * unique,released vs. group,active
1465 * => should be replaced
1468 .line = __location__,
1469 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1472 .type = WREPL_TYPE_UNIQUE,
1473 .state = WREPL_STATE_RELEASED,
1474 .node = WREPL_NODE_B,
1476 .num_ips = ARRAY_SIZE(addresses_A_1),
1477 .ips = addresses_A_1,
1478 .apply_expected = False
1482 .type = WREPL_TYPE_GROUP,
1483 .state = WREPL_STATE_ACTIVE,
1484 .node = WREPL_NODE_B,
1486 .num_ips = ARRAY_SIZE(addresses_B_1),
1487 .ips = addresses_B_1,
1488 .apply_expected = True
1493 * unique,released vs. group,tombstone
1494 * => should be replaced
1497 .line = __location__,
1498 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1501 .type = WREPL_TYPE_UNIQUE,
1502 .state = WREPL_STATE_RELEASED,
1503 .node = WREPL_NODE_B,
1505 .num_ips = ARRAY_SIZE(addresses_B_1),
1506 .ips = addresses_B_1,
1507 .apply_expected = False
1511 .type = WREPL_TYPE_GROUP,
1512 .state = WREPL_STATE_TOMBSTONE,
1513 .node = WREPL_NODE_B,
1515 .num_ips = ARRAY_SIZE(addresses_A_1),
1516 .ips = addresses_A_1,
1517 .apply_expected = True
1522 * unique,tombstone vs. group,active
1523 * => should be replaced
1526 .line = __location__,
1527 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1530 .type = WREPL_TYPE_UNIQUE,
1531 .state = WREPL_STATE_TOMBSTONE,
1532 .node = WREPL_NODE_B,
1534 .num_ips = ARRAY_SIZE(addresses_A_1),
1535 .ips = addresses_A_1,
1536 .apply_expected = True
1540 .type = WREPL_TYPE_GROUP,
1541 .state = WREPL_STATE_ACTIVE,
1542 .node = WREPL_NODE_B,
1544 .num_ips = ARRAY_SIZE(addresses_B_1),
1545 .ips = addresses_B_1,
1546 .apply_expected = True
1551 * unique,tombstone vs. group,tombstone
1552 * => should be replaced
1555 .line = __location__,
1556 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1559 .type = WREPL_TYPE_UNIQUE,
1560 .state = WREPL_STATE_TOMBSTONE,
1561 .node = WREPL_NODE_B,
1563 .num_ips = ARRAY_SIZE(addresses_B_1),
1564 .ips = addresses_B_1,
1565 .apply_expected = True
1569 .type = WREPL_TYPE_GROUP,
1570 .state = WREPL_STATE_TOMBSTONE,
1571 .node = WREPL_NODE_B,
1573 .num_ips = ARRAY_SIZE(addresses_A_1),
1574 .ips = addresses_A_1,
1575 .apply_expected = True
1580 * unique vs special groups section,
1583 * unique,active vs. sgroup,active
1584 * => should NOT be replaced
1587 .line = __location__,
1588 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1591 .type = WREPL_TYPE_UNIQUE,
1592 .state = WREPL_STATE_ACTIVE,
1593 .node = WREPL_NODE_B,
1595 .num_ips = ARRAY_SIZE(addresses_A_1),
1596 .ips = addresses_A_1,
1597 .apply_expected = True
1601 .type = WREPL_TYPE_SGROUP,
1602 .state = WREPL_STATE_ACTIVE,
1603 .node = WREPL_NODE_B,
1605 .num_ips = ARRAY_SIZE(addresses_A_1),
1606 .ips = addresses_A_1,
1607 .apply_expected = False
1612 * unique,active vs. sgroup,tombstone
1613 * => should NOT be replaced
1616 .line = __location__,
1617 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1620 .type = WREPL_TYPE_UNIQUE,
1621 .state = WREPL_STATE_ACTIVE,
1622 .node = WREPL_NODE_B,
1624 .num_ips = ARRAY_SIZE(addresses_A_1),
1625 .ips = addresses_A_1,
1626 .apply_expected = True
1630 .type = WREPL_TYPE_SGROUP,
1631 .state = WREPL_STATE_TOMBSTONE,
1632 .node = WREPL_NODE_B,
1634 .num_ips = ARRAY_SIZE(addresses_A_1),
1635 .ips = addresses_A_1,
1636 .apply_expected = False
1641 * unique,released vs. sgroup,active
1642 * => should be replaced
1645 .line = __location__,
1646 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1649 .type = WREPL_TYPE_UNIQUE,
1650 .state = WREPL_STATE_RELEASED,
1651 .node = WREPL_NODE_B,
1653 .num_ips = ARRAY_SIZE(addresses_A_1),
1654 .ips = addresses_A_1,
1655 .apply_expected = False
1659 .type = WREPL_TYPE_SGROUP,
1660 .state = WREPL_STATE_ACTIVE,
1661 .node = WREPL_NODE_B,
1663 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1664 .ips = addresses_B_3_4,
1665 .apply_expected = True
1670 * unique,released vs. sgroup,tombstone
1671 * => should be replaced
1674 .line = __location__,
1675 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1678 .type = WREPL_TYPE_UNIQUE,
1679 .state = WREPL_STATE_RELEASED,
1680 .node = WREPL_NODE_B,
1682 .num_ips = ARRAY_SIZE(addresses_B_1),
1683 .ips = addresses_B_1,
1684 .apply_expected = False
1688 .type = WREPL_TYPE_SGROUP,
1689 .state = WREPL_STATE_TOMBSTONE,
1690 .node = WREPL_NODE_B,
1692 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1693 .ips = addresses_A_3_4,
1694 .apply_expected = True
1699 * unique,tombstone vs. sgroup,active
1700 * => should be replaced
1703 .line = __location__,
1704 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1707 .type = WREPL_TYPE_UNIQUE,
1708 .state = WREPL_STATE_TOMBSTONE,
1709 .node = WREPL_NODE_B,
1711 .num_ips = ARRAY_SIZE(addresses_A_1),
1712 .ips = addresses_A_1,
1713 .apply_expected = True
1717 .type = WREPL_TYPE_SGROUP,
1718 .state = WREPL_STATE_ACTIVE,
1719 .node = WREPL_NODE_B,
1721 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1722 .ips = addresses_B_3_4,
1723 .apply_expected = True
1728 * unique,tombstone vs. sgroup,tombstone
1729 * => should be replaced
1732 .line = __location__,
1733 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1736 .type = WREPL_TYPE_UNIQUE,
1737 .state = WREPL_STATE_TOMBSTONE,
1738 .node = WREPL_NODE_B,
1740 .num_ips = ARRAY_SIZE(addresses_B_1),
1741 .ips = addresses_B_1,
1742 .apply_expected = True
1746 .type = WREPL_TYPE_SGROUP,
1747 .state = WREPL_STATE_TOMBSTONE,
1748 .node = WREPL_NODE_B,
1750 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1751 .ips = addresses_A_3_4,
1752 .apply_expected = True
1757 * unique vs multi homed section,
1760 * unique,active vs. mhomed,active
1761 * => should be replaced
1764 .line = __location__,
1765 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1768 .type = WREPL_TYPE_UNIQUE,
1769 .state = WREPL_STATE_ACTIVE,
1770 .node = WREPL_NODE_B,
1772 .num_ips = ARRAY_SIZE(addresses_A_1),
1773 .ips = addresses_A_1,
1774 .apply_expected = True
1778 .type = WREPL_TYPE_MHOMED,
1779 .state = WREPL_STATE_ACTIVE,
1780 .node = WREPL_NODE_B,
1782 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1783 .ips = addresses_B_3_4,
1784 .apply_expected = True
1789 * unique,active vs. mhomed,tombstone
1790 * => should NOT be replaced
1793 .line = __location__,
1794 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1797 .type = WREPL_TYPE_UNIQUE,
1798 .state = WREPL_STATE_ACTIVE,
1799 .node = WREPL_NODE_B,
1801 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1802 .ips = addresses_B_3_4,
1803 .apply_expected = True
1807 .type = WREPL_TYPE_MHOMED,
1808 .state = WREPL_STATE_TOMBSTONE,
1809 .node = WREPL_NODE_B,
1811 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1812 .ips = addresses_B_3_4,
1813 .apply_expected = False
1818 * unique,released vs. mhomed,active
1819 * => should be replaced
1822 .line = __location__,
1823 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1826 .type = WREPL_TYPE_UNIQUE,
1827 .state = WREPL_STATE_RELEASED,
1828 .node = WREPL_NODE_B,
1830 .num_ips = ARRAY_SIZE(addresses_B_1),
1831 .ips = addresses_B_1,
1832 .apply_expected = False
1836 .type = WREPL_TYPE_MHOMED,
1837 .state = WREPL_STATE_ACTIVE,
1838 .node = WREPL_NODE_B,
1840 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1841 .ips = addresses_A_3_4,
1842 .apply_expected = True
1847 * unique,released vs. mhomed,tombstone
1848 * => should be replaced
1851 .line = __location__,
1852 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1855 .type = WREPL_TYPE_UNIQUE,
1856 .state = WREPL_STATE_RELEASED,
1857 .node = WREPL_NODE_B,
1859 .num_ips = ARRAY_SIZE(addresses_A_1),
1860 .ips = addresses_A_1,
1861 .apply_expected = False
1865 .type = WREPL_TYPE_MHOMED,
1866 .state = WREPL_STATE_TOMBSTONE,
1867 .node = WREPL_NODE_B,
1869 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1870 .ips = addresses_B_3_4,
1871 .apply_expected = True
1876 * unique,tombstone vs. mhomed,active
1877 * => should be replaced
1880 .line = __location__,
1881 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1884 .type = WREPL_TYPE_UNIQUE,
1885 .state = WREPL_STATE_TOMBSTONE,
1886 .node = WREPL_NODE_B,
1888 .num_ips = ARRAY_SIZE(addresses_B_1),
1889 .ips = addresses_B_1,
1890 .apply_expected = True
1894 .type = WREPL_TYPE_MHOMED,
1895 .state = WREPL_STATE_ACTIVE,
1896 .node = WREPL_NODE_B,
1898 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1899 .ips = addresses_A_3_4,
1900 .apply_expected = True
1905 * unique,tombstone vs. mhomed,tombstone
1906 * => should be replaced
1909 .line = __location__,
1910 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1913 .type = WREPL_TYPE_UNIQUE,
1914 .state = WREPL_STATE_TOMBSTONE,
1915 .node = WREPL_NODE_B,
1917 .num_ips = ARRAY_SIZE(addresses_A_1),
1918 .ips = addresses_A_1,
1919 .apply_expected = True
1923 .type = WREPL_TYPE_MHOMED,
1924 .state = WREPL_STATE_TOMBSTONE,
1925 .node = WREPL_NODE_B,
1927 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1928 .ips = addresses_B_3_4,
1929 .apply_expected = True
1934 * normal groups vs unique section,
1937 * group,active vs. unique,active
1938 * => should NOT be replaced
1941 .line = __location__,
1942 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1945 .type = WREPL_TYPE_GROUP,
1946 .state = WREPL_STATE_ACTIVE,
1947 .node = WREPL_NODE_B,
1949 .num_ips = ARRAY_SIZE(addresses_A_1),
1950 .ips = addresses_A_1,
1951 .apply_expected = True
1955 .type = WREPL_TYPE_UNIQUE,
1956 .state = WREPL_STATE_ACTIVE,
1957 .node = WREPL_NODE_B,
1959 .num_ips = ARRAY_SIZE(addresses_A_1),
1960 .ips = addresses_A_1,
1961 .apply_expected = False
1966 * group,active vs. unique,tombstone
1967 * => should NOT be replaced
1970 .line = __location__,
1971 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1974 .type = WREPL_TYPE_GROUP,
1975 .state = WREPL_STATE_ACTIVE,
1976 .node = WREPL_NODE_B,
1978 .num_ips = ARRAY_SIZE(addresses_A_1),
1979 .ips = addresses_A_1,
1980 .apply_expected = True
1984 .type = WREPL_TYPE_UNIQUE,
1985 .state = WREPL_STATE_TOMBSTONE,
1986 .node = WREPL_NODE_B,
1988 .num_ips = ARRAY_SIZE(addresses_A_1),
1989 .ips = addresses_A_1,
1990 .apply_expected = False
1995 * group,released vs. unique,active
1996 * => should NOT be replaced
1999 .line = __location__,
2000 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2003 .type = WREPL_TYPE_GROUP,
2004 .state = WREPL_STATE_RELEASED,
2005 .node = WREPL_NODE_B,
2007 .num_ips = ARRAY_SIZE(addresses_A_1),
2008 .ips = addresses_A_1,
2009 .apply_expected = False
2013 .type = WREPL_TYPE_UNIQUE,
2014 .state = WREPL_STATE_ACTIVE,
2015 .node = WREPL_NODE_B,
2017 .num_ips = ARRAY_SIZE(addresses_A_1),
2018 .ips = addresses_A_1,
2019 .apply_expected = False
2024 * group,released vs. unique,tombstone
2025 * => should NOT be replaced
2028 .line = __location__,
2029 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2032 .type = WREPL_TYPE_GROUP,
2033 .state = WREPL_STATE_RELEASED,
2034 .node = WREPL_NODE_B,
2036 .num_ips = ARRAY_SIZE(addresses_A_1),
2037 .ips = addresses_A_1,
2038 .apply_expected = False
2042 .type = WREPL_TYPE_UNIQUE,
2043 .state = WREPL_STATE_TOMBSTONE,
2044 .node = WREPL_NODE_B,
2046 .num_ips = ARRAY_SIZE(addresses_A_1),
2047 .ips = addresses_A_1,
2048 .apply_expected = False
2053 * group,tombstone vs. unique,active
2054 * => should NOT be replaced
2057 .line = __location__,
2058 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2061 .type = WREPL_TYPE_GROUP,
2062 .state = WREPL_STATE_TOMBSTONE,
2063 .node = WREPL_NODE_B,
2065 .num_ips = ARRAY_SIZE(addresses_A_1),
2066 .ips = addresses_A_1,
2067 .apply_expected = True
2071 .type = WREPL_TYPE_UNIQUE,
2072 .state = WREPL_STATE_ACTIVE,
2073 .node = WREPL_NODE_B,
2075 .num_ips = ARRAY_SIZE(addresses_A_1),
2076 .ips = addresses_A_1,
2077 .apply_expected = False
2082 * group,tombstone vs. unique,tombstone
2083 * => should NOT be replaced
2086 .line = __location__,
2087 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2090 .type = WREPL_TYPE_GROUP,
2091 .state = WREPL_STATE_TOMBSTONE,
2092 .node = WREPL_NODE_B,
2094 .num_ips = ARRAY_SIZE(addresses_A_1),
2095 .ips = addresses_A_1,
2096 .apply_expected = True
2100 .type = WREPL_TYPE_UNIQUE,
2101 .state = WREPL_STATE_TOMBSTONE,
2102 .node = WREPL_NODE_B,
2104 .num_ips = ARRAY_SIZE(addresses_A_1),
2105 .ips = addresses_A_1,
2106 .apply_expected = False
2111 * normal groups vs normal groups section,
2114 * group,active vs. group,active
2115 * => should NOT be replaced
2118 .line = __location__,
2119 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2122 .type = WREPL_TYPE_GROUP,
2123 .state = WREPL_STATE_ACTIVE,
2124 .node = WREPL_NODE_B,
2126 .num_ips = ARRAY_SIZE(addresses_A_1),
2127 .ips = addresses_A_1,
2128 .apply_expected = True
2132 .type = WREPL_TYPE_GROUP,
2133 .state = WREPL_STATE_ACTIVE,
2134 .node = WREPL_NODE_B,
2136 .num_ips = ARRAY_SIZE(addresses_A_1),
2137 .ips = addresses_A_1,
2138 .apply_expected = False
2143 * group,active vs. group,tombstone
2144 * => should NOT be replaced
2147 .line = __location__,
2148 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2151 .type = WREPL_TYPE_GROUP,
2152 .state = WREPL_STATE_ACTIVE,
2153 .node = WREPL_NODE_B,
2155 .num_ips = ARRAY_SIZE(addresses_A_1),
2156 .ips = addresses_A_1,
2157 .apply_expected = True
2161 .type = WREPL_TYPE_GROUP,
2162 .state = WREPL_STATE_TOMBSTONE,
2163 .node = WREPL_NODE_B,
2165 .num_ips = ARRAY_SIZE(addresses_A_1),
2166 .ips = addresses_A_1,
2167 .apply_expected = False
2172 * group,released vs. group,active
2173 * => should be replaced
2176 .line = __location__,
2177 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2180 .type = WREPL_TYPE_GROUP,
2181 .state = WREPL_STATE_RELEASED,
2182 .node = WREPL_NODE_B,
2184 .num_ips = ARRAY_SIZE(addresses_A_1),
2185 .ips = addresses_A_1,
2186 .apply_expected = False
2190 .type = WREPL_TYPE_GROUP,
2191 .state = WREPL_STATE_ACTIVE,
2192 .node = WREPL_NODE_B,
2194 .num_ips = ARRAY_SIZE(addresses_B_1),
2195 .ips = addresses_B_1,
2196 .apply_expected = True
2201 * group,released vs. group,tombstone
2202 * => should be replaced
2205 .line = __location__,
2206 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2209 .type = WREPL_TYPE_GROUP,
2210 .state = WREPL_STATE_RELEASED,
2211 .node = WREPL_NODE_B,
2213 .num_ips = ARRAY_SIZE(addresses_A_1),
2214 .ips = addresses_A_1,
2215 .apply_expected = False
2219 .type = WREPL_TYPE_GROUP,
2220 .state = WREPL_STATE_TOMBSTONE,
2221 .node = WREPL_NODE_B,
2223 .num_ips = ARRAY_SIZE(addresses_B_1),
2224 .ips = addresses_B_1,
2225 .apply_expected = True
2230 * group,tombstone vs. group,active
2231 * => should be replaced
2234 .line = __location__,
2235 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2238 .type = WREPL_TYPE_GROUP,
2239 .state = WREPL_STATE_TOMBSTONE,
2240 .node = WREPL_NODE_B,
2242 .num_ips = ARRAY_SIZE(addresses_B_1),
2243 .ips = addresses_B_1,
2244 .apply_expected = True
2248 .type = WREPL_TYPE_GROUP,
2249 .state = WREPL_STATE_ACTIVE,
2250 .node = WREPL_NODE_B,
2252 .num_ips = ARRAY_SIZE(addresses_A_1),
2253 .ips = addresses_A_1,
2254 .apply_expected = True
2259 * group,tombstone vs. group,tombstone
2260 * => should be replaced
2263 .line = __location__,
2264 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2267 .type = WREPL_TYPE_GROUP,
2268 .state = WREPL_STATE_TOMBSTONE,
2269 .node = WREPL_NODE_B,
2271 .num_ips = ARRAY_SIZE(addresses_A_1),
2272 .ips = addresses_A_1,
2273 .apply_expected = True
2277 .type = WREPL_TYPE_GROUP,
2278 .state = WREPL_STATE_TOMBSTONE,
2279 .node = WREPL_NODE_B,
2281 .num_ips = ARRAY_SIZE(addresses_B_1),
2282 .ips = addresses_B_1,
2283 .apply_expected = True
2288 * normal groups vs special groups section,
2291 * group,active vs. sgroup,active
2292 * => should NOT be replaced
2295 .line = __location__,
2296 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2299 .type = WREPL_TYPE_GROUP,
2300 .state = WREPL_STATE_ACTIVE,
2301 .node = WREPL_NODE_B,
2303 .num_ips = ARRAY_SIZE(addresses_B_1),
2304 .ips = addresses_B_1,
2305 .apply_expected = True
2309 .type = WREPL_TYPE_SGROUP,
2310 .state = WREPL_STATE_ACTIVE,
2311 .node = WREPL_NODE_B,
2313 .num_ips = ARRAY_SIZE(addresses_B_1),
2314 .ips = addresses_B_1,
2315 .apply_expected = False
2320 * group,active vs. sgroup,tombstone
2321 * => should NOT be replaced
2324 .line = __location__,
2325 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2328 .type = WREPL_TYPE_GROUP,
2329 .state = WREPL_STATE_ACTIVE,
2330 .node = WREPL_NODE_B,
2332 .num_ips = ARRAY_SIZE(addresses_B_1),
2333 .ips = addresses_B_1,
2334 .apply_expected = True
2338 .type = WREPL_TYPE_SGROUP,
2339 .state = WREPL_STATE_TOMBSTONE,
2340 .node = WREPL_NODE_B,
2342 .num_ips = ARRAY_SIZE(addresses_B_1),
2343 .ips = addresses_B_1,
2344 .apply_expected = False
2349 * group,released vs. sgroup,active
2350 * => should be replaced
2353 .line = __location__,
2354 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2357 .type = WREPL_TYPE_GROUP,
2358 .state = WREPL_STATE_RELEASED,
2359 .node = WREPL_NODE_B,
2361 .num_ips = ARRAY_SIZE(addresses_A_1),
2362 .ips = addresses_A_1,
2363 .apply_expected = False
2367 .type = WREPL_TYPE_SGROUP,
2368 .state = WREPL_STATE_ACTIVE,
2369 .node = WREPL_NODE_B,
2371 .num_ips = ARRAY_SIZE(addresses_B_1),
2372 .ips = addresses_B_1,
2373 .apply_expected = True
2378 * group,released vs. sgroup,tombstone
2379 * => should NOT be replaced
2382 .line = __location__,
2383 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2386 .type = WREPL_TYPE_GROUP,
2387 .state = WREPL_STATE_RELEASED,
2388 .node = WREPL_NODE_B,
2390 .num_ips = ARRAY_SIZE(addresses_B_1),
2391 .ips = addresses_B_1,
2392 .apply_expected = False
2396 .type = WREPL_TYPE_SGROUP,
2397 .state = WREPL_STATE_TOMBSTONE,
2398 .node = WREPL_NODE_B,
2400 .num_ips = ARRAY_SIZE(addresses_B_1),
2401 .ips = addresses_B_1,
2402 .apply_expected = False
2407 * group,tombstone vs. sgroup,active
2408 * => should be replaced
2411 .line = __location__,
2412 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2415 .type = WREPL_TYPE_GROUP,
2416 .state = WREPL_STATE_TOMBSTONE,
2417 .node = WREPL_NODE_B,
2419 .num_ips = ARRAY_SIZE(addresses_B_1),
2420 .ips = addresses_B_1,
2421 .apply_expected = True
2425 .type = WREPL_TYPE_SGROUP,
2426 .state = WREPL_STATE_ACTIVE,
2427 .node = WREPL_NODE_B,
2429 .num_ips = ARRAY_SIZE(addresses_A_1),
2430 .ips = addresses_A_1,
2431 .apply_expected = True
2436 * group,tombstone vs. sgroup,tombstone
2437 * => should be replaced
2440 .line = __location__,
2441 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2444 .type = WREPL_TYPE_GROUP,
2445 .state = WREPL_STATE_TOMBSTONE,
2446 .node = WREPL_NODE_B,
2448 .num_ips = ARRAY_SIZE(addresses_A_1),
2449 .ips = addresses_A_1,
2450 .apply_expected = True
2454 .type = WREPL_TYPE_SGROUP,
2455 .state = WREPL_STATE_TOMBSTONE,
2456 .node = WREPL_NODE_B,
2458 .num_ips = ARRAY_SIZE(addresses_B_1),
2459 .ips = addresses_B_1,
2460 .apply_expected = True
2465 * normal groups vs multi homed section,
2468 * group,active vs. mhomed,active
2469 * => should NOT be replaced
2472 .line = __location__,
2473 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2476 .type = WREPL_TYPE_GROUP,
2477 .state = WREPL_STATE_ACTIVE,
2478 .node = WREPL_NODE_B,
2480 .num_ips = ARRAY_SIZE(addresses_B_1),
2481 .ips = addresses_B_1,
2482 .apply_expected = True
2486 .type = WREPL_TYPE_MHOMED,
2487 .state = WREPL_STATE_ACTIVE,
2488 .node = WREPL_NODE_B,
2490 .num_ips = ARRAY_SIZE(addresses_B_1),
2491 .ips = addresses_B_1,
2492 .apply_expected = False
2497 * group,active vs. mhomed,tombstone
2498 * => should NOT be replaced
2501 .line = __location__,
2502 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2505 .type = WREPL_TYPE_GROUP,
2506 .state = WREPL_STATE_ACTIVE,
2507 .node = WREPL_NODE_B,
2509 .num_ips = ARRAY_SIZE(addresses_B_1),
2510 .ips = addresses_B_1,
2511 .apply_expected = True
2515 .type = WREPL_TYPE_MHOMED,
2516 .state = WREPL_STATE_TOMBSTONE,
2517 .node = WREPL_NODE_B,
2519 .num_ips = ARRAY_SIZE(addresses_B_1),
2520 .ips = addresses_B_1,
2521 .apply_expected = False
2526 * group,released vs. mhomed,active
2527 * => should NOT be replaced
2530 .line = __location__,
2531 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2534 .type = WREPL_TYPE_GROUP,
2535 .state = WREPL_STATE_RELEASED,
2536 .node = WREPL_NODE_B,
2538 .num_ips = ARRAY_SIZE(addresses_B_1),
2539 .ips = addresses_B_1,
2540 .apply_expected = False
2544 .type = WREPL_TYPE_MHOMED,
2545 .state = WREPL_STATE_ACTIVE,
2546 .node = WREPL_NODE_B,
2548 .num_ips = ARRAY_SIZE(addresses_B_1),
2549 .ips = addresses_B_1,
2550 .apply_expected = False
2555 * group,released vs. mhomed,tombstone
2556 * => should NOT be replaced
2559 .line = __location__,
2560 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2563 .type = WREPL_TYPE_GROUP,
2564 .state = WREPL_STATE_RELEASED,
2565 .node = WREPL_NODE_B,
2567 .num_ips = ARRAY_SIZE(addresses_B_1),
2568 .ips = addresses_B_1,
2569 .apply_expected = False
2573 .type = WREPL_TYPE_MHOMED,
2574 .state = WREPL_STATE_TOMBSTONE,
2575 .node = WREPL_NODE_B,
2577 .num_ips = ARRAY_SIZE(addresses_B_1),
2578 .ips = addresses_B_1,
2579 .apply_expected = False
2584 * group,tombstone vs. mhomed,active
2585 * => should be replaced
2588 .line = __location__,
2589 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2592 .type = WREPL_TYPE_GROUP,
2593 .state = WREPL_STATE_TOMBSTONE,
2594 .node = WREPL_NODE_B,
2596 .num_ips = ARRAY_SIZE(addresses_B_1),
2597 .ips = addresses_B_1,
2598 .apply_expected = True
2602 .type = WREPL_TYPE_MHOMED,
2603 .state = WREPL_STATE_ACTIVE,
2604 .node = WREPL_NODE_B,
2606 .num_ips = ARRAY_SIZE(addresses_A_1),
2607 .ips = addresses_A_1,
2608 .apply_expected = True
2613 * group,tombstone vs. mhomed,tombstone
2614 * => should be replaced
2617 .line = __location__,
2618 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2621 .type = WREPL_TYPE_GROUP,
2622 .state = WREPL_STATE_TOMBSTONE,
2623 .node = WREPL_NODE_B,
2625 .num_ips = ARRAY_SIZE(addresses_A_1),
2626 .ips = addresses_A_1,
2627 .apply_expected = True
2631 .type = WREPL_TYPE_MHOMED,
2632 .state = WREPL_STATE_TOMBSTONE,
2633 .node = WREPL_NODE_B,
2635 .num_ips = ARRAY_SIZE(addresses_B_1),
2636 .ips = addresses_B_1,
2637 .apply_expected = True
2642 * special groups vs unique section,
2645 * sgroup,active vs. unique,active
2646 * => should NOT be replaced
2649 .line = __location__,
2650 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2653 .type = WREPL_TYPE_SGROUP,
2654 .state = WREPL_STATE_ACTIVE,
2655 .node = WREPL_NODE_B,
2657 .num_ips = ARRAY_SIZE(addresses_B_1),
2658 .ips = addresses_B_1,
2659 .apply_expected = True
2663 .type = WREPL_TYPE_UNIQUE,
2664 .state = WREPL_STATE_ACTIVE,
2665 .node = WREPL_NODE_B,
2667 .num_ips = ARRAY_SIZE(addresses_B_1),
2668 .ips = addresses_B_1,
2669 .apply_expected = False
2674 * sgroup,active vs. unique,tombstone
2675 * => should NOT be replaced
2678 .line = __location__,
2679 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2682 .type = WREPL_TYPE_SGROUP,
2683 .state = WREPL_STATE_ACTIVE,
2684 .node = WREPL_NODE_B,
2686 .num_ips = ARRAY_SIZE(addresses_B_1),
2687 .ips = addresses_B_1,
2688 .apply_expected = True
2692 .type = WREPL_TYPE_UNIQUE,
2693 .state = WREPL_STATE_TOMBSTONE,
2694 .node = WREPL_NODE_B,
2696 .num_ips = ARRAY_SIZE(addresses_B_1),
2697 .ips = addresses_B_1,
2698 .apply_expected = False
2703 * sgroup,released vs. unique,active
2704 * => should be replaced
2707 .line = __location__,
2708 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2711 .type = WREPL_TYPE_SGROUP,
2712 .state = WREPL_STATE_RELEASED,
2713 .node = WREPL_NODE_B,
2715 .num_ips = ARRAY_SIZE(addresses_B_1),
2716 .ips = addresses_B_1,
2717 .apply_expected = False
2721 .type = WREPL_TYPE_UNIQUE,
2722 .state = WREPL_STATE_ACTIVE,
2723 .node = WREPL_NODE_B,
2725 .num_ips = ARRAY_SIZE(addresses_A_1),
2726 .ips = addresses_A_1,
2727 .apply_expected = True
2732 * sgroup,released vs. unique,tombstone
2733 * => should be replaced
2736 .line = __location__,
2737 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2740 .type = WREPL_TYPE_SGROUP,
2741 .state = WREPL_STATE_RELEASED,
2742 .node = WREPL_NODE_B,
2744 .num_ips = ARRAY_SIZE(addresses_A_1),
2745 .ips = addresses_A_1,
2746 .apply_expected = False
2750 .type = WREPL_TYPE_UNIQUE,
2751 .state = WREPL_STATE_TOMBSTONE,
2752 .node = WREPL_NODE_B,
2754 .num_ips = ARRAY_SIZE(addresses_B_1),
2755 .ips = addresses_B_1,
2756 .apply_expected = True
2761 * sgroup,tombstone vs. unique,active
2762 * => should be replaced
2765 .line = __location__,
2766 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2769 .type = WREPL_TYPE_SGROUP,
2770 .state = WREPL_STATE_TOMBSTONE,
2771 .node = WREPL_NODE_B,
2773 .num_ips = ARRAY_SIZE(addresses_A_1),
2774 .ips = addresses_A_1,
2775 .apply_expected = True
2779 .type = WREPL_TYPE_UNIQUE,
2780 .state = WREPL_STATE_ACTIVE,
2781 .node = WREPL_NODE_B,
2783 .num_ips = ARRAY_SIZE(addresses_B_1),
2784 .ips = addresses_B_1,
2785 .apply_expected = True
2790 * sgroup,tombstone vs. unique,tombstone
2791 * => should be replaced
2794 .line = __location__,
2795 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2798 .type = WREPL_TYPE_SGROUP,
2799 .state = WREPL_STATE_TOMBSTONE,
2800 .node = WREPL_NODE_B,
2802 .num_ips = ARRAY_SIZE(addresses_B_1),
2803 .ips = addresses_B_1,
2804 .apply_expected = True
2808 .type = WREPL_TYPE_UNIQUE,
2809 .state = WREPL_STATE_TOMBSTONE,
2810 .node = WREPL_NODE_B,
2812 .num_ips = ARRAY_SIZE(addresses_A_1),
2813 .ips = addresses_A_1,
2814 .apply_expected = True
2819 * special groups vs normal group section,
2822 * sgroup,active vs. group,active
2823 * => should NOT be replaced
2826 .line = __location__,
2827 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2830 .type = WREPL_TYPE_SGROUP,
2831 .state = WREPL_STATE_ACTIVE,
2832 .node = WREPL_NODE_B,
2834 .num_ips = ARRAY_SIZE(addresses_A_1),
2835 .ips = addresses_A_1,
2836 .apply_expected = True
2840 .type = WREPL_TYPE_GROUP,
2841 .state = WREPL_STATE_ACTIVE,
2842 .node = WREPL_NODE_B,
2844 .num_ips = ARRAY_SIZE(addresses_A_1),
2845 .ips = addresses_A_1,
2846 .apply_expected = False
2851 * sgroup,active vs. group,tombstone
2852 * => should NOT be replaced
2855 .line = __location__,
2856 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2859 .type = WREPL_TYPE_SGROUP,
2860 .state = WREPL_STATE_ACTIVE,
2861 .node = WREPL_NODE_B,
2863 .num_ips = ARRAY_SIZE(addresses_A_1),
2864 .ips = addresses_A_1,
2865 .apply_expected = True
2869 .type = WREPL_TYPE_GROUP,
2870 .state = WREPL_STATE_TOMBSTONE,
2871 .node = WREPL_NODE_B,
2873 .num_ips = ARRAY_SIZE(addresses_A_1),
2874 .ips = addresses_A_1,
2875 .apply_expected = False
2880 * sgroup,released vs. group,active
2881 * => should be replaced
2884 .line = __location__,
2885 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2888 .type = WREPL_TYPE_SGROUP,
2889 .state = WREPL_STATE_RELEASED,
2890 .node = WREPL_NODE_B,
2892 .num_ips = ARRAY_SIZE(addresses_A_1),
2893 .ips = addresses_A_1,
2894 .apply_expected = False
2898 .type = WREPL_TYPE_GROUP,
2899 .state = WREPL_STATE_ACTIVE,
2900 .node = WREPL_NODE_B,
2902 .num_ips = ARRAY_SIZE(addresses_B_1),
2903 .ips = addresses_B_1,
2904 .apply_expected = True
2909 * sgroup,released vs. group,tombstone
2910 * => should be replaced
2913 .line = __location__,
2914 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2917 .type = WREPL_TYPE_SGROUP,
2918 .state = WREPL_STATE_RELEASED,
2919 .node = WREPL_NODE_B,
2921 .num_ips = ARRAY_SIZE(addresses_B_1),
2922 .ips = addresses_B_1,
2923 .apply_expected = False
2927 .type = WREPL_TYPE_GROUP,
2928 .state = WREPL_STATE_TOMBSTONE,
2929 .node = WREPL_NODE_B,
2931 .num_ips = ARRAY_SIZE(addresses_A_1),
2932 .ips = addresses_A_1,
2933 .apply_expected = True
2938 * sgroup,tombstone vs. group,active
2939 * => should NOT be replaced
2942 .line = __location__,
2943 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2946 .type = WREPL_TYPE_SGROUP,
2947 .state = WREPL_STATE_TOMBSTONE,
2948 .node = WREPL_NODE_B,
2950 .num_ips = ARRAY_SIZE(addresses_A_1),
2951 .ips = addresses_A_1,
2952 .apply_expected = True
2956 .type = WREPL_TYPE_GROUP,
2957 .state = WREPL_STATE_ACTIVE,
2958 .node = WREPL_NODE_B,
2960 .num_ips = ARRAY_SIZE(addresses_B_1),
2961 .ips = addresses_B_1,
2962 .apply_expected = True
2967 * sgroup,tombstone vs. group,tombstone
2968 * => should NOT be replaced
2971 .line = __location__,
2972 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2975 .type = WREPL_TYPE_SGROUP,
2976 .state = WREPL_STATE_TOMBSTONE,
2977 .node = WREPL_NODE_B,
2979 .num_ips = ARRAY_SIZE(addresses_B_1),
2980 .ips = addresses_B_1,
2981 .apply_expected = True
2985 .type = WREPL_TYPE_GROUP,
2986 .state = WREPL_STATE_TOMBSTONE,
2987 .node = WREPL_NODE_B,
2989 .num_ips = ARRAY_SIZE(addresses_A_1),
2990 .ips = addresses_A_1,
2991 .apply_expected = True
2996 * special groups (not active) vs special group section,
2999 * sgroup,released vs. sgroup,active
3000 * => should be replaced
3003 .line = __location__,
3004 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3007 .type = WREPL_TYPE_SGROUP,
3008 .state = WREPL_STATE_RELEASED,
3009 .node = WREPL_NODE_B,
3011 .num_ips = ARRAY_SIZE(addresses_A_1),
3012 .ips = addresses_A_1,
3013 .apply_expected = False
3017 .type = WREPL_TYPE_SGROUP,
3018 .state = WREPL_STATE_ACTIVE,
3019 .node = WREPL_NODE_B,
3021 .num_ips = ARRAY_SIZE(addresses_B_1),
3022 .ips = addresses_B_1,
3023 .apply_expected = True
3028 * sgroup,released vs. sgroup,tombstone
3029 * => should be replaced
3032 .line = __location__,
3033 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3036 .type = WREPL_TYPE_SGROUP,
3037 .state = WREPL_STATE_RELEASED,
3038 .node = WREPL_NODE_B,
3040 .num_ips = ARRAY_SIZE(addresses_B_1),
3041 .ips = addresses_B_1,
3042 .apply_expected = False
3046 .type = WREPL_TYPE_SGROUP,
3047 .state = WREPL_STATE_TOMBSTONE,
3048 .node = WREPL_NODE_B,
3050 .num_ips = ARRAY_SIZE(addresses_A_1),
3051 .ips = addresses_A_1,
3052 .apply_expected = True
3057 * sgroup,tombstone vs. sgroup,active
3058 * => should NOT be replaced
3061 .line = __location__,
3062 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3065 .type = WREPL_TYPE_SGROUP,
3066 .state = WREPL_STATE_TOMBSTONE,
3067 .node = WREPL_NODE_B,
3069 .num_ips = ARRAY_SIZE(addresses_A_1),
3070 .ips = addresses_A_1,
3071 .apply_expected = True
3075 .type = WREPL_TYPE_SGROUP,
3076 .state = WREPL_STATE_ACTIVE,
3077 .node = WREPL_NODE_B,
3079 .num_ips = ARRAY_SIZE(addresses_B_1),
3080 .ips = addresses_B_1,
3081 .apply_expected = True
3086 * sgroup,tombstone vs. sgroup,tombstone
3087 * => should NOT be replaced
3090 .line = __location__,
3091 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3094 .type = WREPL_TYPE_SGROUP,
3095 .state = WREPL_STATE_TOMBSTONE,
3096 .node = WREPL_NODE_B,
3098 .num_ips = ARRAY_SIZE(addresses_B_1),
3099 .ips = addresses_B_1,
3100 .apply_expected = True
3104 .type = WREPL_TYPE_SGROUP,
3105 .state = WREPL_STATE_TOMBSTONE,
3106 .node = WREPL_NODE_B,
3108 .num_ips = ARRAY_SIZE(addresses_A_1),
3109 .ips = addresses_A_1,
3110 .apply_expected = True
3115 * special groups vs multi homed section,
3118 * sgroup,active vs. mhomed,active
3119 * => should NOT be replaced
3122 .line = __location__,
3123 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3126 .type = WREPL_TYPE_SGROUP,
3127 .state = WREPL_STATE_ACTIVE,
3128 .node = WREPL_NODE_B,
3130 .num_ips = ARRAY_SIZE(addresses_A_1),
3131 .ips = addresses_A_1,
3132 .apply_expected = True
3136 .type = WREPL_TYPE_MHOMED,
3137 .state = WREPL_STATE_ACTIVE,
3138 .node = WREPL_NODE_B,
3140 .num_ips = ARRAY_SIZE(addresses_A_1),
3141 .ips = addresses_A_1,
3142 .apply_expected = False
3147 * sgroup,active vs. mhomed,tombstone
3148 * => should NOT be replaced
3151 .line = __location__,
3152 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3155 .type = WREPL_TYPE_SGROUP,
3156 .state = WREPL_STATE_ACTIVE,
3157 .node = WREPL_NODE_B,
3159 .num_ips = ARRAY_SIZE(addresses_A_1),
3160 .ips = addresses_A_1,
3161 .apply_expected = True
3165 .type = WREPL_TYPE_MHOMED,
3166 .state = WREPL_STATE_TOMBSTONE,
3167 .node = WREPL_NODE_B,
3169 .num_ips = ARRAY_SIZE(addresses_A_1),
3170 .ips = addresses_A_1,
3171 .apply_expected = False
3176 * sgroup,released vs. mhomed,active
3177 * => should be replaced
3180 .line = __location__,
3181 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3184 .type = WREPL_TYPE_SGROUP,
3185 .state = WREPL_STATE_RELEASED,
3186 .node = WREPL_NODE_B,
3188 .num_ips = ARRAY_SIZE(addresses_A_1),
3189 .ips = addresses_A_1,
3190 .apply_expected = False
3194 .type = WREPL_TYPE_MHOMED,
3195 .state = WREPL_STATE_ACTIVE,
3196 .node = WREPL_NODE_B,
3198 .num_ips = ARRAY_SIZE(addresses_B_1),
3199 .ips = addresses_B_1,
3200 .apply_expected = True
3205 * sgroup,released vs. mhomed,tombstone
3206 * => should be replaced
3209 .line = __location__,
3210 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3213 .type = WREPL_TYPE_SGROUP,
3214 .state = WREPL_STATE_RELEASED,
3215 .node = WREPL_NODE_B,
3217 .num_ips = ARRAY_SIZE(addresses_B_1),
3218 .ips = addresses_B_1,
3219 .apply_expected = False
3223 .type = WREPL_TYPE_MHOMED,
3224 .state = WREPL_STATE_TOMBSTONE,
3225 .node = WREPL_NODE_B,
3227 .num_ips = ARRAY_SIZE(addresses_A_1),
3228 .ips = addresses_A_1,
3229 .apply_expected = True
3234 * sgroup,tombstone vs. mhomed,active
3235 * => should be replaced
3238 .line = __location__,
3239 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3242 .type = WREPL_TYPE_SGROUP,
3243 .state = WREPL_STATE_TOMBSTONE,
3244 .node = WREPL_NODE_B,
3246 .num_ips = ARRAY_SIZE(addresses_A_1),
3247 .ips = addresses_A_1,
3248 .apply_expected = True
3252 .type = WREPL_TYPE_MHOMED,
3253 .state = WREPL_STATE_ACTIVE,
3254 .node = WREPL_NODE_B,
3256 .num_ips = ARRAY_SIZE(addresses_B_1),
3257 .ips = addresses_B_1,
3258 .apply_expected = True
3263 * sgroup,tombstone vs. mhomed,tombstone
3264 * => should be replaced
3267 .line = __location__,
3268 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3271 .type = WREPL_TYPE_SGROUP,
3272 .state = WREPL_STATE_TOMBSTONE,
3273 .node = WREPL_NODE_B,
3275 .num_ips = ARRAY_SIZE(addresses_B_1),
3276 .ips = addresses_B_1,
3277 .apply_expected = True
3281 .type = WREPL_TYPE_MHOMED,
3282 .state = WREPL_STATE_TOMBSTONE,
3283 .node = WREPL_NODE_B,
3285 .num_ips = ARRAY_SIZE(addresses_A_1),
3286 .ips = addresses_A_1,
3287 .apply_expected = True
3292 * multi homed vs. unique section,
3295 * mhomed,active vs. unique,active
3296 * => should be replaced
3299 .line = __location__,
3300 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3303 .type = WREPL_TYPE_MHOMED,
3304 .state = WREPL_STATE_ACTIVE,
3305 .node = WREPL_NODE_B,
3307 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3308 .ips = addresses_A_3_4,
3309 .apply_expected = True
3313 .type = WREPL_TYPE_UNIQUE,
3314 .state = WREPL_STATE_ACTIVE,
3315 .node = WREPL_NODE_B,
3317 .num_ips = ARRAY_SIZE(addresses_B_1),
3318 .ips = addresses_B_1,
3319 .apply_expected = True
3324 * mhomed,active vs. unique,tombstone
3325 * => should NOT be replaced
3328 .line = __location__,
3329 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3332 .type = WREPL_TYPE_MHOMED,
3333 .state = WREPL_STATE_ACTIVE,
3334 .node = WREPL_NODE_B,
3336 .num_ips = ARRAY_SIZE(addresses_B_1),
3337 .ips = addresses_B_1,
3338 .apply_expected = True
3342 .type = WREPL_TYPE_UNIQUE,
3343 .state = WREPL_STATE_TOMBSTONE,
3344 .node = WREPL_NODE_B,
3346 .num_ips = ARRAY_SIZE(addresses_B_1),
3347 .ips = addresses_B_1,
3348 .apply_expected = False
3353 * mhomed,released vs. unique,active
3354 * => should be replaced
3357 .line = __location__,
3358 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3361 .type = WREPL_TYPE_MHOMED,
3362 .state = WREPL_STATE_RELEASED,
3363 .node = WREPL_NODE_B,
3365 .num_ips = ARRAY_SIZE(addresses_A_1),
3366 .ips = addresses_A_1,
3367 .apply_expected = False
3371 .type = WREPL_TYPE_UNIQUE,
3372 .state = WREPL_STATE_ACTIVE,
3373 .node = WREPL_NODE_B,
3375 .num_ips = ARRAY_SIZE(addresses_B_1),
3376 .ips = addresses_B_1,
3377 .apply_expected = True
3382 * mhomed,released vs. uinique,tombstone
3383 * => should be replaced
3386 .line = __location__,
3387 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3390 .type = WREPL_TYPE_MHOMED,
3391 .state = WREPL_STATE_RELEASED,
3392 .node = WREPL_NODE_B,
3394 .num_ips = ARRAY_SIZE(addresses_B_1),
3395 .ips = addresses_B_1,
3396 .apply_expected = False
3400 .type = WREPL_TYPE_UNIQUE,
3401 .state = WREPL_STATE_TOMBSTONE,
3402 .node = WREPL_NODE_B,
3404 .num_ips = ARRAY_SIZE(addresses_A_1),
3405 .ips = addresses_A_1,
3406 .apply_expected = True
3411 * mhomed,tombstone vs. unique,active
3412 * => should be replaced
3415 .line = __location__,
3416 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3419 .type = WREPL_TYPE_MHOMED,
3420 .state = WREPL_STATE_TOMBSTONE,
3421 .node = WREPL_NODE_B,
3423 .num_ips = ARRAY_SIZE(addresses_A_1),
3424 .ips = addresses_A_1,
3425 .apply_expected = True
3429 .type = WREPL_TYPE_UNIQUE,
3430 .state = WREPL_STATE_ACTIVE,
3431 .node = WREPL_NODE_B,
3433 .num_ips = ARRAY_SIZE(addresses_B_1),
3434 .ips = addresses_B_1,
3435 .apply_expected = True
3440 * mhomed,tombstone vs. uinique,tombstone
3441 * => should be replaced
3444 .line = __location__,
3445 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3448 .type = WREPL_TYPE_MHOMED,
3449 .state = WREPL_STATE_TOMBSTONE,
3450 .node = WREPL_NODE_B,
3452 .num_ips = ARRAY_SIZE(addresses_B_1),
3453 .ips = addresses_B_1,
3454 .apply_expected = True
3458 .type = WREPL_TYPE_UNIQUE,
3459 .state = WREPL_STATE_TOMBSTONE,
3460 .node = WREPL_NODE_B,
3462 .num_ips = ARRAY_SIZE(addresses_A_1),
3463 .ips = addresses_A_1,
3464 .apply_expected = True
3469 * multi homed vs. normal group section,
3472 * mhomed,active vs. group,active
3473 * => should be replaced
3476 .line = __location__,
3477 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3480 .type = WREPL_TYPE_MHOMED,
3481 .state = WREPL_STATE_ACTIVE,
3482 .node = WREPL_NODE_B,
3484 .num_ips = ARRAY_SIZE(addresses_A_1),
3485 .ips = addresses_A_1,
3486 .apply_expected = True
3490 .type = WREPL_TYPE_GROUP,
3491 .state = WREPL_STATE_ACTIVE,
3492 .node = WREPL_NODE_B,
3494 .num_ips = ARRAY_SIZE(addresses_B_1),
3495 .ips = addresses_B_1,
3496 .apply_expected = True
3501 * mhomed,active vs. group,tombstone
3502 * => should NOT be replaced
3505 .line = __location__,
3506 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3509 .type = WREPL_TYPE_MHOMED,
3510 .state = WREPL_STATE_ACTIVE,
3511 .node = WREPL_NODE_B,
3513 .num_ips = ARRAY_SIZE(addresses_B_1),
3514 .ips = addresses_B_1,
3515 .apply_expected = True
3519 .type = WREPL_TYPE_GROUP,
3520 .state = WREPL_STATE_TOMBSTONE,
3521 .node = WREPL_NODE_B,
3523 .num_ips = ARRAY_SIZE(addresses_B_1),
3524 .ips = addresses_B_1,
3525 .apply_expected = False
3530 * mhomed,released vs. group,active
3531 * => should be replaced
3534 .line = __location__,
3535 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3538 .type = WREPL_TYPE_MHOMED,
3539 .state = WREPL_STATE_RELEASED,
3540 .node = WREPL_NODE_B,
3542 .num_ips = ARRAY_SIZE(addresses_B_1),
3543 .ips = addresses_B_1,
3544 .apply_expected = False
3548 .type = WREPL_TYPE_GROUP,
3549 .state = WREPL_STATE_ACTIVE,
3550 .node = WREPL_NODE_B,
3552 .num_ips = ARRAY_SIZE(addresses_A_1),
3553 .ips = addresses_A_1,
3554 .apply_expected = True
3559 * mhomed,released vs. group,tombstone
3560 * => should be replaced
3563 .line = __location__,
3564 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3567 .type = WREPL_TYPE_MHOMED,
3568 .state = WREPL_STATE_RELEASED,
3569 .node = WREPL_NODE_B,
3571 .num_ips = ARRAY_SIZE(addresses_A_1),
3572 .ips = addresses_A_1,
3573 .apply_expected = False
3577 .type = WREPL_TYPE_GROUP,
3578 .state = WREPL_STATE_TOMBSTONE,
3579 .node = WREPL_NODE_B,
3581 .num_ips = ARRAY_SIZE(addresses_B_1),
3582 .ips = addresses_B_1,
3583 .apply_expected = True
3588 * mhomed,tombstone vs. group,active
3589 * => should be replaced
3592 .line = __location__,
3593 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3596 .type = WREPL_TYPE_MHOMED,
3597 .state = WREPL_STATE_TOMBSTONE,
3598 .node = WREPL_NODE_B,
3600 .num_ips = ARRAY_SIZE(addresses_B_1),
3601 .ips = addresses_B_1,
3602 .apply_expected = True
3606 .type = WREPL_TYPE_GROUP,
3607 .state = WREPL_STATE_ACTIVE,
3608 .node = WREPL_NODE_B,
3610 .num_ips = ARRAY_SIZE(addresses_A_1),
3611 .ips = addresses_A_1,
3612 .apply_expected = True
3617 * mhomed,tombstone vs. group,tombstone
3618 * => should be replaced
3621 .line = __location__,
3622 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3625 .type = WREPL_TYPE_MHOMED,
3626 .state = WREPL_STATE_TOMBSTONE,
3627 .node = WREPL_NODE_B,
3629 .num_ips = ARRAY_SIZE(addresses_A_1),
3630 .ips = addresses_A_1,
3631 .apply_expected = True
3635 .type = WREPL_TYPE_GROUP,
3636 .state = WREPL_STATE_TOMBSTONE,
3637 .node = WREPL_NODE_B,
3639 .num_ips = ARRAY_SIZE(addresses_B_1),
3640 .ips = addresses_B_1,
3641 .apply_expected = True
3646 * multi homed vs. special group section,
3649 * mhomed,active vs. sgroup,active
3650 * => should NOT be replaced
3653 .line = __location__,
3654 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3657 .type = WREPL_TYPE_MHOMED,
3658 .state = WREPL_STATE_ACTIVE,
3659 .node = WREPL_NODE_B,
3661 .num_ips = ARRAY_SIZE(addresses_A_1),
3662 .ips = addresses_A_1,
3663 .apply_expected = True
3667 .type = WREPL_TYPE_SGROUP,
3668 .state = WREPL_STATE_ACTIVE,
3669 .node = WREPL_NODE_B,
3671 .num_ips = ARRAY_SIZE(addresses_A_1),
3672 .ips = addresses_A_1,
3673 .apply_expected = False
3678 * mhomed,active vs. sgroup,tombstone
3679 * => should NOT be replaced
3682 .line = __location__,
3683 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3686 .type = WREPL_TYPE_MHOMED,
3687 .state = WREPL_STATE_ACTIVE,
3688 .node = WREPL_NODE_B,
3690 .num_ips = ARRAY_SIZE(addresses_A_1),
3691 .ips = addresses_A_1,
3692 .apply_expected = True
3696 .type = WREPL_TYPE_SGROUP,
3697 .state = WREPL_STATE_TOMBSTONE,
3698 .node = WREPL_NODE_B,
3700 .num_ips = ARRAY_SIZE(addresses_A_1),
3701 .ips = addresses_A_1,
3702 .apply_expected = False
3707 * mhomed,released vs. sgroup,active
3708 * => should be replaced
3711 .line = __location__,
3712 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3715 .type = WREPL_TYPE_MHOMED,
3716 .state = WREPL_STATE_RELEASED,
3717 .node = WREPL_NODE_B,
3719 .num_ips = ARRAY_SIZE(addresses_A_1),
3720 .ips = addresses_A_1,
3721 .apply_expected = False
3725 .type = WREPL_TYPE_SGROUP,
3726 .state = WREPL_STATE_ACTIVE,
3727 .node = WREPL_NODE_B,
3729 .num_ips = ARRAY_SIZE(addresses_B_1),
3730 .ips = addresses_B_1,
3731 .apply_expected = True
3736 * mhomed,released vs. sgroup,tombstone
3737 * => should be replaced
3740 .line = __location__,
3741 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3744 .type = WREPL_TYPE_MHOMED,
3745 .state = WREPL_STATE_RELEASED,
3746 .node = WREPL_NODE_B,
3748 .num_ips = ARRAY_SIZE(addresses_B_1),
3749 .ips = addresses_B_1,
3750 .apply_expected = False
3754 .type = WREPL_TYPE_SGROUP,
3755 .state = WREPL_STATE_TOMBSTONE,
3756 .node = WREPL_NODE_B,
3758 .num_ips = ARRAY_SIZE(addresses_A_1),
3759 .ips = addresses_A_1,
3760 .apply_expected = True
3765 * mhomed,tombstone vs. sgroup,active
3766 * => should be replaced
3769 .line = __location__,
3770 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3773 .type = WREPL_TYPE_MHOMED,
3774 .state = WREPL_STATE_TOMBSTONE,
3775 .node = WREPL_NODE_B,
3777 .num_ips = ARRAY_SIZE(addresses_A_1),
3778 .ips = addresses_A_1,
3779 .apply_expected = True
3783 .type = WREPL_TYPE_SGROUP,
3784 .state = WREPL_STATE_ACTIVE,
3785 .node = WREPL_NODE_B,
3787 .num_ips = ARRAY_SIZE(addresses_B_1),
3788 .ips = addresses_B_1,
3789 .apply_expected = True
3794 * mhomed,tombstone vs. sgroup,tombstone
3795 * => should be replaced
3798 .line = __location__,
3799 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3802 .type = WREPL_TYPE_MHOMED,
3803 .state = WREPL_STATE_TOMBSTONE,
3804 .node = WREPL_NODE_B,
3806 .num_ips = ARRAY_SIZE(addresses_B_1),
3807 .ips = addresses_B_1,
3808 .apply_expected = True
3812 .type = WREPL_TYPE_SGROUP,
3813 .state = WREPL_STATE_TOMBSTONE,
3814 .node = WREPL_NODE_B,
3816 .num_ips = ARRAY_SIZE(addresses_A_1),
3817 .ips = addresses_A_1,
3818 .apply_expected = True
3823 * multi homed vs. mlti homed section,
3826 * mhomed,active vs. mhomed,active
3827 * => should be replaced
3830 .line = __location__,
3831 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3834 .type = WREPL_TYPE_MHOMED,
3835 .state = WREPL_STATE_ACTIVE,
3836 .node = WREPL_NODE_B,
3838 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3839 .ips = addresses_A_3_4,
3840 .apply_expected = True
3844 .type = WREPL_TYPE_MHOMED,
3845 .state = WREPL_STATE_ACTIVE,
3846 .node = WREPL_NODE_B,
3848 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3849 .ips = addresses_B_3_4,
3850 .apply_expected = True
3855 * mhomed,active vs. mhomed,tombstone
3856 * => should NOT be replaced
3859 .line = __location__,
3860 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3863 .type = WREPL_TYPE_MHOMED,
3864 .state = WREPL_STATE_ACTIVE,
3865 .node = WREPL_NODE_B,
3867 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3868 .ips = addresses_B_3_4,
3869 .apply_expected = True
3873 .type = WREPL_TYPE_MHOMED,
3874 .state = WREPL_STATE_TOMBSTONE,
3875 .node = WREPL_NODE_B,
3877 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3878 .ips = addresses_B_3_4,
3879 .apply_expected = False
3884 * mhomed,released vs. mhomed,active
3885 * => should be replaced
3888 .line = __location__,
3889 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3892 .type = WREPL_TYPE_MHOMED,
3893 .state = WREPL_STATE_RELEASED,
3894 .node = WREPL_NODE_B,
3896 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3897 .ips = addresses_B_3_4,
3898 .apply_expected = False
3902 .type = WREPL_TYPE_MHOMED,
3903 .state = WREPL_STATE_ACTIVE,
3904 .node = WREPL_NODE_B,
3906 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3907 .ips = addresses_A_3_4,
3908 .apply_expected = True
3913 * mhomed,released vs. mhomed,tombstone
3914 * => should be replaced
3917 .line = __location__,
3918 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3921 .type = WREPL_TYPE_MHOMED,
3922 .state = WREPL_STATE_RELEASED,
3923 .node = WREPL_NODE_B,
3925 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3926 .ips = addresses_A_3_4,
3927 .apply_expected = False
3931 .type = WREPL_TYPE_MHOMED,
3932 .state = WREPL_STATE_TOMBSTONE,
3933 .node = WREPL_NODE_B,
3935 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3936 .ips = addresses_B_3_4,
3937 .apply_expected = True
3942 * mhomed,tombstone vs. mhomed,active
3943 * => should be replaced
3946 .line = __location__,
3947 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3950 .type = WREPL_TYPE_MHOMED,
3951 .state = WREPL_STATE_TOMBSTONE,
3952 .node = WREPL_NODE_B,
3954 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3955 .ips = addresses_B_3_4,
3956 .apply_expected = True
3960 .type = WREPL_TYPE_MHOMED,
3961 .state = WREPL_STATE_ACTIVE,
3962 .node = WREPL_NODE_B,
3964 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3965 .ips = addresses_A_3_4,
3966 .apply_expected = True
3971 * mhomed,tombstone vs. mhomed,tombstone
3972 * => should be replaced
3975 .line = __location__,
3976 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3979 .type = WREPL_TYPE_MHOMED,
3980 .state = WREPL_STATE_TOMBSTONE,
3981 .node = WREPL_NODE_B,
3983 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3984 .ips = addresses_A_3_4,
3985 .apply_expected = True
3989 .type = WREPL_TYPE_MHOMED,
3990 .state = WREPL_STATE_TOMBSTONE,
3991 .node = WREPL_NODE_B,
3993 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3994 .ips = addresses_B_3_4,
3995 .apply_expected = True
3999 .line = __location__,
4000 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4004 .type = WREPL_TYPE_UNIQUE,
4005 .state = WREPL_STATE_TOMBSTONE,
4006 .node = WREPL_NODE_B,
4008 .num_ips = ARRAY_SIZE(addresses_B_1),
4009 .ips = addresses_B_1,
4010 .apply_expected = True,
4014 .type = WREPL_TYPE_UNIQUE,
4015 .state = WREPL_STATE_TOMBSTONE,
4016 .node = WREPL_NODE_B,
4018 .num_ips = ARRAY_SIZE(addresses_A_1),
4019 .ips = addresses_A_1,
4020 .apply_expected = True,
4024 * special group vs special group section,
4027 * sgroup,active vs. sgroup,active same addresses
4028 * => should be NOT replaced
4031 .line = __location__,
4032 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4033 .comment= "A:A_3_4 vs. B:A_3_4",
4037 .type = WREPL_TYPE_SGROUP,
4038 .state = WREPL_STATE_ACTIVE,
4039 .node = WREPL_NODE_B,
4041 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4042 .ips = addresses_A_3_4,
4043 .apply_expected = True
4047 .type = WREPL_TYPE_SGROUP,
4048 .state = WREPL_STATE_ACTIVE,
4049 .node = WREPL_NODE_B,
4051 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4052 .ips = addresses_A_3_4,
4053 .apply_expected = False,
4054 .sgroup_cleanup = True
4058 * sgroup,active vs. sgroup,active same addresses
4059 * => should be NOT replaced
4062 .line = __location__,
4063 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4064 .comment= "A:A_3_4 vs. B:NULL",
4068 .type = WREPL_TYPE_SGROUP,
4069 .state = WREPL_STATE_ACTIVE,
4070 .node = WREPL_NODE_B,
4072 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4073 .ips = addresses_A_3_4,
4074 .apply_expected = True
4078 .type = WREPL_TYPE_SGROUP,
4079 .state = WREPL_STATE_ACTIVE,
4080 .node = WREPL_NODE_B,
4084 .apply_expected = False,
4085 .sgroup_cleanup = True
4089 * sgroup,active vs. sgroup,active subset addresses, special case...
4090 * => should NOT be replaced
4093 .line = __location__,
4094 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4095 .comment= "A:A_3_4_X_3_4 vs. B:A_3_4",
4099 .type = WREPL_TYPE_SGROUP,
4100 .state = WREPL_STATE_ACTIVE,
4101 .node = WREPL_NODE_B,
4103 .num_ips = ARRAY_SIZE(addresses_A_3_4_X_3_4),
4104 .ips = addresses_A_3_4_X_3_4,
4105 .apply_expected = True,
4109 .type = WREPL_TYPE_SGROUP,
4110 .state = WREPL_STATE_ACTIVE,
4111 .node = WREPL_NODE_B,
4113 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4114 .ips = addresses_A_3_4,
4115 .apply_expected = False,
4119 .line = __location__,
4120 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4124 .type = WREPL_TYPE_SGROUP,
4125 .state = WREPL_STATE_ACTIVE,
4126 .node = WREPL_NODE_B,
4130 .apply_expected = False,
4134 .type = WREPL_TYPE_SGROUP,
4135 .state = WREPL_STATE_ACTIVE,
4136 .node = WREPL_NODE_B,
4140 .apply_expected = False,
4144 * sgroup,active vs. sgroup,active different addresses, but owner changed
4145 * => should be replaced
4148 .line = __location__,
4149 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4150 .comment= "A:B_3_4 vs. B:A_3_4",
4154 .type = WREPL_TYPE_SGROUP,
4155 .state = WREPL_STATE_ACTIVE,
4156 .node = WREPL_NODE_B,
4158 .num_ips = ARRAY_SIZE(addresses_B_3_4),
4159 .ips = addresses_B_3_4,
4160 .apply_expected = True,
4164 .type = WREPL_TYPE_SGROUP,
4165 .state = WREPL_STATE_ACTIVE,
4166 .node = WREPL_NODE_B,
4168 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4169 .ips = addresses_A_3_4,
4170 .apply_expected = True,
4171 .sgroup_cleanup = True
4175 * sgroup,active vs. sgroup,active different addresses, but owner changed
4176 * => should be replaced
4179 .line = __location__,
4180 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4181 .comment= "A:A_3_4 vs. B:A_3_4_OWNER_B",
4185 .type = WREPL_TYPE_SGROUP,
4186 .state = WREPL_STATE_ACTIVE,
4187 .node = WREPL_NODE_B,
4189 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4190 .ips = addresses_A_3_4,
4191 .apply_expected = True,
4195 .type = WREPL_TYPE_SGROUP,
4196 .state = WREPL_STATE_ACTIVE,
4197 .node = WREPL_NODE_B,
4199 .num_ips = ARRAY_SIZE(addresses_A_3_4_OWNER_B),
4200 .ips = addresses_A_3_4_OWNER_B,
4201 .apply_expected = True,
4202 .sgroup_cleanup = True
4206 * sgroup,active vs. sgroup,active different addresses, but owner changed
4207 * => should be replaced
4210 .line = __location__,
4211 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4212 .comment= "A:A_3_4_OWNER_B vs. B:A_3_4",
4216 .type = WREPL_TYPE_SGROUP,
4217 .state = WREPL_STATE_ACTIVE,
4218 .node = WREPL_NODE_B,
4220 .num_ips = ARRAY_SIZE(addresses_A_3_4_OWNER_B),
4221 .ips = addresses_A_3_4_OWNER_B,
4222 .apply_expected = True,
4226 .type = WREPL_TYPE_SGROUP,
4227 .state = WREPL_STATE_ACTIVE,
4228 .node = WREPL_NODE_B,
4230 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4231 .ips = addresses_A_3_4,
4232 .apply_expected = True,
4233 .sgroup_cleanup = True
4237 * sgroup,active vs. sgroup,active different addresses
4238 * => should be merged
4241 .line = __location__,
4242 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4243 .comment= "A:A_3_4 vs. B:B_3_4 => C:A_3_4_B_3_4",
4247 .type = WREPL_TYPE_SGROUP,
4248 .state = WREPL_STATE_ACTIVE,
4249 .node = WREPL_NODE_B,
4251 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4252 .ips = addresses_A_3_4,
4253 .apply_expected = True,
4257 .type = WREPL_TYPE_SGROUP,
4258 .state = WREPL_STATE_ACTIVE,
4259 .node = WREPL_NODE_B,
4261 .num_ips = ARRAY_SIZE(addresses_B_3_4),
4262 .ips = addresses_B_3_4,
4263 .sgroup_merge = True,
4264 .sgroup_cleanup = True,
4268 * sgroup,active vs. sgroup,active different addresses, special case...
4269 * => should be merged
4272 .line = __location__,
4273 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4274 .comment= "A:B_3_4_X_3_4 vs. B:A_3_4 => B:A_3_4_X_3_4",
4278 .type = WREPL_TYPE_SGROUP,
4279 .state = WREPL_STATE_ACTIVE,
4280 .node = WREPL_NODE_B,
4282 .num_ips = ARRAY_SIZE(addresses_B_3_4_X_3_4),
4283 .ips = addresses_B_3_4_X_3_4,
4284 .apply_expected = True,
4288 .type = WREPL_TYPE_SGROUP,
4289 .state = WREPL_STATE_ACTIVE,
4290 .node = WREPL_NODE_B,
4292 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4293 .ips = addresses_A_3_4,
4294 .sgroup_merge = True,
4295 .merge_owner = &ctx->b,
4296 .sgroup_cleanup = False
4300 .line = __location__,
4301 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4305 .type = WREPL_TYPE_SGROUP,
4306 .state = WREPL_STATE_ACTIVE,
4307 .node = WREPL_NODE_B,
4309 .num_ips = ARRAY_SIZE(addresses_A_3_4_X_3_4_OWNER_B),
4310 .ips = addresses_A_3_4_X_3_4_OWNER_B,
4311 .apply_expected = True,
4315 .type = WREPL_TYPE_SGROUP,
4316 .state = WREPL_STATE_ACTIVE,
4317 .node = WREPL_NODE_B,
4321 .apply_expected = False,
4325 * sgroup,active vs. sgroup,active different addresses, special case...
4326 * => should be merged
4329 .line = __location__,
4330 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4331 .comment= "A:X_3_4 vs. B:A_3_4 => C:A_3_4_X_3_4",
4335 .type = WREPL_TYPE_SGROUP,
4336 .state = WREPL_STATE_ACTIVE,
4337 .node = WREPL_NODE_B,
4339 .num_ips = ARRAY_SIZE(addresses_X_3_4),
4340 .ips = addresses_X_3_4,
4341 .apply_expected = True,
4345 .type = WREPL_TYPE_SGROUP,
4346 .state = WREPL_STATE_ACTIVE,
4347 .node = WREPL_NODE_B,
4349 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4350 .ips = addresses_A_3_4,
4351 .sgroup_merge = True,
4352 .sgroup_cleanup = False
4356 .line = __location__,
4357 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4361 .type = WREPL_TYPE_SGROUP,
4362 .state = WREPL_STATE_ACTIVE,
4363 .node = WREPL_NODE_B,
4367 .apply_expected = False,
4371 .type = WREPL_TYPE_SGROUP,
4372 .state = WREPL_STATE_ACTIVE,
4373 .node = WREPL_NODE_B,
4377 .apply_expected = False,
4381 * sgroup,active vs. sgroup,active different addresses, special case...
4382 * => should be merged
4385 .line = __location__,
4386 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4387 .comment= "A:A_3_4_X_3_4 vs. B:A_3_4_OWNER_B => B:A_3_4_OWNER_B_X_3_4",
4391 .type = WREPL_TYPE_SGROUP,
4392 .state = WREPL_STATE_ACTIVE,
4393 .node = WREPL_NODE_B,
4395 .num_ips = ARRAY_SIZE(addresses_A_3_4_X_3_4),
4396 .ips = addresses_A_3_4_X_3_4,
4397 .apply_expected = True,
4401 .type = WREPL_TYPE_SGROUP,
4402 .state = WREPL_STATE_ACTIVE,
4403 .node = WREPL_NODE_B,
4405 .num_ips = ARRAY_SIZE(addresses_A_3_4_OWNER_B),
4406 .ips = addresses_A_3_4_OWNER_B,
4407 .sgroup_merge = True,
4408 .merge_owner = &ctx->b,
4412 .line = __location__,
4413 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4417 .type = WREPL_TYPE_SGROUP,
4418 .state = WREPL_STATE_ACTIVE,
4419 .node = WREPL_NODE_B,
4423 .apply_expected = False,
4427 .type = WREPL_TYPE_SGROUP,
4428 .state = WREPL_STATE_ACTIVE,
4429 .node = WREPL_NODE_B,
4433 .apply_expected = False,
4437 * sgroup,active vs. sgroup,active partly different addresses, special case...
4438 * => should be merged
4441 .line = __location__,
4442 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4443 .comment= "A:B_3_4_X_3_4 vs. B:B_3_4_X_1_2 => C:B_3_4_X_1_2_3_4",
4447 .type = WREPL_TYPE_SGROUP,
4448 .state = WREPL_STATE_ACTIVE,
4449 .node = WREPL_NODE_B,
4451 .num_ips = ARRAY_SIZE(addresses_B_3_4_X_3_4),
4452 .ips = addresses_B_3_4_X_3_4,
4453 .apply_expected = True,
4457 .type = WREPL_TYPE_SGROUP,
4458 .state = WREPL_STATE_ACTIVE,
4459 .node = WREPL_NODE_B,
4461 .num_ips = ARRAY_SIZE(addresses_B_3_4_X_1_2),
4462 .ips = addresses_B_3_4_X_1_2,
4463 .sgroup_merge = True,
4464 .sgroup_cleanup = False
4468 .line = __location__,
4469 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4473 .type = WREPL_TYPE_SGROUP,
4474 .state = WREPL_STATE_ACTIVE,
4475 .node = WREPL_NODE_B,
4479 .apply_expected = False,
4483 .type = WREPL_TYPE_SGROUP,
4484 .state = WREPL_STATE_ACTIVE,
4485 .node = WREPL_NODE_B,
4489 .apply_expected = False,
4493 * sgroup,active vs. sgroup,active different addresses, special case...
4494 * => should be merged
4497 .line = __location__,
4498 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4499 .comment= "A:A_3_4_B_3_4 vs. B:NULL => B:A_3_4",
4503 .type = WREPL_TYPE_SGROUP,
4504 .state = WREPL_STATE_ACTIVE,
4505 .node = WREPL_NODE_B,
4507 .num_ips = ARRAY_SIZE(addresses_A_3_4_B_3_4),
4508 .ips = addresses_A_3_4_B_3_4,
4509 .apply_expected = True,
4513 .type = WREPL_TYPE_SGROUP,
4514 .state = WREPL_STATE_ACTIVE,
4515 .node = WREPL_NODE_B,
4519 .sgroup_merge = True,
4520 .merge_owner = &ctx->b,
4521 .sgroup_cleanup = True
4525 .line = __location__,
4526 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4530 .type = WREPL_TYPE_SGROUP,
4531 .state = WREPL_STATE_ACTIVE,
4532 .node = WREPL_NODE_B,
4536 .apply_expected = False,
4540 .type = WREPL_TYPE_UNIQUE,
4541 .state = WREPL_STATE_TOMBSTONE,
4542 .node = WREPL_NODE_B,
4544 .num_ips = ARRAY_SIZE(addresses_A_1),
4545 .ips = addresses_A_1,
4546 .apply_expected = True,
4550 * sgroup,active vs. sgroup,active different addresses, special case...
4551 * => should be merged
4554 .line = __location__,
4555 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4556 .comment= "A:B_3_4_X_3_4 vs. B:NULL => B:X_3_4",
4560 .type = WREPL_TYPE_SGROUP,
4561 .state = WREPL_STATE_ACTIVE,
4562 .node = WREPL_NODE_B,
4564 .num_ips = ARRAY_SIZE(addresses_B_3_4_X_3_4),
4565 .ips = addresses_B_3_4_X_3_4,
4566 .apply_expected = True,
4570 .type = WREPL_TYPE_SGROUP,
4571 .state = WREPL_STATE_ACTIVE,
4572 .node = WREPL_NODE_B,
4576 .sgroup_merge = True,
4577 .merge_owner = &ctx->b,
4578 .sgroup_cleanup = True
4582 .line = __location__,
4583 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4587 .type = WREPL_TYPE_SGROUP,
4588 .state = WREPL_STATE_ACTIVE,
4589 .node = WREPL_NODE_B,
4593 .apply_expected = False,
4597 .type = WREPL_TYPE_UNIQUE,
4598 .state = WREPL_STATE_TOMBSTONE,
4599 .node = WREPL_NODE_B,
4601 .num_ips = ARRAY_SIZE(addresses_A_1),
4602 .ips = addresses_A_1,
4603 .apply_expected = True,
4607 * This should be the last record in this array,
4608 * we need to make sure the we leave a tombstoned unique entry
4612 .line = __location__,
4613 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4617 .type = WREPL_TYPE_UNIQUE,
4618 .state = WREPL_STATE_TOMBSTONE,
4619 .node = WREPL_NODE_B,
4621 .num_ips = ARRAY_SIZE(addresses_A_1),
4622 .ips = addresses_A_1,
4623 .apply_expected = True
4627 .type = WREPL_TYPE_UNIQUE,
4628 .state = WREPL_STATE_TOMBSTONE,
4629 .node = WREPL_NODE_B,
4631 .num_ips = ARRAY_SIZE(addresses_A_1),
4632 .ips = addresses_A_1,
4633 .apply_expected = True
4635 }}; /* do not add entries here, this should be the last record! */
4637 if (!ctx) return False;
4639 wins_name_r1 = &wins_name1;
4640 wins_name_r2 = &wins_name2;
4642 printf("Test Replica Conflicts with different owners\n");
4644 for(i=0; ret && i < ARRAY_SIZE(records); i++) {
4646 if (!records[i].extra && !records[i].cleanup) {
4647 /* we should test the worst cases */
4648 if (records[i].r2.apply_expected && records[i].r1.ips==records[i].r2.ips) {
4649 printf("(%s) Programmer error, invalid record[%u]: %s\n",
4650 __location__, i, records[i].line);
4652 } else if (!records[i].r2.apply_expected && records[i].r1.ips!=records[i].r2.ips) {
4653 printf("(%s) Programmer error, invalid record[%u]: %s\n",
4654 __location__, i, records[i].line);
4659 if (!records[i].cleanup) {
4660 const char *expected;
4663 if (records[i].r2.sgroup_merge) {
4664 expected = "SGROUP_MERGE";
4665 } else if (records[i].r2.apply_expected) {
4666 expected = "REPLACE";
4668 expected = "NOT REPLACE";
4671 if (!records[i].r1.ips && !records[i].r2.ips) {
4672 ips = "with no ip(s)";
4673 } else if (records[i].r1.ips==records[i].r2.ips) {
4674 ips = "with same ip(s)";
4676 ips = "with different ip(s)";
4679 printf("%s,%s%s vs. %s,%s%s %s => %s\n",
4680 wrepl_name_type_string(records[i].r1.type),
4681 wrepl_name_state_string(records[i].r1.state),
4682 (records[i].r1.is_static?",static":""),
4683 wrepl_name_type_string(records[i].r2.type),
4684 wrepl_name_state_string(records[i].r2.state),
4685 (records[i].r2.is_static?",static":""),
4686 (records[i].comment?records[i].comment:ips),
4693 wins_name_r1->name = &records[i].name;
4694 wins_name_r1->flags = WREPL_NAME_FLAGS(records[i].r1.type,
4695 records[i].r1.state,
4697 records[i].r1.is_static);
4698 wins_name_r1->id = ++records[i].r1.owner->max_version;
4699 if (wins_name_r1->flags & 2) {
4700 wins_name_r1->addresses.addresses.num_ips = records[i].r1.num_ips;
4701 wins_name_r1->addresses.addresses.ips = discard_const(records[i].r1.ips);
4703 wins_name_r1->addresses.ip = records[i].r1.ips[0].ip;
4705 wins_name_r1->unknown = "255.255.255.255";
4708 ret &= test_wrepl_update_one(ctx, records[i].r1.owner, wins_name_r1);
4709 ret &= test_wrepl_is_applied(ctx, records[i].r1.owner,
4710 wins_name_r1, records[i].r1.apply_expected);
4715 wins_name_r2->name = &records[i].name;
4716 wins_name_r2->flags = WREPL_NAME_FLAGS(records[i].r2.type,
4717 records[i].r2.state,
4719 records[i].r2.is_static);
4720 wins_name_r2->id = ++records[i].r2.owner->max_version;
4721 if (wins_name_r2->flags & 2) {
4722 wins_name_r2->addresses.addresses.num_ips = records[i].r2.num_ips;
4723 wins_name_r2->addresses.addresses.ips = discard_const(records[i].r2.ips);
4725 wins_name_r2->addresses.ip = records[i].r2.ips[0].ip;
4727 wins_name_r2->unknown = "255.255.255.255";
4730 ret &= test_wrepl_update_one(ctx, records[i].r2.owner, wins_name_r2);
4731 if (records[i].r1.state == WREPL_STATE_RELEASED) {
4732 ret &= test_wrepl_is_applied(ctx, records[i].r1.owner,
4733 wins_name_r1, False);
4734 } else if (records[i].r2.sgroup_merge) {
4735 ret &= test_wrepl_sgroup_merged(ctx, records[i].r2.merge_owner,
4736 records[i].r1.owner,
4737 records[i].r1.num_ips, records[i].r1.ips,
4738 records[i].r2.owner,
4739 records[i].r2.num_ips, records[i].r2.ips,
4741 } else if (records[i].r1.owner != records[i].r2.owner) {
4743 _expected = (records[i].r1.apply_expected && !records[i].r2.apply_expected);
4744 ret &= test_wrepl_is_applied(ctx, records[i].r1.owner,
4745 wins_name_r1, _expected);
4747 if (records[i].r2.state == WREPL_STATE_RELEASED) {
4748 ret &= test_wrepl_is_applied(ctx, records[i].r2.owner,
4749 wins_name_r2, False);
4750 } else if (!records[i].r2.sgroup_merge) {
4751 ret &= test_wrepl_is_applied(ctx, records[i].r2.owner,
4752 wins_name_r2, records[i].r2.apply_expected);
4755 if (records[i].r2.sgroup_cleanup) {
4757 printf("failed before sgroup_cleanup record[%u]: %s\n", i, records[i].line);
4761 /* clean up the SGROUP record */
4762 wins_name_r1->name = &records[i].name;
4763 wins_name_r1->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
4765 WREPL_NODE_B, False);
4766 wins_name_r1->id = ++records[i].r1.owner->max_version;
4767 wins_name_r1->addresses.addresses.num_ips = 0;
4768 wins_name_r1->addresses.addresses.ips = NULL;
4769 wins_name_r1->unknown = "255.255.255.255";
4770 ret &= test_wrepl_update_one(ctx, records[i].r1.owner, wins_name_r1);
4772 /* here we test how names from an owner are deleted */
4773 if (records[i].r2.sgroup_merge && records[i].r2.num_ips) {
4774 ret &= test_wrepl_sgroup_merged(ctx, NULL,
4775 records[i].r2.owner,
4776 records[i].r2.num_ips, records[i].r2.ips,
4777 records[i].r1.owner,
4782 /* clean up the SGROUP record */
4783 wins_name_r2->name = &records[i].name;
4784 wins_name_r2->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
4786 WREPL_NODE_B, False);
4787 wins_name_r2->id = ++records[i].r2.owner->max_version;
4788 wins_name_r2->addresses.addresses.num_ips = 0;
4789 wins_name_r2->addresses.addresses.ips = NULL;
4790 wins_name_r2->unknown = "255.255.255.255";
4791 ret &= test_wrepl_update_one(ctx, records[i].r2.owner, wins_name_r2);
4793 /* take ownership of the SGROUP record */
4794 wins_name_r2->name = &records[i].name;
4795 wins_name_r2->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
4797 WREPL_NODE_B, False);
4798 wins_name_r2->id = ++records[i].r2.owner->max_version;
4799 wins_name_r2->addresses.addresses.num_ips = ARRAY_SIZE(addresses_B_1);
4800 wins_name_r2->addresses.addresses.ips = discard_const(addresses_B_1);
4801 wins_name_r2->unknown = "255.255.255.255";
4802 ret &= test_wrepl_update_one(ctx, records[i].r2.owner, wins_name_r2);
4803 ret &= test_wrepl_is_applied(ctx, records[i].r2.owner, wins_name_r2, True);
4805 /* overwrite the SGROUP record with unique,tombstone */
4806 wins_name_r2->name = &records[i].name;
4807 wins_name_r2->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
4808 WREPL_STATE_TOMBSTONE,
4809 WREPL_NODE_B, False);
4810 wins_name_r2->id = ++records[i].r2.owner->max_version;
4811 wins_name_r2->addresses.addresses.num_ips = ARRAY_SIZE(addresses_B_1);
4812 wins_name_r2->addresses.addresses.ips = discard_const(addresses_B_1);
4813 wins_name_r2->unknown = "255.255.255.255";
4814 ret &= test_wrepl_update_one(ctx, records[i].r2.owner, wins_name_r2);
4815 ret &= test_wrepl_is_applied(ctx, records[i].r2.owner, wins_name_r2, True);
4818 printf("failed in sgroup_cleanup record[%u]: %s\n", i, records[i].line);
4823 /* the first one is a cleanup run */
4824 if (!ret && i == 0) ret = True;
4827 printf("conflict handled wrong or record[%u]: %s\n", i, records[i].line);
4835 static BOOL test_conflict_owned_released_vs_replica(struct test_wrepl_conflict_conn *ctx)
4839 struct wrepl_wins_name wins_name_;
4840 struct wrepl_wins_name *wins_name = &wins_name_;
4841 struct nbt_name_register name_register_;
4842 struct nbt_name_register *name_register = &name_register_;
4843 struct nbt_name_release release_;
4844 struct nbt_name_release *release = &release_;
4847 const char *line; /* just better debugging */
4848 struct nbt_name name;
4853 const struct wrepl_ip *ips;
4854 BOOL apply_expected;
4857 enum wrepl_name_type type;
4858 enum wrepl_name_state state;
4859 enum wrepl_name_node node;
4862 const struct wrepl_ip *ips;
4863 BOOL apply_expected;
4867 * unique vs. unique section
4870 * unique,released vs. unique,active with same ip(s)
4873 .line = __location__,
4874 .name = _NBT_NAME("_UR_UA_SI", 0x00, NULL),
4878 .num_ips = ctx->addresses_best_num,
4879 .ips = ctx->addresses_best,
4880 .apply_expected = True
4883 .type = WREPL_TYPE_UNIQUE,
4884 .state = WREPL_STATE_ACTIVE,
4885 .node = WREPL_NODE_B,
4887 .num_ips = ctx->addresses_best_num,
4888 .ips = ctx->addresses_best,
4889 .apply_expected = True
4893 * unique,released vs. unique,active with different ip(s)
4896 .line = __location__,
4897 .name = _NBT_NAME("_UR_UA_DI", 0x00, NULL),
4901 .num_ips = ctx->addresses_best_num,
4902 .ips = ctx->addresses_best,
4903 .apply_expected = True
4906 .type = WREPL_TYPE_UNIQUE,
4907 .state = WREPL_STATE_ACTIVE,
4908 .node = WREPL_NODE_B,
4910 .num_ips = ARRAY_SIZE(addresses_B_1),
4911 .ips = addresses_B_1,
4912 .apply_expected = True
4916 * unique,released vs. unique,tombstone with same ip(s)
4919 .line = __location__,
4920 .name = _NBT_NAME("_UR_UT_SI", 0x00, NULL),
4924 .num_ips = ctx->addresses_best_num,
4925 .ips = ctx->addresses_best,
4926 .apply_expected = True
4929 .type = WREPL_TYPE_UNIQUE,
4930 .state = WREPL_STATE_TOMBSTONE,
4931 .node = WREPL_NODE_B,
4933 .num_ips = ctx->addresses_best_num,
4934 .ips = ctx->addresses_best,
4935 .apply_expected = True
4939 * unique,released vs. unique,tombstone with different ip(s)
4942 .line = __location__,
4943 .name = _NBT_NAME("_UR_UT_DI", 0x00, NULL),
4947 .num_ips = ctx->addresses_best_num,
4948 .ips = ctx->addresses_best,
4949 .apply_expected = True
4952 .type = WREPL_TYPE_UNIQUE,
4953 .state = WREPL_STATE_TOMBSTONE,
4954 .node = WREPL_NODE_B,
4956 .num_ips = ARRAY_SIZE(addresses_B_1),
4957 .ips = addresses_B_1,
4958 .apply_expected = True
4962 * unique vs. group section
4965 * unique,released vs. group,active with same ip(s)
4968 .line = __location__,
4969 .name = _NBT_NAME("_UR_GA_SI", 0x00, NULL),
4973 .num_ips = ctx->addresses_best_num,
4974 .ips = ctx->addresses_best,
4975 .apply_expected = True
4978 .type = WREPL_TYPE_GROUP,
4979 .state = WREPL_STATE_ACTIVE,
4980 .node = WREPL_NODE_B,
4982 .num_ips = ctx->addresses_best_num,
4983 .ips = ctx->addresses_best,
4984 .apply_expected = True
4988 * unique,released vs. group,active with different ip(s)
4991 .line = __location__,
4992 .name = _NBT_NAME("_UR_GA_DI", 0x00, NULL),
4996 .num_ips = ctx->addresses_best_num,
4997 .ips = ctx->addresses_best,
4998 .apply_expected = True
5001 .type = WREPL_TYPE_GROUP,
5002 .state = WREPL_STATE_ACTIVE,
5003 .node = WREPL_NODE_B,
5005 .num_ips = ARRAY_SIZE(addresses_B_1),
5006 .ips = addresses_B_1,
5007 .apply_expected = True
5011 * unique,released vs. group,tombstone with same ip(s)
5014 .line = __location__,
5015 .name = _NBT_NAME("_UR_GT_SI", 0x00, NULL),
5019 .num_ips = ctx->addresses_best_num,
5020 .ips = ctx->addresses_best,
5021 .apply_expected = True
5024 .type = WREPL_TYPE_GROUP,
5025 .state = WREPL_STATE_TOMBSTONE,
5026 .node = WREPL_NODE_B,
5028 .num_ips = ctx->addresses_best_num,
5029 .ips = ctx->addresses_best,
5030 .apply_expected = True
5034 * unique,released vs. group,tombstone with different ip(s)
5037 .line = __location__,
5038 .name = _NBT_NAME("_UR_GT_DI", 0x00, NULL),
5042 .num_ips = ctx->addresses_best_num,
5043 .ips = ctx->addresses_best,
5044 .apply_expected = True
5047 .type = WREPL_TYPE_GROUP,
5048 .state = WREPL_STATE_TOMBSTONE,
5049 .node = WREPL_NODE_B,
5051 .num_ips = ARRAY_SIZE(addresses_B_1),
5052 .ips = addresses_B_1,
5053 .apply_expected = True
5057 * unique vs. special group section
5060 * unique,released vs. sgroup,active with same ip(s)
5063 .line = __location__,
5064 .name = _NBT_NAME("_UR_SA_SI", 0x00, NULL),
5068 .num_ips = ctx->addresses_best_num,
5069 .ips = ctx->addresses_best,
5070 .apply_expected = True
5073 .type = WREPL_TYPE_SGROUP,
5074 .state = WREPL_STATE_ACTIVE,
5075 .node = WREPL_NODE_B,
5077 .num_ips = ctx->addresses_best_num,
5078 .ips = ctx->addresses_best,
5079 .apply_expected = True
5083 * unique,released vs. sgroup,active with different ip(s)
5086 .line = __location__,
5087 .name = _NBT_NAME("_UR_SA_DI", 0x00, NULL),
5091 .num_ips = ctx->addresses_best_num,
5092 .ips = ctx->addresses_best,
5093 .apply_expected = True
5096 .type = WREPL_TYPE_SGROUP,
5097 .state = WREPL_STATE_ACTIVE,
5098 .node = WREPL_NODE_B,
5100 .num_ips = ARRAY_SIZE(addresses_B_1),
5101 .ips = addresses_B_1,
5102 .apply_expected = True
5106 * unique,released vs. sgroup,tombstone with same ip(s)
5109 .line = __location__,
5110 .name = _NBT_NAME("_UR_ST_SI", 0x00, NULL),
5114 .num_ips = ctx->addresses_best_num,
5115 .ips = ctx->addresses_best,
5116 .apply_expected = True
5119 .type = WREPL_TYPE_SGROUP,
5120 .state = WREPL_STATE_TOMBSTONE,
5121 .node = WREPL_NODE_B,
5123 .num_ips = ctx->addresses_best_num,
5124 .ips = ctx->addresses_best,
5125 .apply_expected = True
5129 * unique,released vs. sgroup,tombstone with different ip(s)
5132 .line = __location__,
5133 .name = _NBT_NAME("_UR_ST_DI", 0x00, NULL),
5137 .num_ips = ctx->addresses_best_num,
5138 .ips = ctx->addresses_best,
5139 .apply_expected = True
5142 .type = WREPL_TYPE_SGROUP,
5143 .state = WREPL_STATE_TOMBSTONE,
5144 .node = WREPL_NODE_B,
5146 .num_ips = ARRAY_SIZE(addresses_B_1),
5147 .ips = addresses_B_1,
5148 .apply_expected = True
5152 * unique vs. multi homed section
5155 * unique,released vs. mhomed,active with same ip(s)
5158 .line = __location__,
5159 .name = _NBT_NAME("_UR_MA_SI", 0x00, NULL),
5163 .num_ips = ctx->addresses_best_num,
5164 .ips = ctx->addresses_best,
5165 .apply_expected = True
5168 .type = WREPL_TYPE_MHOMED,
5169 .state = WREPL_STATE_ACTIVE,
5170 .node = WREPL_NODE_B,
5172 .num_ips = ctx->addresses_best_num,
5173 .ips = ctx->addresses_best,
5174 .apply_expected = True
5178 * unique,released vs. mhomed,active with different ip(s)
5181 .line = __location__,
5182 .name = _NBT_NAME("_UR_MA_DI", 0x00, NULL),
5186 .num_ips = ctx->addresses_best_num,
5187 .ips = ctx->addresses_best,
5188 .apply_expected = True
5191 .type = WREPL_TYPE_MHOMED,
5192 .state = WREPL_STATE_ACTIVE,
5193 .node = WREPL_NODE_B,
5195 .num_ips = ARRAY_SIZE(addresses_B_1),
5196 .ips = addresses_B_1,
5197 .apply_expected = True
5201 * unique,released vs. mhomed,tombstone with same ip(s)
5204 .line = __location__,
5205 .name = _NBT_NAME("_UR_MT_SI", 0x00, NULL),
5209 .num_ips = ctx->addresses_best_num,
5210 .ips = ctx->addresses_best,
5211 .apply_expected = True
5214 .type = WREPL_TYPE_MHOMED,
5215 .state = WREPL_STATE_TOMBSTONE,
5216 .node = WREPL_NODE_B,
5218 .num_ips = ctx->addresses_best_num,
5219 .ips = ctx->addresses_best,
5220 .apply_expected = True
5224 * unique,released vs. mhomed,tombstone with different ip(s)
5227 .line = __location__,
5228 .name = _NBT_NAME("_UR_MT_DI", 0x00, NULL),
5232 .num_ips = ctx->addresses_best_num,
5233 .ips = ctx->addresses_best,
5234 .apply_expected = True
5237 .type = WREPL_TYPE_MHOMED,
5238 .state = WREPL_STATE_TOMBSTONE,
5239 .node = WREPL_NODE_B,
5241 .num_ips = ARRAY_SIZE(addresses_B_1),
5242 .ips = addresses_B_1,
5243 .apply_expected = True
5247 * group vs. unique section
5250 * group,released vs. unique,active with same ip(s)
5253 .line = __location__,
5254 .name = _NBT_NAME("_GR_UA_SI", 0x00, NULL),
5256 .nb_flags = NBT_NM_GROUP,
5258 .num_ips = ctx->addresses_best_num,
5259 .ips = ctx->addresses_best,
5260 .apply_expected = True
5263 .type = WREPL_TYPE_UNIQUE,
5264 .state = WREPL_STATE_ACTIVE,
5265 .node = WREPL_NODE_B,
5267 .num_ips = ctx->addresses_best_num,
5268 .ips = ctx->addresses_best,
5269 .apply_expected = False
5273 * group,released vs. unique,active with different ip(s)
5276 .line = __location__,
5277 .name = _NBT_NAME("_GR_UA_DI", 0x00, NULL),
5279 .nb_flags = NBT_NM_GROUP,
5281 .num_ips = ctx->addresses_best_num,
5282 .ips = ctx->addresses_best,
5283 .apply_expected = True
5286 .type = WREPL_TYPE_UNIQUE,
5287 .state = WREPL_STATE_ACTIVE,
5288 .node = WREPL_NODE_B,
5290 .num_ips = ARRAY_SIZE(addresses_B_1),
5291 .ips = addresses_B_1,
5292 .apply_expected = False
5296 * group,released vs. unique,tombstone with same ip(s)
5299 .line = __location__,
5300 .name = _NBT_NAME("_GR_UT_SI", 0x00, NULL),
5302 .nb_flags = NBT_NM_GROUP,
5304 .num_ips = ctx->addresses_best_num,
5305 .ips = ctx->addresses_best,
5306 .apply_expected = True
5309 .type = WREPL_TYPE_UNIQUE,
5310 .state = WREPL_STATE_TOMBSTONE,
5311 .node = WREPL_NODE_B,
5313 .num_ips = ctx->addresses_best_num,
5314 .ips = ctx->addresses_best,
5315 .apply_expected = False
5319 * group,released vs. unique,tombstone with different ip(s)
5322 .line = __location__,
5323 .name = _NBT_NAME("_GR_UT_DI", 0x00, NULL),
5325 .nb_flags = NBT_NM_GROUP,
5327 .num_ips = ctx->addresses_best_num,
5328 .ips = ctx->addresses_best,
5329 .apply_expected = True
5332 .type = WREPL_TYPE_UNIQUE,
5333 .state = WREPL_STATE_TOMBSTONE,
5334 .node = WREPL_NODE_B,
5336 .num_ips = ARRAY_SIZE(addresses_B_1),
5337 .ips = addresses_B_1,
5338 .apply_expected = False
5342 * group vs. group section
5345 * group,released vs. group,active with same ip(s)
5348 .line = __location__,
5349 .name = _NBT_NAME("_GR_GA_SI", 0x00, NULL),
5351 .nb_flags = NBT_NM_GROUP,
5353 .num_ips = ctx->addresses_best_num,
5354 .ips = ctx->addresses_best,
5355 .apply_expected = True
5358 .type = WREPL_TYPE_GROUP,
5359 .state = WREPL_STATE_ACTIVE,
5360 .node = WREPL_NODE_B,
5362 .num_ips = ctx->addresses_best_num,
5363 .ips = ctx->addresses_best,
5364 .apply_expected = True
5368 * group,released vs. group,active with different ip(s)
5371 .line = __location__,
5372 .name = _NBT_NAME("_GR_GA_DI", 0x00, NULL),
5374 .nb_flags = NBT_NM_GROUP,
5376 .num_ips = ctx->addresses_best_num,
5377 .ips = ctx->addresses_best,
5378 .apply_expected = True
5381 .type = WREPL_TYPE_GROUP,
5382 .state = WREPL_STATE_ACTIVE,
5383 .node = WREPL_NODE_B,
5385 .num_ips = ARRAY_SIZE(addresses_B_1),
5386 .ips = addresses_B_1,
5387 .apply_expected = True
5391 * group,released vs. group,tombstone with same ip(s)
5394 .line = __location__,
5395 .name = _NBT_NAME("_GR_GT_SI", 0x00, NULL),
5397 .nb_flags = NBT_NM_GROUP,
5399 .num_ips = ctx->addresses_best_num,
5400 .ips = ctx->addresses_best,
5401 .apply_expected = True
5404 .type = WREPL_TYPE_GROUP,
5405 .state = WREPL_STATE_TOMBSTONE,
5406 .node = WREPL_NODE_B,
5408 .num_ips = ctx->addresses_best_num,
5409 .ips = ctx->addresses_best,
5410 .apply_expected = True
5414 * group,released vs. group,tombstone with different ip(s)
5417 .line = __location__,
5418 .name = _NBT_NAME("_GR_GT_DI", 0x00, NULL),
5420 .nb_flags = NBT_NM_GROUP,
5422 .num_ips = ctx->addresses_best_num,
5423 .ips = ctx->addresses_best,
5424 .apply_expected = True
5427 .type = WREPL_TYPE_GROUP,
5428 .state = WREPL_STATE_TOMBSTONE,
5429 .node = WREPL_NODE_B,
5431 .num_ips = ARRAY_SIZE(addresses_B_1),
5432 .ips = addresses_B_1,
5433 .apply_expected = True
5437 * group vs. special group section
5440 * group,released vs. sgroup,active with same ip(s)
5443 .line = __location__,
5444 .name = _NBT_NAME("_GR_SA_SI", 0x00, NULL),
5446 .nb_flags = NBT_NM_GROUP,
5448 .num_ips = ctx->addresses_best_num,
5449 .ips = ctx->addresses_best,
5450 .apply_expected = True
5453 .type = WREPL_TYPE_SGROUP,
5454 .state = WREPL_STATE_ACTIVE,
5455 .node = WREPL_NODE_B,
5457 .num_ips = ctx->addresses_best_num,
5458 .ips = ctx->addresses_best,
5459 .apply_expected = False
5463 * group,released vs. sgroup,active with different ip(s)
5466 .line = __location__,
5467 .name = _NBT_NAME("_GR_SA_DI", 0x00, NULL),
5469 .nb_flags = NBT_NM_GROUP,
5471 .num_ips = ctx->addresses_best_num,
5472 .ips = ctx->addresses_best,
5473 .apply_expected = True
5476 .type = WREPL_TYPE_SGROUP,
5477 .state = WREPL_STATE_ACTIVE,
5478 .node = WREPL_NODE_B,
5480 .num_ips = ARRAY_SIZE(addresses_B_1),
5481 .ips = addresses_B_1,
5482 .apply_expected = False
5486 * group,released vs. sgroup,tombstone with same ip(s)
5489 .line = __location__,
5490 .name = _NBT_NAME("_GR_ST_SI", 0x00, NULL),
5492 .nb_flags = NBT_NM_GROUP,
5494 .num_ips = ctx->addresses_best_num,
5495 .ips = ctx->addresses_best,
5496 .apply_expected = True
5499 .type = WREPL_TYPE_SGROUP,
5500 .state = WREPL_STATE_TOMBSTONE,
5501 .node = WREPL_NODE_B,
5503 .num_ips = ctx->addresses_best_num,
5504 .ips = ctx->addresses_best,
5505 .apply_expected = False
5509 * group,released vs. sgroup,tombstone with different ip(s)
5512 .line = __location__,
5513 .name = _NBT_NAME("_GR_ST_DI", 0x00, NULL),
5515 .nb_flags = NBT_NM_GROUP,
5517 .num_ips = ctx->addresses_best_num,
5518 .ips = ctx->addresses_best,
5519 .apply_expected = True
5522 .type = WREPL_TYPE_SGROUP,
5523 .state = WREPL_STATE_TOMBSTONE,
5524 .node = WREPL_NODE_B,
5526 .num_ips = ARRAY_SIZE(addresses_B_1),
5527 .ips = addresses_B_1,
5528 .apply_expected = False
5532 * group vs. multi homed section
5535 * group,released vs. mhomed,active with same ip(s)
5538 .line = __location__,
5539 .name = _NBT_NAME("_GR_MA_SI", 0x00, NULL),
5541 .nb_flags = NBT_NM_GROUP,
5543 .num_ips = ctx->addresses_best_num,
5544 .ips = ctx->addresses_best,
5545 .apply_expected = True
5548 .type = WREPL_TYPE_MHOMED,
5549 .state = WREPL_STATE_ACTIVE,
5550 .node = WREPL_NODE_B,
5552 .num_ips = ctx->addresses_best_num,
5553 .ips = ctx->addresses_best,
5554 .apply_expected = False
5558 * group,released vs. mhomed,active with different ip(s)
5561 .line = __location__,
5562 .name = _NBT_NAME("_GR_MA_DI", 0x00, NULL),
5564 .nb_flags = NBT_NM_GROUP,
5566 .num_ips = ctx->addresses_best_num,
5567 .ips = ctx->addresses_best,
5568 .apply_expected = True
5571 .type = WREPL_TYPE_MHOMED,
5572 .state = WREPL_STATE_ACTIVE,
5573 .node = WREPL_NODE_B,
5575 .num_ips = ARRAY_SIZE(addresses_B_1),
5576 .ips = addresses_B_1,
5577 .apply_expected = False
5581 * group,released vs. mhomed,tombstone with same ip(s)
5584 .line = __location__,
5585 .name = _NBT_NAME("_GR_MT_SI", 0x00, NULL),
5587 .nb_flags = NBT_NM_GROUP,
5589 .num_ips = ctx->addresses_best_num,
5590 .ips = ctx->addresses_best,
5591 .apply_expected = True
5594 .type = WREPL_TYPE_MHOMED,
5595 .state = WREPL_STATE_TOMBSTONE,
5596 .node = WREPL_NODE_B,
5598 .num_ips = ctx->addresses_best_num,
5599 .ips = ctx->addresses_best,
5600 .apply_expected = False
5604 * group,released vs. mhomed,tombstone with different ip(s)
5607 .line = __location__,
5608 .name = _NBT_NAME("_GR_MT_DI", 0x00, NULL),
5610 .nb_flags = NBT_NM_GROUP,
5612 .num_ips = ctx->addresses_best_num,
5613 .ips = ctx->addresses_best,
5614 .apply_expected = True
5617 .type = WREPL_TYPE_MHOMED,
5618 .state = WREPL_STATE_TOMBSTONE,
5619 .node = WREPL_NODE_B,
5621 .num_ips = ARRAY_SIZE(addresses_B_1),
5622 .ips = addresses_B_1,
5623 .apply_expected = False
5627 * special group vs. unique section
5630 * sgroup,released vs. unique,active with same ip(s)
5633 .line = __location__,
5634 .name = _NBT_NAME("_SR_UA_SI", 0x1C, NULL),
5636 .nb_flags = NBT_NM_GROUP,
5638 .num_ips = ctx->addresses_best_num,
5639 .ips = ctx->addresses_best,
5640 .apply_expected = True
5643 .type = WREPL_TYPE_UNIQUE,
5644 .state = WREPL_STATE_ACTIVE,
5645 .node = WREPL_NODE_B,
5647 .num_ips = ctx->addresses_best_num,
5648 .ips = ctx->addresses_best,
5649 .apply_expected = True
5653 * sgroup,released vs. unique,active with different ip(s)
5656 .line = __location__,
5657 .name = _NBT_NAME("_SR_UA_DI", 0x1C, NULL),
5659 .nb_flags = NBT_NM_GROUP,
5661 .num_ips = ctx->addresses_best_num,
5662 .ips = ctx->addresses_best,
5663 .apply_expected = True
5666 .type = WREPL_TYPE_UNIQUE,
5667 .state = WREPL_STATE_ACTIVE,
5668 .node = WREPL_NODE_B,
5670 .num_ips = ARRAY_SIZE(addresses_B_1),
5671 .ips = addresses_B_1,
5672 .apply_expected = True
5676 * sgroup,released vs. unique,tombstone with same ip(s)
5679 .line = __location__,
5680 .name = _NBT_NAME("_SR_UT_SI", 0x1C, NULL),
5682 .nb_flags = NBT_NM_GROUP,
5684 .num_ips = ctx->addresses_best_num,
5685 .ips = ctx->addresses_best,
5686 .apply_expected = True
5689 .type = WREPL_TYPE_UNIQUE,
5690 .state = WREPL_STATE_TOMBSTONE,
5691 .node = WREPL_NODE_B,
5693 .num_ips = ctx->addresses_best_num,
5694 .ips = ctx->addresses_best,
5695 .apply_expected = True
5699 * sgroup,released vs. unique,tombstone with different ip(s)
5702 .line = __location__,
5703 .name = _NBT_NAME("_SR_UT_DI", 0x1C, NULL),
5705 .nb_flags = NBT_NM_GROUP,
5707 .num_ips = ctx->addresses_best_num,
5708 .ips = ctx->addresses_best,
5709 .apply_expected = True
5712 .type = WREPL_TYPE_UNIQUE,
5713 .state = WREPL_STATE_TOMBSTONE,
5714 .node = WREPL_NODE_B,
5716 .num_ips = ARRAY_SIZE(addresses_B_1),
5717 .ips = addresses_B_1,
5718 .apply_expected = True
5722 * special group vs. group section
5725 * sgroup,released vs. group,active with same ip(s)
5728 .line = __location__,
5729 .name = _NBT_NAME("_SR_GA_SI", 0x1C, NULL),
5731 .nb_flags = NBT_NM_GROUP,
5733 .num_ips = ctx->addresses_best_num,
5734 .ips = ctx->addresses_best,
5735 .apply_expected = True
5738 .type = WREPL_TYPE_GROUP,
5739 .state = WREPL_STATE_ACTIVE,
5740 .node = WREPL_NODE_B,
5742 .num_ips = ctx->addresses_best_num,
5743 .ips = ctx->addresses_best,
5744 .apply_expected = True
5748 * sgroup,released vs. group,active with different ip(s)
5751 .line = __location__,
5752 .name = _NBT_NAME("_SR_GA_DI", 0x1C, NULL),
5754 .nb_flags = NBT_NM_GROUP,
5756 .num_ips = ctx->addresses_best_num,
5757 .ips = ctx->addresses_best,
5758 .apply_expected = True
5761 .type = WREPL_TYPE_GROUP,
5762 .state = WREPL_STATE_ACTIVE,
5763 .node = WREPL_NODE_B,
5765 .num_ips = ARRAY_SIZE(addresses_B_1),
5766 .ips = addresses_B_1,
5767 .apply_expected = True
5771 * sgroup,released vs. group,tombstone with same ip(s)
5774 .line = __location__,
5775 .name = _NBT_NAME("_SR_GT_SI", 0x1C, NULL),
5777 .nb_flags = NBT_NM_GROUP,
5779 .num_ips = ctx->addresses_best_num,
5780 .ips = ctx->addresses_best,
5781 .apply_expected = True
5784 .type = WREPL_TYPE_GROUP,
5785 .state = WREPL_STATE_TOMBSTONE,
5786 .node = WREPL_NODE_B,
5788 .num_ips = ctx->addresses_best_num,
5789 .ips = ctx->addresses_best,
5790 .apply_expected = True
5794 * sgroup,released vs. group,tombstone with different ip(s)
5797 .line = __location__,
5798 .name = _NBT_NAME("_SR_GT_DI", 0x1C, NULL),
5800 .nb_flags = NBT_NM_GROUP,
5802 .num_ips = ctx->addresses_best_num,
5803 .ips = ctx->addresses_best,
5804 .apply_expected = True
5807 .type = WREPL_TYPE_GROUP,
5808 .state = WREPL_STATE_TOMBSTONE,
5809 .node = WREPL_NODE_B,
5811 .num_ips = ARRAY_SIZE(addresses_B_1),
5812 .ips = addresses_B_1,
5813 .apply_expected = True
5817 * special group vs. special group section
5820 * sgroup,released vs. sgroup,active with same ip(s)
5823 .line = __location__,
5824 .name = _NBT_NAME("_SR_SA_SI", 0x1C, NULL),
5826 .nb_flags = NBT_NM_GROUP,
5828 .num_ips = ctx->addresses_best_num,
5829 .ips = ctx->addresses_best,
5830 .apply_expected = True
5833 .type = WREPL_TYPE_SGROUP,
5834 .state = WREPL_STATE_ACTIVE,
5835 .node = WREPL_NODE_B,
5837 .num_ips = ctx->addresses_best_num,
5838 .ips = ctx->addresses_best,
5839 .apply_expected = True
5843 * sgroup,released vs. sgroup,active with different ip(s)
5846 .line = __location__,
5847 .name = _NBT_NAME("_SR_SA_DI", 0x1C, NULL),
5849 .nb_flags = NBT_NM_GROUP,
5851 .num_ips = ctx->addresses_best_num,
5852 .ips = ctx->addresses_best,
5853 .apply_expected = True
5856 .type = WREPL_TYPE_SGROUP,
5857 .state = WREPL_STATE_ACTIVE,
5858 .node = WREPL_NODE_B,
5860 .num_ips = ARRAY_SIZE(addresses_B_1),
5861 .ips = addresses_B_1,
5862 .apply_expected = True
5866 * sgroup,released vs. sgroup,tombstone with same ip(s)
5869 .line = __location__,
5870 .name = _NBT_NAME("_SR_ST_SI", 0x1C, NULL),
5872 .nb_flags = NBT_NM_GROUP,
5874 .num_ips = ctx->addresses_best_num,
5875 .ips = ctx->addresses_best,
5876 .apply_expected = True
5879 .type = WREPL_TYPE_SGROUP,
5880 .state = WREPL_STATE_TOMBSTONE,
5881 .node = WREPL_NODE_B,
5883 .num_ips = ctx->addresses_best_num,
5884 .ips = ctx->addresses_best,
5885 .apply_expected = True
5889 * sgroup,released vs. sgroup,tombstone with different ip(s)
5892 .line = __location__,
5893 .name = _NBT_NAME("_SR_ST_DI", 0x1C, NULL),
5895 .nb_flags = NBT_NM_GROUP,
5897 .num_ips = ctx->addresses_best_num,
5898 .ips = ctx->addresses_best,
5899 .apply_expected = True
5902 .type = WREPL_TYPE_SGROUP,
5903 .state = WREPL_STATE_TOMBSTONE,
5904 .node = WREPL_NODE_B,
5906 .num_ips = ARRAY_SIZE(addresses_B_1),
5907 .ips = addresses_B_1,
5908 .apply_expected = True
5912 * special group vs. multi homed section
5915 * sgroup,released vs. mhomed,active with same ip(s)
5918 .line = __location__,
5919 .name = _NBT_NAME("_SR_MA_SI", 0x1C, NULL),
5921 .nb_flags = NBT_NM_GROUP,
5923 .num_ips = ctx->addresses_best_num,
5924 .ips = ctx->addresses_best,
5925 .apply_expected = True
5928 .type = WREPL_TYPE_MHOMED,
5929 .state = WREPL_STATE_ACTIVE,
5930 .node = WREPL_NODE_B,
5932 .num_ips = ctx->addresses_best_num,
5933 .ips = ctx->addresses_best,
5934 .apply_expected = True
5938 * sgroup,released vs. mhomed,active with different ip(s)
5941 .line = __location__,
5942 .name = _NBT_NAME("_SR_MA_DI", 0x1C, NULL),
5944 .nb_flags = NBT_NM_GROUP,
5946 .num_ips = ctx->addresses_best_num,
5947 .ips = ctx->addresses_best,
5948 .apply_expected = True
5951 .type = WREPL_TYPE_MHOMED,
5952 .state = WREPL_STATE_ACTIVE,
5953 .node = WREPL_NODE_B,
5955 .num_ips = ARRAY_SIZE(addresses_B_1),
5956 .ips = addresses_B_1,
5957 .apply_expected = True
5961 * sgroup,released vs. mhomed,tombstone with same ip(s)
5964 .line = __location__,
5965 .name = _NBT_NAME("_SR_MT_SI", 0x1C, NULL),
5967 .nb_flags = NBT_NM_GROUP,
5969 .num_ips = ctx->addresses_best_num,
5970 .ips = ctx->addresses_best,
5971 .apply_expected = True
5974 .type = WREPL_TYPE_MHOMED,
5975 .state = WREPL_STATE_TOMBSTONE,
5976 .node = WREPL_NODE_B,
5978 .num_ips = ctx->addresses_best_num,
5979 .ips = ctx->addresses_best,
5980 .apply_expected = True
5984 * sgroup,released vs. mhomed,tombstone with different ip(s)
5987 .line = __location__,
5988 .name = _NBT_NAME("_SR_MT_DI", 0x1C, NULL),
5990 .nb_flags = NBT_NM_GROUP,
5992 .num_ips = ctx->addresses_best_num,
5993 .ips = ctx->addresses_best,
5994 .apply_expected = True
5997 .type = WREPL_TYPE_MHOMED,
5998 .state = WREPL_STATE_TOMBSTONE,
5999 .node = WREPL_NODE_B,
6001 .num_ips = ARRAY_SIZE(addresses_B_1),
6002 .ips = addresses_B_1,
6003 .apply_expected = True
6007 * multi homed vs. unique section
6010 * mhomed,released vs. unique,active with same ip(s)
6013 .line = __location__,
6014 .name = _NBT_NAME("_MR_UA_SI", 0x00, NULL),
6018 .num_ips = ctx->addresses_best_num,
6019 .ips = ctx->addresses_best,
6020 .apply_expected = True
6023 .type = WREPL_TYPE_UNIQUE,
6024 .state = WREPL_STATE_ACTIVE,
6025 .node = WREPL_NODE_B,
6027 .num_ips = ctx->addresses_best_num,
6028 .ips = ctx->addresses_best,
6029 .apply_expected = True
6033 * mhomed,released vs. unique,active with different ip(s)
6036 .line = __location__,
6037 .name = _NBT_NAME("_MR_UA_DI", 0x00, NULL),
6041 .num_ips = ctx->addresses_best_num,
6042 .ips = ctx->addresses_best,
6043 .apply_expected = True
6046 .type = WREPL_TYPE_UNIQUE,
6047 .state = WREPL_STATE_ACTIVE,
6048 .node = WREPL_NODE_B,
6050 .num_ips = ARRAY_SIZE(addresses_B_1),
6051 .ips = addresses_B_1,
6052 .apply_expected = True
6056 * mhomed,released vs. unique,tombstone with same ip(s)
6059 .line = __location__,
6060 .name = _NBT_NAME("_MR_UT_SI", 0x00, NULL),
6064 .num_ips = ctx->addresses_best_num,
6065 .ips = ctx->addresses_best,
6066 .apply_expected = True
6069 .type = WREPL_TYPE_UNIQUE,
6070 .state = WREPL_STATE_TOMBSTONE,
6071 .node = WREPL_NODE_B,
6073 .num_ips = ctx->addresses_best_num,
6074 .ips = ctx->addresses_best,
6075 .apply_expected = True
6079 * mhomed,released vs. unique,tombstone with different ip(s)
6082 .line = __location__,
6083 .name = _NBT_NAME("_MR_UT_DI", 0x00, NULL),
6087 .num_ips = ctx->addresses_best_num,
6088 .ips = ctx->addresses_best,
6089 .apply_expected = True
6092 .type = WREPL_TYPE_UNIQUE,
6093 .state = WREPL_STATE_TOMBSTONE,
6094 .node = WREPL_NODE_B,
6096 .num_ips = ARRAY_SIZE(addresses_B_1),
6097 .ips = addresses_B_1,
6098 .apply_expected = True
6102 * multi homed vs. group section
6105 * mhomed,released vs. group,active with same ip(s)
6108 .line = __location__,
6109 .name = _NBT_NAME("_MR_GA_SI", 0x00, NULL),
6113 .num_ips = ctx->addresses_best_num,
6114 .ips = ctx->addresses_best,
6115 .apply_expected = True
6118 .type = WREPL_TYPE_GROUP,
6119 .state = WREPL_STATE_ACTIVE,
6120 .node = WREPL_NODE_B,
6122 .num_ips = ctx->addresses_best_num,
6123 .ips = ctx->addresses_best,
6124 .apply_expected = True
6128 * mhomed,released vs. group,active with different ip(s)
6131 .line = __location__,
6132 .name = _NBT_NAME("_MR_GA_DI", 0x00, NULL),
6136 .num_ips = ctx->addresses_best_num,
6137 .ips = ctx->addresses_best,
6138 .apply_expected = True
6141 .type = WREPL_TYPE_GROUP,
6142 .state = WREPL_STATE_ACTIVE,
6143 .node = WREPL_NODE_B,
6145 .num_ips = ARRAY_SIZE(addresses_B_1),
6146 .ips = addresses_B_1,
6147 .apply_expected = True
6151 * mhomed,released vs. group,tombstone with same ip(s)
6154 .line = __location__,
6155 .name = _NBT_NAME("_MR_GT_SI", 0x00, NULL),
6159 .num_ips = ctx->addresses_best_num,
6160 .ips = ctx->addresses_best,
6161 .apply_expected = True
6164 .type = WREPL_TYPE_GROUP,
6165 .state = WREPL_STATE_TOMBSTONE,
6166 .node = WREPL_NODE_B,
6168 .num_ips = ctx->addresses_best_num,
6169 .ips = ctx->addresses_best,
6170 .apply_expected = True
6174 * mhomed,released vs. group,tombstone with different ip(s)
6177 .line = __location__,
6178 .name = _NBT_NAME("_MR_GT_DI", 0x00, NULL),
6182 .num_ips = ctx->addresses_best_num,
6183 .ips = ctx->addresses_best,
6184 .apply_expected = True
6187 .type = WREPL_TYPE_GROUP,
6188 .state = WREPL_STATE_TOMBSTONE,
6189 .node = WREPL_NODE_B,
6191 .num_ips = ARRAY_SIZE(addresses_B_1),
6192 .ips = addresses_B_1,
6193 .apply_expected = True
6197 * multi homed vs. special group section
6200 * mhomed,released vs. sgroup,active with same ip(s)
6203 .line = __location__,
6204 .name = _NBT_NAME("_MR_SA_SI", 0x00, NULL),
6208 .num_ips = ctx->addresses_best_num,
6209 .ips = ctx->addresses_best,
6210 .apply_expected = True
6213 .type = WREPL_TYPE_SGROUP,
6214 .state = WREPL_STATE_ACTIVE,
6215 .node = WREPL_NODE_B,
6217 .num_ips = ctx->addresses_best_num,
6218 .ips = ctx->addresses_best,
6219 .apply_expected = True
6223 * mhomed,released vs. sgroup,active with different ip(s)
6226 .line = __location__,
6227 .name = _NBT_NAME("_MR_SA_DI", 0x00, NULL),
6231 .num_ips = ctx->addresses_best_num,
6232 .ips = ctx->addresses_best,
6233 .apply_expected = True
6236 .type = WREPL_TYPE_SGROUP,
6237 .state = WREPL_STATE_ACTIVE,
6238 .node = WREPL_NODE_B,
6240 .num_ips = ARRAY_SIZE(addresses_B_1),
6241 .ips = addresses_B_1,
6242 .apply_expected = True
6246 * mhomed,released vs. sgroup,tombstone with same ip(s)
6249 .line = __location__,
6250 .name = _NBT_NAME("_MR_ST_SI", 0x00, NULL),
6254 .num_ips = ctx->addresses_best_num,
6255 .ips = ctx->addresses_best,
6256 .apply_expected = True
6259 .type = WREPL_TYPE_SGROUP,
6260 .state = WREPL_STATE_TOMBSTONE,
6261 .node = WREPL_NODE_B,
6263 .num_ips = ctx->addresses_best_num,
6264 .ips = ctx->addresses_best,
6265 .apply_expected = True
6269 * mhomed,released vs. sgroup,tombstone with different ip(s)
6272 .line = __location__,
6273 .name = _NBT_NAME("_MR_ST_DI", 0x00, NULL),
6277 .num_ips = ctx->addresses_best_num,
6278 .ips = ctx->addresses_best,
6279 .apply_expected = True
6282 .type = WREPL_TYPE_SGROUP,
6283 .state = WREPL_STATE_TOMBSTONE,
6284 .node = WREPL_NODE_B,
6286 .num_ips = ARRAY_SIZE(addresses_B_1),
6287 .ips = addresses_B_1,
6288 .apply_expected = True
6292 * multi homed vs. multi homed section
6295 * mhomed,released vs. mhomed,active with same ip(s)
6298 .line = __location__,
6299 .name = _NBT_NAME("_MR_MA_SI", 0x00, NULL),
6303 .num_ips = ctx->addresses_best_num,
6304 .ips = ctx->addresses_best,
6305 .apply_expected = True
6308 .type = WREPL_TYPE_MHOMED,
6309 .state = WREPL_STATE_ACTIVE,
6310 .node = WREPL_NODE_B,
6312 .num_ips = ctx->addresses_best_num,
6313 .ips = ctx->addresses_best,
6314 .apply_expected = True
6318 * mhomed,released vs. mhomed,active with different ip(s)
6321 .line = __location__,
6322 .name = _NBT_NAME("_MR_MA_DI", 0x00, NULL),
6326 .num_ips = ctx->addresses_best_num,
6327 .ips = ctx->addresses_best,
6328 .apply_expected = True
6331 .type = WREPL_TYPE_MHOMED,
6332 .state = WREPL_STATE_ACTIVE,
6333 .node = WREPL_NODE_B,
6335 .num_ips = ARRAY_SIZE(addresses_B_1),
6336 .ips = addresses_B_1,
6337 .apply_expected = True
6341 * mhomed,released vs. mhomed,tombstone with same ip(s)
6344 .line = __location__,
6345 .name = _NBT_NAME("_MR_MT_SI", 0x00, NULL),
6349 .num_ips = ctx->addresses_best_num,
6350 .ips = ctx->addresses_best,
6351 .apply_expected = True
6354 .type = WREPL_TYPE_MHOMED,
6355 .state = WREPL_STATE_TOMBSTONE,
6356 .node = WREPL_NODE_B,
6358 .num_ips = ctx->addresses_best_num,
6359 .ips = ctx->addresses_best,
6360 .apply_expected = True
6364 * mhomed,released vs. mhomed,tombstone with different ip(s)
6367 .line = __location__,
6368 .name = _NBT_NAME("_MR_MT_DI", 0x00, NULL),
6372 .num_ips = ctx->addresses_best_num,
6373 .ips = ctx->addresses_best,
6374 .apply_expected = True
6377 .type = WREPL_TYPE_MHOMED,
6378 .state = WREPL_STATE_TOMBSTONE,
6379 .node = WREPL_NODE_B,
6381 .num_ips = ARRAY_SIZE(addresses_B_1),
6382 .ips = addresses_B_1,
6383 .apply_expected = True
6388 if (!ctx) return False;
6390 printf("Test Replica records vs. owned released records\n");
6392 for(i=0; ret && i < ARRAY_SIZE(records); i++) {
6393 printf("%s => %s\n", nbt_name_string(ctx, &records[i].name),
6394 (records[i].replica.apply_expected?"REPLACE":"NOT REPLACE"));
6399 name_register->in.name = records[i].name;
6400 name_register->in.dest_addr = ctx->address;
6401 name_register->in.address = records[i].wins.ips[0].ip;
6402 name_register->in.nb_flags = records[i].wins.nb_flags;
6403 name_register->in.register_demand= False;
6404 name_register->in.broadcast = False;
6405 name_register->in.multi_homed = records[i].wins.mhomed;
6406 name_register->in.ttl = 300000;
6407 name_register->in.timeout = 70;
6408 name_register->in.retries = 0;
6410 status = nbt_name_register(ctx->nbtsock, ctx, name_register);
6411 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
6412 printf("No response from %s for name register\n", ctx->address);
6415 if (!NT_STATUS_IS_OK(status)) {
6416 printf("Bad response from %s for name register - %s\n",
6417 ctx->address, nt_errstr(status));
6420 CHECK_VALUE(name_register->out.rcode, 0);
6421 CHECK_VALUE_STRING(name_register->out.reply_from, ctx->address);
6422 CHECK_VALUE(name_register->out.name.type, records[i].name.type);
6423 CHECK_VALUE_STRING(name_register->out.name.name, records[i].name.name);
6424 CHECK_VALUE_STRING(name_register->out.name.scope, records[i].name.scope);
6425 CHECK_VALUE_STRING(name_register->out.reply_addr, records[i].wins.ips[0].ip);
6427 /* release the record */
6428 release->in.name = records[i].name;
6429 release->in.dest_addr = ctx->address;
6430 release->in.address = records[i].wins.ips[0].ip;
6431 release->in.nb_flags = records[i].wins.nb_flags;
6432 release->in.broadcast = False;
6433 release->in.timeout = 30;
6434 release->in.retries = 0;
6436 status = nbt_name_release(ctx->nbtsock, ctx, release);
6437 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
6438 printf("No response from %s for name release\n", ctx->address);
6441 if (!NT_STATUS_IS_OK(status)) {
6442 printf("Bad response from %s for name query - %s\n",
6443 ctx->address, nt_errstr(status));
6446 CHECK_VALUE(release->out.rcode, 0);
6451 wins_name->name = &records[i].name;
6452 wins_name->flags = WREPL_NAME_FLAGS(records[i].replica.type,
6453 records[i].replica.state,
6454 records[i].replica.node,
6455 records[i].replica.is_static);
6456 wins_name->id = ++ctx->b.max_version;
6457 if (wins_name->flags & 2) {
6458 wins_name->addresses.addresses.num_ips = records[i].replica.num_ips;
6459 wins_name->addresses.addresses.ips = discard_const(records[i].replica.ips);
6461 wins_name->addresses.ip = records[i].replica.ips[0].ip;
6463 wins_name->unknown = "255.255.255.255";
6465 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
6466 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name,
6467 records[i].replica.apply_expected);
6469 if (records[i].replica.apply_expected) {
6470 wins_name->name = &records[i].name;
6471 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE,
6472 WREPL_STATE_TOMBSTONE,
6473 WREPL_NODE_B, False);
6474 wins_name->id = ++ctx->b.max_version;
6475 wins_name->addresses.ip = addresses_B_1[0].ip;
6476 wins_name->unknown = "255.255.255.255";
6478 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
6479 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name, True);
6481 release->in.name = records[i].name;
6482 release->in.dest_addr = ctx->address;
6483 release->in.address = records[i].wins.ips[0].ip;
6484 release->in.nb_flags = records[i].wins.nb_flags;
6485 release->in.broadcast = False;
6486 release->in.timeout = 30;
6487 release->in.retries = 0;
6489 status = nbt_name_release(ctx->nbtsock, ctx, release);
6490 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
6491 printf("No response from %s for name release\n", ctx->address);
6494 if (!NT_STATUS_IS_OK(status)) {
6495 printf("Bad response from %s for name query - %s\n",
6496 ctx->address, nt_errstr(status));
6499 CHECK_VALUE(release->out.rcode, 0);
6503 printf("conflict handled wrong or record[%u]: %s\n", i, records[i].line);
6511 struct test_conflict_owned_active_vs_replica_struct {
6512 const char *line; /* just better debugging */
6513 const char *section; /* just better debugging */
6514 struct nbt_name name;
6520 const struct wrepl_ip *ips;
6521 BOOL apply_expected;
6526 BOOL expect_release;
6529 /* when num_ips == 0, then .wins.ips are used */
6531 const struct wrepl_ip *ips;
6534 enum wrepl_name_type type;
6535 enum wrepl_name_state state;
6536 enum wrepl_name_node node;
6539 const struct wrepl_ip *ips;
6540 BOOL apply_expected;
6546 static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket *nbtsock,
6547 struct nbt_name_packet *req_packet,
6548 const struct nbt_peer_socket *src);
6550 static BOOL test_conflict_owned_active_vs_replica(struct test_wrepl_conflict_conn *ctx)
6554 struct wrepl_wins_name wins_name_;
6555 struct wrepl_wins_name *wins_name = &wins_name_;
6556 struct nbt_name_register name_register_;
6557 struct nbt_name_register *name_register = &name_register_;
6558 struct nbt_name_release release_;
6559 struct nbt_name_release *release = &release_;
6561 struct test_conflict_owned_active_vs_replica_struct records[] = {
6563 * unique vs. unique section
6566 * unique,active vs. unique,active with same ip(s), unchecked
6569 .line = __location__,
6570 .name = _NBT_NAME("_UA_UA_SI_U", 0x00, NULL),
6574 .num_ips = ctx->addresses_best_num,
6575 .ips = ctx->addresses_best,
6576 .apply_expected = True
6582 .type = WREPL_TYPE_UNIQUE,
6583 .state = WREPL_STATE_ACTIVE,
6584 .node = WREPL_NODE_B,
6586 .num_ips = ctx->addresses_best_num,
6587 .ips = ctx->addresses_best,
6588 .apply_expected = True
6592 * unique,active vs. unique,active with different ip(s), positive response
6595 .line = __location__,
6596 .name = _NBT_NAME("_UA_UA_DI_P", 0x00, NULL),
6600 .num_ips = ctx->addresses_best_num,
6601 .ips = ctx->addresses_best,
6602 .apply_expected = True
6609 .type = WREPL_TYPE_UNIQUE,
6610 .state = WREPL_STATE_ACTIVE,
6611 .node = WREPL_NODE_B,
6613 .num_ips = ARRAY_SIZE(addresses_B_1),
6614 .ips = addresses_B_1,
6615 .apply_expected = False
6619 * unique,active vs. unique,active with different ip(s), positive response other ips
6622 .line = __location__,
6623 .name = _NBT_NAME("_UA_UA_DI_O", 0x00, NULL),
6627 .num_ips = ctx->addresses_best_num,
6628 .ips = ctx->addresses_best,
6629 .apply_expected = True
6634 .num_ips = ARRAY_SIZE(addresses_A_3_4),
6635 .ips = addresses_A_3_4,
6638 .type = WREPL_TYPE_UNIQUE,
6639 .state = WREPL_STATE_ACTIVE,
6640 .node = WREPL_NODE_B,
6642 .num_ips = ARRAY_SIZE(addresses_B_1),
6643 .ips = addresses_B_1,
6644 .apply_expected = False
6648 * unique,active vs. unique,active with different ip(s), negative response
6651 .line = __location__,
6652 .name = _NBT_NAME("_UA_UA_DI_N", 0x00, NULL),
6656 .num_ips = ctx->addresses_best_num,
6657 .ips = ctx->addresses_best,
6658 .apply_expected = True
6665 .type = WREPL_TYPE_UNIQUE,
6666 .state = WREPL_STATE_ACTIVE,
6667 .node = WREPL_NODE_B,
6669 .num_ips = ARRAY_SIZE(addresses_B_1),
6670 .ips = addresses_B_1,
6671 .apply_expected = True
6675 * unique,active vs. unique,tombstone with same ip(s), unchecked
6678 .line = __location__,
6679 .name = _NBT_NAME("_UA_UT_SI_U", 0x00, NULL),
6683 .num_ips = ctx->addresses_best_num,
6684 .ips = ctx->addresses_best,
6685 .apply_expected = True
6691 .type = WREPL_TYPE_UNIQUE,
6692 .state = WREPL_STATE_TOMBSTONE,
6693 .node = WREPL_NODE_B,
6695 .num_ips = ctx->addresses_best_num,
6696 .ips = ctx->addresses_best,
6697 .apply_expected = False
6701 * unique,active vs. unique,tombstone with different ip(s), unchecked
6704 .line = __location__,
6705 .name = _NBT_NAME("_UA_UT_DI_U", 0x00, NULL),
6709 .num_ips = ctx->addresses_best_num,
6710 .ips = ctx->addresses_best,
6711 .apply_expected = True
6717 .type = WREPL_TYPE_UNIQUE,
6718 .state = WREPL_STATE_TOMBSTONE,
6719 .node = WREPL_NODE_B,
6721 .num_ips = ARRAY_SIZE(addresses_B_1),
6722 .ips = addresses_B_1,
6723 .apply_expected = False
6727 * unique vs. group section
6730 * unique,active vs. group,active with same ip(s), release expected
6733 .line = __location__,
6734 .name = _NBT_NAME("_UA_GA_SI_R", 0x00, NULL),
6738 .num_ips = ctx->addresses_best_num,
6739 .ips = ctx->addresses_best,
6740 .apply_expected = True
6744 .expect_release = True,
6747 .type = WREPL_TYPE_GROUP,
6748 .state = WREPL_STATE_ACTIVE,
6749 .node = WREPL_NODE_B,
6751 .num_ips = ctx->addresses_best_num,
6752 .ips = ctx->addresses_best,
6753 .apply_expected = True
6757 * unique,active vs. group,active with different ip(s), release expected
6760 .line = __location__,
6761 .name = _NBT_NAME("_UA_GA_DI_R", 0x00, NULL),
6765 .num_ips = ctx->addresses_best_num,
6766 .ips = ctx->addresses_best,
6767 .apply_expected = True
6771 .expect_release = True,
6774 .type = WREPL_TYPE_GROUP,
6775 .state = WREPL_STATE_ACTIVE,
6776 .node = WREPL_NODE_B,
6778 .num_ips = ARRAY_SIZE(addresses_B_1),
6779 .ips = addresses_B_1,
6780 .apply_expected = True
6784 * unique,active vs. group,tombstone with same ip(s), unchecked
6787 .line = __location__,
6788 .name = _NBT_NAME("_UA_GT_SI_U", 0x00, NULL),
6792 .num_ips = ctx->addresses_best_num,
6793 .ips = ctx->addresses_best,
6794 .apply_expected = True
6800 .type = WREPL_TYPE_GROUP,
6801 .state = WREPL_STATE_TOMBSTONE,
6802 .node = WREPL_NODE_B,
6804 .num_ips = ctx->addresses_best_num,
6805 .ips = ctx->addresses_best,
6806 .apply_expected = False
6810 * unique,active vs. group,tombstone with different ip(s), unchecked
6813 .line = __location__,
6814 .name = _NBT_NAME("_UA_GT_DI_U", 0x00, NULL),
6818 .num_ips = ctx->addresses_best_num,
6819 .ips = ctx->addresses_best,
6820 .apply_expected = True
6826 .type = WREPL_TYPE_GROUP,
6827 .state = WREPL_STATE_TOMBSTONE,
6828 .node = WREPL_NODE_B,
6830 .num_ips = ARRAY_SIZE(addresses_B_1),
6831 .ips = addresses_B_1,
6832 .apply_expected = False
6836 * unique vs. special group section
6839 * unique,active vs. sgroup,active with same ip(s), release expected
6842 .line = __location__,
6843 .name = _NBT_NAME("_UA_SA_SI_R", 0x00, NULL),
6847 .num_ips = ctx->addresses_best_num,
6848 .ips = ctx->addresses_best,
6849 .apply_expected = True
6853 .expect_release = True,
6856 .type = WREPL_TYPE_SGROUP,
6857 .state = WREPL_STATE_ACTIVE,
6858 .node = WREPL_NODE_B,
6860 .num_ips = ctx->addresses_best_num,
6861 .ips = ctx->addresses_best,
6862 .apply_expected = True
6866 * unique,active vs. group,active with different ip(s), release expected
6869 .line = __location__,
6870 .name = _NBT_NAME("_UA_SA_DI_R", 0x00, NULL),
6874 .num_ips = ctx->addresses_best_num,
6875 .ips = ctx->addresses_best,
6876 .apply_expected = True
6880 .expect_release = True,
6883 .type = WREPL_TYPE_SGROUP,
6884 .state = WREPL_STATE_ACTIVE,
6885 .node = WREPL_NODE_B,
6887 .num_ips = ARRAY_SIZE(addresses_B_1),
6888 .ips = addresses_B_1,
6889 .apply_expected = True
6893 * unique,active vs. sgroup,tombstone with same ip(s), unchecked
6896 .line = __location__,
6897 .name = _NBT_NAME("_UA_ST_SI_U", 0x00, NULL),
6901 .num_ips = ctx->addresses_best_num,
6902 .ips = ctx->addresses_best,
6903 .apply_expected = True
6909 .type = WREPL_TYPE_SGROUP,
6910 .state = WREPL_STATE_TOMBSTONE,
6911 .node = WREPL_NODE_B,
6913 .num_ips = ctx->addresses_best_num,
6914 .ips = ctx->addresses_best,
6915 .apply_expected = False
6919 * unique,active vs. sgroup,tombstone with different ip(s), unchecked
6922 .line = __location__,
6923 .name = _NBT_NAME("_UA_ST_DI_U", 0x00, NULL),
6927 .num_ips = ctx->addresses_best_num,
6928 .ips = ctx->addresses_best,
6929 .apply_expected = True
6935 .type = WREPL_TYPE_SGROUP,
6936 .state = WREPL_STATE_TOMBSTONE,
6937 .node = WREPL_NODE_B,
6939 .num_ips = ARRAY_SIZE(addresses_B_1),
6940 .ips = addresses_B_1,
6941 .apply_expected = False
6945 * unique vs. multi homed section
6948 * unique,active vs. mhomed,active with same ip(s), unchecked
6951 .line = __location__,
6952 .name = _NBT_NAME("_UA_MA_SI_U", 0x00, NULL),
6956 .num_ips = ctx->addresses_best_num,
6957 .ips = ctx->addresses_best,
6958 .apply_expected = True
6964 .type = WREPL_TYPE_MHOMED,
6965 .state = WREPL_STATE_ACTIVE,
6966 .node = WREPL_NODE_B,
6968 .num_ips = ctx->addresses_best_num,
6969 .ips = ctx->addresses_best,
6970 .apply_expected = True
6974 * unique,active vs. mhomed,active with superset ip(s), unchecked
6977 .line = __location__,
6978 .name = _NBT_NAME("_UA_MA_SP_U", 0x00, NULL),
6982 .num_ips = ctx->addresses_best_num,
6983 .ips = ctx->addresses_best,
6984 .apply_expected = True
6990 .type = WREPL_TYPE_MHOMED,
6991 .state = WREPL_STATE_ACTIVE,
6992 .node = WREPL_NODE_B,
6994 .num_ips = ctx->addresses_all_num,
6995 .ips = ctx->addresses_all,
6996 .apply_expected = True
7000 * unique,active vs. mhomed,active with different ip(s), positive response
7003 .line = __location__,
7004 .name = _NBT_NAME("_UA_MA_DI_P", 0x00, NULL),
7008 .num_ips = ctx->addresses_best_num,
7009 .ips = ctx->addresses_best,
7010 .apply_expected = True
7017 .type = WREPL_TYPE_MHOMED,
7018 .state = WREPL_STATE_ACTIVE,
7019 .node = WREPL_NODE_B,
7021 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7022 .ips = addresses_B_3_4,
7023 .apply_expected = False
7027 * unique,active vs. mhomed,active with different ip(s), positive response other ips
7030 .line = __location__,
7031 .name = _NBT_NAME("_UA_MA_DI_O", 0x00, NULL),
7035 .num_ips = ctx->addresses_best_num,
7036 .ips = ctx->addresses_best,
7037 .apply_expected = True
7042 .num_ips = ARRAY_SIZE(addresses_A_3_4),
7043 .ips = addresses_A_3_4,
7046 .type = WREPL_TYPE_MHOMED,
7047 .state = WREPL_STATE_ACTIVE,
7048 .node = WREPL_NODE_B,
7050 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7051 .ips = addresses_B_3_4,
7052 .apply_expected = False
7056 * unique,active vs. mhomed,active with different ip(s), negative response
7059 .line = __location__,
7060 .name = _NBT_NAME("_UA_MA_DI_N", 0x00, NULL),
7064 .num_ips = ctx->addresses_best_num,
7065 .ips = ctx->addresses_best,
7066 .apply_expected = True
7073 .type = WREPL_TYPE_MHOMED,
7074 .state = WREPL_STATE_ACTIVE,
7075 .node = WREPL_NODE_B,
7077 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7078 .ips = addresses_B_3_4,
7079 .apply_expected = True
7083 * unique,active vs. mhomed,tombstone with same ip(s), unchecked
7086 .line = __location__,
7087 .name = _NBT_NAME("_UA_MT_SI_U", 0x00, NULL),
7091 .num_ips = ctx->addresses_best_num,
7092 .ips = ctx->addresses_best,
7093 .apply_expected = True
7099 .type = WREPL_TYPE_MHOMED,
7100 .state = WREPL_STATE_TOMBSTONE,
7101 .node = WREPL_NODE_B,
7103 .num_ips = ctx->addresses_best_num,
7104 .ips = ctx->addresses_best,
7105 .apply_expected = False
7109 * unique,active vs. mhomed,tombstone with different ip(s), unchecked
7112 .line = __location__,
7113 .name = _NBT_NAME("_UA_MT_DI_U", 0x00, NULL),
7117 .num_ips = ctx->addresses_best_num,
7118 .ips = ctx->addresses_best,
7119 .apply_expected = True
7125 .type = WREPL_TYPE_MHOMED,
7126 .state = WREPL_STATE_TOMBSTONE,
7127 .node = WREPL_NODE_B,
7129 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7130 .ips = addresses_B_3_4,
7131 .apply_expected = False
7135 * normal group vs. unique section
7138 * group,active vs. unique,active with same ip(s), unchecked
7141 .line = __location__,
7142 .name = _NBT_NAME("_GA_UA_SI_U", 0x00, NULL),
7144 .nb_flags = NBT_NM_GROUP,
7146 .num_ips = ctx->addresses_best_num,
7147 .ips = ctx->addresses_best,
7148 .apply_expected = True
7154 .type = WREPL_TYPE_UNIQUE,
7155 .state = WREPL_STATE_ACTIVE,
7156 .node = WREPL_NODE_B,
7158 .num_ips = ctx->addresses_best_num,
7159 .ips = ctx->addresses_best,
7160 .apply_expected = False
7164 * group,active vs. unique,active with different ip(s), unchecked
7167 .line = __location__,
7168 .name = _NBT_NAME("_GA_UA_DI_U", 0x00, NULL),
7170 .nb_flags = NBT_NM_GROUP,
7172 .num_ips = ctx->addresses_best_num,
7173 .ips = ctx->addresses_best,
7174 .apply_expected = True
7180 .type = WREPL_TYPE_UNIQUE,
7181 .state = WREPL_STATE_ACTIVE,
7182 .node = WREPL_NODE_B,
7184 .num_ips = ARRAY_SIZE(addresses_B_1),
7185 .ips = addresses_B_1,
7186 .apply_expected = False
7190 * group,active vs. unique,tombstone with same ip(s), unchecked
7193 .line = __location__,
7194 .name = _NBT_NAME("_GA_UT_SI_U", 0x00, NULL),
7196 .nb_flags = NBT_NM_GROUP,
7198 .num_ips = ctx->addresses_best_num,
7199 .ips = ctx->addresses_best,
7200 .apply_expected = True
7206 .type = WREPL_TYPE_UNIQUE,
7207 .state = WREPL_STATE_TOMBSTONE,
7208 .node = WREPL_NODE_B,
7210 .num_ips = ctx->addresses_best_num,
7211 .ips = ctx->addresses_best,
7212 .apply_expected = False
7216 * group,active vs. unique,tombstone with different ip(s), unchecked
7219 .line = __location__,
7220 .name = _NBT_NAME("_GA_UT_DI_U", 0x00, NULL),
7222 .nb_flags = NBT_NM_GROUP,
7224 .num_ips = ctx->addresses_best_num,
7225 .ips = ctx->addresses_best,
7226 .apply_expected = True
7232 .type = WREPL_TYPE_UNIQUE,
7233 .state = WREPL_STATE_TOMBSTONE,
7234 .node = WREPL_NODE_B,
7236 .num_ips = ARRAY_SIZE(addresses_B_1),
7237 .ips = addresses_B_1,
7238 .apply_expected = False
7242 * normal group vs. normal group section
7245 * group,active vs. group,active with same ip(s), unchecked
7248 .line = __location__,
7249 .name = _NBT_NAME("_GA_GA_SI_U", 0x00, NULL),
7251 .nb_flags = NBT_NM_GROUP,
7253 .num_ips = ctx->addresses_best_num,
7254 .ips = ctx->addresses_best,
7255 .apply_expected = True
7261 .type = WREPL_TYPE_GROUP,
7262 .state = WREPL_STATE_ACTIVE,
7263 .node = WREPL_NODE_B,
7265 .num_ips = ctx->addresses_best_num,
7266 .ips = ctx->addresses_best,
7267 .apply_expected = True
7271 * group,active vs. group,active with different ip(s), unchecked
7274 .line = __location__,
7275 .name = _NBT_NAME("_GA_GA_DI_U", 0x00, NULL),
7277 .nb_flags = NBT_NM_GROUP,
7279 .num_ips = ctx->addresses_best_num,
7280 .ips = ctx->addresses_best,
7281 .apply_expected = True
7287 .type = WREPL_TYPE_GROUP,
7288 .state = WREPL_STATE_ACTIVE,
7289 .node = WREPL_NODE_B,
7291 .num_ips = ARRAY_SIZE(addresses_B_1),
7292 .ips = addresses_B_1,
7293 .apply_expected = True
7297 * group,active vs. group,tombstone with same ip(s), unchecked
7300 .line = __location__,
7301 .name = _NBT_NAME("_GA_GT_SI_U", 0x00, NULL),
7303 .nb_flags = NBT_NM_GROUP,
7305 .num_ips = ctx->addresses_best_num,
7306 .ips = ctx->addresses_best,
7307 .apply_expected = True
7313 .type = WREPL_TYPE_GROUP,
7314 .state = WREPL_STATE_TOMBSTONE,
7315 .node = WREPL_NODE_B,
7317 .num_ips = ctx->addresses_best_num,
7318 .ips = ctx->addresses_best,
7319 .apply_expected = False
7323 * group,active vs. group,tombstone with different ip(s), unchecked
7326 .line = __location__,
7327 .name = _NBT_NAME("_GA_GT_DI_U", 0x00, NULL),
7329 .nb_flags = NBT_NM_GROUP,
7331 .num_ips = ctx->addresses_best_num,
7332 .ips = ctx->addresses_best,
7333 .apply_expected = True
7339 .type = WREPL_TYPE_GROUP,
7340 .state = WREPL_STATE_TOMBSTONE,
7341 .node = WREPL_NODE_B,
7343 .num_ips = ARRAY_SIZE(addresses_B_1),
7344 .ips = addresses_B_1,
7345 .apply_expected = False
7349 * normal group vs. special group section
7352 * group,active vs. sgroup,active with same ip(s), unchecked
7355 .line = __location__,
7356 .name = _NBT_NAME("_GA_SA_SI_U", 0x00, NULL),
7358 .nb_flags = NBT_NM_GROUP,
7360 .num_ips = ctx->addresses_best_num,
7361 .ips = ctx->addresses_best,
7362 .apply_expected = True
7368 .type = WREPL_TYPE_SGROUP,
7369 .state = WREPL_STATE_ACTIVE,
7370 .node = WREPL_NODE_B,
7372 .num_ips = ctx->addresses_best_num,
7373 .ips = ctx->addresses_best,
7374 .apply_expected = False
7378 * group,active vs. sgroup,active with different ip(s), unchecked
7381 .line = __location__,
7382 .name = _NBT_NAME("_GA_SA_DI_U", 0x00, NULL),
7384 .nb_flags = NBT_NM_GROUP,
7386 .num_ips = ctx->addresses_best_num,
7387 .ips = ctx->addresses_best,
7388 .apply_expected = True
7394 .type = WREPL_TYPE_SGROUP,
7395 .state = WREPL_STATE_ACTIVE,
7396 .node = WREPL_NODE_B,
7398 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7399 .ips = addresses_B_3_4,
7400 .apply_expected = False
7404 * group,active vs. sgroup,tombstone with same ip(s), unchecked
7407 .line = __location__,
7408 .name = _NBT_NAME("_GA_ST_SI_U", 0x00, NULL),
7410 .nb_flags = NBT_NM_GROUP,
7412 .num_ips = ctx->addresses_best_num,
7413 .ips = ctx->addresses_best,
7414 .apply_expected = True
7420 .type = WREPL_TYPE_SGROUP,
7421 .state = WREPL_STATE_TOMBSTONE,
7422 .node = WREPL_NODE_B,
7424 .num_ips = ctx->addresses_best_num,
7425 .ips = ctx->addresses_best,
7426 .apply_expected = False
7430 * group,active vs. sgroup,tombstone with different ip(s), unchecked
7433 .line = __location__,
7434 .name = _NBT_NAME("_GA_ST_DI_U", 0x00, NULL),
7436 .nb_flags = NBT_NM_GROUP,
7438 .num_ips = ctx->addresses_best_num,
7439 .ips = ctx->addresses_best,
7440 .apply_expected = True
7446 .type = WREPL_TYPE_SGROUP,
7447 .state = WREPL_STATE_TOMBSTONE,
7448 .node = WREPL_NODE_B,
7450 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7451 .ips = addresses_B_3_4,
7452 .apply_expected = False
7456 * normal group vs. multi homed section
7459 * group,active vs. mhomed,active with same ip(s), unchecked
7462 .line = __location__,
7463 .name = _NBT_NAME("_GA_MA_SI_U", 0x00, NULL),
7465 .nb_flags = NBT_NM_GROUP,
7467 .num_ips = ctx->addresses_best_num,
7468 .ips = ctx->addresses_best,
7469 .apply_expected = True
7475 .type = WREPL_TYPE_MHOMED,
7476 .state = WREPL_STATE_ACTIVE,
7477 .node = WREPL_NODE_B,
7479 .num_ips = ctx->addresses_best_num,
7480 .ips = ctx->addresses_best,
7481 .apply_expected = False
7485 * group,active vs. mhomed,active with different ip(s), unchecked
7488 .line = __location__,
7489 .name = _NBT_NAME("_GA_MA_DI_U", 0x00, NULL),
7491 .nb_flags = NBT_NM_GROUP,
7493 .num_ips = ctx->addresses_best_num,
7494 .ips = ctx->addresses_best,
7495 .apply_expected = True
7501 .type = WREPL_TYPE_MHOMED,
7502 .state = WREPL_STATE_ACTIVE,
7503 .node = WREPL_NODE_B,
7505 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7506 .ips = addresses_B_3_4,
7507 .apply_expected = False
7511 * group,active vs. mhomed,tombstone with same ip(s), unchecked
7514 .line = __location__,
7515 .name = _NBT_NAME("_GA_MT_SI_U", 0x00, NULL),
7517 .nb_flags = NBT_NM_GROUP,
7519 .num_ips = ctx->addresses_best_num,
7520 .ips = ctx->addresses_best,
7521 .apply_expected = True
7527 .type = WREPL_TYPE_MHOMED,
7528 .state = WREPL_STATE_TOMBSTONE,
7529 .node = WREPL_NODE_B,
7531 .num_ips = ctx->addresses_best_num,
7532 .ips = ctx->addresses_best,
7533 .apply_expected = False
7537 * group,active vs. mhomed,tombstone with different ip(s), unchecked
7540 .line = __location__,
7541 .name = _NBT_NAME("_GA_MT_DI_U", 0x00, NULL),
7543 .nb_flags = NBT_NM_GROUP,
7545 .num_ips = ctx->addresses_best_num,
7546 .ips = ctx->addresses_best,
7547 .apply_expected = True
7553 .type = WREPL_TYPE_MHOMED,
7554 .state = WREPL_STATE_TOMBSTONE,
7555 .node = WREPL_NODE_B,
7557 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7558 .ips = addresses_B_3_4,
7559 .apply_expected = False
7563 * special group vs. unique section
7566 * sgroup,active vs. unique,active with same ip(s), unchecked
7569 .line = __location__,
7570 .name = _NBT_NAME("_SA_UA_SI_U", 0x1C, NULL),
7572 .nb_flags = NBT_NM_GROUP,
7574 .num_ips = ctx->addresses_best_num,
7575 .ips = ctx->addresses_best,
7576 .apply_expected = True
7582 .type = WREPL_TYPE_UNIQUE,
7583 .state = WREPL_STATE_ACTIVE,
7584 .node = WREPL_NODE_B,
7586 .num_ips = ctx->addresses_best_num,
7587 .ips = ctx->addresses_best,
7588 .apply_expected = False
7592 * sgroup,active vs. unique,active with different ip(s), unchecked
7595 .line = __location__,
7596 .name = _NBT_NAME("_SA_UA_DI_U", 0x1C, NULL),
7598 .nb_flags = NBT_NM_GROUP,
7600 .num_ips = ctx->addresses_best_num,
7601 .ips = ctx->addresses_best,
7602 .apply_expected = True
7608 .type = WREPL_TYPE_UNIQUE,
7609 .state = WREPL_STATE_ACTIVE,
7610 .node = WREPL_NODE_B,
7612 .num_ips = ARRAY_SIZE(addresses_B_1),
7613 .ips = addresses_B_1,
7614 .apply_expected = False
7618 * sgroup,active vs. unique,tombstone with same ip(s), unchecked
7621 .line = __location__,
7622 .name = _NBT_NAME("_SA_UT_SI_U", 0x1C, NULL),
7624 .nb_flags = NBT_NM_GROUP,
7626 .num_ips = ctx->addresses_best_num,
7627 .ips = ctx->addresses_best,
7628 .apply_expected = True
7634 .type = WREPL_TYPE_UNIQUE,
7635 .state = WREPL_STATE_TOMBSTONE,
7636 .node = WREPL_NODE_B,
7638 .num_ips = ctx->addresses_best_num,
7639 .ips = ctx->addresses_best,
7640 .apply_expected = False
7644 * sgroup,active vs. unique,tombstone with different ip(s), unchecked
7647 .line = __location__,
7648 .name = _NBT_NAME("_SA_UT_DI_U", 0x1C, NULL),
7650 .nb_flags = NBT_NM_GROUP,
7652 .num_ips = ctx->addresses_best_num,
7653 .ips = ctx->addresses_best,
7654 .apply_expected = True
7660 .type = WREPL_TYPE_UNIQUE,
7661 .state = WREPL_STATE_TOMBSTONE,
7662 .node = WREPL_NODE_B,
7664 .num_ips = ARRAY_SIZE(addresses_B_1),
7665 .ips = addresses_B_1,
7666 .apply_expected = False
7670 * special group vs. normal group section
7673 * sgroup,active vs. group,active with same ip(s), unchecked
7676 .line = __location__,
7677 .name = _NBT_NAME("_SA_GA_SI_U", 0x1C, NULL),
7679 .nb_flags = NBT_NM_GROUP,
7681 .num_ips = ctx->addresses_best_num,
7682 .ips = ctx->addresses_best,
7683 .apply_expected = True
7689 .type = WREPL_TYPE_GROUP,
7690 .state = WREPL_STATE_ACTIVE,
7691 .node = WREPL_NODE_B,
7693 .num_ips = ctx->addresses_best_num,
7694 .ips = ctx->addresses_best,
7695 .apply_expected = False
7699 * sgroup,active vs. group,active with different ip(s), unchecked
7702 .line = __location__,
7703 .name = _NBT_NAME("_SA_GA_DI_U", 0x1C, NULL),
7705 .nb_flags = NBT_NM_GROUP,
7707 .num_ips = ctx->addresses_best_num,
7708 .ips = ctx->addresses_best,
7709 .apply_expected = True
7715 .type = WREPL_TYPE_GROUP,
7716 .state = WREPL_STATE_ACTIVE,
7717 .node = WREPL_NODE_B,
7719 .num_ips = ARRAY_SIZE(addresses_B_1),
7720 .ips = addresses_B_1,
7721 .apply_expected = False
7725 * sgroup,active vs. group,tombstone with same ip(s), unchecked
7728 .line = __location__,
7729 .name = _NBT_NAME("_SA_GT_SI_U", 0x1C, NULL),
7731 .nb_flags = NBT_NM_GROUP,
7733 .num_ips = ctx->addresses_best_num,
7734 .ips = ctx->addresses_best,
7735 .apply_expected = True
7741 .type = WREPL_TYPE_GROUP,
7742 .state = WREPL_STATE_TOMBSTONE,
7743 .node = WREPL_NODE_B,
7745 .num_ips = ctx->addresses_best_num,
7746 .ips = ctx->addresses_best,
7747 .apply_expected = False
7751 * sgroup,active vs. group,tombstone with different ip(s), unchecked
7754 .line = __location__,
7755 .name = _NBT_NAME("_SA_GT_DI_U", 0x1C, NULL),
7757 .nb_flags = NBT_NM_GROUP,
7759 .num_ips = ctx->addresses_best_num,
7760 .ips = ctx->addresses_best,
7761 .apply_expected = True
7767 .type = WREPL_TYPE_GROUP,
7768 .state = WREPL_STATE_TOMBSTONE,
7769 .node = WREPL_NODE_B,
7771 .num_ips = ARRAY_SIZE(addresses_B_1),
7772 .ips = addresses_B_1,
7773 .apply_expected = False
7777 * special group vs. multi homed section
7780 * sgroup,active vs. mhomed,active with same ip(s), unchecked
7783 .line = __location__,
7784 .name = _NBT_NAME("_SA_MA_SI_U", 0x1C, NULL),
7786 .nb_flags = NBT_NM_GROUP,
7788 .num_ips = ctx->addresses_best_num,
7789 .ips = ctx->addresses_best,
7790 .apply_expected = True
7796 .type = WREPL_TYPE_MHOMED,
7797 .state = WREPL_STATE_ACTIVE,
7798 .node = WREPL_NODE_B,
7800 .num_ips = ctx->addresses_best_num,
7801 .ips = ctx->addresses_best,
7802 .apply_expected = False
7806 * sgroup,active vs. mhomed,active with different ip(s), unchecked
7809 .line = __location__,
7810 .name = _NBT_NAME("_SA_MA_DI_U", 0x1C, NULL),
7812 .nb_flags = NBT_NM_GROUP,
7814 .num_ips = ctx->addresses_best_num,
7815 .ips = ctx->addresses_best,
7816 .apply_expected = True
7822 .type = WREPL_TYPE_MHOMED,
7823 .state = WREPL_STATE_ACTIVE,
7824 .node = WREPL_NODE_B,
7826 .num_ips = ARRAY_SIZE(addresses_B_1),
7827 .ips = addresses_B_1,
7828 .apply_expected = False
7832 * sgroup,active vs. mhomed,tombstone with same ip(s), unchecked
7835 .line = __location__,
7836 .name = _NBT_NAME("_SA_MT_SI_U", 0x1C, NULL),
7838 .nb_flags = NBT_NM_GROUP,
7840 .num_ips = ctx->addresses_best_num,
7841 .ips = ctx->addresses_best,
7842 .apply_expected = True
7848 .type = WREPL_TYPE_MHOMED,
7849 .state = WREPL_STATE_TOMBSTONE,
7850 .node = WREPL_NODE_B,
7852 .num_ips = ctx->addresses_best_num,
7853 .ips = ctx->addresses_best,
7854 .apply_expected = False
7858 * sgroup,active vs. mhomed,tombstone with different ip(s), unchecked
7861 .line = __location__,
7862 .name = _NBT_NAME("_SA_MT_DI_U", 0x1C, NULL),
7864 .nb_flags = NBT_NM_GROUP,
7866 .num_ips = ctx->addresses_best_num,
7867 .ips = ctx->addresses_best,
7868 .apply_expected = True
7874 .type = WREPL_TYPE_MHOMED,
7875 .state = WREPL_STATE_TOMBSTONE,
7876 .node = WREPL_NODE_B,
7878 .num_ips = ARRAY_SIZE(addresses_B_1),
7879 .ips = addresses_B_1,
7880 .apply_expected = False
7884 * multi homed vs. unique section
7887 * mhomed,active vs. unique,active with same ip(s), unchecked
7890 .line = __location__,
7891 .name = _NBT_NAME("_MA_UA_SI_U", 0x00, NULL),
7895 .num_ips = ctx->addresses_best_num,
7896 .ips = ctx->addresses_best,
7897 .apply_expected = True
7903 .type = WREPL_TYPE_UNIQUE,
7904 .state = WREPL_STATE_ACTIVE,
7905 .node = WREPL_NODE_B,
7907 .num_ips = ctx->addresses_best_num,
7908 .ips = ctx->addresses_best,
7909 .apply_expected = True
7913 * mhomed,active vs. unique,active with different ip(s), positive response
7916 .line = __location__,
7917 .name = _NBT_NAME("_MA_UA_DI_P", 0x00, NULL),
7921 .num_ips = ctx->addresses_best_num,
7922 .ips = ctx->addresses_best,
7923 .apply_expected = True
7930 .type = WREPL_TYPE_UNIQUE,
7931 .state = WREPL_STATE_ACTIVE,
7932 .node = WREPL_NODE_B,
7934 .num_ips = ARRAY_SIZE(addresses_B_1),
7935 .ips = addresses_B_1,
7936 .apply_expected = False
7940 * mhomed,active vs. unique,active with different ip(s), positive response other ips
7943 .line = __location__,
7944 .name = _NBT_NAME("_MA_UA_DI_O", 0x00, NULL),
7948 .num_ips = ctx->addresses_best_num,
7949 .ips = ctx->addresses_best,
7950 .apply_expected = True
7955 .num_ips = ARRAY_SIZE(addresses_A_3_4),
7956 .ips = addresses_A_3_4,
7959 .type = WREPL_TYPE_UNIQUE,
7960 .state = WREPL_STATE_ACTIVE,
7961 .node = WREPL_NODE_B,
7963 .num_ips = ARRAY_SIZE(addresses_B_1),
7964 .ips = addresses_B_1,
7965 .apply_expected = False
7969 * mhomed,active vs. unique,active with different ip(s), negative response
7972 .line = __location__,
7973 .name = _NBT_NAME("_MA_UA_DI_N", 0x00, NULL),
7977 .num_ips = ctx->addresses_best_num,
7978 .ips = ctx->addresses_best,
7979 .apply_expected = True
7986 .type = WREPL_TYPE_UNIQUE,
7987 .state = WREPL_STATE_ACTIVE,
7988 .node = WREPL_NODE_B,
7990 .num_ips = ARRAY_SIZE(addresses_B_1),
7991 .ips = addresses_B_1,
7992 .apply_expected = True
7996 * mhomed,active vs. unique,tombstone with same ip(s), unchecked
7999 .line = __location__,
8000 .name = _NBT_NAME("_MA_UT_SI_U", 0x00, NULL),
8004 .num_ips = ctx->addresses_best_num,
8005 .ips = ctx->addresses_best,
8006 .apply_expected = True
8012 .type = WREPL_TYPE_UNIQUE,
8013 .state = WREPL_STATE_TOMBSTONE,
8014 .node = WREPL_NODE_B,
8016 .num_ips = ctx->addresses_best_num,
8017 .ips = ctx->addresses_best,
8018 .apply_expected = False
8022 * mhomed,active vs. unique,tombstone with different ip(s), unchecked
8025 .line = __location__,
8026 .name = _NBT_NAME("_MA_UT_DI_U", 0x00, NULL),
8030 .num_ips = ctx->addresses_best_num,
8031 .ips = ctx->addresses_best,
8032 .apply_expected = True
8038 .type = WREPL_TYPE_UNIQUE,
8039 .state = WREPL_STATE_TOMBSTONE,
8040 .node = WREPL_NODE_B,
8042 .num_ips = ARRAY_SIZE(addresses_B_1),
8043 .ips = addresses_B_1,
8044 .apply_expected = False
8048 * multi homed vs. normal group section
8051 * mhomed,active vs. group,active with same ip(s), release expected
8054 .line = __location__,
8055 .name = _NBT_NAME("_MA_GA_SI_R", 0x00, NULL),
8059 .num_ips = ctx->addresses_best_num,
8060 .ips = ctx->addresses_best,
8061 .apply_expected = True
8065 .expect_release = True,
8068 .type = WREPL_TYPE_GROUP,
8069 .state = WREPL_STATE_ACTIVE,
8070 .node = WREPL_NODE_B,
8072 .num_ips = ctx->addresses_best_num,
8073 .ips = ctx->addresses_best,
8074 .apply_expected = True
8078 * mhomed,active vs. group,active with different ip(s), release expected
8081 .line = __location__,
8082 .name = _NBT_NAME("_MA_GA_DI_R", 0x00, NULL),
8086 .num_ips = ctx->addresses_best_num,
8087 .ips = ctx->addresses_best,
8088 .apply_expected = True
8092 .expect_release = True,
8095 .type = WREPL_TYPE_GROUP,
8096 .state = WREPL_STATE_ACTIVE,
8097 .node = WREPL_NODE_B,
8099 .num_ips = ARRAY_SIZE(addresses_B_1),
8100 .ips = addresses_B_1,
8101 .apply_expected = True
8105 * mhomed,active vs. group,tombstone with same ip(s), unchecked
8108 .line = __location__,
8109 .name = _NBT_NAME("_MA_GT_SI_U", 0x00, NULL),
8113 .num_ips = ctx->addresses_best_num,
8114 .ips = ctx->addresses_best,
8115 .apply_expected = True
8121 .type = WREPL_TYPE_GROUP,
8122 .state = WREPL_STATE_TOMBSTONE,
8123 .node = WREPL_NODE_B,
8125 .num_ips = ctx->addresses_best_num,
8126 .ips = ctx->addresses_best,
8127 .apply_expected = False
8131 * mhomed,active vs. group,tombstone with different ip(s), unchecked
8134 .line = __location__,
8135 .name = _NBT_NAME("_MA_GT_DI_U", 0x00, NULL),
8139 .num_ips = ctx->addresses_best_num,
8140 .ips = ctx->addresses_best,
8141 .apply_expected = True
8147 .type = WREPL_TYPE_GROUP,
8148 .state = WREPL_STATE_TOMBSTONE,
8149 .node = WREPL_NODE_B,
8151 .num_ips = ARRAY_SIZE(addresses_B_1),
8152 .ips = addresses_B_1,
8153 .apply_expected = False
8157 * multi homed vs. special group section
8160 * mhomed,active vs. sgroup,active with same ip(s), release expected
8163 .line = __location__,
8164 .name = _NBT_NAME("_MA_SA_SI_R", 0x00, NULL),
8168 .num_ips = ctx->addresses_best_num,
8169 .ips = ctx->addresses_best,
8170 .apply_expected = True
8174 .expect_release = True,
8177 .type = WREPL_TYPE_SGROUP,
8178 .state = WREPL_STATE_ACTIVE,
8179 .node = WREPL_NODE_B,
8181 .num_ips = ctx->addresses_best_num,
8182 .ips = ctx->addresses_best,
8183 .apply_expected = True
8187 * mhomed,active vs. group,active with different ip(s), release expected
8190 .line = __location__,
8191 .name = _NBT_NAME("_MA_SA_DI_R", 0x00, NULL),
8195 .num_ips = ctx->addresses_best_num,
8196 .ips = ctx->addresses_best,
8197 .apply_expected = True
8201 .expect_release = True,
8204 .type = WREPL_TYPE_SGROUP,
8205 .state = WREPL_STATE_ACTIVE,
8206 .node = WREPL_NODE_B,
8208 .num_ips = ARRAY_SIZE(addresses_B_1),
8209 .ips = addresses_B_1,
8210 .apply_expected = True
8214 * mhomed,active vs. sgroup,tombstone with same ip(s), unchecked
8217 .line = __location__,
8218 .name = _NBT_NAME("_MA_ST_SI_U", 0x00, NULL),
8222 .num_ips = ctx->addresses_best_num,
8223 .ips = ctx->addresses_best,
8224 .apply_expected = True
8230 .type = WREPL_TYPE_SGROUP,
8231 .state = WREPL_STATE_TOMBSTONE,
8232 .node = WREPL_NODE_B,
8234 .num_ips = ctx->addresses_best_num,
8235 .ips = ctx->addresses_best,
8236 .apply_expected = False
8240 * mhomed,active vs. sgroup,tombstone with different ip(s), unchecked
8243 .line = __location__,
8244 .name = _NBT_NAME("_MA_ST_DI_U", 0x00, NULL),
8248 .num_ips = ctx->addresses_best_num,
8249 .ips = ctx->addresses_best,
8250 .apply_expected = True
8256 .type = WREPL_TYPE_SGROUP,
8257 .state = WREPL_STATE_TOMBSTONE,
8258 .node = WREPL_NODE_B,
8260 .num_ips = ARRAY_SIZE(addresses_B_1),
8261 .ips = addresses_B_1,
8262 .apply_expected = False
8266 * multi homed vs. multi homed section
8269 * mhomed,active vs. mhomed,active with same ip(s), unchecked
8272 .line = __location__,
8273 .name = _NBT_NAME("_MA_MA_SI_U", 0x00, NULL),
8277 .num_ips = ctx->addresses_best_num,
8278 .ips = ctx->addresses_best,
8279 .apply_expected = True
8285 .type = WREPL_TYPE_MHOMED,
8286 .state = WREPL_STATE_ACTIVE,
8287 .node = WREPL_NODE_B,
8289 .num_ips = ctx->addresses_best_num,
8290 .ips = ctx->addresses_best,
8291 .apply_expected = True
8295 * mhomed,active vs. mhomed,active with superset ip(s), unchecked
8298 .line = __location__,
8299 .name = _NBT_NAME("_MA_MA_SP_U", 0x00, NULL),
8303 .num_ips = ctx->addresses_best_num,
8304 .ips = ctx->addresses_best,
8305 .apply_expected = True
8311 .type = WREPL_TYPE_MHOMED,
8312 .state = WREPL_STATE_ACTIVE,
8313 .node = WREPL_NODE_B,
8315 .num_ips = ctx->addresses_all_num,
8316 .ips = ctx->addresses_all,
8317 .apply_expected = True
8321 * mhomed,active vs. mhomed,active with different ip(s), positive response
8324 .line = __location__,
8325 .name = _NBT_NAME("_MA_MA_DI_P", 0x00, NULL),
8329 .num_ips = ctx->addresses_best_num,
8330 .ips = ctx->addresses_best,
8331 .apply_expected = True
8338 .type = WREPL_TYPE_MHOMED,
8339 .state = WREPL_STATE_ACTIVE,
8340 .node = WREPL_NODE_B,
8342 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8343 .ips = addresses_B_3_4,
8344 .apply_expected = False
8348 * mhomed,active vs. mhomed,active with different ip(s), positive response other ips
8351 .line = __location__,
8352 .name = _NBT_NAME("_MA_MA_DI_O", 0x00, NULL),
8356 .num_ips = ctx->addresses_best_num,
8357 .ips = ctx->addresses_best,
8358 .apply_expected = True
8363 .num_ips = ARRAY_SIZE(addresses_A_3_4),
8364 .ips = addresses_A_3_4,
8367 .type = WREPL_TYPE_MHOMED,
8368 .state = WREPL_STATE_ACTIVE,
8369 .node = WREPL_NODE_B,
8371 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8372 .ips = addresses_B_3_4,
8373 .apply_expected = False
8377 * mhomed,active vs. mhomed,active with different ip(s), negative response
8380 .line = __location__,
8381 .name = _NBT_NAME("_MA_MA_DI_N", 0x00, NULL),
8385 .num_ips = ctx->addresses_best_num,
8386 .ips = ctx->addresses_best,
8387 .apply_expected = True
8394 .type = WREPL_TYPE_MHOMED,
8395 .state = WREPL_STATE_ACTIVE,
8396 .node = WREPL_NODE_B,
8398 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8399 .ips = addresses_B_3_4,
8400 .apply_expected = True
8404 * mhomed,active vs. mhomed,tombstone with same ip(s), unchecked
8407 .line = __location__,
8408 .name = _NBT_NAME("_MA_MT_SI_U", 0x00, NULL),
8412 .num_ips = ctx->addresses_best_num,
8413 .ips = ctx->addresses_best,
8414 .apply_expected = True
8420 .type = WREPL_TYPE_MHOMED,
8421 .state = WREPL_STATE_TOMBSTONE,
8422 .node = WREPL_NODE_B,
8424 .num_ips = ctx->addresses_best_num,
8425 .ips = ctx->addresses_best,
8426 .apply_expected = False
8430 * mhomed,active vs. mhomed,tombstone with different ip(s), unchecked
8433 .line = __location__,
8434 .name = _NBT_NAME("_MA_MT_DI_U", 0x00, NULL),
8438 .num_ips = ctx->addresses_best_num,
8439 .ips = ctx->addresses_best,
8440 .apply_expected = True
8446 .type = WREPL_TYPE_MHOMED,
8447 .state = WREPL_STATE_TOMBSTONE,
8448 .node = WREPL_NODE_B,
8450 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8451 .ips = addresses_B_3_4,
8452 .apply_expected = False
8456 * some more multi homed test, including merging
8459 * mhomed,active vs. mhomed,active with superset ip(s), unchecked
8462 .line = __location__,
8463 .section= "Test Replica vs. owned active: some more MHOMED combinations",
8464 .name = _NBT_NAME("_MA_MA_SP_U", 0x00, NULL),
8465 .skip = (ctx->addresses_all_num < 3),
8469 .num_ips = ctx->addresses_mhomed_num,
8470 .ips = ctx->addresses_mhomed,
8471 .apply_expected = True
8477 .type = WREPL_TYPE_MHOMED,
8478 .state = WREPL_STATE_ACTIVE,
8479 .node = WREPL_NODE_B,
8481 .num_ips = ctx->addresses_all_num,
8482 .ips = ctx->addresses_all,
8483 .apply_expected = True
8487 * mhomed,active vs. mhomed,active with same ips, unchecked
8490 .line = __location__,
8491 .name = _NBT_NAME("_MA_MA_SM_U", 0x00, NULL),
8492 .skip = (ctx->addresses_mhomed_num != 2),
8496 .num_ips = ctx->addresses_mhomed_num,
8497 .ips = ctx->addresses_mhomed,
8498 .apply_expected = True
8504 .type = WREPL_TYPE_MHOMED,
8505 .state = WREPL_STATE_ACTIVE,
8506 .node = WREPL_NODE_B,
8508 .num_ips = ctx->addresses_mhomed_num,
8509 .ips = ctx->addresses_mhomed,
8510 .apply_expected = True
8514 * mhomed,active vs. mhomed,active with subset ip(s), positive response
8517 .line = __location__,
8518 .name = _NBT_NAME("_MA_MA_SB_P", 0x00, NULL),
8519 .skip = (ctx->addresses_mhomed_num != 2),
8523 .num_ips = ctx->addresses_mhomed_num,
8524 .ips = ctx->addresses_mhomed,
8525 .apply_expected = True
8532 .type = WREPL_TYPE_MHOMED,
8533 .state = WREPL_STATE_ACTIVE,
8534 .node = WREPL_NODE_B,
8536 .num_ips = ctx->addresses_best_num,
8537 .ips = ctx->addresses_best,
8538 .mhomed_merge = True
8542 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with all addresses
8545 .line = __location__,
8546 .name = _NBT_NAME("_MA_MA_SB_A", 0x00, NULL),
8547 .skip = (ctx->addresses_all_num < 3),
8551 .num_ips = ctx->addresses_mhomed_num,
8552 .ips = ctx->addresses_mhomed,
8553 .apply_expected = True
8558 .num_ips = ctx->addresses_all_num,
8559 .ips = ctx->addresses_all,
8562 .type = WREPL_TYPE_MHOMED,
8563 .state = WREPL_STATE_ACTIVE,
8564 .node = WREPL_NODE_B,
8566 .num_ips = ctx->addresses_best_num,
8567 .ips = ctx->addresses_best,
8568 .mhomed_merge = True
8572 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with replicas addresses
8573 * TODO: check why the server sends a name release demand for one address?
8574 * the release demand has no effect to the database record...
8577 .line = __location__,
8578 .name = _NBT_NAME("_MA_MA_SB_PRA", 0x00, NULL),
8579 .skip = (ctx->addresses_all_num < 3),
8583 .num_ips = ctx->addresses_mhomed_num,
8584 .ips = ctx->addresses_mhomed,
8585 .apply_expected = True
8590 .num_ips = ctx->addresses_best_num,
8591 .ips = ctx->addresses_best,
8592 .late_release = True
8595 .type = WREPL_TYPE_MHOMED,
8596 .state = WREPL_STATE_ACTIVE,
8597 .node = WREPL_NODE_B,
8599 .num_ips = ctx->addresses_best_num,
8600 .ips = ctx->addresses_best,
8601 .apply_expected = False
8605 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with other addresses
8608 .line = __location__,
8609 .name = _NBT_NAME("_MA_MA_SB_O", 0x00, NULL),
8611 .skip = (ctx->addresses_all_num < 3),
8615 .num_ips = ctx->addresses_mhomed_num,
8616 .ips = ctx->addresses_mhomed,
8617 .apply_expected = True
8622 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8623 .ips = addresses_B_3_4,
8626 .type = WREPL_TYPE_MHOMED,
8627 .state = WREPL_STATE_ACTIVE,
8628 .node = WREPL_NODE_B,
8630 .num_ips = ctx->addresses_best_num,
8631 .ips = ctx->addresses_best,
8632 .apply_expected = False
8636 * mhomed,active vs. mhomed,active with subset ip(s), negative response
8639 .line = __location__,
8640 .name = _NBT_NAME("_MA_MA_SB_N", 0x00, NULL),
8641 .skip = (ctx->addresses_mhomed_num != 2),
8645 .num_ips = ctx->addresses_mhomed_num,
8646 .ips = ctx->addresses_mhomed,
8647 .apply_expected = True
8654 .type = WREPL_TYPE_MHOMED,
8655 .state = WREPL_STATE_ACTIVE,
8656 .node = WREPL_NODE_B,
8658 .num_ips = ctx->addresses_best_num,
8659 .ips = ctx->addresses_best,
8660 .apply_expected = True
8664 * some more multi homed and unique test, including merging
8667 * mhomed,active vs. unique,active with subset ip(s), positive response
8670 .line = __location__,
8671 .section= "Test Replica vs. owned active: some more UNIQUE,MHOMED combinations",
8672 .name = _NBT_NAME("_MA_UA_SB_P", 0x00, NULL),
8673 .skip = (ctx->addresses_all_num < 3),
8677 .num_ips = ctx->addresses_mhomed_num,
8678 .ips = ctx->addresses_mhomed,
8679 .apply_expected = True
8686 .type = WREPL_TYPE_UNIQUE,
8687 .state = WREPL_STATE_ACTIVE,
8688 .node = WREPL_NODE_B,
8690 .num_ips = ctx->addresses_best_num,
8691 .ips = ctx->addresses_best,
8692 .mhomed_merge = True
8696 * unique,active vs. unique,active with different ip(s), positive response, with all addresses
8699 .line = __location__,
8700 .name = _NBT_NAME("_UA_UA_DI_A", 0x00, NULL),
8701 .skip = (ctx->addresses_all_num < 3),
8705 .num_ips = ctx->addresses_best_num,
8706 .ips = ctx->addresses_best,
8707 .apply_expected = True
8712 .num_ips = ctx->addresses_all_num,
8713 .ips = ctx->addresses_all,
8716 .type = WREPL_TYPE_UNIQUE,
8717 .state = WREPL_STATE_ACTIVE,
8718 .node = WREPL_NODE_B,
8720 .num_ips = ctx->addresses_best2_num,
8721 .ips = ctx->addresses_best2,
8722 .mhomed_merge = True,
8726 * unique,active vs. mhomed,active with different ip(s), positive response, with all addresses
8729 .line = __location__,
8730 .name = _NBT_NAME("_UA_MA_DI_A", 0x00, NULL),
8731 .skip = (ctx->addresses_all_num < 3),
8735 .num_ips = ctx->addresses_best_num,
8736 .ips = ctx->addresses_best,
8737 .apply_expected = True
8742 .num_ips = ctx->addresses_all_num,
8743 .ips = ctx->addresses_all,
8746 .type = WREPL_TYPE_MHOMED,
8747 .state = WREPL_STATE_ACTIVE,
8748 .node = WREPL_NODE_B,
8750 .num_ips = ctx->addresses_best2_num,
8751 .ips = ctx->addresses_best2,
8752 .mhomed_merge = True,
8756 * special group vs. special group merging section
8759 * sgroup,active vs. sgroup,active with different ip(s)
8762 .line = __location__,
8763 .section= "Test Replica vs. owned active: SGROUP vs. SGROUP tests",
8764 .name = _NBT_NAME("_SA_SA_DI_U", 0x1C, NULL),
8765 .skip = (ctx->addresses_all_num < 3),
8767 .nb_flags = NBT_NM_GROUP,
8769 .num_ips = ctx->addresses_mhomed_num,
8770 .ips = ctx->addresses_mhomed,
8771 .apply_expected = True
8777 .type = WREPL_TYPE_SGROUP,
8778 .state = WREPL_STATE_ACTIVE,
8779 .node = WREPL_NODE_B,
8781 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8782 .ips = addresses_B_3_4,
8783 .sgroup_merge = True
8787 * sgroup,active vs. sgroup,active with same ip(s)
8790 .line = __location__,
8791 .name = _NBT_NAME("_SA_SA_SI_U", 0x1C, NULL),
8792 .skip = (ctx->addresses_all_num < 3),
8794 .nb_flags = NBT_NM_GROUP,
8796 .num_ips = ctx->addresses_mhomed_num,
8797 .ips = ctx->addresses_mhomed,
8798 .apply_expected = True
8804 .type = WREPL_TYPE_SGROUP,
8805 .state = WREPL_STATE_ACTIVE,
8806 .node = WREPL_NODE_B,
8808 .num_ips = ctx->addresses_mhomed_num,
8809 .ips = ctx->addresses_mhomed,
8810 .sgroup_merge = True
8814 * sgroup,active vs. sgroup,active with superset ip(s)
8817 .line = __location__,
8818 .name = _NBT_NAME("_SA_SA_SP_U", 0x1C, NULL),
8819 .skip = (ctx->addresses_all_num < 3),
8821 .nb_flags = NBT_NM_GROUP,
8823 .num_ips = ctx->addresses_mhomed_num,
8824 .ips = ctx->addresses_mhomed,
8825 .apply_expected = True
8831 .type = WREPL_TYPE_SGROUP,
8832 .state = WREPL_STATE_ACTIVE,
8833 .node = WREPL_NODE_B,
8835 .num_ips = ctx->addresses_all_num,
8836 .ips = ctx->addresses_all,
8837 .sgroup_merge = True
8841 * sgroup,active vs. sgroup,active with subset ip(s)
8844 .line = __location__,
8845 .name = _NBT_NAME("_SA_SA_SB_U", 0x1C, NULL),
8846 .skip = (ctx->addresses_all_num < 3),
8848 .nb_flags = NBT_NM_GROUP,
8850 .num_ips = ctx->addresses_mhomed_num,
8851 .ips = ctx->addresses_mhomed,
8852 .apply_expected = True
8858 .type = WREPL_TYPE_SGROUP,
8859 .state = WREPL_STATE_ACTIVE,
8860 .node = WREPL_NODE_B,
8862 .num_ips = ctx->addresses_best_num,
8863 .ips = ctx->addresses_best,
8864 .sgroup_merge = True
8868 * sgroup,active vs. sgroup,tombstone with different ip(s)
8871 .line = __location__,
8872 .name = _NBT_NAME("_SA_ST_DI_U", 0x1C, NULL),
8873 .skip = (ctx->addresses_all_num < 3),
8875 .nb_flags = NBT_NM_GROUP,
8877 .num_ips = ctx->addresses_mhomed_num,
8878 .ips = ctx->addresses_mhomed,
8879 .apply_expected = True
8885 .type = WREPL_TYPE_SGROUP,
8886 .state = WREPL_STATE_TOMBSTONE,
8887 .node = WREPL_NODE_B,
8889 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8890 .ips = addresses_B_3_4,
8891 .apply_expected = False
8895 * sgroup,active vs. sgroup,tombstone with same ip(s)
8898 .line = __location__,
8899 .name = _NBT_NAME("_SA_ST_SI_U", 0x1C, NULL),
8900 .skip = (ctx->addresses_all_num < 3),
8902 .nb_flags = NBT_NM_GROUP,
8904 .num_ips = ctx->addresses_mhomed_num,
8905 .ips = ctx->addresses_mhomed,
8906 .apply_expected = True
8912 .type = WREPL_TYPE_SGROUP,
8913 .state = WREPL_STATE_TOMBSTONE,
8914 .node = WREPL_NODE_B,
8916 .num_ips = ctx->addresses_mhomed_num,
8917 .ips = ctx->addresses_mhomed,
8918 .apply_expected = False
8922 * sgroup,active vs. sgroup,tombstone with superset ip(s)
8925 .line = __location__,
8926 .name = _NBT_NAME("_SA_ST_SP_U", 0x1C, NULL),
8927 .skip = (ctx->addresses_all_num < 3),
8929 .nb_flags = NBT_NM_GROUP,
8931 .num_ips = ctx->addresses_mhomed_num,
8932 .ips = ctx->addresses_mhomed,
8933 .apply_expected = True
8939 .type = WREPL_TYPE_SGROUP,
8940 .state = WREPL_STATE_TOMBSTONE,
8941 .node = WREPL_NODE_B,
8943 .num_ips = ctx->addresses_all_num,
8944 .ips = ctx->addresses_all,
8945 .apply_expected = False
8949 * sgroup,active vs. sgroup,tombstone with subset ip(s)
8952 .line = __location__,
8953 .name = _NBT_NAME("_SA_ST_SB_U", 0x1C, NULL),
8954 .skip = (ctx->addresses_all_num < 3),
8956 .nb_flags = NBT_NM_GROUP,
8958 .num_ips = ctx->addresses_mhomed_num,
8959 .ips = ctx->addresses_mhomed,
8960 .apply_expected = True
8966 .type = WREPL_TYPE_SGROUP,
8967 .state = WREPL_STATE_TOMBSTONE,
8968 .node = WREPL_NODE_B,
8970 .num_ips = ctx->addresses_best_num,
8971 .ips = ctx->addresses_best,
8972 .apply_expected = False
8977 if (!ctx) return False;
8979 if (!ctx->nbtsock_srv) {
8980 printf("SKIP: Test Replica records vs. owned active records: not bound to port[%d]\n",
8985 printf("Test Replica records vs. owned active records\n");
8987 for(i=0; ret && i < ARRAY_SIZE(records); i++) {
8989 struct test_conflict_owned_active_vs_replica_struct record = records[i];
8990 uint32_t j, count = 1;
8993 if (records[i].wins.mhomed || records[i].name.type == 0x1C) {
8994 count = records[i].wins.num_ips;
8997 if (records[i].section) {
8998 printf("%s\n", records[i].section);
9001 if (records[i].skip) {
9002 printf("%s => SKIPPED\n", nbt_name_string(ctx, &records[i].name));
9006 if (records[i].replica.mhomed_merge) {
9007 action = "MHOMED_MERGE";
9008 } else if (records[i].replica.sgroup_merge) {
9009 action = "SGROUP_MERGE";
9010 } else if (records[i].replica.apply_expected) {
9013 action = "NOT REPLACE";
9016 printf("%s => %s\n", nbt_name_string(ctx, &records[i].name), action);
9018 /* Prepare for multi homed registration */
9019 ZERO_STRUCT(records[i].defend);
9020 records[i].defend.timeout = 10;
9021 records[i].defend.positive = True;
9022 nbt_set_incoming_handler(ctx->nbtsock_srv,
9023 test_conflict_owned_active_vs_replica_handler,
9025 if (ctx->nbtsock_srv2) {
9026 nbt_set_incoming_handler(ctx->nbtsock_srv2,
9027 test_conflict_owned_active_vs_replica_handler,
9034 for (j=0; j < count; j++) {
9035 struct nbt_name_request *req;
9037 name_register->in.name = records[i].name;
9038 name_register->in.dest_addr = ctx->address;
9039 name_register->in.address = records[i].wins.ips[j].ip;
9040 name_register->in.nb_flags = records[i].wins.nb_flags;
9041 name_register->in.register_demand= False;
9042 name_register->in.broadcast = False;
9043 name_register->in.multi_homed = records[i].wins.mhomed;
9044 name_register->in.ttl = 300000;
9045 name_register->in.timeout = 70;
9046 name_register->in.retries = 0;
9048 req = nbt_name_register_send(ctx->nbtsock, name_register);
9050 /* push the request on the wire */
9051 event_loop_once(ctx->nbtsock->event_ctx);
9054 * if we register multiple addresses,
9055 * the server will do name queries to see if the old addresses
9058 if (records[i].wins.mhomed && j > 0) {
9059 end = timeval_current_ofs(records[i].defend.timeout,0);
9060 records[i].defend.ret = True;
9061 while (records[i].defend.timeout > 0) {
9062 event_loop_once(ctx->nbtsock_srv->event_ctx);
9063 if (timeval_expired(&end)) break;
9065 ret &= records[i].defend.ret;
9068 status = nbt_name_register_recv(req, ctx, name_register);
9069 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
9070 printf("No response from %s for name register\n", ctx->address);
9073 if (!NT_STATUS_IS_OK(status)) {
9074 printf("Bad response from %s for name register - %s\n",
9075 ctx->address, nt_errstr(status));
9078 CHECK_VALUE(name_register->out.rcode, 0);
9079 CHECK_VALUE_STRING(name_register->out.reply_from, ctx->address);
9080 CHECK_VALUE(name_register->out.name.type, records[i].name.type);
9081 CHECK_VALUE_STRING(name_register->out.name.name, records[i].name.name);
9082 CHECK_VALUE_STRING(name_register->out.name.scope, records[i].name.scope);
9083 CHECK_VALUE_STRING(name_register->out.reply_addr, records[i].wins.ips[j].ip);
9086 /* Prepare for the current test */
9087 records[i].defend = record.defend;
9088 nbt_set_incoming_handler(ctx->nbtsock_srv,
9089 test_conflict_owned_active_vs_replica_handler,
9091 if (ctx->nbtsock_srv2) {
9092 nbt_set_incoming_handler(ctx->nbtsock_srv2,
9093 test_conflict_owned_active_vs_replica_handler,
9100 wins_name->name = &records[i].name;
9101 wins_name->flags = WREPL_NAME_FLAGS(records[i].replica.type,
9102 records[i].replica.state,
9103 records[i].replica.node,
9104 records[i].replica.is_static);
9105 wins_name->id = ++ctx->b.max_version;
9106 if (wins_name->flags & 2) {
9107 wins_name->addresses.addresses.num_ips = records[i].replica.num_ips;
9108 wins_name->addresses.addresses.ips = discard_const(records[i].replica.ips);
9110 wins_name->addresses.ip = records[i].replica.ips[0].ip;
9112 wins_name->unknown = "255.255.255.255";
9114 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9117 * wait for the name query, which is handled in
9118 * test_conflict_owned_active_vs_replica_handler()
9120 end = timeval_current_ofs(records[i].defend.timeout,0);
9121 records[i].defend.ret = True;
9122 while (records[i].defend.timeout > 0) {
9123 event_loop_once(ctx->nbtsock_srv->event_ctx);
9124 if (timeval_expired(&end)) break;
9126 ret &= records[i].defend.ret;
9128 if (records[i].defend.late_release) {
9129 records[i].defend = record.defend;
9130 records[i].defend.expect_release = True;
9132 * wait for the name release demand, which is handled in
9133 * test_conflict_owned_active_vs_replica_handler()
9135 end = timeval_current_ofs(records[i].defend.timeout,0);
9136 records[i].defend.ret = True;
9137 while (records[i].defend.timeout > 0) {
9138 event_loop_once(ctx->nbtsock_srv->event_ctx);
9139 if (timeval_expired(&end)) break;
9141 ret &= records[i].defend.ret;
9144 if (records[i].replica.mhomed_merge) {
9145 ret &= test_wrepl_mhomed_merged(ctx, &ctx->c,
9146 records[i].wins.num_ips, records[i].wins.ips,
9148 records[i].replica.num_ips, records[i].replica.ips,
9150 } else if (records[i].replica.sgroup_merge) {
9151 ret &= test_wrepl_sgroup_merged(ctx, NULL,
9153 records[i].wins.num_ips, records[i].wins.ips,
9155 records[i].replica.num_ips, records[i].replica.ips,
9158 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name,
9159 records[i].replica.apply_expected);
9162 if (records[i].replica.apply_expected ||
9163 records[i].replica.mhomed_merge) {
9164 wins_name->name = &records[i].name;
9165 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE,
9166 WREPL_STATE_TOMBSTONE,
9167 WREPL_NODE_B, False);
9168 wins_name->id = ++ctx->b.max_version;
9169 wins_name->addresses.ip = addresses_B_1[0].ip;
9170 wins_name->unknown = "255.255.255.255";
9172 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9173 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name, True);
9175 for (j=0; j < count; j++) {
9176 struct nbt_name_socket *nbtsock = ctx->nbtsock;
9178 if (ctx->myaddr2 && strcmp(records[i].wins.ips[j].ip, ctx->myaddr2) == 0) {
9179 nbtsock = ctx->nbtsock2;
9182 release->in.name = records[i].name;
9183 release->in.dest_addr = ctx->address;
9184 release->in.address = records[i].wins.ips[j].ip;
9185 release->in.nb_flags = records[i].wins.nb_flags;
9186 release->in.broadcast = False;
9187 release->in.timeout = 30;
9188 release->in.retries = 0;
9190 status = nbt_name_release(nbtsock, ctx, release);
9191 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
9192 printf("No response from %s for name release\n", ctx->address);
9195 if (!NT_STATUS_IS_OK(status)) {
9196 printf("Bad response from %s for name query - %s\n",
9197 ctx->address, nt_errstr(status));
9200 CHECK_VALUE(release->out.rcode, 0);
9203 if (records[i].replica.sgroup_merge) {
9204 /* clean up the SGROUP record */
9205 wins_name->name = &records[i].name;
9206 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
9208 WREPL_NODE_B, False);
9209 wins_name->id = ++ctx->b.max_version;
9210 wins_name->addresses.addresses.num_ips = 0;
9211 wins_name->addresses.addresses.ips = NULL;
9212 wins_name->unknown = "255.255.255.255";
9213 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9215 /* take ownership of the SGROUP record */
9216 wins_name->name = &records[i].name;
9217 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
9219 WREPL_NODE_B, False);
9220 wins_name->id = ++ctx->b.max_version;
9221 wins_name->addresses.addresses.num_ips = ARRAY_SIZE(addresses_B_1);
9222 wins_name->addresses.addresses.ips = discard_const(addresses_B_1);
9223 wins_name->unknown = "255.255.255.255";
9224 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9225 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name, True);
9227 /* overwrite the SGROUP record with unique,tombstone */
9228 wins_name->name = &records[i].name;
9229 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE,
9230 WREPL_STATE_TOMBSTONE,
9231 WREPL_NODE_B, False);
9232 wins_name->id = ++ctx->b.max_version;
9233 wins_name->addresses.ip = addresses_A_1[0].ip;
9234 wins_name->unknown = "255.255.255.255";
9235 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9236 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name, True);
9242 printf("conflict handled wrong or record[%u]: %s\n", i, records[i].line);
9250 #define _NBT_ASSERT(v, correct) do { \
9251 if ((v) != (correct)) { \
9252 printf("(%s) Incorrect value %s=%d - should be %s (%d)\n", \
9253 __location__, #v, v, #correct, correct); \
9258 #define _NBT_ASSERT_STRING(v, correct) do { \
9259 if ( ((!v) && (correct)) || \
9260 ((v) && (!correct)) || \
9261 ((v) && (correct) && strcmp(v,correct) != 0)) { \
9262 printf("(%s) Incorrect value %s=%s - should be %s\n", \
9263 __location__, #v, v, correct); \
9268 static void test_conflict_owned_active_vs_replica_handler_query(struct nbt_name_socket *nbtsock,
9269 struct nbt_name_packet *req_packet,
9270 const struct nbt_peer_socket *src)
9272 struct nbt_name *name;
9273 struct nbt_name_packet *rep_packet;
9274 struct test_conflict_owned_active_vs_replica_struct *rec = nbtsock->incoming.private;
9276 _NBT_ASSERT(req_packet->qdcount, 1);
9277 _NBT_ASSERT(req_packet->questions[0].question_type, NBT_QTYPE_NETBIOS);
9278 _NBT_ASSERT(req_packet->questions[0].question_class, NBT_QCLASS_IP);
9280 name = &req_packet->questions[0].name;
9282 _NBT_ASSERT(name->type, rec->name.type);
9283 _NBT_ASSERT_STRING(name->name, rec->name.name);
9284 _NBT_ASSERT_STRING(name->scope, rec->name.scope);
9286 _NBT_ASSERT(rec->defend.expect_release, False);
9288 rep_packet = talloc_zero(nbtsock, struct nbt_name_packet);
9289 if (rep_packet == NULL) return;
9291 rep_packet->name_trn_id = req_packet->name_trn_id;
9292 rep_packet->ancount = 1;
9294 rep_packet->answers = talloc_array(rep_packet, struct nbt_res_rec, 1);
9295 if (rep_packet->answers == NULL) return;
9297 rep_packet->answers[0].name = *name;
9298 rep_packet->answers[0].rr_class = NBT_QCLASS_IP;
9299 rep_packet->answers[0].ttl = 0;
9301 if (rec->defend.positive) {
9302 uint32_t i, num_ips;
9303 const struct wrepl_ip *ips;
9305 if (rec->defend.num_ips > 0) {
9306 num_ips = rec->defend.num_ips;
9307 ips = rec->defend.ips;
9309 num_ips = rec->wins.num_ips;
9310 ips = rec->wins.ips;
9313 /* send a positive reply */
9314 rep_packet->operation =
9317 NBT_FLAG_AUTHORITIVE |
9318 NBT_FLAG_RECURSION_DESIRED |
9319 NBT_FLAG_RECURSION_AVAIL;
9321 rep_packet->answers[0].rr_type = NBT_QTYPE_NETBIOS;
9323 rep_packet->answers[0].rdata.netbios.length = num_ips*6;
9324 rep_packet->answers[0].rdata.netbios.addresses =
9325 talloc_array(rep_packet->answers, struct nbt_rdata_address, num_ips);
9326 if (rep_packet->answers[0].rdata.netbios.addresses == NULL) return;
9328 for (i=0; i < num_ips; i++) {
9329 struct nbt_rdata_address *addr =
9330 &rep_packet->answers[0].rdata.netbios.addresses[i];
9331 addr->nb_flags = rec->wins.nb_flags;
9332 addr->ipaddr = ips[i].ip;
9334 DEBUG(2,("Sending positive name query reply for %s to %s:%d\n",
9335 nbt_name_string(rep_packet, name), src->addr, src->port));
9337 /* send a negative reply */
9338 rep_packet->operation =
9341 NBT_FLAG_AUTHORITIVE |
9344 rep_packet->answers[0].rr_type = NBT_QTYPE_NULL;
9346 ZERO_STRUCT(rep_packet->answers[0].rdata);
9348 DEBUG(2,("Sending negative name query reply for %s to %s:%d\n",
9349 nbt_name_string(rep_packet, name), src->addr, src->port));
9352 nbt_name_reply_send(nbtsock, src, rep_packet);
9353 talloc_free(rep_packet);
9355 /* make sure we push the reply to the wire */
9356 event_loop_once(nbtsock->event_ctx);
9358 rec->defend.timeout = 0;
9359 rec->defend.ret = True;
9362 static void test_conflict_owned_active_vs_replica_handler_release(struct nbt_name_socket *nbtsock,
9363 struct nbt_name_packet *req_packet,
9364 const struct nbt_peer_socket *src)
9366 struct nbt_name *name;
9367 struct nbt_name_packet *rep_packet;
9368 struct test_conflict_owned_active_vs_replica_struct *rec = nbtsock->incoming.private;
9370 _NBT_ASSERT(req_packet->qdcount, 1);
9371 _NBT_ASSERT(req_packet->questions[0].question_type, NBT_QTYPE_NETBIOS);
9372 _NBT_ASSERT(req_packet->questions[0].question_class, NBT_QCLASS_IP);
9374 name = &req_packet->questions[0].name;
9376 _NBT_ASSERT(name->type, rec->name.type);
9377 _NBT_ASSERT_STRING(name->name, rec->name.name);
9378 _NBT_ASSERT_STRING(name->scope, rec->name.scope);
9380 _NBT_ASSERT(rec->defend.expect_release, True);
9382 rep_packet = talloc_zero(nbtsock, struct nbt_name_packet);
9383 if (rep_packet == NULL) return;
9385 rep_packet->name_trn_id = req_packet->name_trn_id;
9386 rep_packet->ancount = 1;
9387 rep_packet->operation =
9389 NBT_OPCODE_RELEASE |
9390 NBT_FLAG_AUTHORITIVE;
9392 rep_packet->answers = talloc_array(rep_packet, struct nbt_res_rec, 1);
9393 if (rep_packet->answers == NULL) return;
9395 rep_packet->answers[0].name = *name;
9396 rep_packet->answers[0].rr_type = NBT_QTYPE_NETBIOS;
9397 rep_packet->answers[0].rr_class = NBT_QCLASS_IP;
9398 rep_packet->answers[0].ttl = req_packet->additional[0].ttl;
9399 rep_packet->answers[0].rdata = req_packet->additional[0].rdata;
9401 DEBUG(2,("Sending name release reply for %s to %s:%d\n",
9402 nbt_name_string(rep_packet, name), src->addr, src->port));
9404 nbt_name_reply_send(nbtsock, src, rep_packet);
9405 talloc_free(rep_packet);
9407 /* make sure we push the reply to the wire */
9408 event_loop_once(nbtsock->event_ctx);
9410 rec->defend.timeout = 0;
9411 rec->defend.ret = True;
9414 static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket *nbtsock,
9415 struct nbt_name_packet *req_packet,
9416 const struct nbt_peer_socket *src)
9418 struct test_conflict_owned_active_vs_replica_struct *rec = nbtsock->incoming.private;
9420 rec->defend.ret = False;
9422 switch (req_packet->operation & NBT_OPCODE) {
9423 case NBT_OPCODE_QUERY:
9424 test_conflict_owned_active_vs_replica_handler_query(nbtsock, req_packet, src);
9426 case NBT_OPCODE_RELEASE:
9427 test_conflict_owned_active_vs_replica_handler_release(nbtsock, req_packet, src);
9430 printf("%s: unexpected incoming packet\n", __location__);
9436 test WINS replication operations
9438 BOOL torture_nbt_winsreplication_quick(void)
9440 const char *address;
9441 struct nbt_name name;
9442 TALLOC_CTX *mem_ctx = talloc_new(NULL);
9445 struct test_wrepl_conflict_conn *ctx;
9447 make_nbt_name_server(&name, lp_parm_string(-1, "torture", "host"));
9449 /* do an initial name resolution to find its IP */
9450 status = resolve_name(&name, mem_ctx, &address, NULL);
9451 if (!NT_STATUS_IS_OK(status)) {
9452 printf("Failed to resolve %s - %s\n",
9453 name.name, nt_errstr(status));
9454 talloc_free(mem_ctx);
9458 ret &= test_assoc_ctx1(mem_ctx, address);
9459 ret &= test_assoc_ctx2(mem_ctx, address);
9461 ret &= test_wins_replication(mem_ctx, address);
9463 ctx = test_create_conflict_ctx(mem_ctx, address);
9465 ret &= test_conflict_same_owner(ctx);
9466 ret &= test_conflict_owned_released_vs_replica(ctx);
9468 talloc_free(mem_ctx);
9474 test WINS replication operations
9476 BOOL torture_nbt_winsreplication(void)
9478 const char *address;
9479 struct nbt_name name;
9480 TALLOC_CTX *mem_ctx = talloc_new(NULL);
9483 struct test_wrepl_conflict_conn *ctx;
9485 make_nbt_name_server(&name, lp_parm_string(-1, "torture", "host"));
9487 /* do an initial name resolution to find its IP */
9488 status = resolve_name(&name, mem_ctx, &address, NULL);
9489 if (!NT_STATUS_IS_OK(status)) {
9490 printf("Failed to resolve %s - %s\n",
9491 name.name, nt_errstr(status));
9492 talloc_free(mem_ctx);
9496 ret &= test_assoc_ctx1(mem_ctx, address);
9497 ret &= test_assoc_ctx2(mem_ctx, address);
9499 ret &= test_wins_replication(mem_ctx, address);
9501 ctx = test_create_conflict_ctx(mem_ctx, address);
9503 ret &= test_conflict_same_owner(ctx);
9504 ret &= test_conflict_different_owner(ctx);
9505 ret &= test_conflict_owned_released_vs_replica(ctx);
9506 ret &= test_conflict_owned_active_vs_replica(ctx);
9508 talloc_free(mem_ctx);