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 name.name = "_SAME_OWNER_A";
1103 wins_name_tmp = NULL;
1104 wins_name_last = &wins_name2;
1105 wins_name_cur = &wins_name1;
1107 for (j=0; ret && j < ARRAY_SIZE(types); j++) {
1108 name.type = types[j];
1109 printf("Test Replica Conflicts with same owner[%s] for %s\n",
1110 nbt_name_string(ctx, &name), ctx->a.address);
1112 for(i=0; ret && i < ARRAY_SIZE(records); i++) {
1113 wins_name_tmp = wins_name_last;
1114 wins_name_last = wins_name_cur;
1115 wins_name_cur = wins_name_tmp;
1118 printf("%s,%s%s vs. %s,%s%s with %s ip(s) => %s\n",
1119 wrepl_name_type_string(records[i-1].type),
1120 wrepl_name_state_string(records[i-1].state),
1121 (records[i-1].is_static?",static":""),
1122 wrepl_name_type_string(records[i].type),
1123 wrepl_name_state_string(records[i].state),
1124 (records[i].is_static?",static":""),
1125 (records[i-1].ips==records[i].ips?"same":"different"),
1129 wins_name_cur->name = &name;
1130 wins_name_cur->flags = WREPL_NAME_FLAGS(records[i].type,
1133 records[i].is_static);
1134 wins_name_cur->id = ++ctx->a.max_version;
1135 if (wins_name_cur->flags & 2) {
1136 wins_name_cur->addresses.addresses.num_ips = records[i].num_ips;
1137 wins_name_cur->addresses.addresses.ips = discard_const(records[i].ips);
1139 wins_name_cur->addresses.ip = records[i].ips[0].ip;
1141 wins_name_cur->unknown = "255.255.255.255";
1143 ret &= test_wrepl_update_one(ctx, &ctx->a,wins_name_cur);
1144 if (records[i].state == WREPL_STATE_RELEASED) {
1145 ret &= test_wrepl_is_applied(ctx, &ctx->a, wins_name_last, False);
1146 ret &= test_wrepl_is_applied(ctx, &ctx->a, wins_name_cur, False);
1148 ret &= test_wrepl_is_applied(ctx, &ctx->a, wins_name_cur, True);
1151 /* the first one is a cleanup run */
1152 if (!ret && i == 0) ret = True;
1155 printf("conflict handled wrong or record[%u]: %s\n", i, __location__);
1163 static BOOL test_conflict_different_owner(struct test_wrepl_conflict_conn *ctx)
1166 struct wrepl_wins_name wins_name1;
1167 struct wrepl_wins_name wins_name2;
1168 struct wrepl_wins_name *wins_name_r1;
1169 struct wrepl_wins_name *wins_name_r2;
1172 const char *line; /* just better debugging */
1173 struct nbt_name name;
1174 const char *comment;
1175 BOOL extra; /* not the worst case, this is an extra test */
1178 struct wrepl_wins_owner *owner;
1179 enum wrepl_name_type type;
1180 enum wrepl_name_state state;
1181 enum wrepl_name_node node;
1184 const struct wrepl_ip *ips;
1185 BOOL apply_expected;
1187 struct wrepl_wins_owner *merge_owner;
1188 BOOL sgroup_cleanup;
1192 * NOTE: the first record and the last applied one
1193 * needs to be from the same owner,
1194 * to not conflict in the next smbtorture run!!!
1197 .line = __location__,
1198 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1202 .type = WREPL_TYPE_UNIQUE,
1203 .state = WREPL_STATE_TOMBSTONE,
1204 .node = WREPL_NODE_B,
1206 .num_ips = ARRAY_SIZE(addresses_B_1),
1207 .ips = addresses_B_1,
1208 .apply_expected = True /* ignored */
1212 .type = WREPL_TYPE_UNIQUE,
1213 .state = WREPL_STATE_TOMBSTONE,
1214 .node = WREPL_NODE_B,
1216 .num_ips = ARRAY_SIZE(addresses_A_1),
1217 .ips = addresses_A_1,
1218 .apply_expected = True /* ignored */
1223 * unique vs unique section
1226 * unique,active vs. unique,active
1227 * => should be replaced
1230 .line = __location__,
1231 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1234 .type = WREPL_TYPE_UNIQUE,
1235 .state = WREPL_STATE_ACTIVE,
1236 .node = WREPL_NODE_B,
1238 .num_ips = ARRAY_SIZE(addresses_A_1),
1239 .ips = addresses_A_1,
1240 .apply_expected = True
1244 .type = WREPL_TYPE_UNIQUE,
1245 .state = WREPL_STATE_ACTIVE,
1246 .node = WREPL_NODE_B,
1248 .num_ips = ARRAY_SIZE(addresses_B_1),
1249 .ips = addresses_B_1,
1250 .apply_expected = True
1255 * unique,active vs. unique,tombstone
1256 * => should NOT be replaced
1259 .line = __location__,
1260 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1263 .type = WREPL_TYPE_UNIQUE,
1264 .state = WREPL_STATE_ACTIVE,
1265 .node = WREPL_NODE_B,
1267 .num_ips = ARRAY_SIZE(addresses_B_1),
1268 .ips = addresses_B_1,
1269 .apply_expected = True
1273 .type = WREPL_TYPE_UNIQUE,
1274 .state = WREPL_STATE_TOMBSTONE,
1275 .node = WREPL_NODE_B,
1277 .num_ips = ARRAY_SIZE(addresses_B_1),
1278 .ips = addresses_B_1,
1279 .apply_expected = False
1284 * unique,released vs. unique,active
1285 * => should be replaced
1288 .line = __location__,
1289 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1292 .type = WREPL_TYPE_UNIQUE,
1293 .state = WREPL_STATE_RELEASED,
1294 .node = WREPL_NODE_B,
1296 .num_ips = ARRAY_SIZE(addresses_B_1),
1297 .ips = addresses_B_1,
1298 .apply_expected = False
1302 .type = WREPL_TYPE_UNIQUE,
1303 .state = WREPL_STATE_ACTIVE,
1304 .node = WREPL_NODE_B,
1306 .num_ips = ARRAY_SIZE(addresses_A_1),
1307 .ips = addresses_A_1,
1308 .apply_expected = True
1313 * unique,released vs. unique,tombstone
1314 * => should be replaced
1317 .line = __location__,
1318 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1321 .type = WREPL_TYPE_UNIQUE,
1322 .state = WREPL_STATE_RELEASED,
1323 .node = WREPL_NODE_B,
1325 .num_ips = ARRAY_SIZE(addresses_A_1),
1326 .ips = addresses_A_1,
1327 .apply_expected = False
1331 .type = WREPL_TYPE_UNIQUE,
1332 .state = WREPL_STATE_TOMBSTONE,
1333 .node = WREPL_NODE_B,
1335 .num_ips = ARRAY_SIZE(addresses_B_1),
1336 .ips = addresses_B_1,
1337 .apply_expected = True
1342 * unique,tombstone vs. unique,active
1343 * => should be replaced
1346 .line = __location__,
1347 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1350 .type = WREPL_TYPE_UNIQUE,
1351 .state = WREPL_STATE_TOMBSTONE,
1352 .node = WREPL_NODE_B,
1354 .num_ips = ARRAY_SIZE(addresses_B_1),
1355 .ips = addresses_B_1,
1356 .apply_expected = True
1360 .type = WREPL_TYPE_UNIQUE,
1361 .state = WREPL_STATE_ACTIVE,
1362 .node = WREPL_NODE_B,
1364 .num_ips = ARRAY_SIZE(addresses_A_1),
1365 .ips = addresses_A_1,
1366 .apply_expected = True
1371 * unique,tombstone vs. unique,tombstone
1372 * => should be replaced
1375 .line = __location__,
1376 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1379 .type = WREPL_TYPE_UNIQUE,
1380 .state = WREPL_STATE_TOMBSTONE,
1381 .node = WREPL_NODE_B,
1383 .num_ips = ARRAY_SIZE(addresses_A_1),
1384 .ips = addresses_A_1,
1385 .apply_expected = True
1389 .type = WREPL_TYPE_UNIQUE,
1390 .state = WREPL_STATE_TOMBSTONE,
1391 .node = WREPL_NODE_B,
1393 .num_ips = ARRAY_SIZE(addresses_B_1),
1394 .ips = addresses_B_1,
1395 .apply_expected = True
1401 * unique vs normal groups section,
1404 * unique,active vs. group,active
1405 * => should be replaced
1408 .line = __location__,
1409 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1412 .type = WREPL_TYPE_UNIQUE,
1413 .state = WREPL_STATE_ACTIVE,
1414 .node = WREPL_NODE_B,
1416 .num_ips = ARRAY_SIZE(addresses_B_1),
1417 .ips = addresses_B_1,
1418 .apply_expected = True
1422 .type = WREPL_TYPE_GROUP,
1423 .state = WREPL_STATE_ACTIVE,
1424 .node = WREPL_NODE_B,
1426 .num_ips = ARRAY_SIZE(addresses_A_1),
1427 .ips = addresses_A_1,
1428 .apply_expected = True
1433 * unique,active vs. group,tombstone
1434 * => should NOT be replaced
1437 .line = __location__,
1438 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1441 .type = WREPL_TYPE_UNIQUE,
1442 .state = WREPL_STATE_ACTIVE,
1443 .node = WREPL_NODE_B,
1445 .num_ips = ARRAY_SIZE(addresses_A_1),
1446 .ips = addresses_A_1,
1447 .apply_expected = True
1451 .type = WREPL_TYPE_GROUP,
1452 .state = WREPL_STATE_TOMBSTONE,
1453 .node = WREPL_NODE_B,
1455 .num_ips = ARRAY_SIZE(addresses_A_1),
1456 .ips = addresses_A_1,
1457 .apply_expected = False
1462 * unique,released vs. group,active
1463 * => should be replaced
1466 .line = __location__,
1467 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1470 .type = WREPL_TYPE_UNIQUE,
1471 .state = WREPL_STATE_RELEASED,
1472 .node = WREPL_NODE_B,
1474 .num_ips = ARRAY_SIZE(addresses_A_1),
1475 .ips = addresses_A_1,
1476 .apply_expected = False
1480 .type = WREPL_TYPE_GROUP,
1481 .state = WREPL_STATE_ACTIVE,
1482 .node = WREPL_NODE_B,
1484 .num_ips = ARRAY_SIZE(addresses_B_1),
1485 .ips = addresses_B_1,
1486 .apply_expected = True
1491 * unique,released vs. group,tombstone
1492 * => should be replaced
1495 .line = __location__,
1496 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1499 .type = WREPL_TYPE_UNIQUE,
1500 .state = WREPL_STATE_RELEASED,
1501 .node = WREPL_NODE_B,
1503 .num_ips = ARRAY_SIZE(addresses_B_1),
1504 .ips = addresses_B_1,
1505 .apply_expected = False
1509 .type = WREPL_TYPE_GROUP,
1510 .state = WREPL_STATE_TOMBSTONE,
1511 .node = WREPL_NODE_B,
1513 .num_ips = ARRAY_SIZE(addresses_A_1),
1514 .ips = addresses_A_1,
1515 .apply_expected = True
1520 * unique,tombstone vs. group,active
1521 * => should be replaced
1524 .line = __location__,
1525 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1528 .type = WREPL_TYPE_UNIQUE,
1529 .state = WREPL_STATE_TOMBSTONE,
1530 .node = WREPL_NODE_B,
1532 .num_ips = ARRAY_SIZE(addresses_A_1),
1533 .ips = addresses_A_1,
1534 .apply_expected = True
1538 .type = WREPL_TYPE_GROUP,
1539 .state = WREPL_STATE_ACTIVE,
1540 .node = WREPL_NODE_B,
1542 .num_ips = ARRAY_SIZE(addresses_B_1),
1543 .ips = addresses_B_1,
1544 .apply_expected = True
1549 * unique,tombstone vs. group,tombstone
1550 * => should be replaced
1553 .line = __location__,
1554 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1557 .type = WREPL_TYPE_UNIQUE,
1558 .state = WREPL_STATE_TOMBSTONE,
1559 .node = WREPL_NODE_B,
1561 .num_ips = ARRAY_SIZE(addresses_B_1),
1562 .ips = addresses_B_1,
1563 .apply_expected = True
1567 .type = WREPL_TYPE_GROUP,
1568 .state = WREPL_STATE_TOMBSTONE,
1569 .node = WREPL_NODE_B,
1571 .num_ips = ARRAY_SIZE(addresses_A_1),
1572 .ips = addresses_A_1,
1573 .apply_expected = True
1578 * unique vs special groups section,
1581 * unique,active vs. sgroup,active
1582 * => should NOT be replaced
1585 .line = __location__,
1586 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1589 .type = WREPL_TYPE_UNIQUE,
1590 .state = WREPL_STATE_ACTIVE,
1591 .node = WREPL_NODE_B,
1593 .num_ips = ARRAY_SIZE(addresses_A_1),
1594 .ips = addresses_A_1,
1595 .apply_expected = True
1599 .type = WREPL_TYPE_SGROUP,
1600 .state = WREPL_STATE_ACTIVE,
1601 .node = WREPL_NODE_B,
1603 .num_ips = ARRAY_SIZE(addresses_A_1),
1604 .ips = addresses_A_1,
1605 .apply_expected = False
1610 * unique,active vs. sgroup,tombstone
1611 * => should NOT be replaced
1614 .line = __location__,
1615 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1618 .type = WREPL_TYPE_UNIQUE,
1619 .state = WREPL_STATE_ACTIVE,
1620 .node = WREPL_NODE_B,
1622 .num_ips = ARRAY_SIZE(addresses_A_1),
1623 .ips = addresses_A_1,
1624 .apply_expected = True
1628 .type = WREPL_TYPE_SGROUP,
1629 .state = WREPL_STATE_TOMBSTONE,
1630 .node = WREPL_NODE_B,
1632 .num_ips = ARRAY_SIZE(addresses_A_1),
1633 .ips = addresses_A_1,
1634 .apply_expected = False
1639 * unique,released vs. sgroup,active
1640 * => should be replaced
1643 .line = __location__,
1644 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1647 .type = WREPL_TYPE_UNIQUE,
1648 .state = WREPL_STATE_RELEASED,
1649 .node = WREPL_NODE_B,
1651 .num_ips = ARRAY_SIZE(addresses_A_1),
1652 .ips = addresses_A_1,
1653 .apply_expected = False
1657 .type = WREPL_TYPE_SGROUP,
1658 .state = WREPL_STATE_ACTIVE,
1659 .node = WREPL_NODE_B,
1661 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1662 .ips = addresses_B_3_4,
1663 .apply_expected = True
1668 * unique,released vs. sgroup,tombstone
1669 * => should be replaced
1672 .line = __location__,
1673 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1676 .type = WREPL_TYPE_UNIQUE,
1677 .state = WREPL_STATE_RELEASED,
1678 .node = WREPL_NODE_B,
1680 .num_ips = ARRAY_SIZE(addresses_B_1),
1681 .ips = addresses_B_1,
1682 .apply_expected = False
1686 .type = WREPL_TYPE_SGROUP,
1687 .state = WREPL_STATE_TOMBSTONE,
1688 .node = WREPL_NODE_B,
1690 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1691 .ips = addresses_A_3_4,
1692 .apply_expected = True
1697 * unique,tombstone vs. sgroup,active
1698 * => should be replaced
1701 .line = __location__,
1702 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1705 .type = WREPL_TYPE_UNIQUE,
1706 .state = WREPL_STATE_TOMBSTONE,
1707 .node = WREPL_NODE_B,
1709 .num_ips = ARRAY_SIZE(addresses_A_1),
1710 .ips = addresses_A_1,
1711 .apply_expected = True
1715 .type = WREPL_TYPE_SGROUP,
1716 .state = WREPL_STATE_ACTIVE,
1717 .node = WREPL_NODE_B,
1719 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1720 .ips = addresses_B_3_4,
1721 .apply_expected = True
1726 * unique,tombstone vs. sgroup,tombstone
1727 * => should be replaced
1730 .line = __location__,
1731 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1734 .type = WREPL_TYPE_UNIQUE,
1735 .state = WREPL_STATE_TOMBSTONE,
1736 .node = WREPL_NODE_B,
1738 .num_ips = ARRAY_SIZE(addresses_B_1),
1739 .ips = addresses_B_1,
1740 .apply_expected = True
1744 .type = WREPL_TYPE_SGROUP,
1745 .state = WREPL_STATE_TOMBSTONE,
1746 .node = WREPL_NODE_B,
1748 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1749 .ips = addresses_A_3_4,
1750 .apply_expected = True
1755 * unique vs multi homed section,
1758 * unique,active vs. mhomed,active
1759 * => should be replaced
1762 .line = __location__,
1763 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1766 .type = WREPL_TYPE_UNIQUE,
1767 .state = WREPL_STATE_ACTIVE,
1768 .node = WREPL_NODE_B,
1770 .num_ips = ARRAY_SIZE(addresses_A_1),
1771 .ips = addresses_A_1,
1772 .apply_expected = True
1776 .type = WREPL_TYPE_MHOMED,
1777 .state = WREPL_STATE_ACTIVE,
1778 .node = WREPL_NODE_B,
1780 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1781 .ips = addresses_B_3_4,
1782 .apply_expected = True
1787 * unique,active vs. mhomed,tombstone
1788 * => should NOT be replaced
1791 .line = __location__,
1792 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1795 .type = WREPL_TYPE_UNIQUE,
1796 .state = WREPL_STATE_ACTIVE,
1797 .node = WREPL_NODE_B,
1799 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1800 .ips = addresses_B_3_4,
1801 .apply_expected = True
1805 .type = WREPL_TYPE_MHOMED,
1806 .state = WREPL_STATE_TOMBSTONE,
1807 .node = WREPL_NODE_B,
1809 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1810 .ips = addresses_B_3_4,
1811 .apply_expected = False
1816 * unique,released vs. mhomed,active
1817 * => should be replaced
1820 .line = __location__,
1821 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1824 .type = WREPL_TYPE_UNIQUE,
1825 .state = WREPL_STATE_RELEASED,
1826 .node = WREPL_NODE_B,
1828 .num_ips = ARRAY_SIZE(addresses_B_1),
1829 .ips = addresses_B_1,
1830 .apply_expected = False
1834 .type = WREPL_TYPE_MHOMED,
1835 .state = WREPL_STATE_ACTIVE,
1836 .node = WREPL_NODE_B,
1838 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1839 .ips = addresses_A_3_4,
1840 .apply_expected = True
1845 * unique,released vs. mhomed,tombstone
1846 * => should be replaced
1849 .line = __location__,
1850 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1853 .type = WREPL_TYPE_UNIQUE,
1854 .state = WREPL_STATE_RELEASED,
1855 .node = WREPL_NODE_B,
1857 .num_ips = ARRAY_SIZE(addresses_A_1),
1858 .ips = addresses_A_1,
1859 .apply_expected = False
1863 .type = WREPL_TYPE_MHOMED,
1864 .state = WREPL_STATE_TOMBSTONE,
1865 .node = WREPL_NODE_B,
1867 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1868 .ips = addresses_B_3_4,
1869 .apply_expected = True
1874 * unique,tombstone vs. mhomed,active
1875 * => should be replaced
1878 .line = __location__,
1879 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1882 .type = WREPL_TYPE_UNIQUE,
1883 .state = WREPL_STATE_TOMBSTONE,
1884 .node = WREPL_NODE_B,
1886 .num_ips = ARRAY_SIZE(addresses_B_1),
1887 .ips = addresses_B_1,
1888 .apply_expected = True
1892 .type = WREPL_TYPE_MHOMED,
1893 .state = WREPL_STATE_ACTIVE,
1894 .node = WREPL_NODE_B,
1896 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1897 .ips = addresses_A_3_4,
1898 .apply_expected = True
1903 * unique,tombstone vs. mhomed,tombstone
1904 * => should be replaced
1907 .line = __location__,
1908 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1911 .type = WREPL_TYPE_UNIQUE,
1912 .state = WREPL_STATE_TOMBSTONE,
1913 .node = WREPL_NODE_B,
1915 .num_ips = ARRAY_SIZE(addresses_A_1),
1916 .ips = addresses_A_1,
1917 .apply_expected = True
1921 .type = WREPL_TYPE_MHOMED,
1922 .state = WREPL_STATE_TOMBSTONE,
1923 .node = WREPL_NODE_B,
1925 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1926 .ips = addresses_B_3_4,
1927 .apply_expected = True
1932 * normal groups vs unique section,
1935 * group,active vs. unique,active
1936 * => should NOT be replaced
1939 .line = __location__,
1940 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1943 .type = WREPL_TYPE_GROUP,
1944 .state = WREPL_STATE_ACTIVE,
1945 .node = WREPL_NODE_B,
1947 .num_ips = ARRAY_SIZE(addresses_A_1),
1948 .ips = addresses_A_1,
1949 .apply_expected = True
1953 .type = WREPL_TYPE_UNIQUE,
1954 .state = WREPL_STATE_ACTIVE,
1955 .node = WREPL_NODE_B,
1957 .num_ips = ARRAY_SIZE(addresses_A_1),
1958 .ips = addresses_A_1,
1959 .apply_expected = False
1964 * group,active vs. unique,tombstone
1965 * => should NOT be replaced
1968 .line = __location__,
1969 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1972 .type = WREPL_TYPE_GROUP,
1973 .state = WREPL_STATE_ACTIVE,
1974 .node = WREPL_NODE_B,
1976 .num_ips = ARRAY_SIZE(addresses_A_1),
1977 .ips = addresses_A_1,
1978 .apply_expected = True
1982 .type = WREPL_TYPE_UNIQUE,
1983 .state = WREPL_STATE_TOMBSTONE,
1984 .node = WREPL_NODE_B,
1986 .num_ips = ARRAY_SIZE(addresses_A_1),
1987 .ips = addresses_A_1,
1988 .apply_expected = False
1993 * group,released vs. unique,active
1994 * => should NOT be replaced
1997 .line = __location__,
1998 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2001 .type = WREPL_TYPE_GROUP,
2002 .state = WREPL_STATE_RELEASED,
2003 .node = WREPL_NODE_B,
2005 .num_ips = ARRAY_SIZE(addresses_A_1),
2006 .ips = addresses_A_1,
2007 .apply_expected = False
2011 .type = WREPL_TYPE_UNIQUE,
2012 .state = WREPL_STATE_ACTIVE,
2013 .node = WREPL_NODE_B,
2015 .num_ips = ARRAY_SIZE(addresses_A_1),
2016 .ips = addresses_A_1,
2017 .apply_expected = False
2022 * group,released vs. unique,tombstone
2023 * => should NOT be replaced
2026 .line = __location__,
2027 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2030 .type = WREPL_TYPE_GROUP,
2031 .state = WREPL_STATE_RELEASED,
2032 .node = WREPL_NODE_B,
2034 .num_ips = ARRAY_SIZE(addresses_A_1),
2035 .ips = addresses_A_1,
2036 .apply_expected = False
2040 .type = WREPL_TYPE_UNIQUE,
2041 .state = WREPL_STATE_TOMBSTONE,
2042 .node = WREPL_NODE_B,
2044 .num_ips = ARRAY_SIZE(addresses_A_1),
2045 .ips = addresses_A_1,
2046 .apply_expected = False
2051 * group,tombstone vs. unique,active
2052 * => should NOT be replaced
2055 .line = __location__,
2056 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2059 .type = WREPL_TYPE_GROUP,
2060 .state = WREPL_STATE_TOMBSTONE,
2061 .node = WREPL_NODE_B,
2063 .num_ips = ARRAY_SIZE(addresses_A_1),
2064 .ips = addresses_A_1,
2065 .apply_expected = True
2069 .type = WREPL_TYPE_UNIQUE,
2070 .state = WREPL_STATE_ACTIVE,
2071 .node = WREPL_NODE_B,
2073 .num_ips = ARRAY_SIZE(addresses_A_1),
2074 .ips = addresses_A_1,
2075 .apply_expected = False
2080 * group,tombstone vs. unique,tombstone
2081 * => should NOT be replaced
2084 .line = __location__,
2085 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2088 .type = WREPL_TYPE_GROUP,
2089 .state = WREPL_STATE_TOMBSTONE,
2090 .node = WREPL_NODE_B,
2092 .num_ips = ARRAY_SIZE(addresses_A_1),
2093 .ips = addresses_A_1,
2094 .apply_expected = True
2098 .type = WREPL_TYPE_UNIQUE,
2099 .state = WREPL_STATE_TOMBSTONE,
2100 .node = WREPL_NODE_B,
2102 .num_ips = ARRAY_SIZE(addresses_A_1),
2103 .ips = addresses_A_1,
2104 .apply_expected = False
2109 * normal groups vs normal groups section,
2112 * group,active vs. group,active
2113 * => should NOT be replaced
2116 .line = __location__,
2117 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2120 .type = WREPL_TYPE_GROUP,
2121 .state = WREPL_STATE_ACTIVE,
2122 .node = WREPL_NODE_B,
2124 .num_ips = ARRAY_SIZE(addresses_A_1),
2125 .ips = addresses_A_1,
2126 .apply_expected = True
2130 .type = WREPL_TYPE_GROUP,
2131 .state = WREPL_STATE_ACTIVE,
2132 .node = WREPL_NODE_B,
2134 .num_ips = ARRAY_SIZE(addresses_A_1),
2135 .ips = addresses_A_1,
2136 .apply_expected = False
2141 * group,active vs. group,tombstone
2142 * => should NOT be replaced
2145 .line = __location__,
2146 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2149 .type = WREPL_TYPE_GROUP,
2150 .state = WREPL_STATE_ACTIVE,
2151 .node = WREPL_NODE_B,
2153 .num_ips = ARRAY_SIZE(addresses_A_1),
2154 .ips = addresses_A_1,
2155 .apply_expected = True
2159 .type = WREPL_TYPE_GROUP,
2160 .state = WREPL_STATE_TOMBSTONE,
2161 .node = WREPL_NODE_B,
2163 .num_ips = ARRAY_SIZE(addresses_A_1),
2164 .ips = addresses_A_1,
2165 .apply_expected = False
2170 * group,released vs. group,active
2171 * => should be replaced
2174 .line = __location__,
2175 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2178 .type = WREPL_TYPE_GROUP,
2179 .state = WREPL_STATE_RELEASED,
2180 .node = WREPL_NODE_B,
2182 .num_ips = ARRAY_SIZE(addresses_A_1),
2183 .ips = addresses_A_1,
2184 .apply_expected = False
2188 .type = WREPL_TYPE_GROUP,
2189 .state = WREPL_STATE_ACTIVE,
2190 .node = WREPL_NODE_B,
2192 .num_ips = ARRAY_SIZE(addresses_B_1),
2193 .ips = addresses_B_1,
2194 .apply_expected = True
2199 * group,released vs. group,tombstone
2200 * => should be replaced
2203 .line = __location__,
2204 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2207 .type = WREPL_TYPE_GROUP,
2208 .state = WREPL_STATE_RELEASED,
2209 .node = WREPL_NODE_B,
2211 .num_ips = ARRAY_SIZE(addresses_A_1),
2212 .ips = addresses_A_1,
2213 .apply_expected = False
2217 .type = WREPL_TYPE_GROUP,
2218 .state = WREPL_STATE_TOMBSTONE,
2219 .node = WREPL_NODE_B,
2221 .num_ips = ARRAY_SIZE(addresses_B_1),
2222 .ips = addresses_B_1,
2223 .apply_expected = True
2228 * group,tombstone vs. group,active
2229 * => should be replaced
2232 .line = __location__,
2233 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2236 .type = WREPL_TYPE_GROUP,
2237 .state = WREPL_STATE_TOMBSTONE,
2238 .node = WREPL_NODE_B,
2240 .num_ips = ARRAY_SIZE(addresses_B_1),
2241 .ips = addresses_B_1,
2242 .apply_expected = True
2246 .type = WREPL_TYPE_GROUP,
2247 .state = WREPL_STATE_ACTIVE,
2248 .node = WREPL_NODE_B,
2250 .num_ips = ARRAY_SIZE(addresses_A_1),
2251 .ips = addresses_A_1,
2252 .apply_expected = True
2257 * group,tombstone vs. group,tombstone
2258 * => should be replaced
2261 .line = __location__,
2262 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2265 .type = WREPL_TYPE_GROUP,
2266 .state = WREPL_STATE_TOMBSTONE,
2267 .node = WREPL_NODE_B,
2269 .num_ips = ARRAY_SIZE(addresses_A_1),
2270 .ips = addresses_A_1,
2271 .apply_expected = True
2275 .type = WREPL_TYPE_GROUP,
2276 .state = WREPL_STATE_TOMBSTONE,
2277 .node = WREPL_NODE_B,
2279 .num_ips = ARRAY_SIZE(addresses_B_1),
2280 .ips = addresses_B_1,
2281 .apply_expected = True
2286 * normal groups vs special groups section,
2289 * group,active vs. sgroup,active
2290 * => should NOT be replaced
2293 .line = __location__,
2294 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2297 .type = WREPL_TYPE_GROUP,
2298 .state = WREPL_STATE_ACTIVE,
2299 .node = WREPL_NODE_B,
2301 .num_ips = ARRAY_SIZE(addresses_B_1),
2302 .ips = addresses_B_1,
2303 .apply_expected = True
2307 .type = WREPL_TYPE_SGROUP,
2308 .state = WREPL_STATE_ACTIVE,
2309 .node = WREPL_NODE_B,
2311 .num_ips = ARRAY_SIZE(addresses_B_1),
2312 .ips = addresses_B_1,
2313 .apply_expected = False
2318 * group,active vs. sgroup,tombstone
2319 * => should NOT be replaced
2322 .line = __location__,
2323 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2326 .type = WREPL_TYPE_GROUP,
2327 .state = WREPL_STATE_ACTIVE,
2328 .node = WREPL_NODE_B,
2330 .num_ips = ARRAY_SIZE(addresses_B_1),
2331 .ips = addresses_B_1,
2332 .apply_expected = True
2336 .type = WREPL_TYPE_SGROUP,
2337 .state = WREPL_STATE_TOMBSTONE,
2338 .node = WREPL_NODE_B,
2340 .num_ips = ARRAY_SIZE(addresses_B_1),
2341 .ips = addresses_B_1,
2342 .apply_expected = False
2347 * group,released vs. sgroup,active
2348 * => should be replaced
2351 .line = __location__,
2352 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2355 .type = WREPL_TYPE_GROUP,
2356 .state = WREPL_STATE_RELEASED,
2357 .node = WREPL_NODE_B,
2359 .num_ips = ARRAY_SIZE(addresses_A_1),
2360 .ips = addresses_A_1,
2361 .apply_expected = False
2365 .type = WREPL_TYPE_SGROUP,
2366 .state = WREPL_STATE_ACTIVE,
2367 .node = WREPL_NODE_B,
2369 .num_ips = ARRAY_SIZE(addresses_B_1),
2370 .ips = addresses_B_1,
2371 .apply_expected = True
2376 * group,released vs. sgroup,tombstone
2377 * => should NOT be replaced
2380 .line = __location__,
2381 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2384 .type = WREPL_TYPE_GROUP,
2385 .state = WREPL_STATE_RELEASED,
2386 .node = WREPL_NODE_B,
2388 .num_ips = ARRAY_SIZE(addresses_B_1),
2389 .ips = addresses_B_1,
2390 .apply_expected = False
2394 .type = WREPL_TYPE_SGROUP,
2395 .state = WREPL_STATE_TOMBSTONE,
2396 .node = WREPL_NODE_B,
2398 .num_ips = ARRAY_SIZE(addresses_B_1),
2399 .ips = addresses_B_1,
2400 .apply_expected = False
2405 * group,tombstone vs. sgroup,active
2406 * => should be replaced
2409 .line = __location__,
2410 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2413 .type = WREPL_TYPE_GROUP,
2414 .state = WREPL_STATE_TOMBSTONE,
2415 .node = WREPL_NODE_B,
2417 .num_ips = ARRAY_SIZE(addresses_B_1),
2418 .ips = addresses_B_1,
2419 .apply_expected = True
2423 .type = WREPL_TYPE_SGROUP,
2424 .state = WREPL_STATE_ACTIVE,
2425 .node = WREPL_NODE_B,
2427 .num_ips = ARRAY_SIZE(addresses_A_1),
2428 .ips = addresses_A_1,
2429 .apply_expected = True
2434 * group,tombstone vs. sgroup,tombstone
2435 * => should be replaced
2438 .line = __location__,
2439 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2442 .type = WREPL_TYPE_GROUP,
2443 .state = WREPL_STATE_TOMBSTONE,
2444 .node = WREPL_NODE_B,
2446 .num_ips = ARRAY_SIZE(addresses_A_1),
2447 .ips = addresses_A_1,
2448 .apply_expected = True
2452 .type = WREPL_TYPE_SGROUP,
2453 .state = WREPL_STATE_TOMBSTONE,
2454 .node = WREPL_NODE_B,
2456 .num_ips = ARRAY_SIZE(addresses_B_1),
2457 .ips = addresses_B_1,
2458 .apply_expected = True
2463 * normal groups vs multi homed section,
2466 * group,active vs. mhomed,active
2467 * => should NOT be replaced
2470 .line = __location__,
2471 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2474 .type = WREPL_TYPE_GROUP,
2475 .state = WREPL_STATE_ACTIVE,
2476 .node = WREPL_NODE_B,
2478 .num_ips = ARRAY_SIZE(addresses_B_1),
2479 .ips = addresses_B_1,
2480 .apply_expected = True
2484 .type = WREPL_TYPE_MHOMED,
2485 .state = WREPL_STATE_ACTIVE,
2486 .node = WREPL_NODE_B,
2488 .num_ips = ARRAY_SIZE(addresses_B_1),
2489 .ips = addresses_B_1,
2490 .apply_expected = False
2495 * group,active vs. mhomed,tombstone
2496 * => should NOT be replaced
2499 .line = __location__,
2500 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2503 .type = WREPL_TYPE_GROUP,
2504 .state = WREPL_STATE_ACTIVE,
2505 .node = WREPL_NODE_B,
2507 .num_ips = ARRAY_SIZE(addresses_B_1),
2508 .ips = addresses_B_1,
2509 .apply_expected = True
2513 .type = WREPL_TYPE_MHOMED,
2514 .state = WREPL_STATE_TOMBSTONE,
2515 .node = WREPL_NODE_B,
2517 .num_ips = ARRAY_SIZE(addresses_B_1),
2518 .ips = addresses_B_1,
2519 .apply_expected = False
2524 * group,released vs. mhomed,active
2525 * => should NOT be replaced
2528 .line = __location__,
2529 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2532 .type = WREPL_TYPE_GROUP,
2533 .state = WREPL_STATE_RELEASED,
2534 .node = WREPL_NODE_B,
2536 .num_ips = ARRAY_SIZE(addresses_B_1),
2537 .ips = addresses_B_1,
2538 .apply_expected = False
2542 .type = WREPL_TYPE_MHOMED,
2543 .state = WREPL_STATE_ACTIVE,
2544 .node = WREPL_NODE_B,
2546 .num_ips = ARRAY_SIZE(addresses_B_1),
2547 .ips = addresses_B_1,
2548 .apply_expected = False
2553 * group,released vs. mhomed,tombstone
2554 * => should NOT be replaced
2557 .line = __location__,
2558 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2561 .type = WREPL_TYPE_GROUP,
2562 .state = WREPL_STATE_RELEASED,
2563 .node = WREPL_NODE_B,
2565 .num_ips = ARRAY_SIZE(addresses_B_1),
2566 .ips = addresses_B_1,
2567 .apply_expected = False
2571 .type = WREPL_TYPE_MHOMED,
2572 .state = WREPL_STATE_TOMBSTONE,
2573 .node = WREPL_NODE_B,
2575 .num_ips = ARRAY_SIZE(addresses_B_1),
2576 .ips = addresses_B_1,
2577 .apply_expected = False
2582 * group,tombstone vs. mhomed,active
2583 * => should be replaced
2586 .line = __location__,
2587 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2590 .type = WREPL_TYPE_GROUP,
2591 .state = WREPL_STATE_TOMBSTONE,
2592 .node = WREPL_NODE_B,
2594 .num_ips = ARRAY_SIZE(addresses_B_1),
2595 .ips = addresses_B_1,
2596 .apply_expected = True
2600 .type = WREPL_TYPE_MHOMED,
2601 .state = WREPL_STATE_ACTIVE,
2602 .node = WREPL_NODE_B,
2604 .num_ips = ARRAY_SIZE(addresses_A_1),
2605 .ips = addresses_A_1,
2606 .apply_expected = True
2611 * group,tombstone vs. mhomed,tombstone
2612 * => should be replaced
2615 .line = __location__,
2616 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2619 .type = WREPL_TYPE_GROUP,
2620 .state = WREPL_STATE_TOMBSTONE,
2621 .node = WREPL_NODE_B,
2623 .num_ips = ARRAY_SIZE(addresses_A_1),
2624 .ips = addresses_A_1,
2625 .apply_expected = True
2629 .type = WREPL_TYPE_MHOMED,
2630 .state = WREPL_STATE_TOMBSTONE,
2631 .node = WREPL_NODE_B,
2633 .num_ips = ARRAY_SIZE(addresses_B_1),
2634 .ips = addresses_B_1,
2635 .apply_expected = True
2640 * special groups vs unique section,
2643 * sgroup,active vs. unique,active
2644 * => should NOT be replaced
2647 .line = __location__,
2648 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2651 .type = WREPL_TYPE_SGROUP,
2652 .state = WREPL_STATE_ACTIVE,
2653 .node = WREPL_NODE_B,
2655 .num_ips = ARRAY_SIZE(addresses_B_1),
2656 .ips = addresses_B_1,
2657 .apply_expected = True
2661 .type = WREPL_TYPE_UNIQUE,
2662 .state = WREPL_STATE_ACTIVE,
2663 .node = WREPL_NODE_B,
2665 .num_ips = ARRAY_SIZE(addresses_B_1),
2666 .ips = addresses_B_1,
2667 .apply_expected = False
2672 * sgroup,active vs. unique,tombstone
2673 * => should NOT be replaced
2676 .line = __location__,
2677 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2680 .type = WREPL_TYPE_SGROUP,
2681 .state = WREPL_STATE_ACTIVE,
2682 .node = WREPL_NODE_B,
2684 .num_ips = ARRAY_SIZE(addresses_B_1),
2685 .ips = addresses_B_1,
2686 .apply_expected = True
2690 .type = WREPL_TYPE_UNIQUE,
2691 .state = WREPL_STATE_TOMBSTONE,
2692 .node = WREPL_NODE_B,
2694 .num_ips = ARRAY_SIZE(addresses_B_1),
2695 .ips = addresses_B_1,
2696 .apply_expected = False
2701 * sgroup,released vs. unique,active
2702 * => should be replaced
2705 .line = __location__,
2706 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2709 .type = WREPL_TYPE_SGROUP,
2710 .state = WREPL_STATE_RELEASED,
2711 .node = WREPL_NODE_B,
2713 .num_ips = ARRAY_SIZE(addresses_B_1),
2714 .ips = addresses_B_1,
2715 .apply_expected = False
2719 .type = WREPL_TYPE_UNIQUE,
2720 .state = WREPL_STATE_ACTIVE,
2721 .node = WREPL_NODE_B,
2723 .num_ips = ARRAY_SIZE(addresses_A_1),
2724 .ips = addresses_A_1,
2725 .apply_expected = True
2730 * sgroup,released vs. unique,tombstone
2731 * => should be replaced
2734 .line = __location__,
2735 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2738 .type = WREPL_TYPE_SGROUP,
2739 .state = WREPL_STATE_RELEASED,
2740 .node = WREPL_NODE_B,
2742 .num_ips = ARRAY_SIZE(addresses_A_1),
2743 .ips = addresses_A_1,
2744 .apply_expected = False
2748 .type = WREPL_TYPE_UNIQUE,
2749 .state = WREPL_STATE_TOMBSTONE,
2750 .node = WREPL_NODE_B,
2752 .num_ips = ARRAY_SIZE(addresses_B_1),
2753 .ips = addresses_B_1,
2754 .apply_expected = True
2759 * sgroup,tombstone vs. unique,active
2760 * => should be replaced
2763 .line = __location__,
2764 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2767 .type = WREPL_TYPE_SGROUP,
2768 .state = WREPL_STATE_TOMBSTONE,
2769 .node = WREPL_NODE_B,
2771 .num_ips = ARRAY_SIZE(addresses_A_1),
2772 .ips = addresses_A_1,
2773 .apply_expected = True
2777 .type = WREPL_TYPE_UNIQUE,
2778 .state = WREPL_STATE_ACTIVE,
2779 .node = WREPL_NODE_B,
2781 .num_ips = ARRAY_SIZE(addresses_B_1),
2782 .ips = addresses_B_1,
2783 .apply_expected = True
2788 * sgroup,tombstone vs. unique,tombstone
2789 * => should be replaced
2792 .line = __location__,
2793 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2796 .type = WREPL_TYPE_SGROUP,
2797 .state = WREPL_STATE_TOMBSTONE,
2798 .node = WREPL_NODE_B,
2800 .num_ips = ARRAY_SIZE(addresses_B_1),
2801 .ips = addresses_B_1,
2802 .apply_expected = True
2806 .type = WREPL_TYPE_UNIQUE,
2807 .state = WREPL_STATE_TOMBSTONE,
2808 .node = WREPL_NODE_B,
2810 .num_ips = ARRAY_SIZE(addresses_A_1),
2811 .ips = addresses_A_1,
2812 .apply_expected = True
2817 * special groups vs normal group section,
2820 * sgroup,active vs. group,active
2821 * => should NOT be replaced
2824 .line = __location__,
2825 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2828 .type = WREPL_TYPE_SGROUP,
2829 .state = WREPL_STATE_ACTIVE,
2830 .node = WREPL_NODE_B,
2832 .num_ips = ARRAY_SIZE(addresses_A_1),
2833 .ips = addresses_A_1,
2834 .apply_expected = True
2838 .type = WREPL_TYPE_GROUP,
2839 .state = WREPL_STATE_ACTIVE,
2840 .node = WREPL_NODE_B,
2842 .num_ips = ARRAY_SIZE(addresses_A_1),
2843 .ips = addresses_A_1,
2844 .apply_expected = False
2849 * sgroup,active vs. group,tombstone
2850 * => should NOT be replaced
2853 .line = __location__,
2854 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2857 .type = WREPL_TYPE_SGROUP,
2858 .state = WREPL_STATE_ACTIVE,
2859 .node = WREPL_NODE_B,
2861 .num_ips = ARRAY_SIZE(addresses_A_1),
2862 .ips = addresses_A_1,
2863 .apply_expected = True
2867 .type = WREPL_TYPE_GROUP,
2868 .state = WREPL_STATE_TOMBSTONE,
2869 .node = WREPL_NODE_B,
2871 .num_ips = ARRAY_SIZE(addresses_A_1),
2872 .ips = addresses_A_1,
2873 .apply_expected = False
2878 * sgroup,released vs. group,active
2879 * => should be replaced
2882 .line = __location__,
2883 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2886 .type = WREPL_TYPE_SGROUP,
2887 .state = WREPL_STATE_RELEASED,
2888 .node = WREPL_NODE_B,
2890 .num_ips = ARRAY_SIZE(addresses_A_1),
2891 .ips = addresses_A_1,
2892 .apply_expected = False
2896 .type = WREPL_TYPE_GROUP,
2897 .state = WREPL_STATE_ACTIVE,
2898 .node = WREPL_NODE_B,
2900 .num_ips = ARRAY_SIZE(addresses_B_1),
2901 .ips = addresses_B_1,
2902 .apply_expected = True
2907 * sgroup,released vs. group,tombstone
2908 * => should be replaced
2911 .line = __location__,
2912 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2915 .type = WREPL_TYPE_SGROUP,
2916 .state = WREPL_STATE_RELEASED,
2917 .node = WREPL_NODE_B,
2919 .num_ips = ARRAY_SIZE(addresses_B_1),
2920 .ips = addresses_B_1,
2921 .apply_expected = False
2925 .type = WREPL_TYPE_GROUP,
2926 .state = WREPL_STATE_TOMBSTONE,
2927 .node = WREPL_NODE_B,
2929 .num_ips = ARRAY_SIZE(addresses_A_1),
2930 .ips = addresses_A_1,
2931 .apply_expected = True
2936 * sgroup,tombstone vs. group,active
2937 * => should NOT be replaced
2940 .line = __location__,
2941 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2944 .type = WREPL_TYPE_SGROUP,
2945 .state = WREPL_STATE_TOMBSTONE,
2946 .node = WREPL_NODE_B,
2948 .num_ips = ARRAY_SIZE(addresses_A_1),
2949 .ips = addresses_A_1,
2950 .apply_expected = True
2954 .type = WREPL_TYPE_GROUP,
2955 .state = WREPL_STATE_ACTIVE,
2956 .node = WREPL_NODE_B,
2958 .num_ips = ARRAY_SIZE(addresses_B_1),
2959 .ips = addresses_B_1,
2960 .apply_expected = True
2965 * sgroup,tombstone vs. group,tombstone
2966 * => should NOT be replaced
2969 .line = __location__,
2970 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2973 .type = WREPL_TYPE_SGROUP,
2974 .state = WREPL_STATE_TOMBSTONE,
2975 .node = WREPL_NODE_B,
2977 .num_ips = ARRAY_SIZE(addresses_B_1),
2978 .ips = addresses_B_1,
2979 .apply_expected = True
2983 .type = WREPL_TYPE_GROUP,
2984 .state = WREPL_STATE_TOMBSTONE,
2985 .node = WREPL_NODE_B,
2987 .num_ips = ARRAY_SIZE(addresses_A_1),
2988 .ips = addresses_A_1,
2989 .apply_expected = True
2994 * special groups (not active) vs special group section,
2997 * sgroup,released vs. sgroup,active
2998 * => should be replaced
3001 .line = __location__,
3002 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3005 .type = WREPL_TYPE_SGROUP,
3006 .state = WREPL_STATE_RELEASED,
3007 .node = WREPL_NODE_B,
3009 .num_ips = ARRAY_SIZE(addresses_A_1),
3010 .ips = addresses_A_1,
3011 .apply_expected = False
3015 .type = WREPL_TYPE_SGROUP,
3016 .state = WREPL_STATE_ACTIVE,
3017 .node = WREPL_NODE_B,
3019 .num_ips = ARRAY_SIZE(addresses_B_1),
3020 .ips = addresses_B_1,
3021 .apply_expected = True
3026 * sgroup,released vs. sgroup,tombstone
3027 * => should be replaced
3030 .line = __location__,
3031 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3034 .type = WREPL_TYPE_SGROUP,
3035 .state = WREPL_STATE_RELEASED,
3036 .node = WREPL_NODE_B,
3038 .num_ips = ARRAY_SIZE(addresses_B_1),
3039 .ips = addresses_B_1,
3040 .apply_expected = False
3044 .type = WREPL_TYPE_SGROUP,
3045 .state = WREPL_STATE_TOMBSTONE,
3046 .node = WREPL_NODE_B,
3048 .num_ips = ARRAY_SIZE(addresses_A_1),
3049 .ips = addresses_A_1,
3050 .apply_expected = True
3055 * sgroup,tombstone vs. sgroup,active
3056 * => should NOT be replaced
3059 .line = __location__,
3060 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3063 .type = WREPL_TYPE_SGROUP,
3064 .state = WREPL_STATE_TOMBSTONE,
3065 .node = WREPL_NODE_B,
3067 .num_ips = ARRAY_SIZE(addresses_A_1),
3068 .ips = addresses_A_1,
3069 .apply_expected = True
3073 .type = WREPL_TYPE_SGROUP,
3074 .state = WREPL_STATE_ACTIVE,
3075 .node = WREPL_NODE_B,
3077 .num_ips = ARRAY_SIZE(addresses_B_1),
3078 .ips = addresses_B_1,
3079 .apply_expected = True
3084 * sgroup,tombstone vs. sgroup,tombstone
3085 * => should NOT be replaced
3088 .line = __location__,
3089 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3092 .type = WREPL_TYPE_SGROUP,
3093 .state = WREPL_STATE_TOMBSTONE,
3094 .node = WREPL_NODE_B,
3096 .num_ips = ARRAY_SIZE(addresses_B_1),
3097 .ips = addresses_B_1,
3098 .apply_expected = True
3102 .type = WREPL_TYPE_SGROUP,
3103 .state = WREPL_STATE_TOMBSTONE,
3104 .node = WREPL_NODE_B,
3106 .num_ips = ARRAY_SIZE(addresses_A_1),
3107 .ips = addresses_A_1,
3108 .apply_expected = True
3113 * special groups vs multi homed section,
3116 * sgroup,active vs. mhomed,active
3117 * => should NOT be replaced
3120 .line = __location__,
3121 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3124 .type = WREPL_TYPE_SGROUP,
3125 .state = WREPL_STATE_ACTIVE,
3126 .node = WREPL_NODE_B,
3128 .num_ips = ARRAY_SIZE(addresses_A_1),
3129 .ips = addresses_A_1,
3130 .apply_expected = True
3134 .type = WREPL_TYPE_MHOMED,
3135 .state = WREPL_STATE_ACTIVE,
3136 .node = WREPL_NODE_B,
3138 .num_ips = ARRAY_SIZE(addresses_A_1),
3139 .ips = addresses_A_1,
3140 .apply_expected = False
3145 * sgroup,active vs. mhomed,tombstone
3146 * => should NOT be replaced
3149 .line = __location__,
3150 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3153 .type = WREPL_TYPE_SGROUP,
3154 .state = WREPL_STATE_ACTIVE,
3155 .node = WREPL_NODE_B,
3157 .num_ips = ARRAY_SIZE(addresses_A_1),
3158 .ips = addresses_A_1,
3159 .apply_expected = True
3163 .type = WREPL_TYPE_MHOMED,
3164 .state = WREPL_STATE_TOMBSTONE,
3165 .node = WREPL_NODE_B,
3167 .num_ips = ARRAY_SIZE(addresses_A_1),
3168 .ips = addresses_A_1,
3169 .apply_expected = False
3174 * sgroup,released vs. mhomed,active
3175 * => should be replaced
3178 .line = __location__,
3179 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3182 .type = WREPL_TYPE_SGROUP,
3183 .state = WREPL_STATE_RELEASED,
3184 .node = WREPL_NODE_B,
3186 .num_ips = ARRAY_SIZE(addresses_A_1),
3187 .ips = addresses_A_1,
3188 .apply_expected = False
3192 .type = WREPL_TYPE_MHOMED,
3193 .state = WREPL_STATE_ACTIVE,
3194 .node = WREPL_NODE_B,
3196 .num_ips = ARRAY_SIZE(addresses_B_1),
3197 .ips = addresses_B_1,
3198 .apply_expected = True
3203 * sgroup,released vs. mhomed,tombstone
3204 * => should be replaced
3207 .line = __location__,
3208 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3211 .type = WREPL_TYPE_SGROUP,
3212 .state = WREPL_STATE_RELEASED,
3213 .node = WREPL_NODE_B,
3215 .num_ips = ARRAY_SIZE(addresses_B_1),
3216 .ips = addresses_B_1,
3217 .apply_expected = False
3221 .type = WREPL_TYPE_MHOMED,
3222 .state = WREPL_STATE_TOMBSTONE,
3223 .node = WREPL_NODE_B,
3225 .num_ips = ARRAY_SIZE(addresses_A_1),
3226 .ips = addresses_A_1,
3227 .apply_expected = True
3232 * sgroup,tombstone vs. mhomed,active
3233 * => should be replaced
3236 .line = __location__,
3237 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3240 .type = WREPL_TYPE_SGROUP,
3241 .state = WREPL_STATE_TOMBSTONE,
3242 .node = WREPL_NODE_B,
3244 .num_ips = ARRAY_SIZE(addresses_A_1),
3245 .ips = addresses_A_1,
3246 .apply_expected = True
3250 .type = WREPL_TYPE_MHOMED,
3251 .state = WREPL_STATE_ACTIVE,
3252 .node = WREPL_NODE_B,
3254 .num_ips = ARRAY_SIZE(addresses_B_1),
3255 .ips = addresses_B_1,
3256 .apply_expected = True
3261 * sgroup,tombstone vs. mhomed,tombstone
3262 * => should be replaced
3265 .line = __location__,
3266 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3269 .type = WREPL_TYPE_SGROUP,
3270 .state = WREPL_STATE_TOMBSTONE,
3271 .node = WREPL_NODE_B,
3273 .num_ips = ARRAY_SIZE(addresses_B_1),
3274 .ips = addresses_B_1,
3275 .apply_expected = True
3279 .type = WREPL_TYPE_MHOMED,
3280 .state = WREPL_STATE_TOMBSTONE,
3281 .node = WREPL_NODE_B,
3283 .num_ips = ARRAY_SIZE(addresses_A_1),
3284 .ips = addresses_A_1,
3285 .apply_expected = True
3290 * multi homed vs. unique section,
3293 * mhomed,active vs. unique,active
3294 * => should be replaced
3297 .line = __location__,
3298 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3301 .type = WREPL_TYPE_MHOMED,
3302 .state = WREPL_STATE_ACTIVE,
3303 .node = WREPL_NODE_B,
3305 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3306 .ips = addresses_A_3_4,
3307 .apply_expected = True
3311 .type = WREPL_TYPE_UNIQUE,
3312 .state = WREPL_STATE_ACTIVE,
3313 .node = WREPL_NODE_B,
3315 .num_ips = ARRAY_SIZE(addresses_B_1),
3316 .ips = addresses_B_1,
3317 .apply_expected = True
3322 * mhomed,active vs. unique,tombstone
3323 * => should NOT be replaced
3326 .line = __location__,
3327 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3330 .type = WREPL_TYPE_MHOMED,
3331 .state = WREPL_STATE_ACTIVE,
3332 .node = WREPL_NODE_B,
3334 .num_ips = ARRAY_SIZE(addresses_B_1),
3335 .ips = addresses_B_1,
3336 .apply_expected = True
3340 .type = WREPL_TYPE_UNIQUE,
3341 .state = WREPL_STATE_TOMBSTONE,
3342 .node = WREPL_NODE_B,
3344 .num_ips = ARRAY_SIZE(addresses_B_1),
3345 .ips = addresses_B_1,
3346 .apply_expected = False
3351 * mhomed,released vs. unique,active
3352 * => should be replaced
3355 .line = __location__,
3356 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3359 .type = WREPL_TYPE_MHOMED,
3360 .state = WREPL_STATE_RELEASED,
3361 .node = WREPL_NODE_B,
3363 .num_ips = ARRAY_SIZE(addresses_A_1),
3364 .ips = addresses_A_1,
3365 .apply_expected = False
3369 .type = WREPL_TYPE_UNIQUE,
3370 .state = WREPL_STATE_ACTIVE,
3371 .node = WREPL_NODE_B,
3373 .num_ips = ARRAY_SIZE(addresses_B_1),
3374 .ips = addresses_B_1,
3375 .apply_expected = True
3380 * mhomed,released vs. uinique,tombstone
3381 * => should be replaced
3384 .line = __location__,
3385 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3388 .type = WREPL_TYPE_MHOMED,
3389 .state = WREPL_STATE_RELEASED,
3390 .node = WREPL_NODE_B,
3392 .num_ips = ARRAY_SIZE(addresses_B_1),
3393 .ips = addresses_B_1,
3394 .apply_expected = False
3398 .type = WREPL_TYPE_UNIQUE,
3399 .state = WREPL_STATE_TOMBSTONE,
3400 .node = WREPL_NODE_B,
3402 .num_ips = ARRAY_SIZE(addresses_A_1),
3403 .ips = addresses_A_1,
3404 .apply_expected = True
3409 * mhomed,tombstone vs. unique,active
3410 * => should be replaced
3413 .line = __location__,
3414 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3417 .type = WREPL_TYPE_MHOMED,
3418 .state = WREPL_STATE_TOMBSTONE,
3419 .node = WREPL_NODE_B,
3421 .num_ips = ARRAY_SIZE(addresses_A_1),
3422 .ips = addresses_A_1,
3423 .apply_expected = True
3427 .type = WREPL_TYPE_UNIQUE,
3428 .state = WREPL_STATE_ACTIVE,
3429 .node = WREPL_NODE_B,
3431 .num_ips = ARRAY_SIZE(addresses_B_1),
3432 .ips = addresses_B_1,
3433 .apply_expected = True
3438 * mhomed,tombstone vs. uinique,tombstone
3439 * => should be replaced
3442 .line = __location__,
3443 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3446 .type = WREPL_TYPE_MHOMED,
3447 .state = WREPL_STATE_TOMBSTONE,
3448 .node = WREPL_NODE_B,
3450 .num_ips = ARRAY_SIZE(addresses_B_1),
3451 .ips = addresses_B_1,
3452 .apply_expected = True
3456 .type = WREPL_TYPE_UNIQUE,
3457 .state = WREPL_STATE_TOMBSTONE,
3458 .node = WREPL_NODE_B,
3460 .num_ips = ARRAY_SIZE(addresses_A_1),
3461 .ips = addresses_A_1,
3462 .apply_expected = True
3467 * multi homed vs. normal group section,
3470 * mhomed,active vs. group,active
3471 * => should be replaced
3474 .line = __location__,
3475 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3478 .type = WREPL_TYPE_MHOMED,
3479 .state = WREPL_STATE_ACTIVE,
3480 .node = WREPL_NODE_B,
3482 .num_ips = ARRAY_SIZE(addresses_A_1),
3483 .ips = addresses_A_1,
3484 .apply_expected = True
3488 .type = WREPL_TYPE_GROUP,
3489 .state = WREPL_STATE_ACTIVE,
3490 .node = WREPL_NODE_B,
3492 .num_ips = ARRAY_SIZE(addresses_B_1),
3493 .ips = addresses_B_1,
3494 .apply_expected = True
3499 * mhomed,active vs. group,tombstone
3500 * => should NOT be replaced
3503 .line = __location__,
3504 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3507 .type = WREPL_TYPE_MHOMED,
3508 .state = WREPL_STATE_ACTIVE,
3509 .node = WREPL_NODE_B,
3511 .num_ips = ARRAY_SIZE(addresses_B_1),
3512 .ips = addresses_B_1,
3513 .apply_expected = True
3517 .type = WREPL_TYPE_GROUP,
3518 .state = WREPL_STATE_TOMBSTONE,
3519 .node = WREPL_NODE_B,
3521 .num_ips = ARRAY_SIZE(addresses_B_1),
3522 .ips = addresses_B_1,
3523 .apply_expected = False
3528 * mhomed,released vs. group,active
3529 * => should be replaced
3532 .line = __location__,
3533 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3536 .type = WREPL_TYPE_MHOMED,
3537 .state = WREPL_STATE_RELEASED,
3538 .node = WREPL_NODE_B,
3540 .num_ips = ARRAY_SIZE(addresses_B_1),
3541 .ips = addresses_B_1,
3542 .apply_expected = False
3546 .type = WREPL_TYPE_GROUP,
3547 .state = WREPL_STATE_ACTIVE,
3548 .node = WREPL_NODE_B,
3550 .num_ips = ARRAY_SIZE(addresses_A_1),
3551 .ips = addresses_A_1,
3552 .apply_expected = True
3557 * mhomed,released vs. group,tombstone
3558 * => should be replaced
3561 .line = __location__,
3562 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3565 .type = WREPL_TYPE_MHOMED,
3566 .state = WREPL_STATE_RELEASED,
3567 .node = WREPL_NODE_B,
3569 .num_ips = ARRAY_SIZE(addresses_A_1),
3570 .ips = addresses_A_1,
3571 .apply_expected = False
3575 .type = WREPL_TYPE_GROUP,
3576 .state = WREPL_STATE_TOMBSTONE,
3577 .node = WREPL_NODE_B,
3579 .num_ips = ARRAY_SIZE(addresses_B_1),
3580 .ips = addresses_B_1,
3581 .apply_expected = True
3586 * mhomed,tombstone vs. group,active
3587 * => should be replaced
3590 .line = __location__,
3591 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3594 .type = WREPL_TYPE_MHOMED,
3595 .state = WREPL_STATE_TOMBSTONE,
3596 .node = WREPL_NODE_B,
3598 .num_ips = ARRAY_SIZE(addresses_B_1),
3599 .ips = addresses_B_1,
3600 .apply_expected = True
3604 .type = WREPL_TYPE_GROUP,
3605 .state = WREPL_STATE_ACTIVE,
3606 .node = WREPL_NODE_B,
3608 .num_ips = ARRAY_SIZE(addresses_A_1),
3609 .ips = addresses_A_1,
3610 .apply_expected = True
3615 * mhomed,tombstone vs. group,tombstone
3616 * => should be replaced
3619 .line = __location__,
3620 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3623 .type = WREPL_TYPE_MHOMED,
3624 .state = WREPL_STATE_TOMBSTONE,
3625 .node = WREPL_NODE_B,
3627 .num_ips = ARRAY_SIZE(addresses_A_1),
3628 .ips = addresses_A_1,
3629 .apply_expected = True
3633 .type = WREPL_TYPE_GROUP,
3634 .state = WREPL_STATE_TOMBSTONE,
3635 .node = WREPL_NODE_B,
3637 .num_ips = ARRAY_SIZE(addresses_B_1),
3638 .ips = addresses_B_1,
3639 .apply_expected = True
3644 * multi homed vs. special group section,
3647 * mhomed,active vs. sgroup,active
3648 * => should NOT be replaced
3651 .line = __location__,
3652 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3655 .type = WREPL_TYPE_MHOMED,
3656 .state = WREPL_STATE_ACTIVE,
3657 .node = WREPL_NODE_B,
3659 .num_ips = ARRAY_SIZE(addresses_A_1),
3660 .ips = addresses_A_1,
3661 .apply_expected = True
3665 .type = WREPL_TYPE_SGROUP,
3666 .state = WREPL_STATE_ACTIVE,
3667 .node = WREPL_NODE_B,
3669 .num_ips = ARRAY_SIZE(addresses_A_1),
3670 .ips = addresses_A_1,
3671 .apply_expected = False
3676 * mhomed,active vs. sgroup,tombstone
3677 * => should NOT be replaced
3680 .line = __location__,
3681 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3684 .type = WREPL_TYPE_MHOMED,
3685 .state = WREPL_STATE_ACTIVE,
3686 .node = WREPL_NODE_B,
3688 .num_ips = ARRAY_SIZE(addresses_A_1),
3689 .ips = addresses_A_1,
3690 .apply_expected = True
3694 .type = WREPL_TYPE_SGROUP,
3695 .state = WREPL_STATE_TOMBSTONE,
3696 .node = WREPL_NODE_B,
3698 .num_ips = ARRAY_SIZE(addresses_A_1),
3699 .ips = addresses_A_1,
3700 .apply_expected = False
3705 * mhomed,released vs. sgroup,active
3706 * => should be replaced
3709 .line = __location__,
3710 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3713 .type = WREPL_TYPE_MHOMED,
3714 .state = WREPL_STATE_RELEASED,
3715 .node = WREPL_NODE_B,
3717 .num_ips = ARRAY_SIZE(addresses_A_1),
3718 .ips = addresses_A_1,
3719 .apply_expected = False
3723 .type = WREPL_TYPE_SGROUP,
3724 .state = WREPL_STATE_ACTIVE,
3725 .node = WREPL_NODE_B,
3727 .num_ips = ARRAY_SIZE(addresses_B_1),
3728 .ips = addresses_B_1,
3729 .apply_expected = True
3734 * mhomed,released vs. sgroup,tombstone
3735 * => should be replaced
3738 .line = __location__,
3739 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3742 .type = WREPL_TYPE_MHOMED,
3743 .state = WREPL_STATE_RELEASED,
3744 .node = WREPL_NODE_B,
3746 .num_ips = ARRAY_SIZE(addresses_B_1),
3747 .ips = addresses_B_1,
3748 .apply_expected = False
3752 .type = WREPL_TYPE_SGROUP,
3753 .state = WREPL_STATE_TOMBSTONE,
3754 .node = WREPL_NODE_B,
3756 .num_ips = ARRAY_SIZE(addresses_A_1),
3757 .ips = addresses_A_1,
3758 .apply_expected = True
3763 * mhomed,tombstone vs. sgroup,active
3764 * => should be replaced
3767 .line = __location__,
3768 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3771 .type = WREPL_TYPE_MHOMED,
3772 .state = WREPL_STATE_TOMBSTONE,
3773 .node = WREPL_NODE_B,
3775 .num_ips = ARRAY_SIZE(addresses_A_1),
3776 .ips = addresses_A_1,
3777 .apply_expected = True
3781 .type = WREPL_TYPE_SGROUP,
3782 .state = WREPL_STATE_ACTIVE,
3783 .node = WREPL_NODE_B,
3785 .num_ips = ARRAY_SIZE(addresses_B_1),
3786 .ips = addresses_B_1,
3787 .apply_expected = True
3792 * mhomed,tombstone vs. sgroup,tombstone
3793 * => should be replaced
3796 .line = __location__,
3797 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3800 .type = WREPL_TYPE_MHOMED,
3801 .state = WREPL_STATE_TOMBSTONE,
3802 .node = WREPL_NODE_B,
3804 .num_ips = ARRAY_SIZE(addresses_B_1),
3805 .ips = addresses_B_1,
3806 .apply_expected = True
3810 .type = WREPL_TYPE_SGROUP,
3811 .state = WREPL_STATE_TOMBSTONE,
3812 .node = WREPL_NODE_B,
3814 .num_ips = ARRAY_SIZE(addresses_A_1),
3815 .ips = addresses_A_1,
3816 .apply_expected = True
3821 * multi homed vs. mlti homed section,
3824 * mhomed,active vs. mhomed,active
3825 * => should be replaced
3828 .line = __location__,
3829 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3832 .type = WREPL_TYPE_MHOMED,
3833 .state = WREPL_STATE_ACTIVE,
3834 .node = WREPL_NODE_B,
3836 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3837 .ips = addresses_A_3_4,
3838 .apply_expected = True
3842 .type = WREPL_TYPE_MHOMED,
3843 .state = WREPL_STATE_ACTIVE,
3844 .node = WREPL_NODE_B,
3846 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3847 .ips = addresses_B_3_4,
3848 .apply_expected = True
3853 * mhomed,active vs. mhomed,tombstone
3854 * => should NOT be replaced
3857 .line = __location__,
3858 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3861 .type = WREPL_TYPE_MHOMED,
3862 .state = WREPL_STATE_ACTIVE,
3863 .node = WREPL_NODE_B,
3865 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3866 .ips = addresses_B_3_4,
3867 .apply_expected = True
3871 .type = WREPL_TYPE_MHOMED,
3872 .state = WREPL_STATE_TOMBSTONE,
3873 .node = WREPL_NODE_B,
3875 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3876 .ips = addresses_B_3_4,
3877 .apply_expected = False
3882 * mhomed,released vs. mhomed,active
3883 * => should be replaced
3886 .line = __location__,
3887 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3890 .type = WREPL_TYPE_MHOMED,
3891 .state = WREPL_STATE_RELEASED,
3892 .node = WREPL_NODE_B,
3894 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3895 .ips = addresses_B_3_4,
3896 .apply_expected = False
3900 .type = WREPL_TYPE_MHOMED,
3901 .state = WREPL_STATE_ACTIVE,
3902 .node = WREPL_NODE_B,
3904 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3905 .ips = addresses_A_3_4,
3906 .apply_expected = True
3911 * mhomed,released vs. mhomed,tombstone
3912 * => should be replaced
3915 .line = __location__,
3916 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3919 .type = WREPL_TYPE_MHOMED,
3920 .state = WREPL_STATE_RELEASED,
3921 .node = WREPL_NODE_B,
3923 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3924 .ips = addresses_A_3_4,
3925 .apply_expected = False
3929 .type = WREPL_TYPE_MHOMED,
3930 .state = WREPL_STATE_TOMBSTONE,
3931 .node = WREPL_NODE_B,
3933 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3934 .ips = addresses_B_3_4,
3935 .apply_expected = True
3940 * mhomed,tombstone vs. mhomed,active
3941 * => should be replaced
3944 .line = __location__,
3945 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3948 .type = WREPL_TYPE_MHOMED,
3949 .state = WREPL_STATE_TOMBSTONE,
3950 .node = WREPL_NODE_B,
3952 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3953 .ips = addresses_B_3_4,
3954 .apply_expected = True
3958 .type = WREPL_TYPE_MHOMED,
3959 .state = WREPL_STATE_ACTIVE,
3960 .node = WREPL_NODE_B,
3962 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3963 .ips = addresses_A_3_4,
3964 .apply_expected = True
3969 * mhomed,tombstone vs. mhomed,tombstone
3970 * => should be replaced
3973 .line = __location__,
3974 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3977 .type = WREPL_TYPE_MHOMED,
3978 .state = WREPL_STATE_TOMBSTONE,
3979 .node = WREPL_NODE_B,
3981 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3982 .ips = addresses_A_3_4,
3983 .apply_expected = True
3987 .type = WREPL_TYPE_MHOMED,
3988 .state = WREPL_STATE_TOMBSTONE,
3989 .node = WREPL_NODE_B,
3991 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3992 .ips = addresses_B_3_4,
3993 .apply_expected = True
3997 .line = __location__,
3998 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4002 .type = WREPL_TYPE_UNIQUE,
4003 .state = WREPL_STATE_TOMBSTONE,
4004 .node = WREPL_NODE_B,
4006 .num_ips = ARRAY_SIZE(addresses_B_1),
4007 .ips = addresses_B_1,
4008 .apply_expected = True,
4012 .type = WREPL_TYPE_UNIQUE,
4013 .state = WREPL_STATE_TOMBSTONE,
4014 .node = WREPL_NODE_B,
4016 .num_ips = ARRAY_SIZE(addresses_A_1),
4017 .ips = addresses_A_1,
4018 .apply_expected = True,
4022 * special group vs special group section,
4025 * sgroup,active vs. sgroup,active same addresses
4026 * => should be NOT replaced
4029 .line = __location__,
4030 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4031 .comment= "A:A_3_4 vs. B:A_3_4",
4035 .type = WREPL_TYPE_SGROUP,
4036 .state = WREPL_STATE_ACTIVE,
4037 .node = WREPL_NODE_B,
4039 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4040 .ips = addresses_A_3_4,
4041 .apply_expected = True
4045 .type = WREPL_TYPE_SGROUP,
4046 .state = WREPL_STATE_ACTIVE,
4047 .node = WREPL_NODE_B,
4049 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4050 .ips = addresses_A_3_4,
4051 .apply_expected = False,
4052 .sgroup_cleanup = True
4056 * sgroup,active vs. sgroup,active same addresses
4057 * => should be NOT replaced
4060 .line = __location__,
4061 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4062 .comment= "A:A_3_4 vs. B:NULL",
4066 .type = WREPL_TYPE_SGROUP,
4067 .state = WREPL_STATE_ACTIVE,
4068 .node = WREPL_NODE_B,
4070 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4071 .ips = addresses_A_3_4,
4072 .apply_expected = True
4076 .type = WREPL_TYPE_SGROUP,
4077 .state = WREPL_STATE_ACTIVE,
4078 .node = WREPL_NODE_B,
4082 .apply_expected = False,
4083 .sgroup_cleanup = True
4087 * sgroup,active vs. sgroup,active subset addresses, special case...
4088 * => should NOT be replaced
4091 .line = __location__,
4092 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4093 .comment= "A:A_3_4_X_3_4 vs. B:A_3_4",
4097 .type = WREPL_TYPE_SGROUP,
4098 .state = WREPL_STATE_ACTIVE,
4099 .node = WREPL_NODE_B,
4101 .num_ips = ARRAY_SIZE(addresses_A_3_4_X_3_4),
4102 .ips = addresses_A_3_4_X_3_4,
4103 .apply_expected = True,
4107 .type = WREPL_TYPE_SGROUP,
4108 .state = WREPL_STATE_ACTIVE,
4109 .node = WREPL_NODE_B,
4111 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4112 .ips = addresses_A_3_4,
4113 .apply_expected = False,
4117 .line = __location__,
4118 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4122 .type = WREPL_TYPE_SGROUP,
4123 .state = WREPL_STATE_ACTIVE,
4124 .node = WREPL_NODE_B,
4128 .apply_expected = False,
4132 .type = WREPL_TYPE_SGROUP,
4133 .state = WREPL_STATE_ACTIVE,
4134 .node = WREPL_NODE_B,
4138 .apply_expected = False,
4142 * sgroup,active vs. sgroup,active different addresses, but owner changed
4143 * => should be replaced
4146 .line = __location__,
4147 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4148 .comment= "A:B_3_4 vs. B:A_3_4",
4152 .type = WREPL_TYPE_SGROUP,
4153 .state = WREPL_STATE_ACTIVE,
4154 .node = WREPL_NODE_B,
4156 .num_ips = ARRAY_SIZE(addresses_B_3_4),
4157 .ips = addresses_B_3_4,
4158 .apply_expected = True,
4162 .type = WREPL_TYPE_SGROUP,
4163 .state = WREPL_STATE_ACTIVE,
4164 .node = WREPL_NODE_B,
4166 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4167 .ips = addresses_A_3_4,
4168 .apply_expected = True,
4169 .sgroup_cleanup = True
4173 * sgroup,active vs. sgroup,active different addresses, but owner changed
4174 * => should be replaced
4177 .line = __location__,
4178 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4179 .comment= "A:A_3_4 vs. B:A_3_4_OWNER_B",
4183 .type = WREPL_TYPE_SGROUP,
4184 .state = WREPL_STATE_ACTIVE,
4185 .node = WREPL_NODE_B,
4187 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4188 .ips = addresses_A_3_4,
4189 .apply_expected = True,
4193 .type = WREPL_TYPE_SGROUP,
4194 .state = WREPL_STATE_ACTIVE,
4195 .node = WREPL_NODE_B,
4197 .num_ips = ARRAY_SIZE(addresses_A_3_4_OWNER_B),
4198 .ips = addresses_A_3_4_OWNER_B,
4199 .apply_expected = True,
4200 .sgroup_cleanup = True
4204 * sgroup,active vs. sgroup,active different addresses, but owner changed
4205 * => should be replaced
4208 .line = __location__,
4209 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4210 .comment= "A:A_3_4_OWNER_B vs. B:A_3_4",
4214 .type = WREPL_TYPE_SGROUP,
4215 .state = WREPL_STATE_ACTIVE,
4216 .node = WREPL_NODE_B,
4218 .num_ips = ARRAY_SIZE(addresses_A_3_4_OWNER_B),
4219 .ips = addresses_A_3_4_OWNER_B,
4220 .apply_expected = True,
4224 .type = WREPL_TYPE_SGROUP,
4225 .state = WREPL_STATE_ACTIVE,
4226 .node = WREPL_NODE_B,
4228 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4229 .ips = addresses_A_3_4,
4230 .apply_expected = True,
4231 .sgroup_cleanup = True
4235 * sgroup,active vs. sgroup,active different addresses
4236 * => should be merged
4239 .line = __location__,
4240 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4241 .comment= "A:A_3_4 vs. B:B_3_4 => C:A_3_4_B_3_4",
4245 .type = WREPL_TYPE_SGROUP,
4246 .state = WREPL_STATE_ACTIVE,
4247 .node = WREPL_NODE_B,
4249 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4250 .ips = addresses_A_3_4,
4251 .apply_expected = True,
4255 .type = WREPL_TYPE_SGROUP,
4256 .state = WREPL_STATE_ACTIVE,
4257 .node = WREPL_NODE_B,
4259 .num_ips = ARRAY_SIZE(addresses_B_3_4),
4260 .ips = addresses_B_3_4,
4261 .sgroup_merge = True,
4262 .sgroup_cleanup = True,
4266 * sgroup,active vs. sgroup,active different addresses, special case...
4267 * => should be merged
4270 .line = __location__,
4271 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4272 .comment= "A:B_3_4_X_3_4 vs. B:A_3_4 => B:A_3_4_X_3_4",
4276 .type = WREPL_TYPE_SGROUP,
4277 .state = WREPL_STATE_ACTIVE,
4278 .node = WREPL_NODE_B,
4280 .num_ips = ARRAY_SIZE(addresses_B_3_4_X_3_4),
4281 .ips = addresses_B_3_4_X_3_4,
4282 .apply_expected = True,
4286 .type = WREPL_TYPE_SGROUP,
4287 .state = WREPL_STATE_ACTIVE,
4288 .node = WREPL_NODE_B,
4290 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4291 .ips = addresses_A_3_4,
4292 .sgroup_merge = True,
4293 .merge_owner = &ctx->b,
4294 .sgroup_cleanup = False
4298 .line = __location__,
4299 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4303 .type = WREPL_TYPE_SGROUP,
4304 .state = WREPL_STATE_ACTIVE,
4305 .node = WREPL_NODE_B,
4307 .num_ips = ARRAY_SIZE(addresses_A_3_4_X_3_4_OWNER_B),
4308 .ips = addresses_A_3_4_X_3_4_OWNER_B,
4309 .apply_expected = True,
4313 .type = WREPL_TYPE_SGROUP,
4314 .state = WREPL_STATE_ACTIVE,
4315 .node = WREPL_NODE_B,
4319 .apply_expected = False,
4323 * sgroup,active vs. sgroup,active different addresses, special case...
4324 * => should be merged
4327 .line = __location__,
4328 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4329 .comment= "A:X_3_4 vs. B:A_3_4 => C:A_3_4_X_3_4",
4333 .type = WREPL_TYPE_SGROUP,
4334 .state = WREPL_STATE_ACTIVE,
4335 .node = WREPL_NODE_B,
4337 .num_ips = ARRAY_SIZE(addresses_X_3_4),
4338 .ips = addresses_X_3_4,
4339 .apply_expected = True,
4343 .type = WREPL_TYPE_SGROUP,
4344 .state = WREPL_STATE_ACTIVE,
4345 .node = WREPL_NODE_B,
4347 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4348 .ips = addresses_A_3_4,
4349 .sgroup_merge = True,
4350 .sgroup_cleanup = False
4354 .line = __location__,
4355 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4359 .type = WREPL_TYPE_SGROUP,
4360 .state = WREPL_STATE_ACTIVE,
4361 .node = WREPL_NODE_B,
4365 .apply_expected = False,
4369 .type = WREPL_TYPE_SGROUP,
4370 .state = WREPL_STATE_ACTIVE,
4371 .node = WREPL_NODE_B,
4375 .apply_expected = False,
4379 * sgroup,active vs. sgroup,active different addresses, special case...
4380 * => should be merged
4383 .line = __location__,
4384 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4385 .comment= "A:A_3_4_X_3_4 vs. B:A_3_4_OWNER_B => B:A_3_4_OWNER_B_X_3_4",
4389 .type = WREPL_TYPE_SGROUP,
4390 .state = WREPL_STATE_ACTIVE,
4391 .node = WREPL_NODE_B,
4393 .num_ips = ARRAY_SIZE(addresses_A_3_4_X_3_4),
4394 .ips = addresses_A_3_4_X_3_4,
4395 .apply_expected = True,
4399 .type = WREPL_TYPE_SGROUP,
4400 .state = WREPL_STATE_ACTIVE,
4401 .node = WREPL_NODE_B,
4403 .num_ips = ARRAY_SIZE(addresses_A_3_4_OWNER_B),
4404 .ips = addresses_A_3_4_OWNER_B,
4405 .sgroup_merge = True,
4406 .merge_owner = &ctx->b,
4410 .line = __location__,
4411 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4415 .type = WREPL_TYPE_SGROUP,
4416 .state = WREPL_STATE_ACTIVE,
4417 .node = WREPL_NODE_B,
4421 .apply_expected = False,
4425 .type = WREPL_TYPE_SGROUP,
4426 .state = WREPL_STATE_ACTIVE,
4427 .node = WREPL_NODE_B,
4431 .apply_expected = False,
4435 * sgroup,active vs. sgroup,active partly different addresses, special case...
4436 * => should be merged
4439 .line = __location__,
4440 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4441 .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",
4445 .type = WREPL_TYPE_SGROUP,
4446 .state = WREPL_STATE_ACTIVE,
4447 .node = WREPL_NODE_B,
4449 .num_ips = ARRAY_SIZE(addresses_B_3_4_X_3_4),
4450 .ips = addresses_B_3_4_X_3_4,
4451 .apply_expected = True,
4455 .type = WREPL_TYPE_SGROUP,
4456 .state = WREPL_STATE_ACTIVE,
4457 .node = WREPL_NODE_B,
4459 .num_ips = ARRAY_SIZE(addresses_B_3_4_X_1_2),
4460 .ips = addresses_B_3_4_X_1_2,
4461 .sgroup_merge = True,
4462 .sgroup_cleanup = False
4466 .line = __location__,
4467 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4471 .type = WREPL_TYPE_SGROUP,
4472 .state = WREPL_STATE_ACTIVE,
4473 .node = WREPL_NODE_B,
4477 .apply_expected = False,
4481 .type = WREPL_TYPE_SGROUP,
4482 .state = WREPL_STATE_ACTIVE,
4483 .node = WREPL_NODE_B,
4487 .apply_expected = False,
4491 * sgroup,active vs. sgroup,active different addresses, special case...
4492 * => should be merged
4495 .line = __location__,
4496 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4497 .comment= "A:A_3_4_B_3_4 vs. B:NULL => B:A_3_4",
4501 .type = WREPL_TYPE_SGROUP,
4502 .state = WREPL_STATE_ACTIVE,
4503 .node = WREPL_NODE_B,
4505 .num_ips = ARRAY_SIZE(addresses_A_3_4_B_3_4),
4506 .ips = addresses_A_3_4_B_3_4,
4507 .apply_expected = True,
4511 .type = WREPL_TYPE_SGROUP,
4512 .state = WREPL_STATE_ACTIVE,
4513 .node = WREPL_NODE_B,
4517 .sgroup_merge = True,
4518 .merge_owner = &ctx->b,
4519 .sgroup_cleanup = True
4523 .line = __location__,
4524 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4528 .type = WREPL_TYPE_SGROUP,
4529 .state = WREPL_STATE_ACTIVE,
4530 .node = WREPL_NODE_B,
4534 .apply_expected = False,
4538 .type = WREPL_TYPE_UNIQUE,
4539 .state = WREPL_STATE_TOMBSTONE,
4540 .node = WREPL_NODE_B,
4542 .num_ips = ARRAY_SIZE(addresses_A_1),
4543 .ips = addresses_A_1,
4544 .apply_expected = True,
4548 * sgroup,active vs. sgroup,active different addresses, special case...
4549 * => should be merged
4552 .line = __location__,
4553 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4554 .comment= "A:B_3_4_X_3_4 vs. B:NULL => B:X_3_4",
4558 .type = WREPL_TYPE_SGROUP,
4559 .state = WREPL_STATE_ACTIVE,
4560 .node = WREPL_NODE_B,
4562 .num_ips = ARRAY_SIZE(addresses_B_3_4_X_3_4),
4563 .ips = addresses_B_3_4_X_3_4,
4564 .apply_expected = True,
4568 .type = WREPL_TYPE_SGROUP,
4569 .state = WREPL_STATE_ACTIVE,
4570 .node = WREPL_NODE_B,
4574 .sgroup_merge = True,
4575 .merge_owner = &ctx->b,
4576 .sgroup_cleanup = True
4580 .line = __location__,
4581 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4585 .type = WREPL_TYPE_SGROUP,
4586 .state = WREPL_STATE_ACTIVE,
4587 .node = WREPL_NODE_B,
4591 .apply_expected = False,
4595 .type = WREPL_TYPE_UNIQUE,
4596 .state = WREPL_STATE_TOMBSTONE,
4597 .node = WREPL_NODE_B,
4599 .num_ips = ARRAY_SIZE(addresses_A_1),
4600 .ips = addresses_A_1,
4601 .apply_expected = True,
4605 * This should be the last record in this array,
4606 * we need to make sure the we leave a tombstoned unique entry
4610 .line = __location__,
4611 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4615 .type = WREPL_TYPE_UNIQUE,
4616 .state = WREPL_STATE_TOMBSTONE,
4617 .node = WREPL_NODE_B,
4619 .num_ips = ARRAY_SIZE(addresses_A_1),
4620 .ips = addresses_A_1,
4621 .apply_expected = True
4625 .type = WREPL_TYPE_UNIQUE,
4626 .state = WREPL_STATE_TOMBSTONE,
4627 .node = WREPL_NODE_B,
4629 .num_ips = ARRAY_SIZE(addresses_A_1),
4630 .ips = addresses_A_1,
4631 .apply_expected = True
4633 }}; /* do not add entries here, this should be the last record! */
4635 wins_name_r1 = &wins_name1;
4636 wins_name_r2 = &wins_name2;
4638 printf("Test Replica Conflicts with different owners\n");
4640 for(i=0; ret && i < ARRAY_SIZE(records); i++) {
4642 if (!records[i].extra && !records[i].cleanup) {
4643 /* we should test the worst cases */
4644 if (records[i].r2.apply_expected && records[i].r1.ips==records[i].r2.ips) {
4645 printf("(%s) Programmer error, invalid record[%u]: %s\n",
4646 __location__, i, records[i].line);
4648 } else 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);
4655 if (!records[i].cleanup) {
4656 const char *expected;
4659 if (records[i].r2.sgroup_merge) {
4660 expected = "SGROUP_MERGE";
4661 } else if (records[i].r2.apply_expected) {
4662 expected = "REPLACE";
4664 expected = "NOT REPLACE";
4667 if (!records[i].r1.ips && !records[i].r2.ips) {
4668 ips = "with no ip(s)";
4669 } else if (records[i].r1.ips==records[i].r2.ips) {
4670 ips = "with same ip(s)";
4672 ips = "with different ip(s)";
4675 printf("%s,%s%s vs. %s,%s%s %s => %s\n",
4676 wrepl_name_type_string(records[i].r1.type),
4677 wrepl_name_state_string(records[i].r1.state),
4678 (records[i].r1.is_static?",static":""),
4679 wrepl_name_type_string(records[i].r2.type),
4680 wrepl_name_state_string(records[i].r2.state),
4681 (records[i].r2.is_static?",static":""),
4682 (records[i].comment?records[i].comment:ips),
4689 wins_name_r1->name = &records[i].name;
4690 wins_name_r1->flags = WREPL_NAME_FLAGS(records[i].r1.type,
4691 records[i].r1.state,
4693 records[i].r1.is_static);
4694 wins_name_r1->id = ++records[i].r1.owner->max_version;
4695 if (wins_name_r1->flags & 2) {
4696 wins_name_r1->addresses.addresses.num_ips = records[i].r1.num_ips;
4697 wins_name_r1->addresses.addresses.ips = discard_const(records[i].r1.ips);
4699 wins_name_r1->addresses.ip = records[i].r1.ips[0].ip;
4701 wins_name_r1->unknown = "255.255.255.255";
4704 ret &= test_wrepl_update_one(ctx, records[i].r1.owner, wins_name_r1);
4705 ret &= test_wrepl_is_applied(ctx, records[i].r1.owner,
4706 wins_name_r1, records[i].r1.apply_expected);
4711 wins_name_r2->name = &records[i].name;
4712 wins_name_r2->flags = WREPL_NAME_FLAGS(records[i].r2.type,
4713 records[i].r2.state,
4715 records[i].r2.is_static);
4716 wins_name_r2->id = ++records[i].r2.owner->max_version;
4717 if (wins_name_r2->flags & 2) {
4718 wins_name_r2->addresses.addresses.num_ips = records[i].r2.num_ips;
4719 wins_name_r2->addresses.addresses.ips = discard_const(records[i].r2.ips);
4721 wins_name_r2->addresses.ip = records[i].r2.ips[0].ip;
4723 wins_name_r2->unknown = "255.255.255.255";
4726 ret &= test_wrepl_update_one(ctx, records[i].r2.owner, wins_name_r2);
4727 if (records[i].r1.state == WREPL_STATE_RELEASED) {
4728 ret &= test_wrepl_is_applied(ctx, records[i].r1.owner,
4729 wins_name_r1, False);
4730 } else if (records[i].r2.sgroup_merge) {
4731 ret &= test_wrepl_sgroup_merged(ctx, records[i].r2.merge_owner,
4732 records[i].r1.owner,
4733 records[i].r1.num_ips, records[i].r1.ips,
4734 records[i].r2.owner,
4735 records[i].r2.num_ips, records[i].r2.ips,
4737 } else if (records[i].r1.owner != records[i].r2.owner) {
4739 _expected = (records[i].r1.apply_expected && !records[i].r2.apply_expected);
4740 ret &= test_wrepl_is_applied(ctx, records[i].r1.owner,
4741 wins_name_r1, _expected);
4743 if (records[i].r2.state == WREPL_STATE_RELEASED) {
4744 ret &= test_wrepl_is_applied(ctx, records[i].r2.owner,
4745 wins_name_r2, False);
4746 } else if (!records[i].r2.sgroup_merge) {
4747 ret &= test_wrepl_is_applied(ctx, records[i].r2.owner,
4748 wins_name_r2, records[i].r2.apply_expected);
4751 if (records[i].r2.sgroup_cleanup) {
4753 printf("failed before sgroup_cleanup record[%u]: %s\n", i, records[i].line);
4757 /* clean up the SGROUP record */
4758 wins_name_r1->name = &records[i].name;
4759 wins_name_r1->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
4761 WREPL_NODE_B, False);
4762 wins_name_r1->id = ++records[i].r1.owner->max_version;
4763 wins_name_r1->addresses.addresses.num_ips = 0;
4764 wins_name_r1->addresses.addresses.ips = NULL;
4765 wins_name_r1->unknown = "255.255.255.255";
4766 ret &= test_wrepl_update_one(ctx, records[i].r1.owner, wins_name_r1);
4768 /* here we test how names from an owner are deleted */
4769 if (records[i].r2.sgroup_merge && records[i].r2.num_ips) {
4770 ret &= test_wrepl_sgroup_merged(ctx, NULL,
4771 records[i].r2.owner,
4772 records[i].r2.num_ips, records[i].r2.ips,
4773 records[i].r1.owner,
4778 /* clean up the SGROUP record */
4779 wins_name_r2->name = &records[i].name;
4780 wins_name_r2->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
4782 WREPL_NODE_B, False);
4783 wins_name_r2->id = ++records[i].r2.owner->max_version;
4784 wins_name_r2->addresses.addresses.num_ips = 0;
4785 wins_name_r2->addresses.addresses.ips = NULL;
4786 wins_name_r2->unknown = "255.255.255.255";
4787 ret &= test_wrepl_update_one(ctx, records[i].r2.owner, wins_name_r2);
4789 /* take ownership of the SGROUP record */
4790 wins_name_r2->name = &records[i].name;
4791 wins_name_r2->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
4793 WREPL_NODE_B, False);
4794 wins_name_r2->id = ++records[i].r2.owner->max_version;
4795 wins_name_r2->addresses.addresses.num_ips = ARRAY_SIZE(addresses_B_1);
4796 wins_name_r2->addresses.addresses.ips = discard_const(addresses_B_1);
4797 wins_name_r2->unknown = "255.255.255.255";
4798 ret &= test_wrepl_update_one(ctx, records[i].r2.owner, wins_name_r2);
4799 ret &= test_wrepl_is_applied(ctx, records[i].r2.owner, wins_name_r2, True);
4801 /* overwrite the SGROUP record with unique,tombstone */
4802 wins_name_r2->name = &records[i].name;
4803 wins_name_r2->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
4804 WREPL_STATE_TOMBSTONE,
4805 WREPL_NODE_B, False);
4806 wins_name_r2->id = ++records[i].r2.owner->max_version;
4807 wins_name_r2->addresses.addresses.num_ips = ARRAY_SIZE(addresses_B_1);
4808 wins_name_r2->addresses.addresses.ips = discard_const(addresses_B_1);
4809 wins_name_r2->unknown = "255.255.255.255";
4810 ret &= test_wrepl_update_one(ctx, records[i].r2.owner, wins_name_r2);
4811 ret &= test_wrepl_is_applied(ctx, records[i].r2.owner, wins_name_r2, True);
4814 printf("failed in sgroup_cleanup record[%u]: %s\n", i, records[i].line);
4819 /* the first one is a cleanup run */
4820 if (!ret && i == 0) ret = True;
4823 printf("conflict handled wrong or record[%u]: %s\n", i, records[i].line);
4831 static BOOL test_conflict_owned_released_vs_replica(struct test_wrepl_conflict_conn *ctx)
4835 struct wrepl_wins_name wins_name_;
4836 struct wrepl_wins_name *wins_name = &wins_name_;
4837 struct nbt_name_register name_register_;
4838 struct nbt_name_register *name_register = &name_register_;
4839 struct nbt_name_release release_;
4840 struct nbt_name_release *release = &release_;
4843 const char *line; /* just better debugging */
4844 struct nbt_name name;
4849 const struct wrepl_ip *ips;
4850 BOOL apply_expected;
4853 enum wrepl_name_type type;
4854 enum wrepl_name_state state;
4855 enum wrepl_name_node node;
4858 const struct wrepl_ip *ips;
4859 BOOL apply_expected;
4863 * unique vs. unique section
4866 * unique,released vs. unique,active with same ip(s)
4869 .line = __location__,
4870 .name = _NBT_NAME("_UR_UA_SI", 0x00, NULL),
4874 .num_ips = ctx->addresses_best_num,
4875 .ips = ctx->addresses_best,
4876 .apply_expected = True
4879 .type = WREPL_TYPE_UNIQUE,
4880 .state = WREPL_STATE_ACTIVE,
4881 .node = WREPL_NODE_B,
4883 .num_ips = ctx->addresses_best_num,
4884 .ips = ctx->addresses_best,
4885 .apply_expected = True
4889 * unique,released vs. unique,active with different ip(s)
4892 .line = __location__,
4893 .name = _NBT_NAME("_UR_UA_DI", 0x00, NULL),
4897 .num_ips = ctx->addresses_best_num,
4898 .ips = ctx->addresses_best,
4899 .apply_expected = True
4902 .type = WREPL_TYPE_UNIQUE,
4903 .state = WREPL_STATE_ACTIVE,
4904 .node = WREPL_NODE_B,
4906 .num_ips = ARRAY_SIZE(addresses_B_1),
4907 .ips = addresses_B_1,
4908 .apply_expected = True
4912 * unique,released vs. unique,tombstone with same ip(s)
4915 .line = __location__,
4916 .name = _NBT_NAME("_UR_UT_SI", 0x00, NULL),
4920 .num_ips = ctx->addresses_best_num,
4921 .ips = ctx->addresses_best,
4922 .apply_expected = True
4925 .type = WREPL_TYPE_UNIQUE,
4926 .state = WREPL_STATE_TOMBSTONE,
4927 .node = WREPL_NODE_B,
4929 .num_ips = ctx->addresses_best_num,
4930 .ips = ctx->addresses_best,
4931 .apply_expected = True
4935 * unique,released vs. unique,tombstone with different ip(s)
4938 .line = __location__,
4939 .name = _NBT_NAME("_UR_UT_DI", 0x00, NULL),
4943 .num_ips = ctx->addresses_best_num,
4944 .ips = ctx->addresses_best,
4945 .apply_expected = True
4948 .type = WREPL_TYPE_UNIQUE,
4949 .state = WREPL_STATE_TOMBSTONE,
4950 .node = WREPL_NODE_B,
4952 .num_ips = ARRAY_SIZE(addresses_B_1),
4953 .ips = addresses_B_1,
4954 .apply_expected = True
4958 * unique vs. group section
4961 * unique,released vs. group,active with same ip(s)
4964 .line = __location__,
4965 .name = _NBT_NAME("_UR_GA_SI", 0x00, NULL),
4969 .num_ips = ctx->addresses_best_num,
4970 .ips = ctx->addresses_best,
4971 .apply_expected = True
4974 .type = WREPL_TYPE_GROUP,
4975 .state = WREPL_STATE_ACTIVE,
4976 .node = WREPL_NODE_B,
4978 .num_ips = ctx->addresses_best_num,
4979 .ips = ctx->addresses_best,
4980 .apply_expected = True
4984 * unique,released vs. group,active with different ip(s)
4987 .line = __location__,
4988 .name = _NBT_NAME("_UR_GA_DI", 0x00, NULL),
4992 .num_ips = ctx->addresses_best_num,
4993 .ips = ctx->addresses_best,
4994 .apply_expected = True
4997 .type = WREPL_TYPE_GROUP,
4998 .state = WREPL_STATE_ACTIVE,
4999 .node = WREPL_NODE_B,
5001 .num_ips = ARRAY_SIZE(addresses_B_1),
5002 .ips = addresses_B_1,
5003 .apply_expected = True
5007 * unique,released vs. group,tombstone with same ip(s)
5010 .line = __location__,
5011 .name = _NBT_NAME("_UR_GT_SI", 0x00, NULL),
5015 .num_ips = ctx->addresses_best_num,
5016 .ips = ctx->addresses_best,
5017 .apply_expected = True
5020 .type = WREPL_TYPE_GROUP,
5021 .state = WREPL_STATE_TOMBSTONE,
5022 .node = WREPL_NODE_B,
5024 .num_ips = ctx->addresses_best_num,
5025 .ips = ctx->addresses_best,
5026 .apply_expected = True
5030 * unique,released vs. group,tombstone with different ip(s)
5033 .line = __location__,
5034 .name = _NBT_NAME("_UR_GT_DI", 0x00, NULL),
5038 .num_ips = ctx->addresses_best_num,
5039 .ips = ctx->addresses_best,
5040 .apply_expected = True
5043 .type = WREPL_TYPE_GROUP,
5044 .state = WREPL_STATE_TOMBSTONE,
5045 .node = WREPL_NODE_B,
5047 .num_ips = ARRAY_SIZE(addresses_B_1),
5048 .ips = addresses_B_1,
5049 .apply_expected = True
5053 * unique vs. special group section
5056 * unique,released vs. sgroup,active with same ip(s)
5059 .line = __location__,
5060 .name = _NBT_NAME("_UR_SA_SI", 0x00, NULL),
5064 .num_ips = ctx->addresses_best_num,
5065 .ips = ctx->addresses_best,
5066 .apply_expected = True
5069 .type = WREPL_TYPE_SGROUP,
5070 .state = WREPL_STATE_ACTIVE,
5071 .node = WREPL_NODE_B,
5073 .num_ips = ctx->addresses_best_num,
5074 .ips = ctx->addresses_best,
5075 .apply_expected = True
5079 * unique,released vs. sgroup,active with different ip(s)
5082 .line = __location__,
5083 .name = _NBT_NAME("_UR_SA_DI", 0x00, NULL),
5087 .num_ips = ctx->addresses_best_num,
5088 .ips = ctx->addresses_best,
5089 .apply_expected = True
5092 .type = WREPL_TYPE_SGROUP,
5093 .state = WREPL_STATE_ACTIVE,
5094 .node = WREPL_NODE_B,
5096 .num_ips = ARRAY_SIZE(addresses_B_1),
5097 .ips = addresses_B_1,
5098 .apply_expected = True
5102 * unique,released vs. sgroup,tombstone with same ip(s)
5105 .line = __location__,
5106 .name = _NBT_NAME("_UR_ST_SI", 0x00, NULL),
5110 .num_ips = ctx->addresses_best_num,
5111 .ips = ctx->addresses_best,
5112 .apply_expected = True
5115 .type = WREPL_TYPE_SGROUP,
5116 .state = WREPL_STATE_TOMBSTONE,
5117 .node = WREPL_NODE_B,
5119 .num_ips = ctx->addresses_best_num,
5120 .ips = ctx->addresses_best,
5121 .apply_expected = True
5125 * unique,released vs. sgroup,tombstone with different ip(s)
5128 .line = __location__,
5129 .name = _NBT_NAME("_UR_ST_DI", 0x00, NULL),
5133 .num_ips = ctx->addresses_best_num,
5134 .ips = ctx->addresses_best,
5135 .apply_expected = True
5138 .type = WREPL_TYPE_SGROUP,
5139 .state = WREPL_STATE_TOMBSTONE,
5140 .node = WREPL_NODE_B,
5142 .num_ips = ARRAY_SIZE(addresses_B_1),
5143 .ips = addresses_B_1,
5144 .apply_expected = True
5148 * unique vs. multi homed section
5151 * unique,released vs. mhomed,active with same ip(s)
5154 .line = __location__,
5155 .name = _NBT_NAME("_UR_MA_SI", 0x00, NULL),
5159 .num_ips = ctx->addresses_best_num,
5160 .ips = ctx->addresses_best,
5161 .apply_expected = True
5164 .type = WREPL_TYPE_MHOMED,
5165 .state = WREPL_STATE_ACTIVE,
5166 .node = WREPL_NODE_B,
5168 .num_ips = ctx->addresses_best_num,
5169 .ips = ctx->addresses_best,
5170 .apply_expected = True
5174 * unique,released vs. mhomed,active with different ip(s)
5177 .line = __location__,
5178 .name = _NBT_NAME("_UR_MA_DI", 0x00, NULL),
5182 .num_ips = ctx->addresses_best_num,
5183 .ips = ctx->addresses_best,
5184 .apply_expected = True
5187 .type = WREPL_TYPE_MHOMED,
5188 .state = WREPL_STATE_ACTIVE,
5189 .node = WREPL_NODE_B,
5191 .num_ips = ARRAY_SIZE(addresses_B_1),
5192 .ips = addresses_B_1,
5193 .apply_expected = True
5197 * unique,released vs. mhomed,tombstone with same ip(s)
5200 .line = __location__,
5201 .name = _NBT_NAME("_UR_MT_SI", 0x00, NULL),
5205 .num_ips = ctx->addresses_best_num,
5206 .ips = ctx->addresses_best,
5207 .apply_expected = True
5210 .type = WREPL_TYPE_MHOMED,
5211 .state = WREPL_STATE_TOMBSTONE,
5212 .node = WREPL_NODE_B,
5214 .num_ips = ctx->addresses_best_num,
5215 .ips = ctx->addresses_best,
5216 .apply_expected = True
5220 * unique,released vs. mhomed,tombstone with different ip(s)
5223 .line = __location__,
5224 .name = _NBT_NAME("_UR_MT_DI", 0x00, NULL),
5228 .num_ips = ctx->addresses_best_num,
5229 .ips = ctx->addresses_best,
5230 .apply_expected = True
5233 .type = WREPL_TYPE_MHOMED,
5234 .state = WREPL_STATE_TOMBSTONE,
5235 .node = WREPL_NODE_B,
5237 .num_ips = ARRAY_SIZE(addresses_B_1),
5238 .ips = addresses_B_1,
5239 .apply_expected = True
5243 * group vs. unique section
5246 * group,released vs. unique,active with same ip(s)
5249 .line = __location__,
5250 .name = _NBT_NAME("_GR_UA_SI", 0x00, NULL),
5252 .nb_flags = NBT_NM_GROUP,
5254 .num_ips = ctx->addresses_best_num,
5255 .ips = ctx->addresses_best,
5256 .apply_expected = True
5259 .type = WREPL_TYPE_UNIQUE,
5260 .state = WREPL_STATE_ACTIVE,
5261 .node = WREPL_NODE_B,
5263 .num_ips = ctx->addresses_best_num,
5264 .ips = ctx->addresses_best,
5265 .apply_expected = False
5269 * group,released vs. unique,active with different ip(s)
5272 .line = __location__,
5273 .name = _NBT_NAME("_GR_UA_DI", 0x00, NULL),
5275 .nb_flags = NBT_NM_GROUP,
5277 .num_ips = ctx->addresses_best_num,
5278 .ips = ctx->addresses_best,
5279 .apply_expected = True
5282 .type = WREPL_TYPE_UNIQUE,
5283 .state = WREPL_STATE_ACTIVE,
5284 .node = WREPL_NODE_B,
5286 .num_ips = ARRAY_SIZE(addresses_B_1),
5287 .ips = addresses_B_1,
5288 .apply_expected = False
5292 * group,released vs. unique,tombstone with same ip(s)
5295 .line = __location__,
5296 .name = _NBT_NAME("_GR_UT_SI", 0x00, NULL),
5298 .nb_flags = NBT_NM_GROUP,
5300 .num_ips = ctx->addresses_best_num,
5301 .ips = ctx->addresses_best,
5302 .apply_expected = True
5305 .type = WREPL_TYPE_UNIQUE,
5306 .state = WREPL_STATE_TOMBSTONE,
5307 .node = WREPL_NODE_B,
5309 .num_ips = ctx->addresses_best_num,
5310 .ips = ctx->addresses_best,
5311 .apply_expected = False
5315 * group,released vs. unique,tombstone with different ip(s)
5318 .line = __location__,
5319 .name = _NBT_NAME("_GR_UT_DI", 0x00, NULL),
5321 .nb_flags = NBT_NM_GROUP,
5323 .num_ips = ctx->addresses_best_num,
5324 .ips = ctx->addresses_best,
5325 .apply_expected = True
5328 .type = WREPL_TYPE_UNIQUE,
5329 .state = WREPL_STATE_TOMBSTONE,
5330 .node = WREPL_NODE_B,
5332 .num_ips = ARRAY_SIZE(addresses_B_1),
5333 .ips = addresses_B_1,
5334 .apply_expected = False
5338 * group vs. group section
5341 * group,released vs. group,active with same ip(s)
5344 .line = __location__,
5345 .name = _NBT_NAME("_GR_GA_SI", 0x00, NULL),
5347 .nb_flags = NBT_NM_GROUP,
5349 .num_ips = ctx->addresses_best_num,
5350 .ips = ctx->addresses_best,
5351 .apply_expected = True
5354 .type = WREPL_TYPE_GROUP,
5355 .state = WREPL_STATE_ACTIVE,
5356 .node = WREPL_NODE_B,
5358 .num_ips = ctx->addresses_best_num,
5359 .ips = ctx->addresses_best,
5360 .apply_expected = True
5364 * group,released vs. group,active with different ip(s)
5367 .line = __location__,
5368 .name = _NBT_NAME("_GR_GA_DI", 0x00, NULL),
5370 .nb_flags = NBT_NM_GROUP,
5372 .num_ips = ctx->addresses_best_num,
5373 .ips = ctx->addresses_best,
5374 .apply_expected = True
5377 .type = WREPL_TYPE_GROUP,
5378 .state = WREPL_STATE_ACTIVE,
5379 .node = WREPL_NODE_B,
5381 .num_ips = ARRAY_SIZE(addresses_B_1),
5382 .ips = addresses_B_1,
5383 .apply_expected = True
5387 * group,released vs. group,tombstone with same ip(s)
5390 .line = __location__,
5391 .name = _NBT_NAME("_GR_GT_SI", 0x00, NULL),
5393 .nb_flags = NBT_NM_GROUP,
5395 .num_ips = ctx->addresses_best_num,
5396 .ips = ctx->addresses_best,
5397 .apply_expected = True
5400 .type = WREPL_TYPE_GROUP,
5401 .state = WREPL_STATE_TOMBSTONE,
5402 .node = WREPL_NODE_B,
5404 .num_ips = ctx->addresses_best_num,
5405 .ips = ctx->addresses_best,
5406 .apply_expected = True
5410 * group,released vs. group,tombstone with different ip(s)
5413 .line = __location__,
5414 .name = _NBT_NAME("_GR_GT_DI", 0x00, NULL),
5416 .nb_flags = NBT_NM_GROUP,
5418 .num_ips = ctx->addresses_best_num,
5419 .ips = ctx->addresses_best,
5420 .apply_expected = True
5423 .type = WREPL_TYPE_GROUP,
5424 .state = WREPL_STATE_TOMBSTONE,
5425 .node = WREPL_NODE_B,
5427 .num_ips = ARRAY_SIZE(addresses_B_1),
5428 .ips = addresses_B_1,
5429 .apply_expected = True
5433 * group vs. special group section
5436 * group,released vs. sgroup,active with same ip(s)
5439 .line = __location__,
5440 .name = _NBT_NAME("_GR_SA_SI", 0x00, NULL),
5442 .nb_flags = NBT_NM_GROUP,
5444 .num_ips = ctx->addresses_best_num,
5445 .ips = ctx->addresses_best,
5446 .apply_expected = True
5449 .type = WREPL_TYPE_SGROUP,
5450 .state = WREPL_STATE_ACTIVE,
5451 .node = WREPL_NODE_B,
5453 .num_ips = ctx->addresses_best_num,
5454 .ips = ctx->addresses_best,
5455 .apply_expected = False
5459 * group,released vs. sgroup,active with different ip(s)
5462 .line = __location__,
5463 .name = _NBT_NAME("_GR_SA_DI", 0x00, NULL),
5465 .nb_flags = NBT_NM_GROUP,
5467 .num_ips = ctx->addresses_best_num,
5468 .ips = ctx->addresses_best,
5469 .apply_expected = True
5472 .type = WREPL_TYPE_SGROUP,
5473 .state = WREPL_STATE_ACTIVE,
5474 .node = WREPL_NODE_B,
5476 .num_ips = ARRAY_SIZE(addresses_B_1),
5477 .ips = addresses_B_1,
5478 .apply_expected = False
5482 * group,released vs. sgroup,tombstone with same ip(s)
5485 .line = __location__,
5486 .name = _NBT_NAME("_GR_ST_SI", 0x00, NULL),
5488 .nb_flags = NBT_NM_GROUP,
5490 .num_ips = ctx->addresses_best_num,
5491 .ips = ctx->addresses_best,
5492 .apply_expected = True
5495 .type = WREPL_TYPE_SGROUP,
5496 .state = WREPL_STATE_TOMBSTONE,
5497 .node = WREPL_NODE_B,
5499 .num_ips = ctx->addresses_best_num,
5500 .ips = ctx->addresses_best,
5501 .apply_expected = False
5505 * group,released vs. sgroup,tombstone with different ip(s)
5508 .line = __location__,
5509 .name = _NBT_NAME("_GR_ST_DI", 0x00, NULL),
5511 .nb_flags = NBT_NM_GROUP,
5513 .num_ips = ctx->addresses_best_num,
5514 .ips = ctx->addresses_best,
5515 .apply_expected = True
5518 .type = WREPL_TYPE_SGROUP,
5519 .state = WREPL_STATE_TOMBSTONE,
5520 .node = WREPL_NODE_B,
5522 .num_ips = ARRAY_SIZE(addresses_B_1),
5523 .ips = addresses_B_1,
5524 .apply_expected = False
5528 * group vs. multi homed section
5531 * group,released vs. mhomed,active with same ip(s)
5534 .line = __location__,
5535 .name = _NBT_NAME("_GR_MA_SI", 0x00, NULL),
5537 .nb_flags = NBT_NM_GROUP,
5539 .num_ips = ctx->addresses_best_num,
5540 .ips = ctx->addresses_best,
5541 .apply_expected = True
5544 .type = WREPL_TYPE_MHOMED,
5545 .state = WREPL_STATE_ACTIVE,
5546 .node = WREPL_NODE_B,
5548 .num_ips = ctx->addresses_best_num,
5549 .ips = ctx->addresses_best,
5550 .apply_expected = False
5554 * group,released vs. mhomed,active with different ip(s)
5557 .line = __location__,
5558 .name = _NBT_NAME("_GR_MA_DI", 0x00, NULL),
5560 .nb_flags = NBT_NM_GROUP,
5562 .num_ips = ctx->addresses_best_num,
5563 .ips = ctx->addresses_best,
5564 .apply_expected = True
5567 .type = WREPL_TYPE_MHOMED,
5568 .state = WREPL_STATE_ACTIVE,
5569 .node = WREPL_NODE_B,
5571 .num_ips = ARRAY_SIZE(addresses_B_1),
5572 .ips = addresses_B_1,
5573 .apply_expected = False
5577 * group,released vs. mhomed,tombstone with same ip(s)
5580 .line = __location__,
5581 .name = _NBT_NAME("_GR_MT_SI", 0x00, NULL),
5583 .nb_flags = NBT_NM_GROUP,
5585 .num_ips = ctx->addresses_best_num,
5586 .ips = ctx->addresses_best,
5587 .apply_expected = True
5590 .type = WREPL_TYPE_MHOMED,
5591 .state = WREPL_STATE_TOMBSTONE,
5592 .node = WREPL_NODE_B,
5594 .num_ips = ctx->addresses_best_num,
5595 .ips = ctx->addresses_best,
5596 .apply_expected = False
5600 * group,released vs. mhomed,tombstone with different ip(s)
5603 .line = __location__,
5604 .name = _NBT_NAME("_GR_MT_DI", 0x00, NULL),
5606 .nb_flags = NBT_NM_GROUP,
5608 .num_ips = ctx->addresses_best_num,
5609 .ips = ctx->addresses_best,
5610 .apply_expected = True
5613 .type = WREPL_TYPE_MHOMED,
5614 .state = WREPL_STATE_TOMBSTONE,
5615 .node = WREPL_NODE_B,
5617 .num_ips = ARRAY_SIZE(addresses_B_1),
5618 .ips = addresses_B_1,
5619 .apply_expected = False
5623 * special group vs. unique section
5626 * sgroup,released vs. unique,active with same ip(s)
5629 .line = __location__,
5630 .name = _NBT_NAME("_SR_UA_SI", 0x1C, NULL),
5632 .nb_flags = NBT_NM_GROUP,
5634 .num_ips = ctx->addresses_best_num,
5635 .ips = ctx->addresses_best,
5636 .apply_expected = True
5639 .type = WREPL_TYPE_UNIQUE,
5640 .state = WREPL_STATE_ACTIVE,
5641 .node = WREPL_NODE_B,
5643 .num_ips = ctx->addresses_best_num,
5644 .ips = ctx->addresses_best,
5645 .apply_expected = True
5649 * sgroup,released vs. unique,active with different ip(s)
5652 .line = __location__,
5653 .name = _NBT_NAME("_SR_UA_DI", 0x1C, NULL),
5655 .nb_flags = NBT_NM_GROUP,
5657 .num_ips = ctx->addresses_best_num,
5658 .ips = ctx->addresses_best,
5659 .apply_expected = True
5662 .type = WREPL_TYPE_UNIQUE,
5663 .state = WREPL_STATE_ACTIVE,
5664 .node = WREPL_NODE_B,
5666 .num_ips = ARRAY_SIZE(addresses_B_1),
5667 .ips = addresses_B_1,
5668 .apply_expected = True
5672 * sgroup,released vs. unique,tombstone with same ip(s)
5675 .line = __location__,
5676 .name = _NBT_NAME("_SR_UT_SI", 0x1C, NULL),
5678 .nb_flags = NBT_NM_GROUP,
5680 .num_ips = ctx->addresses_best_num,
5681 .ips = ctx->addresses_best,
5682 .apply_expected = True
5685 .type = WREPL_TYPE_UNIQUE,
5686 .state = WREPL_STATE_TOMBSTONE,
5687 .node = WREPL_NODE_B,
5689 .num_ips = ctx->addresses_best_num,
5690 .ips = ctx->addresses_best,
5691 .apply_expected = True
5695 * sgroup,released vs. unique,tombstone with different ip(s)
5698 .line = __location__,
5699 .name = _NBT_NAME("_SR_UT_DI", 0x1C, NULL),
5701 .nb_flags = NBT_NM_GROUP,
5703 .num_ips = ctx->addresses_best_num,
5704 .ips = ctx->addresses_best,
5705 .apply_expected = True
5708 .type = WREPL_TYPE_UNIQUE,
5709 .state = WREPL_STATE_TOMBSTONE,
5710 .node = WREPL_NODE_B,
5712 .num_ips = ARRAY_SIZE(addresses_B_1),
5713 .ips = addresses_B_1,
5714 .apply_expected = True
5718 * special group vs. group section
5721 * sgroup,released vs. group,active with same ip(s)
5724 .line = __location__,
5725 .name = _NBT_NAME("_SR_GA_SI", 0x1C, NULL),
5727 .nb_flags = NBT_NM_GROUP,
5729 .num_ips = ctx->addresses_best_num,
5730 .ips = ctx->addresses_best,
5731 .apply_expected = True
5734 .type = WREPL_TYPE_GROUP,
5735 .state = WREPL_STATE_ACTIVE,
5736 .node = WREPL_NODE_B,
5738 .num_ips = ctx->addresses_best_num,
5739 .ips = ctx->addresses_best,
5740 .apply_expected = True
5744 * sgroup,released vs. group,active with different ip(s)
5747 .line = __location__,
5748 .name = _NBT_NAME("_SR_GA_DI", 0x1C, NULL),
5750 .nb_flags = NBT_NM_GROUP,
5752 .num_ips = ctx->addresses_best_num,
5753 .ips = ctx->addresses_best,
5754 .apply_expected = True
5757 .type = WREPL_TYPE_GROUP,
5758 .state = WREPL_STATE_ACTIVE,
5759 .node = WREPL_NODE_B,
5761 .num_ips = ARRAY_SIZE(addresses_B_1),
5762 .ips = addresses_B_1,
5763 .apply_expected = True
5767 * sgroup,released vs. group,tombstone with same ip(s)
5770 .line = __location__,
5771 .name = _NBT_NAME("_SR_GT_SI", 0x1C, NULL),
5773 .nb_flags = NBT_NM_GROUP,
5775 .num_ips = ctx->addresses_best_num,
5776 .ips = ctx->addresses_best,
5777 .apply_expected = True
5780 .type = WREPL_TYPE_GROUP,
5781 .state = WREPL_STATE_TOMBSTONE,
5782 .node = WREPL_NODE_B,
5784 .num_ips = ctx->addresses_best_num,
5785 .ips = ctx->addresses_best,
5786 .apply_expected = True
5790 * sgroup,released vs. group,tombstone with different ip(s)
5793 .line = __location__,
5794 .name = _NBT_NAME("_SR_GT_DI", 0x1C, NULL),
5796 .nb_flags = NBT_NM_GROUP,
5798 .num_ips = ctx->addresses_best_num,
5799 .ips = ctx->addresses_best,
5800 .apply_expected = True
5803 .type = WREPL_TYPE_GROUP,
5804 .state = WREPL_STATE_TOMBSTONE,
5805 .node = WREPL_NODE_B,
5807 .num_ips = ARRAY_SIZE(addresses_B_1),
5808 .ips = addresses_B_1,
5809 .apply_expected = True
5813 * special group vs. special group section
5816 * sgroup,released vs. sgroup,active with same ip(s)
5819 .line = __location__,
5820 .name = _NBT_NAME("_SR_SA_SI", 0x1C, NULL),
5822 .nb_flags = NBT_NM_GROUP,
5824 .num_ips = ctx->addresses_best_num,
5825 .ips = ctx->addresses_best,
5826 .apply_expected = True
5829 .type = WREPL_TYPE_SGROUP,
5830 .state = WREPL_STATE_ACTIVE,
5831 .node = WREPL_NODE_B,
5833 .num_ips = ctx->addresses_best_num,
5834 .ips = ctx->addresses_best,
5835 .apply_expected = True
5839 * sgroup,released vs. sgroup,active with different ip(s)
5842 .line = __location__,
5843 .name = _NBT_NAME("_SR_SA_DI", 0x1C, NULL),
5845 .nb_flags = NBT_NM_GROUP,
5847 .num_ips = ctx->addresses_best_num,
5848 .ips = ctx->addresses_best,
5849 .apply_expected = True
5852 .type = WREPL_TYPE_SGROUP,
5853 .state = WREPL_STATE_ACTIVE,
5854 .node = WREPL_NODE_B,
5856 .num_ips = ARRAY_SIZE(addresses_B_1),
5857 .ips = addresses_B_1,
5858 .apply_expected = True
5862 * sgroup,released vs. sgroup,tombstone with same ip(s)
5865 .line = __location__,
5866 .name = _NBT_NAME("_SR_ST_SI", 0x1C, NULL),
5868 .nb_flags = NBT_NM_GROUP,
5870 .num_ips = ctx->addresses_best_num,
5871 .ips = ctx->addresses_best,
5872 .apply_expected = True
5875 .type = WREPL_TYPE_SGROUP,
5876 .state = WREPL_STATE_TOMBSTONE,
5877 .node = WREPL_NODE_B,
5879 .num_ips = ctx->addresses_best_num,
5880 .ips = ctx->addresses_best,
5881 .apply_expected = True
5885 * sgroup,released vs. sgroup,tombstone with different ip(s)
5888 .line = __location__,
5889 .name = _NBT_NAME("_SR_ST_DI", 0x1C, NULL),
5891 .nb_flags = NBT_NM_GROUP,
5893 .num_ips = ctx->addresses_best_num,
5894 .ips = ctx->addresses_best,
5895 .apply_expected = True
5898 .type = WREPL_TYPE_SGROUP,
5899 .state = WREPL_STATE_TOMBSTONE,
5900 .node = WREPL_NODE_B,
5902 .num_ips = ARRAY_SIZE(addresses_B_1),
5903 .ips = addresses_B_1,
5904 .apply_expected = True
5908 * special group vs. multi homed section
5911 * sgroup,released vs. mhomed,active with same ip(s)
5914 .line = __location__,
5915 .name = _NBT_NAME("_SR_MA_SI", 0x1C, NULL),
5917 .nb_flags = NBT_NM_GROUP,
5919 .num_ips = ctx->addresses_best_num,
5920 .ips = ctx->addresses_best,
5921 .apply_expected = True
5924 .type = WREPL_TYPE_MHOMED,
5925 .state = WREPL_STATE_ACTIVE,
5926 .node = WREPL_NODE_B,
5928 .num_ips = ctx->addresses_best_num,
5929 .ips = ctx->addresses_best,
5930 .apply_expected = True
5934 * sgroup,released vs. mhomed,active with different ip(s)
5937 .line = __location__,
5938 .name = _NBT_NAME("_SR_MA_DI", 0x1C, NULL),
5940 .nb_flags = NBT_NM_GROUP,
5942 .num_ips = ctx->addresses_best_num,
5943 .ips = ctx->addresses_best,
5944 .apply_expected = True
5947 .type = WREPL_TYPE_MHOMED,
5948 .state = WREPL_STATE_ACTIVE,
5949 .node = WREPL_NODE_B,
5951 .num_ips = ARRAY_SIZE(addresses_B_1),
5952 .ips = addresses_B_1,
5953 .apply_expected = True
5957 * sgroup,released vs. mhomed,tombstone with same ip(s)
5960 .line = __location__,
5961 .name = _NBT_NAME("_SR_MT_SI", 0x1C, NULL),
5963 .nb_flags = NBT_NM_GROUP,
5965 .num_ips = ctx->addresses_best_num,
5966 .ips = ctx->addresses_best,
5967 .apply_expected = True
5970 .type = WREPL_TYPE_MHOMED,
5971 .state = WREPL_STATE_TOMBSTONE,
5972 .node = WREPL_NODE_B,
5974 .num_ips = ctx->addresses_best_num,
5975 .ips = ctx->addresses_best,
5976 .apply_expected = True
5980 * sgroup,released vs. mhomed,tombstone with different ip(s)
5983 .line = __location__,
5984 .name = _NBT_NAME("_SR_MT_DI", 0x1C, NULL),
5986 .nb_flags = NBT_NM_GROUP,
5988 .num_ips = ctx->addresses_best_num,
5989 .ips = ctx->addresses_best,
5990 .apply_expected = True
5993 .type = WREPL_TYPE_MHOMED,
5994 .state = WREPL_STATE_TOMBSTONE,
5995 .node = WREPL_NODE_B,
5997 .num_ips = ARRAY_SIZE(addresses_B_1),
5998 .ips = addresses_B_1,
5999 .apply_expected = True
6003 * multi homed vs. unique section
6006 * mhomed,released vs. unique,active with same ip(s)
6009 .line = __location__,
6010 .name = _NBT_NAME("_MR_UA_SI", 0x00, NULL),
6014 .num_ips = ctx->addresses_best_num,
6015 .ips = ctx->addresses_best,
6016 .apply_expected = True
6019 .type = WREPL_TYPE_UNIQUE,
6020 .state = WREPL_STATE_ACTIVE,
6021 .node = WREPL_NODE_B,
6023 .num_ips = ctx->addresses_best_num,
6024 .ips = ctx->addresses_best,
6025 .apply_expected = True
6029 * mhomed,released vs. unique,active with different ip(s)
6032 .line = __location__,
6033 .name = _NBT_NAME("_MR_UA_DI", 0x00, NULL),
6037 .num_ips = ctx->addresses_best_num,
6038 .ips = ctx->addresses_best,
6039 .apply_expected = True
6042 .type = WREPL_TYPE_UNIQUE,
6043 .state = WREPL_STATE_ACTIVE,
6044 .node = WREPL_NODE_B,
6046 .num_ips = ARRAY_SIZE(addresses_B_1),
6047 .ips = addresses_B_1,
6048 .apply_expected = True
6052 * mhomed,released vs. unique,tombstone with same ip(s)
6055 .line = __location__,
6056 .name = _NBT_NAME("_MR_UT_SI", 0x00, NULL),
6060 .num_ips = ctx->addresses_best_num,
6061 .ips = ctx->addresses_best,
6062 .apply_expected = True
6065 .type = WREPL_TYPE_UNIQUE,
6066 .state = WREPL_STATE_TOMBSTONE,
6067 .node = WREPL_NODE_B,
6069 .num_ips = ctx->addresses_best_num,
6070 .ips = ctx->addresses_best,
6071 .apply_expected = True
6075 * mhomed,released vs. unique,tombstone with different ip(s)
6078 .line = __location__,
6079 .name = _NBT_NAME("_MR_UT_DI", 0x00, NULL),
6083 .num_ips = ctx->addresses_best_num,
6084 .ips = ctx->addresses_best,
6085 .apply_expected = True
6088 .type = WREPL_TYPE_UNIQUE,
6089 .state = WREPL_STATE_TOMBSTONE,
6090 .node = WREPL_NODE_B,
6092 .num_ips = ARRAY_SIZE(addresses_B_1),
6093 .ips = addresses_B_1,
6094 .apply_expected = True
6098 * multi homed vs. group section
6101 * mhomed,released vs. group,active with same ip(s)
6104 .line = __location__,
6105 .name = _NBT_NAME("_MR_GA_SI", 0x00, NULL),
6109 .num_ips = ctx->addresses_best_num,
6110 .ips = ctx->addresses_best,
6111 .apply_expected = True
6114 .type = WREPL_TYPE_GROUP,
6115 .state = WREPL_STATE_ACTIVE,
6116 .node = WREPL_NODE_B,
6118 .num_ips = ctx->addresses_best_num,
6119 .ips = ctx->addresses_best,
6120 .apply_expected = True
6124 * mhomed,released vs. group,active with different ip(s)
6127 .line = __location__,
6128 .name = _NBT_NAME("_MR_GA_DI", 0x00, NULL),
6132 .num_ips = ctx->addresses_best_num,
6133 .ips = ctx->addresses_best,
6134 .apply_expected = True
6137 .type = WREPL_TYPE_GROUP,
6138 .state = WREPL_STATE_ACTIVE,
6139 .node = WREPL_NODE_B,
6141 .num_ips = ARRAY_SIZE(addresses_B_1),
6142 .ips = addresses_B_1,
6143 .apply_expected = True
6147 * mhomed,released vs. group,tombstone with same ip(s)
6150 .line = __location__,
6151 .name = _NBT_NAME("_MR_GT_SI", 0x00, NULL),
6155 .num_ips = ctx->addresses_best_num,
6156 .ips = ctx->addresses_best,
6157 .apply_expected = True
6160 .type = WREPL_TYPE_GROUP,
6161 .state = WREPL_STATE_TOMBSTONE,
6162 .node = WREPL_NODE_B,
6164 .num_ips = ctx->addresses_best_num,
6165 .ips = ctx->addresses_best,
6166 .apply_expected = True
6170 * mhomed,released vs. group,tombstone with different ip(s)
6173 .line = __location__,
6174 .name = _NBT_NAME("_MR_GT_DI", 0x00, NULL),
6178 .num_ips = ctx->addresses_best_num,
6179 .ips = ctx->addresses_best,
6180 .apply_expected = True
6183 .type = WREPL_TYPE_GROUP,
6184 .state = WREPL_STATE_TOMBSTONE,
6185 .node = WREPL_NODE_B,
6187 .num_ips = ARRAY_SIZE(addresses_B_1),
6188 .ips = addresses_B_1,
6189 .apply_expected = True
6193 * multi homed vs. special group section
6196 * mhomed,released vs. sgroup,active with same ip(s)
6199 .line = __location__,
6200 .name = _NBT_NAME("_MR_SA_SI", 0x00, NULL),
6204 .num_ips = ctx->addresses_best_num,
6205 .ips = ctx->addresses_best,
6206 .apply_expected = True
6209 .type = WREPL_TYPE_SGROUP,
6210 .state = WREPL_STATE_ACTIVE,
6211 .node = WREPL_NODE_B,
6213 .num_ips = ctx->addresses_best_num,
6214 .ips = ctx->addresses_best,
6215 .apply_expected = True
6219 * mhomed,released vs. sgroup,active with different ip(s)
6222 .line = __location__,
6223 .name = _NBT_NAME("_MR_SA_DI", 0x00, NULL),
6227 .num_ips = ctx->addresses_best_num,
6228 .ips = ctx->addresses_best,
6229 .apply_expected = True
6232 .type = WREPL_TYPE_SGROUP,
6233 .state = WREPL_STATE_ACTIVE,
6234 .node = WREPL_NODE_B,
6236 .num_ips = ARRAY_SIZE(addresses_B_1),
6237 .ips = addresses_B_1,
6238 .apply_expected = True
6242 * mhomed,released vs. sgroup,tombstone with same ip(s)
6245 .line = __location__,
6246 .name = _NBT_NAME("_MR_ST_SI", 0x00, NULL),
6250 .num_ips = ctx->addresses_best_num,
6251 .ips = ctx->addresses_best,
6252 .apply_expected = True
6255 .type = WREPL_TYPE_SGROUP,
6256 .state = WREPL_STATE_TOMBSTONE,
6257 .node = WREPL_NODE_B,
6259 .num_ips = ctx->addresses_best_num,
6260 .ips = ctx->addresses_best,
6261 .apply_expected = True
6265 * mhomed,released vs. sgroup,tombstone with different ip(s)
6268 .line = __location__,
6269 .name = _NBT_NAME("_MR_ST_DI", 0x00, NULL),
6273 .num_ips = ctx->addresses_best_num,
6274 .ips = ctx->addresses_best,
6275 .apply_expected = True
6278 .type = WREPL_TYPE_SGROUP,
6279 .state = WREPL_STATE_TOMBSTONE,
6280 .node = WREPL_NODE_B,
6282 .num_ips = ARRAY_SIZE(addresses_B_1),
6283 .ips = addresses_B_1,
6284 .apply_expected = True
6288 * multi homed vs. multi homed section
6291 * mhomed,released vs. mhomed,active with same ip(s)
6294 .line = __location__,
6295 .name = _NBT_NAME("_MR_MA_SI", 0x00, NULL),
6299 .num_ips = ctx->addresses_best_num,
6300 .ips = ctx->addresses_best,
6301 .apply_expected = True
6304 .type = WREPL_TYPE_MHOMED,
6305 .state = WREPL_STATE_ACTIVE,
6306 .node = WREPL_NODE_B,
6308 .num_ips = ctx->addresses_best_num,
6309 .ips = ctx->addresses_best,
6310 .apply_expected = True
6314 * mhomed,released vs. mhomed,active with different ip(s)
6317 .line = __location__,
6318 .name = _NBT_NAME("_MR_MA_DI", 0x00, NULL),
6322 .num_ips = ctx->addresses_best_num,
6323 .ips = ctx->addresses_best,
6324 .apply_expected = True
6327 .type = WREPL_TYPE_MHOMED,
6328 .state = WREPL_STATE_ACTIVE,
6329 .node = WREPL_NODE_B,
6331 .num_ips = ARRAY_SIZE(addresses_B_1),
6332 .ips = addresses_B_1,
6333 .apply_expected = True
6337 * mhomed,released vs. mhomed,tombstone with same ip(s)
6340 .line = __location__,
6341 .name = _NBT_NAME("_MR_MT_SI", 0x00, NULL),
6345 .num_ips = ctx->addresses_best_num,
6346 .ips = ctx->addresses_best,
6347 .apply_expected = True
6350 .type = WREPL_TYPE_MHOMED,
6351 .state = WREPL_STATE_TOMBSTONE,
6352 .node = WREPL_NODE_B,
6354 .num_ips = ctx->addresses_best_num,
6355 .ips = ctx->addresses_best,
6356 .apply_expected = True
6360 * mhomed,released vs. mhomed,tombstone with different ip(s)
6363 .line = __location__,
6364 .name = _NBT_NAME("_MR_MT_DI", 0x00, NULL),
6368 .num_ips = ctx->addresses_best_num,
6369 .ips = ctx->addresses_best,
6370 .apply_expected = True
6373 .type = WREPL_TYPE_MHOMED,
6374 .state = WREPL_STATE_TOMBSTONE,
6375 .node = WREPL_NODE_B,
6377 .num_ips = ARRAY_SIZE(addresses_B_1),
6378 .ips = addresses_B_1,
6379 .apply_expected = True
6384 printf("Test Replica records vs. owned released records\n");
6386 for(i=0; ret && i < ARRAY_SIZE(records); i++) {
6387 printf("%s => %s\n", nbt_name_string(ctx, &records[i].name),
6388 (records[i].replica.apply_expected?"REPLACE":"NOT REPLACE"));
6393 name_register->in.name = records[i].name;
6394 name_register->in.dest_addr = ctx->address;
6395 name_register->in.address = records[i].wins.ips[0].ip;
6396 name_register->in.nb_flags = records[i].wins.nb_flags;
6397 name_register->in.register_demand= False;
6398 name_register->in.broadcast = False;
6399 name_register->in.multi_homed = records[i].wins.mhomed;
6400 name_register->in.ttl = 300000;
6401 name_register->in.timeout = 70;
6402 name_register->in.retries = 0;
6404 status = nbt_name_register(ctx->nbtsock, ctx, name_register);
6405 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
6406 printf("No response from %s for name register\n", ctx->address);
6409 if (!NT_STATUS_IS_OK(status)) {
6410 printf("Bad response from %s for name register - %s\n",
6411 ctx->address, nt_errstr(status));
6414 CHECK_VALUE(name_register->out.rcode, 0);
6415 CHECK_VALUE_STRING(name_register->out.reply_from, ctx->address);
6416 CHECK_VALUE(name_register->out.name.type, records[i].name.type);
6417 CHECK_VALUE_STRING(name_register->out.name.name, records[i].name.name);
6418 CHECK_VALUE_STRING(name_register->out.name.scope, records[i].name.scope);
6419 CHECK_VALUE_STRING(name_register->out.reply_addr, records[i].wins.ips[0].ip);
6421 /* release the record */
6422 release->in.name = records[i].name;
6423 release->in.dest_addr = ctx->address;
6424 release->in.address = records[i].wins.ips[0].ip;
6425 release->in.nb_flags = records[i].wins.nb_flags;
6426 release->in.broadcast = False;
6427 release->in.timeout = 30;
6428 release->in.retries = 0;
6430 status = nbt_name_release(ctx->nbtsock, ctx, release);
6431 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
6432 printf("No response from %s for name release\n", ctx->address);
6435 if (!NT_STATUS_IS_OK(status)) {
6436 printf("Bad response from %s for name query - %s\n",
6437 ctx->address, nt_errstr(status));
6440 CHECK_VALUE(release->out.rcode, 0);
6445 wins_name->name = &records[i].name;
6446 wins_name->flags = WREPL_NAME_FLAGS(records[i].replica.type,
6447 records[i].replica.state,
6448 records[i].replica.node,
6449 records[i].replica.is_static);
6450 wins_name->id = ++ctx->b.max_version;
6451 if (wins_name->flags & 2) {
6452 wins_name->addresses.addresses.num_ips = records[i].replica.num_ips;
6453 wins_name->addresses.addresses.ips = discard_const(records[i].replica.ips);
6455 wins_name->addresses.ip = records[i].replica.ips[0].ip;
6457 wins_name->unknown = "255.255.255.255";
6459 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
6460 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name,
6461 records[i].replica.apply_expected);
6463 if (records[i].replica.apply_expected) {
6464 wins_name->name = &records[i].name;
6465 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE,
6466 WREPL_STATE_TOMBSTONE,
6467 WREPL_NODE_B, False);
6468 wins_name->id = ++ctx->b.max_version;
6469 wins_name->addresses.ip = addresses_B_1[0].ip;
6470 wins_name->unknown = "255.255.255.255";
6472 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
6473 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name, True);
6475 release->in.name = records[i].name;
6476 release->in.dest_addr = ctx->address;
6477 release->in.address = records[i].wins.ips[0].ip;
6478 release->in.nb_flags = records[i].wins.nb_flags;
6479 release->in.broadcast = False;
6480 release->in.timeout = 30;
6481 release->in.retries = 0;
6483 status = nbt_name_release(ctx->nbtsock, ctx, release);
6484 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
6485 printf("No response from %s for name release\n", ctx->address);
6488 if (!NT_STATUS_IS_OK(status)) {
6489 printf("Bad response from %s for name query - %s\n",
6490 ctx->address, nt_errstr(status));
6493 CHECK_VALUE(release->out.rcode, 0);
6497 printf("conflict handled wrong or record[%u]: %s\n", i, records[i].line);
6505 struct test_conflict_owned_active_vs_replica_struct {
6506 const char *line; /* just better debugging */
6507 const char *section; /* just better debugging */
6508 struct nbt_name name;
6509 const char *comment;
6515 const struct wrepl_ip *ips;
6516 BOOL apply_expected;
6521 BOOL expect_release;
6524 /* when num_ips == 0, then .wins.ips are used */
6526 const struct wrepl_ip *ips;
6529 enum wrepl_name_type type;
6530 enum wrepl_name_state state;
6531 enum wrepl_name_node node;
6534 const struct wrepl_ip *ips;
6535 BOOL apply_expected;
6541 static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket *nbtsock,
6542 struct nbt_name_packet *req_packet,
6543 const struct nbt_peer_socket *src);
6545 static BOOL test_conflict_owned_active_vs_replica(struct test_wrepl_conflict_conn *ctx)
6549 struct wrepl_wins_name wins_name_;
6550 struct wrepl_wins_name *wins_name = &wins_name_;
6551 struct nbt_name_register name_register_;
6552 struct nbt_name_register *name_register = &name_register_;
6553 struct nbt_name_release release_;
6554 struct nbt_name_release *release = &release_;
6556 struct test_conflict_owned_active_vs_replica_struct records[] = {
6558 * unique vs. unique section
6561 * unique,active vs. unique,active with same ip(s), unchecked
6564 .line = __location__,
6565 .name = _NBT_NAME("_UA_UA_SI_U", 0x00, NULL),
6569 .num_ips = ctx->addresses_best_num,
6570 .ips = ctx->addresses_best,
6571 .apply_expected = True
6577 .type = WREPL_TYPE_UNIQUE,
6578 .state = WREPL_STATE_ACTIVE,
6579 .node = WREPL_NODE_B,
6581 .num_ips = ctx->addresses_best_num,
6582 .ips = ctx->addresses_best,
6583 .apply_expected = True
6587 * unique,active vs. unique,active with different ip(s), positive response
6590 .line = __location__,
6591 .name = _NBT_NAME("_UA_UA_DI_P", 0x00, NULL),
6595 .num_ips = ctx->addresses_best_num,
6596 .ips = ctx->addresses_best,
6597 .apply_expected = True
6604 .type = WREPL_TYPE_UNIQUE,
6605 .state = WREPL_STATE_ACTIVE,
6606 .node = WREPL_NODE_B,
6608 .num_ips = ARRAY_SIZE(addresses_B_1),
6609 .ips = addresses_B_1,
6610 .apply_expected = False
6614 * unique,active vs. unique,active with different ip(s), positive response other ips
6617 .line = __location__,
6618 .name = _NBT_NAME("_UA_UA_DI_O", 0x00, NULL),
6622 .num_ips = ctx->addresses_best_num,
6623 .ips = ctx->addresses_best,
6624 .apply_expected = True
6629 .num_ips = ARRAY_SIZE(addresses_A_3_4),
6630 .ips = addresses_A_3_4,
6633 .type = WREPL_TYPE_UNIQUE,
6634 .state = WREPL_STATE_ACTIVE,
6635 .node = WREPL_NODE_B,
6637 .num_ips = ARRAY_SIZE(addresses_B_1),
6638 .ips = addresses_B_1,
6639 .apply_expected = False
6643 * unique,active vs. unique,active with different ip(s), negative response
6646 .line = __location__,
6647 .name = _NBT_NAME("_UA_UA_DI_N", 0x00, NULL),
6651 .num_ips = ctx->addresses_best_num,
6652 .ips = ctx->addresses_best,
6653 .apply_expected = True
6660 .type = WREPL_TYPE_UNIQUE,
6661 .state = WREPL_STATE_ACTIVE,
6662 .node = WREPL_NODE_B,
6664 .num_ips = ARRAY_SIZE(addresses_B_1),
6665 .ips = addresses_B_1,
6666 .apply_expected = True
6670 * unique,active vs. unique,tombstone with same ip(s), unchecked
6673 .line = __location__,
6674 .name = _NBT_NAME("_UA_UT_SI_U", 0x00, NULL),
6678 .num_ips = ctx->addresses_best_num,
6679 .ips = ctx->addresses_best,
6680 .apply_expected = True
6686 .type = WREPL_TYPE_UNIQUE,
6687 .state = WREPL_STATE_TOMBSTONE,
6688 .node = WREPL_NODE_B,
6690 .num_ips = ctx->addresses_best_num,
6691 .ips = ctx->addresses_best,
6692 .apply_expected = False
6696 * unique,active vs. unique,tombstone with different ip(s), unchecked
6699 .line = __location__,
6700 .name = _NBT_NAME("_UA_UT_DI_U", 0x00, NULL),
6704 .num_ips = ctx->addresses_best_num,
6705 .ips = ctx->addresses_best,
6706 .apply_expected = True
6712 .type = WREPL_TYPE_UNIQUE,
6713 .state = WREPL_STATE_TOMBSTONE,
6714 .node = WREPL_NODE_B,
6716 .num_ips = ARRAY_SIZE(addresses_B_1),
6717 .ips = addresses_B_1,
6718 .apply_expected = False
6722 * unique vs. group section
6725 * unique,active vs. group,active with same ip(s), release expected
6728 .line = __location__,
6729 .name = _NBT_NAME("_UA_GA_SI_R", 0x00, NULL),
6733 .num_ips = ctx->addresses_best_num,
6734 .ips = ctx->addresses_best,
6735 .apply_expected = True
6739 .expect_release = True,
6742 .type = WREPL_TYPE_GROUP,
6743 .state = WREPL_STATE_ACTIVE,
6744 .node = WREPL_NODE_B,
6746 .num_ips = ctx->addresses_best_num,
6747 .ips = ctx->addresses_best,
6748 .apply_expected = True
6752 * unique,active vs. group,active with different ip(s), release expected
6755 .line = __location__,
6756 .name = _NBT_NAME("_UA_GA_DI_R", 0x00, NULL),
6760 .num_ips = ctx->addresses_best_num,
6761 .ips = ctx->addresses_best,
6762 .apply_expected = True
6766 .expect_release = True,
6769 .type = WREPL_TYPE_GROUP,
6770 .state = WREPL_STATE_ACTIVE,
6771 .node = WREPL_NODE_B,
6773 .num_ips = ARRAY_SIZE(addresses_B_1),
6774 .ips = addresses_B_1,
6775 .apply_expected = True
6779 * unique,active vs. group,tombstone with same ip(s), unchecked
6782 .line = __location__,
6783 .name = _NBT_NAME("_UA_GT_SI_U", 0x00, NULL),
6787 .num_ips = ctx->addresses_best_num,
6788 .ips = ctx->addresses_best,
6789 .apply_expected = True
6795 .type = WREPL_TYPE_GROUP,
6796 .state = WREPL_STATE_TOMBSTONE,
6797 .node = WREPL_NODE_B,
6799 .num_ips = ctx->addresses_best_num,
6800 .ips = ctx->addresses_best,
6801 .apply_expected = False
6805 * unique,active vs. group,tombstone with different ip(s), unchecked
6808 .line = __location__,
6809 .name = _NBT_NAME("_UA_GT_DI_U", 0x00, NULL),
6813 .num_ips = ctx->addresses_best_num,
6814 .ips = ctx->addresses_best,
6815 .apply_expected = True
6821 .type = WREPL_TYPE_GROUP,
6822 .state = WREPL_STATE_TOMBSTONE,
6823 .node = WREPL_NODE_B,
6825 .num_ips = ARRAY_SIZE(addresses_B_1),
6826 .ips = addresses_B_1,
6827 .apply_expected = False
6831 * unique vs. special group section
6834 * unique,active vs. sgroup,active with same ip(s), release expected
6837 .line = __location__,
6838 .name = _NBT_NAME("_UA_SA_SI_R", 0x00, NULL),
6842 .num_ips = ctx->addresses_best_num,
6843 .ips = ctx->addresses_best,
6844 .apply_expected = True
6848 .expect_release = True,
6851 .type = WREPL_TYPE_SGROUP,
6852 .state = WREPL_STATE_ACTIVE,
6853 .node = WREPL_NODE_B,
6855 .num_ips = ctx->addresses_best_num,
6856 .ips = ctx->addresses_best,
6857 .apply_expected = True
6861 * unique,active vs. group,active with different ip(s), release expected
6864 .line = __location__,
6865 .name = _NBT_NAME("_UA_SA_DI_R", 0x00, NULL),
6869 .num_ips = ctx->addresses_best_num,
6870 .ips = ctx->addresses_best,
6871 .apply_expected = True
6875 .expect_release = True,
6878 .type = WREPL_TYPE_SGROUP,
6879 .state = WREPL_STATE_ACTIVE,
6880 .node = WREPL_NODE_B,
6882 .num_ips = ARRAY_SIZE(addresses_B_1),
6883 .ips = addresses_B_1,
6884 .apply_expected = True
6888 * unique,active vs. sgroup,tombstone with same ip(s), unchecked
6891 .line = __location__,
6892 .name = _NBT_NAME("_UA_ST_SI_U", 0x00, NULL),
6896 .num_ips = ctx->addresses_best_num,
6897 .ips = ctx->addresses_best,
6898 .apply_expected = True
6904 .type = WREPL_TYPE_SGROUP,
6905 .state = WREPL_STATE_TOMBSTONE,
6906 .node = WREPL_NODE_B,
6908 .num_ips = ctx->addresses_best_num,
6909 .ips = ctx->addresses_best,
6910 .apply_expected = False
6914 * unique,active vs. sgroup,tombstone with different ip(s), unchecked
6917 .line = __location__,
6918 .name = _NBT_NAME("_UA_ST_DI_U", 0x00, NULL),
6922 .num_ips = ctx->addresses_best_num,
6923 .ips = ctx->addresses_best,
6924 .apply_expected = True
6930 .type = WREPL_TYPE_SGROUP,
6931 .state = WREPL_STATE_TOMBSTONE,
6932 .node = WREPL_NODE_B,
6934 .num_ips = ARRAY_SIZE(addresses_B_1),
6935 .ips = addresses_B_1,
6936 .apply_expected = False
6940 * unique vs. multi homed section
6943 * unique,active vs. mhomed,active with same ip(s), unchecked
6946 .line = __location__,
6947 .name = _NBT_NAME("_UA_MA_SI_U", 0x00, NULL),
6951 .num_ips = ctx->addresses_best_num,
6952 .ips = ctx->addresses_best,
6953 .apply_expected = True
6959 .type = WREPL_TYPE_MHOMED,
6960 .state = WREPL_STATE_ACTIVE,
6961 .node = WREPL_NODE_B,
6963 .num_ips = ctx->addresses_best_num,
6964 .ips = ctx->addresses_best,
6965 .apply_expected = True
6969 * unique,active vs. mhomed,active with superset ip(s), unchecked
6972 .line = __location__,
6973 .name = _NBT_NAME("_UA_MA_SP_U", 0x00, NULL),
6977 .num_ips = ctx->addresses_best_num,
6978 .ips = ctx->addresses_best,
6979 .apply_expected = True
6985 .type = WREPL_TYPE_MHOMED,
6986 .state = WREPL_STATE_ACTIVE,
6987 .node = WREPL_NODE_B,
6989 .num_ips = ctx->addresses_all_num,
6990 .ips = ctx->addresses_all,
6991 .apply_expected = True
6995 * unique,active vs. mhomed,active with different ip(s), positive response
6998 .line = __location__,
6999 .name = _NBT_NAME("_UA_MA_DI_P", 0x00, NULL),
7003 .num_ips = ctx->addresses_best_num,
7004 .ips = ctx->addresses_best,
7005 .apply_expected = True
7012 .type = WREPL_TYPE_MHOMED,
7013 .state = WREPL_STATE_ACTIVE,
7014 .node = WREPL_NODE_B,
7016 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7017 .ips = addresses_B_3_4,
7018 .apply_expected = False
7022 * unique,active vs. mhomed,active with different ip(s), positive response other ips
7025 .line = __location__,
7026 .name = _NBT_NAME("_UA_MA_DI_O", 0x00, NULL),
7030 .num_ips = ctx->addresses_best_num,
7031 .ips = ctx->addresses_best,
7032 .apply_expected = True
7037 .num_ips = ARRAY_SIZE(addresses_A_3_4),
7038 .ips = addresses_A_3_4,
7041 .type = WREPL_TYPE_MHOMED,
7042 .state = WREPL_STATE_ACTIVE,
7043 .node = WREPL_NODE_B,
7045 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7046 .ips = addresses_B_3_4,
7047 .apply_expected = False
7051 * unique,active vs. mhomed,active with different ip(s), negative response
7054 .line = __location__,
7055 .name = _NBT_NAME("_UA_MA_DI_N", 0x00, NULL),
7059 .num_ips = ctx->addresses_best_num,
7060 .ips = ctx->addresses_best,
7061 .apply_expected = True
7068 .type = WREPL_TYPE_MHOMED,
7069 .state = WREPL_STATE_ACTIVE,
7070 .node = WREPL_NODE_B,
7072 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7073 .ips = addresses_B_3_4,
7074 .apply_expected = True
7078 * unique,active vs. mhomed,tombstone with same ip(s), unchecked
7081 .line = __location__,
7082 .name = _NBT_NAME("_UA_MT_SI_U", 0x00, NULL),
7086 .num_ips = ctx->addresses_best_num,
7087 .ips = ctx->addresses_best,
7088 .apply_expected = True
7094 .type = WREPL_TYPE_MHOMED,
7095 .state = WREPL_STATE_TOMBSTONE,
7096 .node = WREPL_NODE_B,
7098 .num_ips = ctx->addresses_best_num,
7099 .ips = ctx->addresses_best,
7100 .apply_expected = False
7104 * unique,active vs. mhomed,tombstone with different ip(s), unchecked
7107 .line = __location__,
7108 .name = _NBT_NAME("_UA_MT_DI_U", 0x00, NULL),
7112 .num_ips = ctx->addresses_best_num,
7113 .ips = ctx->addresses_best,
7114 .apply_expected = True
7120 .type = WREPL_TYPE_MHOMED,
7121 .state = WREPL_STATE_TOMBSTONE,
7122 .node = WREPL_NODE_B,
7124 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7125 .ips = addresses_B_3_4,
7126 .apply_expected = False
7130 * normal group vs. unique section
7133 * group,active vs. unique,active with same ip(s), unchecked
7136 .line = __location__,
7137 .name = _NBT_NAME("_GA_UA_SI_U", 0x00, NULL),
7139 .nb_flags = NBT_NM_GROUP,
7141 .num_ips = ctx->addresses_best_num,
7142 .ips = ctx->addresses_best,
7143 .apply_expected = True
7149 .type = WREPL_TYPE_UNIQUE,
7150 .state = WREPL_STATE_ACTIVE,
7151 .node = WREPL_NODE_B,
7153 .num_ips = ctx->addresses_best_num,
7154 .ips = ctx->addresses_best,
7155 .apply_expected = False
7159 * group,active vs. unique,active with different ip(s), unchecked
7162 .line = __location__,
7163 .name = _NBT_NAME("_GA_UA_DI_U", 0x00, NULL),
7165 .nb_flags = NBT_NM_GROUP,
7167 .num_ips = ctx->addresses_best_num,
7168 .ips = ctx->addresses_best,
7169 .apply_expected = True
7175 .type = WREPL_TYPE_UNIQUE,
7176 .state = WREPL_STATE_ACTIVE,
7177 .node = WREPL_NODE_B,
7179 .num_ips = ARRAY_SIZE(addresses_B_1),
7180 .ips = addresses_B_1,
7181 .apply_expected = False
7185 * group,active vs. unique,tombstone with same ip(s), unchecked
7188 .line = __location__,
7189 .name = _NBT_NAME("_GA_UT_SI_U", 0x00, NULL),
7191 .nb_flags = NBT_NM_GROUP,
7193 .num_ips = ctx->addresses_best_num,
7194 .ips = ctx->addresses_best,
7195 .apply_expected = True
7201 .type = WREPL_TYPE_UNIQUE,
7202 .state = WREPL_STATE_TOMBSTONE,
7203 .node = WREPL_NODE_B,
7205 .num_ips = ctx->addresses_best_num,
7206 .ips = ctx->addresses_best,
7207 .apply_expected = False
7211 * group,active vs. unique,tombstone with different ip(s), unchecked
7214 .line = __location__,
7215 .name = _NBT_NAME("_GA_UT_DI_U", 0x00, NULL),
7217 .nb_flags = NBT_NM_GROUP,
7219 .num_ips = ctx->addresses_best_num,
7220 .ips = ctx->addresses_best,
7221 .apply_expected = True
7227 .type = WREPL_TYPE_UNIQUE,
7228 .state = WREPL_STATE_TOMBSTONE,
7229 .node = WREPL_NODE_B,
7231 .num_ips = ARRAY_SIZE(addresses_B_1),
7232 .ips = addresses_B_1,
7233 .apply_expected = False
7237 * normal group vs. normal group section
7240 * group,active vs. group,active with same ip(s), unchecked
7243 .line = __location__,
7244 .name = _NBT_NAME("_GA_GA_SI_U", 0x00, NULL),
7246 .nb_flags = NBT_NM_GROUP,
7248 .num_ips = ctx->addresses_best_num,
7249 .ips = ctx->addresses_best,
7250 .apply_expected = True
7256 .type = WREPL_TYPE_GROUP,
7257 .state = WREPL_STATE_ACTIVE,
7258 .node = WREPL_NODE_B,
7260 .num_ips = ctx->addresses_best_num,
7261 .ips = ctx->addresses_best,
7262 .apply_expected = True
7266 * group,active vs. group,active with different ip(s), unchecked
7269 .line = __location__,
7270 .name = _NBT_NAME("_GA_GA_DI_U", 0x00, NULL),
7272 .nb_flags = NBT_NM_GROUP,
7274 .num_ips = ctx->addresses_best_num,
7275 .ips = ctx->addresses_best,
7276 .apply_expected = True
7282 .type = WREPL_TYPE_GROUP,
7283 .state = WREPL_STATE_ACTIVE,
7284 .node = WREPL_NODE_B,
7286 .num_ips = ARRAY_SIZE(addresses_B_1),
7287 .ips = addresses_B_1,
7288 .apply_expected = True
7292 * group,active vs. group,tombstone with same ip(s), unchecked
7295 .line = __location__,
7296 .name = _NBT_NAME("_GA_GT_SI_U", 0x00, NULL),
7298 .nb_flags = NBT_NM_GROUP,
7300 .num_ips = ctx->addresses_best_num,
7301 .ips = ctx->addresses_best,
7302 .apply_expected = True
7308 .type = WREPL_TYPE_GROUP,
7309 .state = WREPL_STATE_TOMBSTONE,
7310 .node = WREPL_NODE_B,
7312 .num_ips = ctx->addresses_best_num,
7313 .ips = ctx->addresses_best,
7314 .apply_expected = False
7318 * group,active vs. group,tombstone with different ip(s), unchecked
7321 .line = __location__,
7322 .name = _NBT_NAME("_GA_GT_DI_U", 0x00, NULL),
7324 .nb_flags = NBT_NM_GROUP,
7326 .num_ips = ctx->addresses_best_num,
7327 .ips = ctx->addresses_best,
7328 .apply_expected = True
7334 .type = WREPL_TYPE_GROUP,
7335 .state = WREPL_STATE_TOMBSTONE,
7336 .node = WREPL_NODE_B,
7338 .num_ips = ARRAY_SIZE(addresses_B_1),
7339 .ips = addresses_B_1,
7340 .apply_expected = False
7344 * normal group vs. special group section
7347 * group,active vs. sgroup,active with same ip(s), unchecked
7350 .line = __location__,
7351 .name = _NBT_NAME("_GA_SA_SI_U", 0x00, NULL),
7353 .nb_flags = NBT_NM_GROUP,
7355 .num_ips = ctx->addresses_best_num,
7356 .ips = ctx->addresses_best,
7357 .apply_expected = True
7363 .type = WREPL_TYPE_SGROUP,
7364 .state = WREPL_STATE_ACTIVE,
7365 .node = WREPL_NODE_B,
7367 .num_ips = ctx->addresses_best_num,
7368 .ips = ctx->addresses_best,
7369 .apply_expected = False
7373 * group,active vs. sgroup,active with different ip(s), unchecked
7376 .line = __location__,
7377 .name = _NBT_NAME("_GA_SA_DI_U", 0x00, NULL),
7379 .nb_flags = NBT_NM_GROUP,
7381 .num_ips = ctx->addresses_best_num,
7382 .ips = ctx->addresses_best,
7383 .apply_expected = True
7389 .type = WREPL_TYPE_SGROUP,
7390 .state = WREPL_STATE_ACTIVE,
7391 .node = WREPL_NODE_B,
7393 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7394 .ips = addresses_B_3_4,
7395 .apply_expected = False
7399 * group,active vs. sgroup,tombstone with same ip(s), unchecked
7402 .line = __location__,
7403 .name = _NBT_NAME("_GA_ST_SI_U", 0x00, NULL),
7405 .nb_flags = NBT_NM_GROUP,
7407 .num_ips = ctx->addresses_best_num,
7408 .ips = ctx->addresses_best,
7409 .apply_expected = True
7415 .type = WREPL_TYPE_SGROUP,
7416 .state = WREPL_STATE_TOMBSTONE,
7417 .node = WREPL_NODE_B,
7419 .num_ips = ctx->addresses_best_num,
7420 .ips = ctx->addresses_best,
7421 .apply_expected = False
7425 * group,active vs. sgroup,tombstone with different ip(s), unchecked
7428 .line = __location__,
7429 .name = _NBT_NAME("_GA_ST_DI_U", 0x00, NULL),
7431 .nb_flags = NBT_NM_GROUP,
7433 .num_ips = ctx->addresses_best_num,
7434 .ips = ctx->addresses_best,
7435 .apply_expected = True
7441 .type = WREPL_TYPE_SGROUP,
7442 .state = WREPL_STATE_TOMBSTONE,
7443 .node = WREPL_NODE_B,
7445 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7446 .ips = addresses_B_3_4,
7447 .apply_expected = False
7451 * normal group vs. multi homed section
7454 * group,active vs. mhomed,active with same ip(s), unchecked
7457 .line = __location__,
7458 .name = _NBT_NAME("_GA_MA_SI_U", 0x00, NULL),
7460 .nb_flags = NBT_NM_GROUP,
7462 .num_ips = ctx->addresses_best_num,
7463 .ips = ctx->addresses_best,
7464 .apply_expected = True
7470 .type = WREPL_TYPE_MHOMED,
7471 .state = WREPL_STATE_ACTIVE,
7472 .node = WREPL_NODE_B,
7474 .num_ips = ctx->addresses_best_num,
7475 .ips = ctx->addresses_best,
7476 .apply_expected = False
7480 * group,active vs. mhomed,active with different ip(s), unchecked
7483 .line = __location__,
7484 .name = _NBT_NAME("_GA_MA_DI_U", 0x00, NULL),
7486 .nb_flags = NBT_NM_GROUP,
7488 .num_ips = ctx->addresses_best_num,
7489 .ips = ctx->addresses_best,
7490 .apply_expected = True
7496 .type = WREPL_TYPE_MHOMED,
7497 .state = WREPL_STATE_ACTIVE,
7498 .node = WREPL_NODE_B,
7500 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7501 .ips = addresses_B_3_4,
7502 .apply_expected = False
7506 * group,active vs. mhomed,tombstone with same ip(s), unchecked
7509 .line = __location__,
7510 .name = _NBT_NAME("_GA_MT_SI_U", 0x00, NULL),
7512 .nb_flags = NBT_NM_GROUP,
7514 .num_ips = ctx->addresses_best_num,
7515 .ips = ctx->addresses_best,
7516 .apply_expected = True
7522 .type = WREPL_TYPE_MHOMED,
7523 .state = WREPL_STATE_TOMBSTONE,
7524 .node = WREPL_NODE_B,
7526 .num_ips = ctx->addresses_best_num,
7527 .ips = ctx->addresses_best,
7528 .apply_expected = False
7532 * group,active vs. mhomed,tombstone with different ip(s), unchecked
7535 .line = __location__,
7536 .name = _NBT_NAME("_GA_MT_DI_U", 0x00, NULL),
7538 .nb_flags = NBT_NM_GROUP,
7540 .num_ips = ctx->addresses_best_num,
7541 .ips = ctx->addresses_best,
7542 .apply_expected = True
7548 .type = WREPL_TYPE_MHOMED,
7549 .state = WREPL_STATE_TOMBSTONE,
7550 .node = WREPL_NODE_B,
7552 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7553 .ips = addresses_B_3_4,
7554 .apply_expected = False
7558 * special group vs. unique section
7561 * sgroup,active vs. unique,active with same ip(s), unchecked
7564 .line = __location__,
7565 .name = _NBT_NAME("_SA_UA_SI_U", 0x1C, NULL),
7567 .nb_flags = NBT_NM_GROUP,
7569 .num_ips = ctx->addresses_best_num,
7570 .ips = ctx->addresses_best,
7571 .apply_expected = True
7577 .type = WREPL_TYPE_UNIQUE,
7578 .state = WREPL_STATE_ACTIVE,
7579 .node = WREPL_NODE_B,
7581 .num_ips = ctx->addresses_best_num,
7582 .ips = ctx->addresses_best,
7583 .apply_expected = False
7587 * sgroup,active vs. unique,active with different ip(s), unchecked
7590 .line = __location__,
7591 .name = _NBT_NAME("_SA_UA_DI_U", 0x1C, NULL),
7593 .nb_flags = NBT_NM_GROUP,
7595 .num_ips = ctx->addresses_best_num,
7596 .ips = ctx->addresses_best,
7597 .apply_expected = True
7603 .type = WREPL_TYPE_UNIQUE,
7604 .state = WREPL_STATE_ACTIVE,
7605 .node = WREPL_NODE_B,
7607 .num_ips = ARRAY_SIZE(addresses_B_1),
7608 .ips = addresses_B_1,
7609 .apply_expected = False
7613 * sgroup,active vs. unique,tombstone with same ip(s), unchecked
7616 .line = __location__,
7617 .name = _NBT_NAME("_SA_UT_SI_U", 0x1C, NULL),
7619 .nb_flags = NBT_NM_GROUP,
7621 .num_ips = ctx->addresses_best_num,
7622 .ips = ctx->addresses_best,
7623 .apply_expected = True
7629 .type = WREPL_TYPE_UNIQUE,
7630 .state = WREPL_STATE_TOMBSTONE,
7631 .node = WREPL_NODE_B,
7633 .num_ips = ctx->addresses_best_num,
7634 .ips = ctx->addresses_best,
7635 .apply_expected = False
7639 * sgroup,active vs. unique,tombstone with different ip(s), unchecked
7642 .line = __location__,
7643 .name = _NBT_NAME("_SA_UT_DI_U", 0x1C, NULL),
7645 .nb_flags = NBT_NM_GROUP,
7647 .num_ips = ctx->addresses_best_num,
7648 .ips = ctx->addresses_best,
7649 .apply_expected = True
7655 .type = WREPL_TYPE_UNIQUE,
7656 .state = WREPL_STATE_TOMBSTONE,
7657 .node = WREPL_NODE_B,
7659 .num_ips = ARRAY_SIZE(addresses_B_1),
7660 .ips = addresses_B_1,
7661 .apply_expected = False
7665 * special group vs. normal group section
7668 * sgroup,active vs. group,active with same ip(s), unchecked
7671 .line = __location__,
7672 .name = _NBT_NAME("_SA_GA_SI_U", 0x1C, NULL),
7674 .nb_flags = NBT_NM_GROUP,
7676 .num_ips = ctx->addresses_best_num,
7677 .ips = ctx->addresses_best,
7678 .apply_expected = True
7684 .type = WREPL_TYPE_GROUP,
7685 .state = WREPL_STATE_ACTIVE,
7686 .node = WREPL_NODE_B,
7688 .num_ips = ctx->addresses_best_num,
7689 .ips = ctx->addresses_best,
7690 .apply_expected = False
7694 * sgroup,active vs. group,active with different ip(s), unchecked
7697 .line = __location__,
7698 .name = _NBT_NAME("_SA_GA_DI_U", 0x1C, NULL),
7700 .nb_flags = NBT_NM_GROUP,
7702 .num_ips = ctx->addresses_best_num,
7703 .ips = ctx->addresses_best,
7704 .apply_expected = True
7710 .type = WREPL_TYPE_GROUP,
7711 .state = WREPL_STATE_ACTIVE,
7712 .node = WREPL_NODE_B,
7714 .num_ips = ARRAY_SIZE(addresses_B_1),
7715 .ips = addresses_B_1,
7716 .apply_expected = False
7720 * sgroup,active vs. group,tombstone with same ip(s), unchecked
7723 .line = __location__,
7724 .name = _NBT_NAME("_SA_GT_SI_U", 0x1C, NULL),
7726 .nb_flags = NBT_NM_GROUP,
7728 .num_ips = ctx->addresses_best_num,
7729 .ips = ctx->addresses_best,
7730 .apply_expected = True
7736 .type = WREPL_TYPE_GROUP,
7737 .state = WREPL_STATE_TOMBSTONE,
7738 .node = WREPL_NODE_B,
7740 .num_ips = ctx->addresses_best_num,
7741 .ips = ctx->addresses_best,
7742 .apply_expected = False
7746 * sgroup,active vs. group,tombstone with different ip(s), unchecked
7749 .line = __location__,
7750 .name = _NBT_NAME("_SA_GT_DI_U", 0x1C, NULL),
7752 .nb_flags = NBT_NM_GROUP,
7754 .num_ips = ctx->addresses_best_num,
7755 .ips = ctx->addresses_best,
7756 .apply_expected = True
7762 .type = WREPL_TYPE_GROUP,
7763 .state = WREPL_STATE_TOMBSTONE,
7764 .node = WREPL_NODE_B,
7766 .num_ips = ARRAY_SIZE(addresses_B_1),
7767 .ips = addresses_B_1,
7768 .apply_expected = False
7772 * special group vs. multi homed section
7775 * sgroup,active vs. mhomed,active with same ip(s), unchecked
7778 .line = __location__,
7779 .name = _NBT_NAME("_SA_MA_SI_U", 0x1C, NULL),
7781 .nb_flags = NBT_NM_GROUP,
7783 .num_ips = ctx->addresses_best_num,
7784 .ips = ctx->addresses_best,
7785 .apply_expected = True
7791 .type = WREPL_TYPE_MHOMED,
7792 .state = WREPL_STATE_ACTIVE,
7793 .node = WREPL_NODE_B,
7795 .num_ips = ctx->addresses_best_num,
7796 .ips = ctx->addresses_best,
7797 .apply_expected = False
7801 * sgroup,active vs. mhomed,active with different ip(s), unchecked
7804 .line = __location__,
7805 .name = _NBT_NAME("_SA_MA_DI_U", 0x1C, NULL),
7807 .nb_flags = NBT_NM_GROUP,
7809 .num_ips = ctx->addresses_best_num,
7810 .ips = ctx->addresses_best,
7811 .apply_expected = True
7817 .type = WREPL_TYPE_MHOMED,
7818 .state = WREPL_STATE_ACTIVE,
7819 .node = WREPL_NODE_B,
7821 .num_ips = ARRAY_SIZE(addresses_B_1),
7822 .ips = addresses_B_1,
7823 .apply_expected = False
7827 * sgroup,active vs. mhomed,tombstone with same ip(s), unchecked
7830 .line = __location__,
7831 .name = _NBT_NAME("_SA_MT_SI_U", 0x1C, NULL),
7833 .nb_flags = NBT_NM_GROUP,
7835 .num_ips = ctx->addresses_best_num,
7836 .ips = ctx->addresses_best,
7837 .apply_expected = True
7843 .type = WREPL_TYPE_MHOMED,
7844 .state = WREPL_STATE_TOMBSTONE,
7845 .node = WREPL_NODE_B,
7847 .num_ips = ctx->addresses_best_num,
7848 .ips = ctx->addresses_best,
7849 .apply_expected = False
7853 * sgroup,active vs. mhomed,tombstone with different ip(s), unchecked
7856 .line = __location__,
7857 .name = _NBT_NAME("_SA_MT_DI_U", 0x1C, NULL),
7859 .nb_flags = NBT_NM_GROUP,
7861 .num_ips = ctx->addresses_best_num,
7862 .ips = ctx->addresses_best,
7863 .apply_expected = True
7869 .type = WREPL_TYPE_MHOMED,
7870 .state = WREPL_STATE_TOMBSTONE,
7871 .node = WREPL_NODE_B,
7873 .num_ips = ARRAY_SIZE(addresses_B_1),
7874 .ips = addresses_B_1,
7875 .apply_expected = False
7879 * multi homed vs. unique section
7882 * mhomed,active vs. unique,active with same ip(s), unchecked
7885 .line = __location__,
7886 .name = _NBT_NAME("_MA_UA_SI_U", 0x00, NULL),
7890 .num_ips = ctx->addresses_best_num,
7891 .ips = ctx->addresses_best,
7892 .apply_expected = True
7898 .type = WREPL_TYPE_UNIQUE,
7899 .state = WREPL_STATE_ACTIVE,
7900 .node = WREPL_NODE_B,
7902 .num_ips = ctx->addresses_best_num,
7903 .ips = ctx->addresses_best,
7904 .apply_expected = True
7908 * mhomed,active vs. unique,active with different ip(s), positive response
7911 .line = __location__,
7912 .name = _NBT_NAME("_MA_UA_DI_P", 0x00, NULL),
7916 .num_ips = ctx->addresses_best_num,
7917 .ips = ctx->addresses_best,
7918 .apply_expected = True
7925 .type = WREPL_TYPE_UNIQUE,
7926 .state = WREPL_STATE_ACTIVE,
7927 .node = WREPL_NODE_B,
7929 .num_ips = ARRAY_SIZE(addresses_B_1),
7930 .ips = addresses_B_1,
7931 .apply_expected = False
7935 * mhomed,active vs. unique,active with different ip(s), positive response other ips
7938 .line = __location__,
7939 .name = _NBT_NAME("_MA_UA_DI_O", 0x00, NULL),
7943 .num_ips = ctx->addresses_best_num,
7944 .ips = ctx->addresses_best,
7945 .apply_expected = True
7950 .num_ips = ARRAY_SIZE(addresses_A_3_4),
7951 .ips = addresses_A_3_4,
7954 .type = WREPL_TYPE_UNIQUE,
7955 .state = WREPL_STATE_ACTIVE,
7956 .node = WREPL_NODE_B,
7958 .num_ips = ARRAY_SIZE(addresses_B_1),
7959 .ips = addresses_B_1,
7960 .apply_expected = False
7964 * mhomed,active vs. unique,active with different ip(s), negative response
7967 .line = __location__,
7968 .name = _NBT_NAME("_MA_UA_DI_N", 0x00, NULL),
7972 .num_ips = ctx->addresses_best_num,
7973 .ips = ctx->addresses_best,
7974 .apply_expected = True
7981 .type = WREPL_TYPE_UNIQUE,
7982 .state = WREPL_STATE_ACTIVE,
7983 .node = WREPL_NODE_B,
7985 .num_ips = ARRAY_SIZE(addresses_B_1),
7986 .ips = addresses_B_1,
7987 .apply_expected = True
7991 * mhomed,active vs. unique,tombstone with same ip(s), unchecked
7994 .line = __location__,
7995 .name = _NBT_NAME("_MA_UT_SI_U", 0x00, NULL),
7999 .num_ips = ctx->addresses_best_num,
8000 .ips = ctx->addresses_best,
8001 .apply_expected = True
8007 .type = WREPL_TYPE_UNIQUE,
8008 .state = WREPL_STATE_TOMBSTONE,
8009 .node = WREPL_NODE_B,
8011 .num_ips = ctx->addresses_best_num,
8012 .ips = ctx->addresses_best,
8013 .apply_expected = False
8017 * mhomed,active vs. unique,tombstone with different ip(s), unchecked
8020 .line = __location__,
8021 .name = _NBT_NAME("_MA_UT_DI_U", 0x00, NULL),
8025 .num_ips = ctx->addresses_best_num,
8026 .ips = ctx->addresses_best,
8027 .apply_expected = True
8033 .type = WREPL_TYPE_UNIQUE,
8034 .state = WREPL_STATE_TOMBSTONE,
8035 .node = WREPL_NODE_B,
8037 .num_ips = ARRAY_SIZE(addresses_B_1),
8038 .ips = addresses_B_1,
8039 .apply_expected = False
8043 * multi homed vs. normal group section
8046 * mhomed,active vs. group,active with same ip(s), release expected
8049 .line = __location__,
8050 .name = _NBT_NAME("_MA_GA_SI_R", 0x00, NULL),
8054 .num_ips = ctx->addresses_best_num,
8055 .ips = ctx->addresses_best,
8056 .apply_expected = True
8060 .expect_release = True,
8063 .type = WREPL_TYPE_GROUP,
8064 .state = WREPL_STATE_ACTIVE,
8065 .node = WREPL_NODE_B,
8067 .num_ips = ctx->addresses_best_num,
8068 .ips = ctx->addresses_best,
8069 .apply_expected = True
8073 * mhomed,active vs. group,active with different ip(s), release expected
8076 .line = __location__,
8077 .name = _NBT_NAME("_MA_GA_DI_R", 0x00, NULL),
8081 .num_ips = ctx->addresses_best_num,
8082 .ips = ctx->addresses_best,
8083 .apply_expected = True
8087 .expect_release = True,
8090 .type = WREPL_TYPE_GROUP,
8091 .state = WREPL_STATE_ACTIVE,
8092 .node = WREPL_NODE_B,
8094 .num_ips = ARRAY_SIZE(addresses_B_1),
8095 .ips = addresses_B_1,
8096 .apply_expected = True
8100 * mhomed,active vs. group,tombstone with same ip(s), unchecked
8103 .line = __location__,
8104 .name = _NBT_NAME("_MA_GT_SI_U", 0x00, NULL),
8108 .num_ips = ctx->addresses_best_num,
8109 .ips = ctx->addresses_best,
8110 .apply_expected = True
8116 .type = WREPL_TYPE_GROUP,
8117 .state = WREPL_STATE_TOMBSTONE,
8118 .node = WREPL_NODE_B,
8120 .num_ips = ctx->addresses_best_num,
8121 .ips = ctx->addresses_best,
8122 .apply_expected = False
8126 * mhomed,active vs. group,tombstone with different ip(s), unchecked
8129 .line = __location__,
8130 .name = _NBT_NAME("_MA_GT_DI_U", 0x00, NULL),
8134 .num_ips = ctx->addresses_best_num,
8135 .ips = ctx->addresses_best,
8136 .apply_expected = True
8142 .type = WREPL_TYPE_GROUP,
8143 .state = WREPL_STATE_TOMBSTONE,
8144 .node = WREPL_NODE_B,
8146 .num_ips = ARRAY_SIZE(addresses_B_1),
8147 .ips = addresses_B_1,
8148 .apply_expected = False
8152 * multi homed vs. special group section
8155 * mhomed,active vs. sgroup,active with same ip(s), release expected
8158 .line = __location__,
8159 .name = _NBT_NAME("_MA_SA_SI_R", 0x00, NULL),
8163 .num_ips = ctx->addresses_best_num,
8164 .ips = ctx->addresses_best,
8165 .apply_expected = True
8169 .expect_release = True,
8172 .type = WREPL_TYPE_SGROUP,
8173 .state = WREPL_STATE_ACTIVE,
8174 .node = WREPL_NODE_B,
8176 .num_ips = ctx->addresses_best_num,
8177 .ips = ctx->addresses_best,
8178 .apply_expected = True
8182 * mhomed,active vs. group,active with different ip(s), release expected
8185 .line = __location__,
8186 .name = _NBT_NAME("_MA_SA_DI_R", 0x00, NULL),
8190 .num_ips = ctx->addresses_best_num,
8191 .ips = ctx->addresses_best,
8192 .apply_expected = True
8196 .expect_release = True,
8199 .type = WREPL_TYPE_SGROUP,
8200 .state = WREPL_STATE_ACTIVE,
8201 .node = WREPL_NODE_B,
8203 .num_ips = ARRAY_SIZE(addresses_B_1),
8204 .ips = addresses_B_1,
8205 .apply_expected = True
8209 * mhomed,active vs. sgroup,tombstone with same ip(s), unchecked
8212 .line = __location__,
8213 .name = _NBT_NAME("_MA_ST_SI_U", 0x00, NULL),
8217 .num_ips = ctx->addresses_best_num,
8218 .ips = ctx->addresses_best,
8219 .apply_expected = True
8225 .type = WREPL_TYPE_SGROUP,
8226 .state = WREPL_STATE_TOMBSTONE,
8227 .node = WREPL_NODE_B,
8229 .num_ips = ctx->addresses_best_num,
8230 .ips = ctx->addresses_best,
8231 .apply_expected = False
8235 * mhomed,active vs. sgroup,tombstone with different ip(s), unchecked
8238 .line = __location__,
8239 .name = _NBT_NAME("_MA_ST_DI_U", 0x00, NULL),
8243 .num_ips = ctx->addresses_best_num,
8244 .ips = ctx->addresses_best,
8245 .apply_expected = True
8251 .type = WREPL_TYPE_SGROUP,
8252 .state = WREPL_STATE_TOMBSTONE,
8253 .node = WREPL_NODE_B,
8255 .num_ips = ARRAY_SIZE(addresses_B_1),
8256 .ips = addresses_B_1,
8257 .apply_expected = False
8261 * multi homed vs. multi homed section
8264 * mhomed,active vs. mhomed,active with same ip(s), unchecked
8267 .line = __location__,
8268 .name = _NBT_NAME("_MA_MA_SI_U", 0x00, NULL),
8272 .num_ips = ctx->addresses_best_num,
8273 .ips = ctx->addresses_best,
8274 .apply_expected = True
8280 .type = WREPL_TYPE_MHOMED,
8281 .state = WREPL_STATE_ACTIVE,
8282 .node = WREPL_NODE_B,
8284 .num_ips = ctx->addresses_best_num,
8285 .ips = ctx->addresses_best,
8286 .apply_expected = True
8290 * mhomed,active vs. mhomed,active with superset ip(s), unchecked
8293 .line = __location__,
8294 .name = _NBT_NAME("_MA_MA_SP_U", 0x00, NULL),
8298 .num_ips = ctx->addresses_best_num,
8299 .ips = ctx->addresses_best,
8300 .apply_expected = True
8306 .type = WREPL_TYPE_MHOMED,
8307 .state = WREPL_STATE_ACTIVE,
8308 .node = WREPL_NODE_B,
8310 .num_ips = ctx->addresses_all_num,
8311 .ips = ctx->addresses_all,
8312 .apply_expected = True
8316 * mhomed,active vs. mhomed,active with different ip(s), positive response
8319 .line = __location__,
8320 .name = _NBT_NAME("_MA_MA_DI_P", 0x00, NULL),
8324 .num_ips = ctx->addresses_best_num,
8325 .ips = ctx->addresses_best,
8326 .apply_expected = True
8333 .type = WREPL_TYPE_MHOMED,
8334 .state = WREPL_STATE_ACTIVE,
8335 .node = WREPL_NODE_B,
8337 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8338 .ips = addresses_B_3_4,
8339 .apply_expected = False
8343 * mhomed,active vs. mhomed,active with different ip(s), positive response other ips
8346 .line = __location__,
8347 .name = _NBT_NAME("_MA_MA_DI_O", 0x00, NULL),
8351 .num_ips = ctx->addresses_best_num,
8352 .ips = ctx->addresses_best,
8353 .apply_expected = True
8358 .num_ips = ARRAY_SIZE(addresses_A_3_4),
8359 .ips = addresses_A_3_4,
8362 .type = WREPL_TYPE_MHOMED,
8363 .state = WREPL_STATE_ACTIVE,
8364 .node = WREPL_NODE_B,
8366 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8367 .ips = addresses_B_3_4,
8368 .apply_expected = False
8372 * mhomed,active vs. mhomed,active with different ip(s), negative response
8375 .line = __location__,
8376 .name = _NBT_NAME("_MA_MA_DI_N", 0x00, NULL),
8380 .num_ips = ctx->addresses_best_num,
8381 .ips = ctx->addresses_best,
8382 .apply_expected = True
8389 .type = WREPL_TYPE_MHOMED,
8390 .state = WREPL_STATE_ACTIVE,
8391 .node = WREPL_NODE_B,
8393 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8394 .ips = addresses_B_3_4,
8395 .apply_expected = True
8399 * mhomed,active vs. mhomed,tombstone with same ip(s), unchecked
8402 .line = __location__,
8403 .name = _NBT_NAME("_MA_MT_SI_U", 0x00, NULL),
8407 .num_ips = ctx->addresses_best_num,
8408 .ips = ctx->addresses_best,
8409 .apply_expected = True
8415 .type = WREPL_TYPE_MHOMED,
8416 .state = WREPL_STATE_TOMBSTONE,
8417 .node = WREPL_NODE_B,
8419 .num_ips = ctx->addresses_best_num,
8420 .ips = ctx->addresses_best,
8421 .apply_expected = False
8425 * mhomed,active vs. mhomed,tombstone with different ip(s), unchecked
8428 .line = __location__,
8429 .name = _NBT_NAME("_MA_MT_DI_U", 0x00, NULL),
8433 .num_ips = ctx->addresses_best_num,
8434 .ips = ctx->addresses_best,
8435 .apply_expected = True
8441 .type = WREPL_TYPE_MHOMED,
8442 .state = WREPL_STATE_TOMBSTONE,
8443 .node = WREPL_NODE_B,
8445 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8446 .ips = addresses_B_3_4,
8447 .apply_expected = False
8451 * some more multi homed test, including merging
8454 * mhomed,active vs. mhomed,active with superset ip(s), unchecked
8457 .line = __location__,
8458 .section= "Test Replica vs. owned active: some more MHOMED combinations",
8459 .name = _NBT_NAME("_MA_MA_SP_U", 0x00, NULL),
8460 .comment= "C:MHOMED vs. B:ALL => B:ALL",
8461 .skip = (ctx->addresses_all_num < 3),
8465 .num_ips = ctx->addresses_mhomed_num,
8466 .ips = ctx->addresses_mhomed,
8467 .apply_expected = True
8473 .type = WREPL_TYPE_MHOMED,
8474 .state = WREPL_STATE_ACTIVE,
8475 .node = WREPL_NODE_B,
8477 .num_ips = ctx->addresses_all_num,
8478 .ips = ctx->addresses_all,
8479 .apply_expected = True
8483 * mhomed,active vs. mhomed,active with same ips, unchecked
8486 .line = __location__,
8487 .name = _NBT_NAME("_MA_MA_SM_U", 0x00, NULL),
8488 .comment= "C:MHOMED vs. B:MHOMED => B:MHOMED",
8489 .skip = (ctx->addresses_mhomed_num < 2),
8493 .num_ips = ctx->addresses_mhomed_num,
8494 .ips = ctx->addresses_mhomed,
8495 .apply_expected = True
8501 .type = WREPL_TYPE_MHOMED,
8502 .state = WREPL_STATE_ACTIVE,
8503 .node = WREPL_NODE_B,
8505 .num_ips = ctx->addresses_mhomed_num,
8506 .ips = ctx->addresses_mhomed,
8507 .apply_expected = True
8511 * mhomed,active vs. mhomed,active with subset ip(s), positive response
8514 .line = __location__,
8515 .name = _NBT_NAME("_MA_MA_SB_P", 0x00, NULL),
8516 .comment= "C:MHOMED vs. B:BEST (C:MHOMED) => B:MHOMED",
8517 .skip = (ctx->addresses_mhomed_num < 2),
8521 .num_ips = ctx->addresses_mhomed_num,
8522 .ips = ctx->addresses_mhomed,
8523 .apply_expected = True
8530 .type = WREPL_TYPE_MHOMED,
8531 .state = WREPL_STATE_ACTIVE,
8532 .node = WREPL_NODE_B,
8534 .num_ips = ctx->addresses_best_num,
8535 .ips = ctx->addresses_best,
8536 .mhomed_merge = True
8540 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with all addresses
8543 .line = __location__,
8544 .name = _NBT_NAME("_MA_MA_SB_A", 0x00, NULL),
8545 .comment= "C:MHOMED vs. B:BEST (C:ALL) => B:MHOMED",
8546 .skip = (ctx->addresses_all_num < 3),
8550 .num_ips = ctx->addresses_mhomed_num,
8551 .ips = ctx->addresses_mhomed,
8552 .apply_expected = True
8557 .num_ips = ctx->addresses_all_num,
8558 .ips = ctx->addresses_all,
8561 .type = WREPL_TYPE_MHOMED,
8562 .state = WREPL_STATE_ACTIVE,
8563 .node = WREPL_NODE_B,
8565 .num_ips = ctx->addresses_best_num,
8566 .ips = ctx->addresses_best,
8567 .mhomed_merge = True
8571 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with replicas addresses
8572 * TODO: check why the server sends a name release demand for one address?
8573 * the release demand has no effect to the database record...
8576 .line = __location__,
8577 .name = _NBT_NAME("_MA_MA_SB_PRA", 0x00, NULL),
8578 .comment= "C:MHOMED vs. B:BEST (C:BEST) => C:MHOMED",
8579 .skip = (ctx->addresses_all_num < 2),
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),
8610 .comment= "C:MHOMED vs. B:BEST (B:B_3_4) =>C:MHOMED",
8611 .skip = (ctx->addresses_all_num < 2),
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 .comment= "C:MHOMED vs. B:BEST (NEGATIVE) => B:BEST",
8642 .skip = (ctx->addresses_mhomed_num < 2),
8646 .num_ips = ctx->addresses_mhomed_num,
8647 .ips = ctx->addresses_mhomed,
8648 .apply_expected = True
8655 .type = WREPL_TYPE_MHOMED,
8656 .state = WREPL_STATE_ACTIVE,
8657 .node = WREPL_NODE_B,
8659 .num_ips = ctx->addresses_best_num,
8660 .ips = ctx->addresses_best,
8661 .apply_expected = True
8665 * some more multi homed and unique test, including merging
8668 * mhomed,active vs. unique,active with subset ip(s), positive response
8671 .line = __location__,
8672 .section= "Test Replica vs. owned active: some more UNIQUE,MHOMED combinations",
8673 .name = _NBT_NAME("_MA_UA_SB_P", 0x00, NULL),
8674 .comment= "C:MHOMED vs. B:UNIQUE,BEST (C:MHOMED) => B:MHOMED",
8675 .skip = (ctx->addresses_all_num < 2),
8679 .num_ips = ctx->addresses_mhomed_num,
8680 .ips = ctx->addresses_mhomed,
8681 .apply_expected = True
8688 .type = WREPL_TYPE_UNIQUE,
8689 .state = WREPL_STATE_ACTIVE,
8690 .node = WREPL_NODE_B,
8692 .num_ips = ctx->addresses_best_num,
8693 .ips = ctx->addresses_best,
8694 .mhomed_merge = True
8698 * unique,active vs. unique,active with different ip(s), positive response, with replicas address
8699 * TODO: check why the server sends a name release demand for one address?
8700 * the release demand has no effect to the database record...
8703 .line = __location__,
8704 .name = _NBT_NAME("_UA_UA_DI_PRA", 0x00, NULL),
8705 .comment= "C:BEST vs. B:BEST2 (C:BEST2,LR:BEST2) => C:BEST",
8706 .skip = (ctx->addresses_all_num < 2),
8710 .num_ips = ctx->addresses_best_num,
8711 .ips = ctx->addresses_best,
8712 .apply_expected = True
8717 .num_ips = ctx->addresses_best2_num,
8718 .ips = ctx->addresses_best2,
8719 .late_release = True
8722 .type = WREPL_TYPE_UNIQUE,
8723 .state = WREPL_STATE_ACTIVE,
8724 .node = WREPL_NODE_B,
8726 .num_ips = ctx->addresses_best2_num,
8727 .ips = ctx->addresses_best2,
8728 .apply_expected = False,
8732 * unique,active vs. unique,active with different ip(s), positive response, with all addresses
8735 .line = __location__,
8736 .name = _NBT_NAME("_UA_UA_DI_A", 0x00, NULL),
8737 .comment= "C:BEST vs. B:BEST2 (C:ALL) => B:MHOMED",
8738 .skip = (ctx->addresses_all_num < 3),
8742 .num_ips = ctx->addresses_best_num,
8743 .ips = ctx->addresses_best,
8744 .apply_expected = True
8749 .num_ips = ctx->addresses_all_num,
8750 .ips = ctx->addresses_all,
8753 .type = WREPL_TYPE_UNIQUE,
8754 .state = WREPL_STATE_ACTIVE,
8755 .node = WREPL_NODE_B,
8757 .num_ips = ctx->addresses_best2_num,
8758 .ips = ctx->addresses_best2,
8759 .mhomed_merge = True,
8763 * unique,active vs. mhomed,active with different ip(s), positive response, with all addresses
8766 .line = __location__,
8767 .name = _NBT_NAME("_UA_MA_DI_A", 0x00, NULL),
8768 .comment= "C:BEST vs. B:BEST2 (C:ALL) => B:MHOMED",
8769 .skip = (ctx->addresses_all_num < 3),
8773 .num_ips = ctx->addresses_best_num,
8774 .ips = ctx->addresses_best,
8775 .apply_expected = True
8780 .num_ips = ctx->addresses_all_num,
8781 .ips = ctx->addresses_all,
8784 .type = WREPL_TYPE_MHOMED,
8785 .state = WREPL_STATE_ACTIVE,
8786 .node = WREPL_NODE_B,
8788 .num_ips = ctx->addresses_best2_num,
8789 .ips = ctx->addresses_best2,
8790 .mhomed_merge = True,
8794 * special group vs. special group merging section
8797 * sgroup,active vs. sgroup,active with different ip(s)
8800 .line = __location__,
8801 .section= "Test Replica vs. owned active: SGROUP vs. SGROUP tests",
8802 .name = _NBT_NAME("_SA_SA_DI_U", 0x1C, NULL),
8803 .skip = (ctx->addresses_all_num < 3),
8805 .nb_flags = NBT_NM_GROUP,
8807 .num_ips = ctx->addresses_mhomed_num,
8808 .ips = ctx->addresses_mhomed,
8809 .apply_expected = True
8815 .type = WREPL_TYPE_SGROUP,
8816 .state = WREPL_STATE_ACTIVE,
8817 .node = WREPL_NODE_B,
8819 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8820 .ips = addresses_B_3_4,
8821 .sgroup_merge = True
8825 * sgroup,active vs. sgroup,active with same ip(s)
8828 .line = __location__,
8829 .name = _NBT_NAME("_SA_SA_SI_U", 0x1C, NULL),
8830 .skip = (ctx->addresses_all_num < 3),
8832 .nb_flags = NBT_NM_GROUP,
8834 .num_ips = ctx->addresses_mhomed_num,
8835 .ips = ctx->addresses_mhomed,
8836 .apply_expected = True
8842 .type = WREPL_TYPE_SGROUP,
8843 .state = WREPL_STATE_ACTIVE,
8844 .node = WREPL_NODE_B,
8846 .num_ips = ctx->addresses_mhomed_num,
8847 .ips = ctx->addresses_mhomed,
8848 .sgroup_merge = True
8852 * sgroup,active vs. sgroup,active with superset ip(s)
8855 .line = __location__,
8856 .name = _NBT_NAME("_SA_SA_SP_U", 0x1C, NULL),
8857 .skip = (ctx->addresses_all_num < 3),
8859 .nb_flags = NBT_NM_GROUP,
8861 .num_ips = ctx->addresses_mhomed_num,
8862 .ips = ctx->addresses_mhomed,
8863 .apply_expected = True
8869 .type = WREPL_TYPE_SGROUP,
8870 .state = WREPL_STATE_ACTIVE,
8871 .node = WREPL_NODE_B,
8873 .num_ips = ctx->addresses_all_num,
8874 .ips = ctx->addresses_all,
8875 .sgroup_merge = True
8879 * sgroup,active vs. sgroup,active with subset ip(s)
8882 .line = __location__,
8883 .name = _NBT_NAME("_SA_SA_SB_U", 0x1C, NULL),
8884 .skip = (ctx->addresses_all_num < 3),
8886 .nb_flags = NBT_NM_GROUP,
8888 .num_ips = ctx->addresses_mhomed_num,
8889 .ips = ctx->addresses_mhomed,
8890 .apply_expected = True
8896 .type = WREPL_TYPE_SGROUP,
8897 .state = WREPL_STATE_ACTIVE,
8898 .node = WREPL_NODE_B,
8900 .num_ips = ctx->addresses_best_num,
8901 .ips = ctx->addresses_best,
8902 .sgroup_merge = True
8906 * sgroup,active vs. sgroup,tombstone with different ip(s)
8909 .line = __location__,
8910 .name = _NBT_NAME("_SA_ST_DI_U", 0x1C, NULL),
8911 .skip = (ctx->addresses_all_num < 3),
8913 .nb_flags = NBT_NM_GROUP,
8915 .num_ips = ctx->addresses_mhomed_num,
8916 .ips = ctx->addresses_mhomed,
8917 .apply_expected = True
8923 .type = WREPL_TYPE_SGROUP,
8924 .state = WREPL_STATE_TOMBSTONE,
8925 .node = WREPL_NODE_B,
8927 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8928 .ips = addresses_B_3_4,
8929 .apply_expected = False
8933 * sgroup,active vs. sgroup,tombstone with same ip(s)
8936 .line = __location__,
8937 .name = _NBT_NAME("_SA_ST_SI_U", 0x1C, NULL),
8938 .skip = (ctx->addresses_all_num < 3),
8940 .nb_flags = NBT_NM_GROUP,
8942 .num_ips = ctx->addresses_mhomed_num,
8943 .ips = ctx->addresses_mhomed,
8944 .apply_expected = True
8950 .type = WREPL_TYPE_SGROUP,
8951 .state = WREPL_STATE_TOMBSTONE,
8952 .node = WREPL_NODE_B,
8954 .num_ips = ctx->addresses_mhomed_num,
8955 .ips = ctx->addresses_mhomed,
8956 .apply_expected = False
8960 * sgroup,active vs. sgroup,tombstone with superset ip(s)
8963 .line = __location__,
8964 .name = _NBT_NAME("_SA_ST_SP_U", 0x1C, NULL),
8965 .skip = (ctx->addresses_all_num < 3),
8967 .nb_flags = NBT_NM_GROUP,
8969 .num_ips = ctx->addresses_mhomed_num,
8970 .ips = ctx->addresses_mhomed,
8971 .apply_expected = True
8977 .type = WREPL_TYPE_SGROUP,
8978 .state = WREPL_STATE_TOMBSTONE,
8979 .node = WREPL_NODE_B,
8981 .num_ips = ctx->addresses_all_num,
8982 .ips = ctx->addresses_all,
8983 .apply_expected = False
8987 * sgroup,active vs. sgroup,tombstone with subset ip(s)
8990 .line = __location__,
8991 .name = _NBT_NAME("_SA_ST_SB_U", 0x1C, NULL),
8992 .skip = (ctx->addresses_all_num < 3),
8994 .nb_flags = NBT_NM_GROUP,
8996 .num_ips = ctx->addresses_mhomed_num,
8997 .ips = ctx->addresses_mhomed,
8998 .apply_expected = True
9004 .type = WREPL_TYPE_SGROUP,
9005 .state = WREPL_STATE_TOMBSTONE,
9006 .node = WREPL_NODE_B,
9008 .num_ips = ctx->addresses_best_num,
9009 .ips = ctx->addresses_best,
9010 .apply_expected = False
9015 if (!ctx->nbtsock_srv) {
9016 printf("SKIP: Test Replica records vs. owned active records: not bound to port[%d]\n",
9021 printf("Test Replica records vs. owned active records\n");
9023 for(i=0; ret && i < ARRAY_SIZE(records); i++) {
9025 struct test_conflict_owned_active_vs_replica_struct record = records[i];
9026 uint32_t j, count = 1;
9029 if (records[i].wins.mhomed || records[i].name.type == 0x1C) {
9030 count = records[i].wins.num_ips;
9033 if (records[i].section) {
9034 printf("%s\n", records[i].section);
9037 if (records[i].skip) {
9038 printf("%s => SKIPPED\n", nbt_name_string(ctx, &records[i].name));
9042 if (records[i].replica.mhomed_merge) {
9043 action = "MHOMED_MERGE";
9044 } else if (records[i].replica.sgroup_merge) {
9045 action = "SGROUP_MERGE";
9046 } else if (records[i].replica.apply_expected) {
9049 action = "NOT REPLACE";
9052 printf("%s%s%s => %s\n",
9053 nbt_name_string(ctx, &records[i].name),
9054 (records[i].comment?": ":""),
9055 (records[i].comment?records[i].comment:""),
9058 /* Prepare for multi homed registration */
9059 ZERO_STRUCT(records[i].defend);
9060 records[i].defend.timeout = 10;
9061 records[i].defend.positive = True;
9062 nbt_set_incoming_handler(ctx->nbtsock_srv,
9063 test_conflict_owned_active_vs_replica_handler,
9065 if (ctx->nbtsock_srv2) {
9066 nbt_set_incoming_handler(ctx->nbtsock_srv2,
9067 test_conflict_owned_active_vs_replica_handler,
9074 for (j=0; j < count; j++) {
9075 struct nbt_name_request *req;
9077 name_register->in.name = records[i].name;
9078 name_register->in.dest_addr = ctx->address;
9079 name_register->in.address = records[i].wins.ips[j].ip;
9080 name_register->in.nb_flags = records[i].wins.nb_flags;
9081 name_register->in.register_demand= False;
9082 name_register->in.broadcast = False;
9083 name_register->in.multi_homed = records[i].wins.mhomed;
9084 name_register->in.ttl = 300000;
9085 name_register->in.timeout = 70;
9086 name_register->in.retries = 0;
9088 req = nbt_name_register_send(ctx->nbtsock, name_register);
9090 /* push the request on the wire */
9091 event_loop_once(ctx->nbtsock->event_ctx);
9094 * if we register multiple addresses,
9095 * the server will do name queries to see if the old addresses
9098 if (records[i].wins.mhomed && j > 0) {
9099 end = timeval_current_ofs(records[i].defend.timeout,0);
9100 records[i].defend.ret = True;
9101 while (records[i].defend.timeout > 0) {
9102 event_loop_once(ctx->nbtsock_srv->event_ctx);
9103 if (timeval_expired(&end)) break;
9105 ret &= records[i].defend.ret;
9108 status = nbt_name_register_recv(req, ctx, name_register);
9109 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
9110 printf("No response from %s for name register\n", ctx->address);
9113 if (!NT_STATUS_IS_OK(status)) {
9114 printf("Bad response from %s for name register - %s\n",
9115 ctx->address, nt_errstr(status));
9118 CHECK_VALUE(name_register->out.rcode, 0);
9119 CHECK_VALUE_STRING(name_register->out.reply_from, ctx->address);
9120 CHECK_VALUE(name_register->out.name.type, records[i].name.type);
9121 CHECK_VALUE_STRING(name_register->out.name.name, records[i].name.name);
9122 CHECK_VALUE_STRING(name_register->out.name.scope, records[i].name.scope);
9123 CHECK_VALUE_STRING(name_register->out.reply_addr, records[i].wins.ips[j].ip);
9126 /* Prepare for the current test */
9127 records[i].defend = record.defend;
9128 nbt_set_incoming_handler(ctx->nbtsock_srv,
9129 test_conflict_owned_active_vs_replica_handler,
9131 if (ctx->nbtsock_srv2) {
9132 nbt_set_incoming_handler(ctx->nbtsock_srv2,
9133 test_conflict_owned_active_vs_replica_handler,
9140 wins_name->name = &records[i].name;
9141 wins_name->flags = WREPL_NAME_FLAGS(records[i].replica.type,
9142 records[i].replica.state,
9143 records[i].replica.node,
9144 records[i].replica.is_static);
9145 wins_name->id = ++ctx->b.max_version;
9146 if (wins_name->flags & 2) {
9147 wins_name->addresses.addresses.num_ips = records[i].replica.num_ips;
9148 wins_name->addresses.addresses.ips = discard_const(records[i].replica.ips);
9150 wins_name->addresses.ip = records[i].replica.ips[0].ip;
9152 wins_name->unknown = "255.255.255.255";
9154 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9157 * wait for the name query, which is handled in
9158 * test_conflict_owned_active_vs_replica_handler()
9160 end = timeval_current_ofs(records[i].defend.timeout,0);
9161 records[i].defend.ret = True;
9162 while (records[i].defend.timeout > 0) {
9163 event_loop_once(ctx->nbtsock_srv->event_ctx);
9164 if (timeval_expired(&end)) break;
9166 ret &= records[i].defend.ret;
9168 if (records[i].defend.late_release) {
9169 records[i].defend = record.defend;
9170 records[i].defend.expect_release = True;
9172 * wait for the name release demand, which is handled in
9173 * test_conflict_owned_active_vs_replica_handler()
9175 end = timeval_current_ofs(records[i].defend.timeout,0);
9176 records[i].defend.ret = True;
9177 while (records[i].defend.timeout > 0) {
9178 event_loop_once(ctx->nbtsock_srv->event_ctx);
9179 if (timeval_expired(&end)) break;
9181 ret &= records[i].defend.ret;
9184 if (records[i].replica.mhomed_merge) {
9185 ret &= test_wrepl_mhomed_merged(ctx, &ctx->c,
9186 records[i].wins.num_ips, records[i].wins.ips,
9188 records[i].replica.num_ips, records[i].replica.ips,
9190 } else if (records[i].replica.sgroup_merge) {
9191 ret &= test_wrepl_sgroup_merged(ctx, NULL,
9193 records[i].wins.num_ips, records[i].wins.ips,
9195 records[i].replica.num_ips, records[i].replica.ips,
9198 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name,
9199 records[i].replica.apply_expected);
9202 if (records[i].replica.apply_expected ||
9203 records[i].replica.mhomed_merge) {
9204 wins_name->name = &records[i].name;
9205 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE,
9206 WREPL_STATE_TOMBSTONE,
9207 WREPL_NODE_B, False);
9208 wins_name->id = ++ctx->b.max_version;
9209 wins_name->addresses.ip = addresses_B_1[0].ip;
9210 wins_name->unknown = "255.255.255.255";
9212 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9213 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name, True);
9215 for (j=0; j < count; j++) {
9216 struct nbt_name_socket *nbtsock = ctx->nbtsock;
9218 if (ctx->myaddr2 && strcmp(records[i].wins.ips[j].ip, ctx->myaddr2) == 0) {
9219 nbtsock = ctx->nbtsock2;
9222 release->in.name = records[i].name;
9223 release->in.dest_addr = ctx->address;
9224 release->in.address = records[i].wins.ips[j].ip;
9225 release->in.nb_flags = records[i].wins.nb_flags;
9226 release->in.broadcast = False;
9227 release->in.timeout = 30;
9228 release->in.retries = 0;
9230 status = nbt_name_release(nbtsock, ctx, release);
9231 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
9232 printf("No response from %s for name release\n", ctx->address);
9235 if (!NT_STATUS_IS_OK(status)) {
9236 printf("Bad response from %s for name query - %s\n",
9237 ctx->address, nt_errstr(status));
9240 CHECK_VALUE(release->out.rcode, 0);
9243 if (records[i].replica.sgroup_merge) {
9244 /* clean up the SGROUP record */
9245 wins_name->name = &records[i].name;
9246 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
9248 WREPL_NODE_B, False);
9249 wins_name->id = ++ctx->b.max_version;
9250 wins_name->addresses.addresses.num_ips = 0;
9251 wins_name->addresses.addresses.ips = NULL;
9252 wins_name->unknown = "255.255.255.255";
9253 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9255 /* take ownership of the SGROUP record */
9256 wins_name->name = &records[i].name;
9257 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
9259 WREPL_NODE_B, False);
9260 wins_name->id = ++ctx->b.max_version;
9261 wins_name->addresses.addresses.num_ips = ARRAY_SIZE(addresses_B_1);
9262 wins_name->addresses.addresses.ips = discard_const(addresses_B_1);
9263 wins_name->unknown = "255.255.255.255";
9264 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9265 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name, True);
9267 /* overwrite the SGROUP record with unique,tombstone */
9268 wins_name->name = &records[i].name;
9269 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE,
9270 WREPL_STATE_TOMBSTONE,
9271 WREPL_NODE_B, False);
9272 wins_name->id = ++ctx->b.max_version;
9273 wins_name->addresses.ip = addresses_A_1[0].ip;
9274 wins_name->unknown = "255.255.255.255";
9275 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9276 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name, True);
9282 printf("conflict handled wrong or record[%u]: %s\n", i, records[i].line);
9290 #define _NBT_ASSERT(v, correct) do { \
9291 if ((v) != (correct)) { \
9292 printf("(%s) Incorrect value %s=%d - should be %s (%d)\n", \
9293 __location__, #v, v, #correct, correct); \
9298 #define _NBT_ASSERT_STRING(v, correct) do { \
9299 if ( ((!v) && (correct)) || \
9300 ((v) && (!correct)) || \
9301 ((v) && (correct) && strcmp(v,correct) != 0)) { \
9302 printf("(%s) Incorrect value %s=%s - should be %s\n", \
9303 __location__, #v, v, correct); \
9308 static void test_conflict_owned_active_vs_replica_handler_query(struct nbt_name_socket *nbtsock,
9309 struct nbt_name_packet *req_packet,
9310 const struct nbt_peer_socket *src)
9312 struct nbt_name *name;
9313 struct nbt_name_packet *rep_packet;
9314 struct test_conflict_owned_active_vs_replica_struct *rec = nbtsock->incoming.private;
9316 _NBT_ASSERT(req_packet->qdcount, 1);
9317 _NBT_ASSERT(req_packet->questions[0].question_type, NBT_QTYPE_NETBIOS);
9318 _NBT_ASSERT(req_packet->questions[0].question_class, NBT_QCLASS_IP);
9320 name = &req_packet->questions[0].name;
9322 _NBT_ASSERT(name->type, rec->name.type);
9323 _NBT_ASSERT_STRING(name->name, rec->name.name);
9324 _NBT_ASSERT_STRING(name->scope, rec->name.scope);
9326 _NBT_ASSERT(rec->defend.expect_release, False);
9328 rep_packet = talloc_zero(nbtsock, struct nbt_name_packet);
9329 if (rep_packet == NULL) return;
9331 rep_packet->name_trn_id = req_packet->name_trn_id;
9332 rep_packet->ancount = 1;
9334 rep_packet->answers = talloc_array(rep_packet, struct nbt_res_rec, 1);
9335 if (rep_packet->answers == NULL) return;
9337 rep_packet->answers[0].name = *name;
9338 rep_packet->answers[0].rr_class = NBT_QCLASS_IP;
9339 rep_packet->answers[0].ttl = 0;
9341 if (rec->defend.positive) {
9342 uint32_t i, num_ips;
9343 const struct wrepl_ip *ips;
9345 if (rec->defend.num_ips > 0) {
9346 num_ips = rec->defend.num_ips;
9347 ips = rec->defend.ips;
9349 num_ips = rec->wins.num_ips;
9350 ips = rec->wins.ips;
9353 /* send a positive reply */
9354 rep_packet->operation =
9357 NBT_FLAG_AUTHORITIVE |
9358 NBT_FLAG_RECURSION_DESIRED |
9359 NBT_FLAG_RECURSION_AVAIL;
9361 rep_packet->answers[0].rr_type = NBT_QTYPE_NETBIOS;
9363 rep_packet->answers[0].rdata.netbios.length = num_ips*6;
9364 rep_packet->answers[0].rdata.netbios.addresses =
9365 talloc_array(rep_packet->answers, struct nbt_rdata_address, num_ips);
9366 if (rep_packet->answers[0].rdata.netbios.addresses == NULL) return;
9368 for (i=0; i < num_ips; i++) {
9369 struct nbt_rdata_address *addr =
9370 &rep_packet->answers[0].rdata.netbios.addresses[i];
9371 addr->nb_flags = rec->wins.nb_flags;
9372 addr->ipaddr = ips[i].ip;
9374 DEBUG(2,("Sending positive name query reply for %s to %s:%d\n",
9375 nbt_name_string(rep_packet, name), src->addr, src->port));
9377 /* send a negative reply */
9378 rep_packet->operation =
9381 NBT_FLAG_AUTHORITIVE |
9384 rep_packet->answers[0].rr_type = NBT_QTYPE_NULL;
9386 ZERO_STRUCT(rep_packet->answers[0].rdata);
9388 DEBUG(2,("Sending negative name query reply for %s to %s:%d\n",
9389 nbt_name_string(rep_packet, name), src->addr, src->port));
9392 nbt_name_reply_send(nbtsock, src, rep_packet);
9393 talloc_free(rep_packet);
9395 /* make sure we push the reply to the wire */
9396 event_loop_once(nbtsock->event_ctx);
9399 rec->defend.timeout = 0;
9400 rec->defend.ret = True;
9403 static void test_conflict_owned_active_vs_replica_handler_release(struct nbt_name_socket *nbtsock,
9404 struct nbt_name_packet *req_packet,
9405 const struct nbt_peer_socket *src)
9407 struct nbt_name *name;
9408 struct nbt_name_packet *rep_packet;
9409 struct test_conflict_owned_active_vs_replica_struct *rec = nbtsock->incoming.private;
9411 _NBT_ASSERT(req_packet->qdcount, 1);
9412 _NBT_ASSERT(req_packet->questions[0].question_type, NBT_QTYPE_NETBIOS);
9413 _NBT_ASSERT(req_packet->questions[0].question_class, NBT_QCLASS_IP);
9415 name = &req_packet->questions[0].name;
9417 _NBT_ASSERT(name->type, rec->name.type);
9418 _NBT_ASSERT_STRING(name->name, rec->name.name);
9419 _NBT_ASSERT_STRING(name->scope, rec->name.scope);
9421 _NBT_ASSERT(rec->defend.expect_release, True);
9423 rep_packet = talloc_zero(nbtsock, struct nbt_name_packet);
9424 if (rep_packet == NULL) return;
9426 rep_packet->name_trn_id = req_packet->name_trn_id;
9427 rep_packet->ancount = 1;
9428 rep_packet->operation =
9430 NBT_OPCODE_RELEASE |
9431 NBT_FLAG_AUTHORITIVE;
9433 rep_packet->answers = talloc_array(rep_packet, struct nbt_res_rec, 1);
9434 if (rep_packet->answers == NULL) return;
9436 rep_packet->answers[0].name = *name;
9437 rep_packet->answers[0].rr_type = NBT_QTYPE_NETBIOS;
9438 rep_packet->answers[0].rr_class = NBT_QCLASS_IP;
9439 rep_packet->answers[0].ttl = req_packet->additional[0].ttl;
9440 rep_packet->answers[0].rdata = req_packet->additional[0].rdata;
9442 DEBUG(2,("Sending name release reply for %s to %s:%d\n",
9443 nbt_name_string(rep_packet, name), src->addr, src->port));
9445 nbt_name_reply_send(nbtsock, src, rep_packet);
9446 talloc_free(rep_packet);
9448 /* make sure we push the reply to the wire */
9449 event_loop_once(nbtsock->event_ctx);
9452 rec->defend.timeout = 0;
9453 rec->defend.ret = True;
9456 static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket *nbtsock,
9457 struct nbt_name_packet *req_packet,
9458 const struct nbt_peer_socket *src)
9460 struct test_conflict_owned_active_vs_replica_struct *rec = nbtsock->incoming.private;
9462 rec->defend.ret = False;
9464 switch (req_packet->operation & NBT_OPCODE) {
9465 case NBT_OPCODE_QUERY:
9466 test_conflict_owned_active_vs_replica_handler_query(nbtsock, req_packet, src);
9468 case NBT_OPCODE_RELEASE:
9469 test_conflict_owned_active_vs_replica_handler_release(nbtsock, req_packet, src);
9472 printf("%s: unexpected incoming packet\n", __location__);
9478 test WINS replication operations
9480 BOOL torture_nbt_winsreplication(void)
9482 const char *address;
9483 struct nbt_name name;
9484 TALLOC_CTX *mem_ctx = talloc_new(NULL);
9487 struct test_wrepl_conflict_conn *ctx;
9489 make_nbt_name_server(&name, lp_parm_string(-1, "torture", "host"));
9491 /* do an initial name resolution to find its IP */
9492 status = resolve_name(&name, mem_ctx, &address, NULL);
9493 if (!NT_STATUS_IS_OK(status)) {
9494 printf("Failed to resolve %s - %s\n",
9495 name.name, nt_errstr(status));
9496 talloc_free(mem_ctx);
9500 ret &= test_assoc_ctx1(mem_ctx, address);
9501 ret &= test_assoc_ctx2(mem_ctx, address);
9503 ret &= test_wins_replication(mem_ctx, address);
9505 ctx = test_create_conflict_ctx(mem_ctx, address);
9506 if (!ctx) return False;
9508 ret &= test_conflict_same_owner(ctx);
9509 ret &= test_conflict_different_owner(ctx);
9510 ret &= test_conflict_owned_released_vs_replica(ctx);
9511 ret &= test_conflict_owned_active_vs_replica(ctx);
9513 talloc_free(mem_ctx);