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/wrepl/winsrepl.h"
26 #include "lib/events/events.h"
27 #include "lib/socket/socket.h"
29 #define CHECK_STATUS(status, correct) do { \
30 if (!NT_STATUS_EQUAL(status, correct)) { \
31 printf("(%s) Incorrect status %s - should be %s\n", \
32 __location__, nt_errstr(status), nt_errstr(correct)); \
37 #define CHECK_VALUE(v, correct) do { \
38 if ((v) != (correct)) { \
39 printf("(%s) Incorrect value %s=%d - should be %d\n", \
40 __location__, #v, v, correct); \
45 #define CHECK_VALUE_UINT64(v, correct) do { \
46 if ((v) != (correct)) { \
47 printf("(%s) Incorrect value %s=%llu - should be %llu\n", \
48 __location__, #v, (long long)v, (long long)correct); \
53 #define CHECK_VALUE_STRING(v, correct) do { \
54 if ( ((!v) && (correct)) || \
55 ((v) && (!correct)) || \
56 ((v) && (correct) && strcmp(v,correct) != 0)) { \
57 printf("(%s) Incorrect value %s='%s' - should be '%s'\n", \
58 __location__, #v, v, correct); \
63 #define _NBT_NAME(n,t,s) {\
69 static const char *wrepl_name_type_string(enum wrepl_name_type type)
72 case WREPL_TYPE_UNIQUE: return "UNIQUE";
73 case WREPL_TYPE_GROUP: return "GROUP";
74 case WREPL_TYPE_SGROUP: return "SGROUP";
75 case WREPL_TYPE_MHOMED: return "MHOMED";
77 return "UNKNOWN_TYPE";
80 static const char *wrepl_name_state_string(enum wrepl_name_state state)
83 case WREPL_STATE_ACTIVE: return "ACTIVE";
84 case WREPL_STATE_RELEASED: return "RELEASED";
85 case WREPL_STATE_TOMBSTONE: return "TOMBSTONE";
86 case WREPL_STATE_RESERVED: return "RESERVED";
88 return "UNKNOWN_STATE";
92 test how assoc_ctx's are only usable on the connection
95 static BOOL test_assoc_ctx1(TALLOC_CTX *mem_ctx, const char *address)
98 struct wrepl_request *req;
99 struct wrepl_socket *wrepl_socket1;
100 struct wrepl_associate associate1;
101 struct wrepl_socket *wrepl_socket2;
102 struct wrepl_associate associate2;
103 struct wrepl_pull_table pull_table;
104 struct wrepl_packet packet;
105 struct wrepl_send_ctrl ctrl;
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");
141 packet.opcode = WREPL_OPCODE_BITS;
142 packet.assoc_ctx = associate1.out.assoc_ctx;
143 packet.mess_type = WREPL_REPLICATION;
144 packet.message.replication.command = WREPL_REPL_TABLE_QUERY;
146 ctrl.send_only = True;
147 req = wrepl_request_send(wrepl_socket2, &packet, &ctrl);
148 status = wrepl_request_recv(req, mem_ctx, &rep_packet);
149 CHECK_STATUS(status, NT_STATUS_OK);
151 printf("Send a association request (conn2), to make sure the last request was ignored\n");
152 status = wrepl_associate(wrepl_socket2, &associate2);
153 CHECK_STATUS(status, NT_STATUS_OK);
155 printf("Send a replication table query, with invalid assoc (conn1), receive answer from conn2\n");
156 pull_table.in.assoc_ctx = 0;
157 req = wrepl_pull_table_send(wrepl_socket1, &pull_table);
158 status = wrepl_request_recv(req, mem_ctx, &rep_packet);
159 CHECK_STATUS(status, NT_STATUS_OK);
161 printf("Send a association request (conn1), to make sure the last request was handled correct\n");
162 status = wrepl_associate(wrepl_socket1, &associate2);
163 CHECK_STATUS(status, NT_STATUS_OK);
165 assoc_stop.in.assoc_ctx = associate1.out.assoc_ctx;
166 assoc_stop.in.reason = 4;
167 printf("Send a association stop request (conn1), reson: %u\n", assoc_stop.in.reason);
168 status = wrepl_associate_stop(wrepl_socket1, &assoc_stop);
169 CHECK_STATUS(status, NT_STATUS_END_OF_FILE);
171 assoc_stop.in.assoc_ctx = associate2.out.assoc_ctx;
172 assoc_stop.in.reason = 0;
173 printf("Send a association stop request (conn2), reson: %u\n", assoc_stop.in.reason);
174 status = wrepl_associate_stop(wrepl_socket2, &assoc_stop);
175 CHECK_STATUS(status, NT_STATUS_OK);
178 printf("Close 2 wrepl connections\n");
179 talloc_free(wrepl_socket1);
180 talloc_free(wrepl_socket2);
185 test if we always get back the same assoc_ctx
187 static BOOL test_assoc_ctx2(TALLOC_CTX *mem_ctx, const char *address)
190 struct wrepl_socket *wrepl_socket;
191 struct wrepl_associate associate;
195 printf("Test if we always get back the same assoc_ctx\n");
197 wrepl_socket = wrepl_socket_init(mem_ctx, NULL);
199 printf("Setup wrepl connections\n");
200 status = wrepl_connect(wrepl_socket, NULL, address);
201 CHECK_STATUS(status, NT_STATUS_OK);
204 printf("Send 1st start association request\n");
205 status = wrepl_associate(wrepl_socket, &associate);
206 CHECK_STATUS(status, NT_STATUS_OK);
207 assoc_ctx1 = associate.out.assoc_ctx;
208 printf("1st association context: 0x%x\n", associate.out.assoc_ctx);
210 printf("Send 2nd start association request\n");
211 status = wrepl_associate(wrepl_socket, &associate);
212 CHECK_VALUE(associate.out.assoc_ctx, assoc_ctx1);
213 CHECK_STATUS(status, NT_STATUS_OK);
214 printf("2nd association context: 0x%x\n", associate.out.assoc_ctx);
216 printf("Send 3rd start association request\n");
217 status = wrepl_associate(wrepl_socket, &associate);
218 CHECK_VALUE(associate.out.assoc_ctx, assoc_ctx1);
219 CHECK_STATUS(status, NT_STATUS_OK);
220 printf("3rd association context: 0x%x\n", associate.out.assoc_ctx);
223 printf("Close wrepl connections\n");
224 talloc_free(wrepl_socket);
230 display a replication entry
232 static void display_entry(TALLOC_CTX *mem_ctx, struct wrepl_name *name)
236 printf("%s\n", nbt_name_string(mem_ctx, &name->name));
237 printf("\tTYPE:%u STATE:%u NODE:%u STATIC:%u VERSION_ID: %llu\n",
238 name->type, name->state, name->node, name->is_static, (long long)name->version_id);
239 printf("\tRAW_FLAGS: 0x%08X OWNER: %-15s\n",
240 name->raw_flags, name->owner);
241 for (i=0;i<name->num_addresses;i++) {
242 printf("\tADDR: %-15s OWNER: %-15s\n",
243 name->addresses[i].address, name->addresses[i].owner);
248 test a full replication dump from a WINS server
250 static BOOL test_wins_replication(TALLOC_CTX *mem_ctx, const char *address)
253 struct wrepl_socket *wrepl_socket;
256 struct wrepl_associate associate;
257 struct wrepl_pull_table pull_table;
258 struct wrepl_pull_names pull_names;
260 printf("Test one pull replication cycle\n");
262 wrepl_socket = wrepl_socket_init(mem_ctx, NULL);
264 printf("Setup wrepl connections\n");
265 status = wrepl_connect(wrepl_socket, NULL, address);
266 CHECK_STATUS(status, NT_STATUS_OK);
268 printf("Send a start association request\n");
270 status = wrepl_associate(wrepl_socket, &associate);
271 CHECK_STATUS(status, NT_STATUS_OK);
273 printf("association context: 0x%x\n", associate.out.assoc_ctx);
275 printf("Send a replication table query\n");
276 pull_table.in.assoc_ctx = associate.out.assoc_ctx;
278 status = wrepl_pull_table(wrepl_socket, mem_ctx, &pull_table);
279 if (NT_STATUS_EQUAL(NT_STATUS_NETWORK_ACCESS_DENIED,status)) {
280 struct wrepl_packet packet;
281 struct wrepl_request *req;
284 packet.opcode = WREPL_OPCODE_BITS;
285 packet.assoc_ctx = associate.out.assoc_ctx;
286 packet.mess_type = WREPL_STOP_ASSOCIATION;
287 packet.message.stop.reason = 0;
289 req = wrepl_request_send(wrepl_socket, &packet, NULL);
292 printf("failed - We are not a valid pull partner for the server\n");
296 CHECK_STATUS(status, NT_STATUS_OK);
298 printf("Found %d replication partners\n", pull_table.out.num_partners);
300 for (i=0;i<pull_table.out.num_partners;i++) {
301 struct wrepl_wins_owner *partner = &pull_table.out.partners[i];
302 printf("%s max_version=%6llu min_version=%6llu type=%d\n",
304 (long long)partner->max_version,
305 (long long)partner->min_version,
308 pull_names.in.assoc_ctx = associate.out.assoc_ctx;
309 pull_names.in.partner = *partner;
311 status = wrepl_pull_names(wrepl_socket, mem_ctx, &pull_names);
312 CHECK_STATUS(status, NT_STATUS_OK);
314 printf("Received %d names\n", pull_names.out.num_names);
316 for (j=0;j<pull_names.out.num_names;j++) {
317 display_entry(mem_ctx, &pull_names.out.names[j]);
322 printf("Close wrepl connections\n");
323 talloc_free(wrepl_socket);
327 struct test_wrepl_conflict_conn {
329 struct wrepl_socket *pull;
332 #define TEST_OWNER_A_ADDRESS "127.65.65.1"
333 #define TEST_ADDRESS_A_PREFIX "127.0.65"
334 #define TEST_OWNER_B_ADDRESS "127.66.66.1"
335 #define TEST_ADDRESS_B_PREFIX "127.0.66"
336 #define TEST_OWNER_X_ADDRESS "127.88.88.1"
337 #define TEST_ADDRESS_X_PREFIX "127.0.88"
339 struct wrepl_wins_owner a, b, c, x;
343 struct nbt_name_socket *nbtsock;
344 struct nbt_name_socket *nbtsock2;
346 struct nbt_name_socket *nbtsock_srv;
347 struct nbt_name_socket *nbtsock_srv2;
349 uint32_t addresses_best_num;
350 struct wrepl_ip *addresses_best;
352 uint32_t addresses_best2_num;
353 struct wrepl_ip *addresses_best2;
355 uint32_t addresses_all_num;
356 struct wrepl_ip *addresses_all;
358 uint32_t addresses_mhomed_num;
359 struct wrepl_ip *addresses_mhomed;
362 static const struct wrepl_ip addresses_A_1[] = {
364 .owner = TEST_OWNER_A_ADDRESS,
365 .ip = TEST_ADDRESS_A_PREFIX".1"
368 static const struct wrepl_ip addresses_A_2[] = {
370 .owner = TEST_OWNER_A_ADDRESS,
371 .ip = TEST_ADDRESS_A_PREFIX".2"
374 static const struct wrepl_ip addresses_A_3_4[] = {
376 .owner = TEST_OWNER_A_ADDRESS,
377 .ip = TEST_ADDRESS_A_PREFIX".3"
380 .owner = TEST_OWNER_A_ADDRESS,
381 .ip = TEST_ADDRESS_A_PREFIX".4"
384 static const struct wrepl_ip addresses_A_3_4_X_3_4[] = {
386 .owner = TEST_OWNER_A_ADDRESS,
387 .ip = TEST_ADDRESS_A_PREFIX".3"
390 .owner = TEST_OWNER_A_ADDRESS,
391 .ip = TEST_ADDRESS_A_PREFIX".4"
394 .owner = TEST_OWNER_X_ADDRESS,
395 .ip = TEST_ADDRESS_X_PREFIX".3"
398 .owner = TEST_OWNER_X_ADDRESS,
399 .ip = TEST_ADDRESS_X_PREFIX".4"
402 static const struct wrepl_ip addresses_A_3_4_B_3_4[] = {
404 .owner = TEST_OWNER_A_ADDRESS,
405 .ip = TEST_ADDRESS_A_PREFIX".3"
408 .owner = TEST_OWNER_A_ADDRESS,
409 .ip = TEST_ADDRESS_A_PREFIX".4"
412 .owner = TEST_OWNER_B_ADDRESS,
413 .ip = TEST_ADDRESS_B_PREFIX".3"
416 .owner = TEST_OWNER_B_ADDRESS,
417 .ip = TEST_ADDRESS_B_PREFIX".4"
420 static const struct wrepl_ip addresses_A_3_4_OWNER_B[] = {
422 .owner = TEST_OWNER_B_ADDRESS,
423 .ip = TEST_ADDRESS_A_PREFIX".3"
426 .owner = TEST_OWNER_B_ADDRESS,
427 .ip = TEST_ADDRESS_A_PREFIX".4"
430 static const struct wrepl_ip addresses_A_3_4_X_3_4_OWNER_B[] = {
432 .owner = TEST_OWNER_B_ADDRESS,
433 .ip = TEST_ADDRESS_A_PREFIX".3"
436 .owner = TEST_OWNER_B_ADDRESS,
437 .ip = TEST_ADDRESS_A_PREFIX".4"
440 .owner = TEST_OWNER_B_ADDRESS,
441 .ip = TEST_ADDRESS_X_PREFIX".3"
444 .owner = TEST_OWNER_B_ADDRESS,
445 .ip = TEST_ADDRESS_X_PREFIX".4"
449 static const struct wrepl_ip addresses_A_3_4_X_1_2[] = {
451 .owner = TEST_OWNER_A_ADDRESS,
452 .ip = TEST_ADDRESS_A_PREFIX".3"
455 .owner = TEST_OWNER_A_ADDRESS,
456 .ip = TEST_ADDRESS_A_PREFIX".4"
459 .owner = TEST_OWNER_X_ADDRESS,
460 .ip = TEST_ADDRESS_X_PREFIX".1"
463 .owner = TEST_OWNER_X_ADDRESS,
464 .ip = TEST_ADDRESS_X_PREFIX".2"
468 static const struct wrepl_ip addresses_B_1[] = {
470 .owner = TEST_OWNER_B_ADDRESS,
471 .ip = TEST_ADDRESS_B_PREFIX".1"
474 static const struct wrepl_ip addresses_B_2[] = {
476 .owner = TEST_OWNER_B_ADDRESS,
477 .ip = TEST_ADDRESS_B_PREFIX".2"
480 static const struct wrepl_ip addresses_B_3_4[] = {
482 .owner = TEST_OWNER_B_ADDRESS,
483 .ip = TEST_ADDRESS_B_PREFIX".3"
486 .owner = TEST_OWNER_B_ADDRESS,
487 .ip = TEST_ADDRESS_B_PREFIX".4"
490 static const struct wrepl_ip addresses_B_3_4_X_3_4[] = {
492 .owner = TEST_OWNER_B_ADDRESS,
493 .ip = TEST_ADDRESS_B_PREFIX".3"
496 .owner = TEST_OWNER_B_ADDRESS,
497 .ip = TEST_ADDRESS_B_PREFIX".4"
500 .owner = TEST_OWNER_X_ADDRESS,
501 .ip = TEST_ADDRESS_X_PREFIX".3"
504 .owner = TEST_OWNER_X_ADDRESS,
505 .ip = TEST_ADDRESS_X_PREFIX".4"
508 static const struct wrepl_ip addresses_B_3_4_X_1_2[] = {
510 .owner = TEST_OWNER_B_ADDRESS,
511 .ip = TEST_ADDRESS_B_PREFIX".3"
514 .owner = TEST_OWNER_B_ADDRESS,
515 .ip = TEST_ADDRESS_B_PREFIX".4"
518 .owner = TEST_OWNER_X_ADDRESS,
519 .ip = TEST_ADDRESS_X_PREFIX".1"
522 .owner = TEST_OWNER_X_ADDRESS,
523 .ip = TEST_ADDRESS_X_PREFIX".2"
527 static const struct wrepl_ip addresses_X_1_2[] = {
529 .owner = TEST_OWNER_X_ADDRESS,
530 .ip = TEST_ADDRESS_X_PREFIX".1"
533 .owner = TEST_OWNER_X_ADDRESS,
534 .ip = TEST_ADDRESS_X_PREFIX".2"
537 static const struct wrepl_ip addresses_X_3_4[] = {
539 .owner = TEST_OWNER_X_ADDRESS,
540 .ip = TEST_ADDRESS_X_PREFIX".3"
543 .owner = TEST_OWNER_X_ADDRESS,
544 .ip = TEST_ADDRESS_X_PREFIX".4"
548 static struct test_wrepl_conflict_conn *test_create_conflict_ctx(TALLOC_CTX *mem_ctx,
551 struct test_wrepl_conflict_conn *ctx;
552 struct wrepl_associate associate;
553 struct wrepl_pull_table pull_table;
557 ctx = talloc_zero(mem_ctx, struct test_wrepl_conflict_conn);
558 if (!ctx) return NULL;
560 ctx->address = address;
561 ctx->pull = wrepl_socket_init(ctx, NULL);
562 if (!ctx->pull) return NULL;
564 printf("Setup wrepl conflict pull connection\n");
565 status = wrepl_connect(ctx->pull, NULL, ctx->address);
566 if (!NT_STATUS_IS_OK(status)) return NULL;
568 status = wrepl_associate(ctx->pull, &associate);
569 if (!NT_STATUS_IS_OK(status)) return NULL;
571 ctx->pull_assoc = associate.out.assoc_ctx;
573 ctx->a.address = TEST_OWNER_A_ADDRESS;
574 ctx->a.max_version = 0;
575 ctx->a.min_version = 0;
578 ctx->b.address = TEST_OWNER_B_ADDRESS;
579 ctx->b.max_version = 0;
580 ctx->b.min_version = 0;
583 ctx->x.address = TEST_OWNER_X_ADDRESS;
584 ctx->x.max_version = 0;
585 ctx->x.min_version = 0;
588 ctx->c.address = address;
589 ctx->c.max_version = 0;
590 ctx->c.min_version = 0;
593 pull_table.in.assoc_ctx = ctx->pull_assoc;
594 status = wrepl_pull_table(ctx->pull, ctx->pull, &pull_table);
595 if (!NT_STATUS_IS_OK(status)) return NULL;
597 for (i=0; i < pull_table.out.num_partners; i++) {
598 if (strcmp(TEST_OWNER_A_ADDRESS,pull_table.out.partners[i].address)==0) {
599 ctx->a.max_version = pull_table.out.partners[i].max_version;
600 ctx->a.min_version = pull_table.out.partners[i].min_version;
602 if (strcmp(TEST_OWNER_B_ADDRESS,pull_table.out.partners[i].address)==0) {
603 ctx->b.max_version = pull_table.out.partners[i].max_version;
604 ctx->b.min_version = pull_table.out.partners[i].min_version;
606 if (strcmp(TEST_OWNER_X_ADDRESS,pull_table.out.partners[i].address)==0) {
607 ctx->x.max_version = pull_table.out.partners[i].max_version;
608 ctx->x.min_version = pull_table.out.partners[i].min_version;
610 if (strcmp(address,pull_table.out.partners[i].address)==0) {
611 ctx->c.max_version = pull_table.out.partners[i].max_version;
612 ctx->c.min_version = pull_table.out.partners[i].min_version;
616 talloc_free(pull_table.out.partners);
618 ctx->myaddr = talloc_strdup(mem_ctx, iface_best_ip(address));
619 if (!ctx->myaddr) return NULL;
621 for (i = 0; i < iface_count(); i++) {
622 if (strcmp(ctx->myaddr, iface_n_ip(i)) == 0) continue;
623 ctx->myaddr2 = talloc_strdup(mem_ctx, iface_n_ip(i));
624 if (!ctx->myaddr2) return NULL;
628 ctx->nbtsock = nbt_name_socket_init(ctx, NULL);
629 if (!ctx->nbtsock) return NULL;
631 status = socket_listen(ctx->nbtsock->sock, ctx->myaddr, 0, 0, 0);
632 if (!NT_STATUS_IS_OK(status)) return NULL;
634 ctx->nbtsock_srv = nbt_name_socket_init(ctx, NULL);
635 if (!ctx->nbtsock_srv) return NULL;
637 status = socket_listen(ctx->nbtsock_srv->sock, ctx->myaddr, lp_nbt_port(), 0, 0);
638 if (!NT_STATUS_IS_OK(status)) {
639 talloc_free(ctx->nbtsock_srv);
640 ctx->nbtsock_srv = NULL;
643 if (ctx->myaddr2 && ctx->nbtsock_srv) {
644 ctx->nbtsock2 = nbt_name_socket_init(ctx, NULL);
645 if (!ctx->nbtsock2) return NULL;
647 status = socket_listen(ctx->nbtsock2->sock, ctx->myaddr2, 0, 0, 0);
648 if (!NT_STATUS_IS_OK(status)) return NULL;
650 ctx->nbtsock_srv2 = nbt_name_socket_init(ctx, ctx->nbtsock_srv->event_ctx);
651 if (!ctx->nbtsock_srv2) return NULL;
653 status = socket_listen(ctx->nbtsock_srv2->sock, ctx->myaddr2, lp_nbt_port(), 0, 0);
654 if (!NT_STATUS_IS_OK(status)) {
655 talloc_free(ctx->nbtsock_srv2);
656 ctx->nbtsock_srv2 = NULL;
660 ctx->addresses_best_num = 1;
661 ctx->addresses_best = talloc_array(ctx, struct wrepl_ip, ctx->addresses_best_num);
662 if (!ctx->addresses_best) return NULL;
663 ctx->addresses_best[0].owner = ctx->b.address;
664 ctx->addresses_best[0].ip = ctx->myaddr;
666 ctx->addresses_all_num = iface_count();
667 ctx->addresses_all = talloc_array(ctx, struct wrepl_ip, ctx->addresses_all_num);
668 if (!ctx->addresses_all) return NULL;
669 for (i=0; i < ctx->addresses_all_num; i++) {
670 ctx->addresses_all[i].owner = ctx->b.address;
671 ctx->addresses_all[i].ip = talloc_strdup(ctx->addresses_all, iface_n_ip(i));
672 if (!ctx->addresses_all[i].ip) return NULL;
675 if (ctx->nbtsock_srv2) {
676 ctx->addresses_best2_num = 1;
677 ctx->addresses_best2 = talloc_array(ctx, struct wrepl_ip, ctx->addresses_best2_num);
678 if (!ctx->addresses_best2) return NULL;
679 ctx->addresses_best2[0].owner = ctx->b.address;
680 ctx->addresses_best2[0].ip = ctx->myaddr2;
682 ctx->addresses_mhomed_num = 2;
683 ctx->addresses_mhomed = talloc_array(ctx, struct wrepl_ip, ctx->addresses_mhomed_num);
684 if (!ctx->addresses_mhomed) return NULL;
685 ctx->addresses_mhomed[0].owner = ctx->b.address;
686 ctx->addresses_mhomed[0].ip = ctx->myaddr;
687 ctx->addresses_mhomed[1].owner = ctx->b.address;
688 ctx->addresses_mhomed[1].ip = ctx->myaddr2;
694 static BOOL test_wrepl_update_one(struct test_wrepl_conflict_conn *ctx,
695 const struct wrepl_wins_owner *owner,
696 const struct wrepl_wins_name *name)
699 struct wrepl_socket *wrepl_socket;
700 struct wrepl_associate associate;
701 struct wrepl_packet update_packet, repl_send;
702 struct wrepl_table *update;
703 struct wrepl_wins_owner wrepl_wins_owners[1];
704 struct wrepl_packet *repl_recv;
705 struct wrepl_wins_owner *send_request;
706 struct wrepl_send_reply *send_reply;
707 struct wrepl_wins_name wrepl_wins_names[1];
711 wrepl_socket = wrepl_socket_init(ctx, NULL);
713 status = wrepl_connect(wrepl_socket, NULL, ctx->address);
714 CHECK_STATUS(status, NT_STATUS_OK);
716 status = wrepl_associate(wrepl_socket, &associate);
717 CHECK_STATUS(status, NT_STATUS_OK);
718 assoc_ctx = associate.out.assoc_ctx;
720 /* now send a WREPL_REPL_UPDATE message */
721 ZERO_STRUCT(update_packet);
722 update_packet.opcode = WREPL_OPCODE_BITS;
723 update_packet.assoc_ctx = assoc_ctx;
724 update_packet.mess_type = WREPL_REPLICATION;
725 update_packet.message.replication.command = WREPL_REPL_UPDATE;
726 update = &update_packet.message.replication.info.table;
728 update->partner_count = ARRAY_SIZE(wrepl_wins_owners);
729 update->partners = wrepl_wins_owners;
730 update->initiator = "0.0.0.0";
732 wrepl_wins_owners[0] = *owner;
734 status = wrepl_request(wrepl_socket, wrepl_socket,
735 &update_packet, &repl_recv);
736 CHECK_STATUS(status, NT_STATUS_OK);
737 CHECK_VALUE(repl_recv->mess_type, WREPL_REPLICATION);
738 CHECK_VALUE(repl_recv->message.replication.command, WREPL_REPL_SEND_REQUEST);
739 send_request = &repl_recv->message.replication.info.owner;
741 ZERO_STRUCT(repl_send);
742 repl_send.opcode = WREPL_OPCODE_BITS;
743 repl_send.assoc_ctx = assoc_ctx;
744 repl_send.mess_type = WREPL_REPLICATION;
745 repl_send.message.replication.command = WREPL_REPL_SEND_REPLY;
746 send_reply = &repl_send.message.replication.info.reply;
748 send_reply->num_names = ARRAY_SIZE(wrepl_wins_names);
749 send_reply->names = wrepl_wins_names;
751 wrepl_wins_names[0] = *name;
753 status = wrepl_request(wrepl_socket, wrepl_socket,
754 &repl_send, &repl_recv);
755 CHECK_STATUS(status, NT_STATUS_OK);
756 CHECK_VALUE(repl_recv->mess_type, WREPL_STOP_ASSOCIATION);
757 CHECK_VALUE(repl_recv->message.stop.reason, 0);
760 talloc_free(wrepl_socket);
764 static BOOL test_wrepl_is_applied(struct test_wrepl_conflict_conn *ctx,
765 const struct wrepl_wins_owner *owner,
766 const struct wrepl_wins_name *name,
771 struct wrepl_pull_names pull_names;
772 struct wrepl_name *names;
774 pull_names.in.assoc_ctx = ctx->pull_assoc;
775 pull_names.in.partner = *owner;
776 pull_names.in.partner.min_version = pull_names.in.partner.max_version;
778 status = wrepl_pull_names(ctx->pull, ctx->pull, &pull_names);
779 CHECK_STATUS(status, NT_STATUS_OK);
780 CHECK_VALUE(pull_names.out.num_names, (expected?1:0));
782 names = pull_names.out.names;
785 uint32_t flags = WREPL_NAME_FLAGS(names[0].type,
789 CHECK_VALUE(names[0].name.type, name->name->type);
790 CHECK_VALUE_STRING(names[0].name.name, name->name->name);
791 CHECK_VALUE_STRING(names[0].name.scope, name->name->scope);
792 CHECK_VALUE(flags, name->flags);
793 CHECK_VALUE_UINT64(names[0].version_id, name->id);
796 CHECK_VALUE(names[0].num_addresses,
797 name->addresses.addresses.num_ips);
799 CHECK_VALUE(names[0].num_addresses, 1);
800 CHECK_VALUE_STRING(names[0].addresses[0].address,
805 talloc_free(pull_names.out.names);
809 static BOOL test_wrepl_mhomed_merged(struct test_wrepl_conflict_conn *ctx,
810 const struct wrepl_wins_owner *owner1,
811 uint32_t num_ips1, const struct wrepl_ip *ips1,
812 const struct wrepl_wins_owner *owner2,
813 uint32_t num_ips2, const struct wrepl_ip *ips2,
814 const struct wrepl_wins_name *name2)
818 struct wrepl_pull_names pull_names;
819 struct wrepl_name *names;
822 uint32_t num_ips = num_ips1 + num_ips2;
824 for (i = 0; i < num_ips2; i++) {
825 for (j = 0; j < num_ips1; j++) {
826 if (strcmp(ips2[i].ip,ips1[j].ip) == 0) {
833 pull_names.in.assoc_ctx = ctx->pull_assoc;
834 pull_names.in.partner = *owner2;
835 pull_names.in.partner.min_version = pull_names.in.partner.max_version;
837 status = wrepl_pull_names(ctx->pull, ctx->pull, &pull_names);
838 CHECK_STATUS(status, NT_STATUS_OK);
839 CHECK_VALUE(pull_names.out.num_names, 1);
841 names = pull_names.out.names;
843 flags = WREPL_NAME_FLAGS(names[0].type,
847 CHECK_VALUE(names[0].name.type, name2->name->type);
848 CHECK_VALUE_STRING(names[0].name.name, name2->name->name);
849 CHECK_VALUE_STRING(names[0].name.scope, name2->name->scope);
850 CHECK_VALUE(flags, name2->flags | WREPL_TYPE_MHOMED);
851 CHECK_VALUE_UINT64(names[0].version_id, name2->id);
853 CHECK_VALUE(names[0].num_addresses, num_ips);
855 for (i = 0; i < names[0].num_addresses; i++) {
856 const char *addr = names[0].addresses[i].address;
857 const char *owner = names[0].addresses[i].owner;
860 for (j = 0; j < num_ips2; j++) {
861 if (strcmp(addr, ips2[j].ip) == 0) {
863 CHECK_VALUE_STRING(owner, owner2->address);
870 for (j = 0; j < num_ips1; j++) {
871 if (strcmp(addr, ips1[j].ip) == 0) {
873 CHECK_VALUE_STRING(owner, owner1->address);
880 CHECK_VALUE_STRING(addr, "not found in address list");
883 talloc_free(pull_names.out.names);
887 static BOOL test_wrepl_sgroup_merged(struct test_wrepl_conflict_conn *ctx,
888 struct wrepl_wins_owner *merge_owner,
889 struct wrepl_wins_owner *owner1,
890 uint32_t num_ips1, const struct wrepl_ip *ips1,
891 struct wrepl_wins_owner *owner2,
892 uint32_t num_ips2, const struct wrepl_ip *ips2,
893 const struct wrepl_wins_name *name2)
897 struct wrepl_pull_names pull_names;
898 struct wrepl_name *names;
899 struct wrepl_name *name = NULL;
902 uint32_t num_ips = num_ips1 + num_ips2;
905 merge_owner = &ctx->c;
908 for (i = 0; i < num_ips1; i++) {
909 if (owner1 != &ctx->c && strcmp(ips1[i].owner,owner2->address) == 0) {
913 for (j = 0; j < num_ips2; j++) {
914 if (strcmp(ips1[i].ip,ips2[j].ip) == 0) {
922 pull_names.in.assoc_ctx = ctx->pull_assoc;
923 pull_names.in.partner = *merge_owner;
924 pull_names.in.partner.min_version = pull_names.in.partner.max_version;
925 pull_names.in.partner.max_version = 0;
927 status = wrepl_pull_names(ctx->pull, ctx->pull, &pull_names);
928 CHECK_STATUS(status, NT_STATUS_OK);
930 names = pull_names.out.names;
932 for (i = 0; i < pull_names.out.num_names; i++) {
933 if (names[i].name.type != name2->name->type) continue;
934 if (!names[i].name.name) continue;
935 if (strcmp(names[i].name.name, name2->name->name) != 0) continue;
936 if (names[i].name.scope) continue;
941 if (pull_names.out.num_names > 0) {
942 merge_owner->max_version = names[pull_names.out.num_names-1].version_id;
946 printf("%s: Name '%s' not found\n", __location__, nbt_name_string(ctx, name2->name));
950 flags = WREPL_NAME_FLAGS(name->type,
954 CHECK_VALUE(name->name.type, name2->name->type);
955 CHECK_VALUE_STRING(name->name.name, name2->name->name);
956 CHECK_VALUE_STRING(name->name.scope, name2->name->scope);
957 CHECK_VALUE(flags, name2->flags);
959 CHECK_VALUE(name->num_addresses, num_ips);
961 for (i = 0; i < name->num_addresses; i++) {
962 const char *addr = name->addresses[i].address;
963 const char *owner = name->addresses[i].owner;
966 for (j = 0; j < num_ips2; j++) {
967 if (strcmp(addr, ips2[j].ip) == 0) {
969 CHECK_VALUE_STRING(owner, ips2[j].owner);
976 for (j = 0; j < num_ips1; j++) {
977 if (strcmp(addr, ips1[j].ip) == 0) {
979 if (owner1 == &ctx->c) {
980 CHECK_VALUE_STRING(owner, owner1->address);
982 CHECK_VALUE_STRING(owner, ips1[j].owner);
990 CHECK_VALUE_STRING(addr, "not found in address list");
993 talloc_free(pull_names.out.names);
997 static BOOL test_conflict_same_owner(struct test_wrepl_conflict_conn *ctx)
1000 struct nbt_name name;
1001 struct wrepl_wins_name wins_name1;
1002 struct wrepl_wins_name wins_name2;
1003 struct wrepl_wins_name *wins_name_tmp;
1004 struct wrepl_wins_name *wins_name_last;
1005 struct wrepl_wins_name *wins_name_cur;
1007 uint8_t types[] = { 0x00, 0x1C };
1009 enum wrepl_name_type type;
1010 enum wrepl_name_state state;
1011 enum wrepl_name_node node;
1014 const struct wrepl_ip *ips;
1017 .type = WREPL_TYPE_GROUP,
1018 .state = WREPL_STATE_ACTIVE,
1019 .node = WREPL_NODE_B,
1021 .num_ips = ARRAY_SIZE(addresses_A_1),
1022 .ips = addresses_A_1,
1024 .type = WREPL_TYPE_UNIQUE,
1025 .state = WREPL_STATE_ACTIVE,
1026 .node = WREPL_NODE_B,
1028 .num_ips = ARRAY_SIZE(addresses_A_1),
1029 .ips = addresses_A_1,
1031 .type = WREPL_TYPE_UNIQUE,
1032 .state = WREPL_STATE_ACTIVE,
1033 .node = WREPL_NODE_B,
1035 .num_ips = ARRAY_SIZE(addresses_A_2),
1036 .ips = addresses_A_2,
1038 .type = WREPL_TYPE_UNIQUE,
1039 .state = WREPL_STATE_ACTIVE,
1040 .node = WREPL_NODE_B,
1042 .num_ips = ARRAY_SIZE(addresses_A_1),
1043 .ips = addresses_A_1,
1045 .type = WREPL_TYPE_UNIQUE,
1046 .state = WREPL_STATE_ACTIVE,
1047 .node = WREPL_NODE_B,
1049 .num_ips = ARRAY_SIZE(addresses_A_2),
1050 .ips = addresses_A_2,
1052 .type = WREPL_TYPE_SGROUP,
1053 .state = WREPL_STATE_TOMBSTONE,
1054 .node = WREPL_NODE_B,
1056 .num_ips = ARRAY_SIZE(addresses_A_2),
1057 .ips = addresses_A_2,
1059 .type = WREPL_TYPE_MHOMED,
1060 .state = WREPL_STATE_TOMBSTONE,
1061 .node = WREPL_NODE_B,
1063 .num_ips = ARRAY_SIZE(addresses_A_1),
1064 .ips = addresses_A_1,
1066 .type = WREPL_TYPE_MHOMED,
1067 .state = WREPL_STATE_RELEASED,
1068 .node = WREPL_NODE_B,
1070 .num_ips = ARRAY_SIZE(addresses_A_2),
1071 .ips = addresses_A_2,
1073 .type = WREPL_TYPE_SGROUP,
1074 .state = WREPL_STATE_ACTIVE,
1075 .node = WREPL_NODE_B,
1077 .num_ips = ARRAY_SIZE(addresses_A_1),
1078 .ips = addresses_A_1,
1080 .type = WREPL_TYPE_SGROUP,
1081 .state = WREPL_STATE_ACTIVE,
1082 .node = WREPL_NODE_B,
1084 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1085 .ips = addresses_A_3_4,
1087 .type = WREPL_TYPE_SGROUP,
1088 .state = WREPL_STATE_TOMBSTONE,
1089 .node = WREPL_NODE_B,
1091 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1092 .ips = addresses_B_3_4,
1094 /* the last one should always be a unique,tomstone record! */
1095 .type = WREPL_TYPE_UNIQUE,
1096 .state = WREPL_STATE_TOMBSTONE,
1097 .node = WREPL_NODE_B,
1099 .num_ips = ARRAY_SIZE(addresses_A_1),
1100 .ips = addresses_A_1,
1104 name.name = "_SAME_OWNER_A";
1108 wins_name_tmp = NULL;
1109 wins_name_last = &wins_name2;
1110 wins_name_cur = &wins_name1;
1112 for (j=0; ret && j < ARRAY_SIZE(types); j++) {
1113 name.type = types[j];
1114 printf("Test Replica Conflicts with same owner[%s] for %s\n",
1115 nbt_name_string(ctx, &name), ctx->a.address);
1117 for(i=0; ret && i < ARRAY_SIZE(records); i++) {
1118 wins_name_tmp = wins_name_last;
1119 wins_name_last = wins_name_cur;
1120 wins_name_cur = wins_name_tmp;
1123 printf("%s,%s%s vs. %s,%s%s with %s ip(s) => %s\n",
1124 wrepl_name_type_string(records[i-1].type),
1125 wrepl_name_state_string(records[i-1].state),
1126 (records[i-1].is_static?",static":""),
1127 wrepl_name_type_string(records[i].type),
1128 wrepl_name_state_string(records[i].state),
1129 (records[i].is_static?",static":""),
1130 (records[i-1].ips==records[i].ips?"same":"different"),
1134 wins_name_cur->name = &name;
1135 wins_name_cur->flags = WREPL_NAME_FLAGS(records[i].type,
1138 records[i].is_static);
1139 wins_name_cur->id = ++ctx->a.max_version;
1140 if (wins_name_cur->flags & 2) {
1141 wins_name_cur->addresses.addresses.num_ips = records[i].num_ips;
1142 wins_name_cur->addresses.addresses.ips = discard_const(records[i].ips);
1144 wins_name_cur->addresses.ip = records[i].ips[0].ip;
1146 wins_name_cur->unknown = "255.255.255.255";
1148 ret &= test_wrepl_update_one(ctx, &ctx->a,wins_name_cur);
1149 if (records[i].state == WREPL_STATE_RELEASED) {
1150 ret &= test_wrepl_is_applied(ctx, &ctx->a, wins_name_last, False);
1151 ret &= test_wrepl_is_applied(ctx, &ctx->a, wins_name_cur, False);
1153 ret &= test_wrepl_is_applied(ctx, &ctx->a, wins_name_cur, True);
1156 /* the first one is a cleanup run */
1157 if (!ret && i == 0) ret = True;
1160 printf("conflict handled wrong or record[%u]: %s\n", i, __location__);
1168 static BOOL test_conflict_different_owner(struct test_wrepl_conflict_conn *ctx)
1171 struct wrepl_wins_name wins_name1;
1172 struct wrepl_wins_name wins_name2;
1173 struct wrepl_wins_name *wins_name_r1;
1174 struct wrepl_wins_name *wins_name_r2;
1177 const char *line; /* just better debugging */
1178 struct nbt_name name;
1179 const char *comment;
1180 BOOL extra; /* not the worst case, this is an extra test */
1183 struct wrepl_wins_owner *owner;
1184 enum wrepl_name_type type;
1185 enum wrepl_name_state state;
1186 enum wrepl_name_node node;
1189 const struct wrepl_ip *ips;
1190 BOOL apply_expected;
1192 struct wrepl_wins_owner *merge_owner;
1193 BOOL sgroup_cleanup;
1197 * NOTE: the first record and the last applied one
1198 * needs to be from the same owner,
1199 * to not conflict in the next smbtorture run!!!
1202 .line = __location__,
1203 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1207 .type = WREPL_TYPE_UNIQUE,
1208 .state = WREPL_STATE_TOMBSTONE,
1209 .node = WREPL_NODE_B,
1211 .num_ips = ARRAY_SIZE(addresses_B_1),
1212 .ips = addresses_B_1,
1213 .apply_expected = True /* ignored */
1217 .type = WREPL_TYPE_UNIQUE,
1218 .state = WREPL_STATE_TOMBSTONE,
1219 .node = WREPL_NODE_B,
1221 .num_ips = ARRAY_SIZE(addresses_A_1),
1222 .ips = addresses_A_1,
1223 .apply_expected = True /* ignored */
1228 * unique vs unique section
1231 * unique,active vs. unique,active
1232 * => should be replaced
1235 .line = __location__,
1236 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1239 .type = WREPL_TYPE_UNIQUE,
1240 .state = WREPL_STATE_ACTIVE,
1241 .node = WREPL_NODE_B,
1243 .num_ips = ARRAY_SIZE(addresses_A_1),
1244 .ips = addresses_A_1,
1245 .apply_expected = True
1249 .type = WREPL_TYPE_UNIQUE,
1250 .state = WREPL_STATE_ACTIVE,
1251 .node = WREPL_NODE_B,
1253 .num_ips = ARRAY_SIZE(addresses_B_1),
1254 .ips = addresses_B_1,
1255 .apply_expected = True
1260 * unique,active vs. unique,tombstone
1261 * => should NOT be replaced
1264 .line = __location__,
1265 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1268 .type = WREPL_TYPE_UNIQUE,
1269 .state = WREPL_STATE_ACTIVE,
1270 .node = WREPL_NODE_B,
1272 .num_ips = ARRAY_SIZE(addresses_B_1),
1273 .ips = addresses_B_1,
1274 .apply_expected = True
1278 .type = WREPL_TYPE_UNIQUE,
1279 .state = WREPL_STATE_TOMBSTONE,
1280 .node = WREPL_NODE_B,
1282 .num_ips = ARRAY_SIZE(addresses_B_1),
1283 .ips = addresses_B_1,
1284 .apply_expected = False
1289 * unique,released vs. unique,active
1290 * => should be replaced
1293 .line = __location__,
1294 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1297 .type = WREPL_TYPE_UNIQUE,
1298 .state = WREPL_STATE_RELEASED,
1299 .node = WREPL_NODE_B,
1301 .num_ips = ARRAY_SIZE(addresses_B_1),
1302 .ips = addresses_B_1,
1303 .apply_expected = False
1307 .type = WREPL_TYPE_UNIQUE,
1308 .state = WREPL_STATE_ACTIVE,
1309 .node = WREPL_NODE_B,
1311 .num_ips = ARRAY_SIZE(addresses_A_1),
1312 .ips = addresses_A_1,
1313 .apply_expected = True
1318 * unique,released vs. unique,tombstone
1319 * => should be replaced
1322 .line = __location__,
1323 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1326 .type = WREPL_TYPE_UNIQUE,
1327 .state = WREPL_STATE_RELEASED,
1328 .node = WREPL_NODE_B,
1330 .num_ips = ARRAY_SIZE(addresses_A_1),
1331 .ips = addresses_A_1,
1332 .apply_expected = False
1336 .type = WREPL_TYPE_UNIQUE,
1337 .state = WREPL_STATE_TOMBSTONE,
1338 .node = WREPL_NODE_B,
1340 .num_ips = ARRAY_SIZE(addresses_B_1),
1341 .ips = addresses_B_1,
1342 .apply_expected = True
1347 * unique,tombstone vs. unique,active
1348 * => should be replaced
1351 .line = __location__,
1352 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1355 .type = WREPL_TYPE_UNIQUE,
1356 .state = WREPL_STATE_TOMBSTONE,
1357 .node = WREPL_NODE_B,
1359 .num_ips = ARRAY_SIZE(addresses_B_1),
1360 .ips = addresses_B_1,
1361 .apply_expected = True
1365 .type = WREPL_TYPE_UNIQUE,
1366 .state = WREPL_STATE_ACTIVE,
1367 .node = WREPL_NODE_B,
1369 .num_ips = ARRAY_SIZE(addresses_A_1),
1370 .ips = addresses_A_1,
1371 .apply_expected = True
1376 * unique,tombstone vs. unique,tombstone
1377 * => should be replaced
1380 .line = __location__,
1381 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1384 .type = WREPL_TYPE_UNIQUE,
1385 .state = WREPL_STATE_TOMBSTONE,
1386 .node = WREPL_NODE_B,
1388 .num_ips = ARRAY_SIZE(addresses_A_1),
1389 .ips = addresses_A_1,
1390 .apply_expected = True
1394 .type = WREPL_TYPE_UNIQUE,
1395 .state = WREPL_STATE_TOMBSTONE,
1396 .node = WREPL_NODE_B,
1398 .num_ips = ARRAY_SIZE(addresses_B_1),
1399 .ips = addresses_B_1,
1400 .apply_expected = True
1406 * unique vs normal groups section,
1409 * unique,active vs. group,active
1410 * => should be replaced
1413 .line = __location__,
1414 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1417 .type = WREPL_TYPE_UNIQUE,
1418 .state = WREPL_STATE_ACTIVE,
1419 .node = WREPL_NODE_B,
1421 .num_ips = ARRAY_SIZE(addresses_B_1),
1422 .ips = addresses_B_1,
1423 .apply_expected = True
1427 .type = WREPL_TYPE_GROUP,
1428 .state = WREPL_STATE_ACTIVE,
1429 .node = WREPL_NODE_B,
1431 .num_ips = ARRAY_SIZE(addresses_A_1),
1432 .ips = addresses_A_1,
1433 .apply_expected = True
1438 * unique,active vs. group,tombstone
1439 * => should NOT be replaced
1442 .line = __location__,
1443 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1446 .type = WREPL_TYPE_UNIQUE,
1447 .state = WREPL_STATE_ACTIVE,
1448 .node = WREPL_NODE_B,
1450 .num_ips = ARRAY_SIZE(addresses_A_1),
1451 .ips = addresses_A_1,
1452 .apply_expected = True
1456 .type = WREPL_TYPE_GROUP,
1457 .state = WREPL_STATE_TOMBSTONE,
1458 .node = WREPL_NODE_B,
1460 .num_ips = ARRAY_SIZE(addresses_A_1),
1461 .ips = addresses_A_1,
1462 .apply_expected = False
1467 * unique,released vs. group,active
1468 * => should be replaced
1471 .line = __location__,
1472 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1475 .type = WREPL_TYPE_UNIQUE,
1476 .state = WREPL_STATE_RELEASED,
1477 .node = WREPL_NODE_B,
1479 .num_ips = ARRAY_SIZE(addresses_A_1),
1480 .ips = addresses_A_1,
1481 .apply_expected = False
1485 .type = WREPL_TYPE_GROUP,
1486 .state = WREPL_STATE_ACTIVE,
1487 .node = WREPL_NODE_B,
1489 .num_ips = ARRAY_SIZE(addresses_B_1),
1490 .ips = addresses_B_1,
1491 .apply_expected = True
1496 * unique,released vs. group,tombstone
1497 * => should be replaced
1500 .line = __location__,
1501 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1504 .type = WREPL_TYPE_UNIQUE,
1505 .state = WREPL_STATE_RELEASED,
1506 .node = WREPL_NODE_B,
1508 .num_ips = ARRAY_SIZE(addresses_B_1),
1509 .ips = addresses_B_1,
1510 .apply_expected = False
1514 .type = WREPL_TYPE_GROUP,
1515 .state = WREPL_STATE_TOMBSTONE,
1516 .node = WREPL_NODE_B,
1518 .num_ips = ARRAY_SIZE(addresses_A_1),
1519 .ips = addresses_A_1,
1520 .apply_expected = True
1525 * unique,tombstone vs. group,active
1526 * => should be replaced
1529 .line = __location__,
1530 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1533 .type = WREPL_TYPE_UNIQUE,
1534 .state = WREPL_STATE_TOMBSTONE,
1535 .node = WREPL_NODE_B,
1537 .num_ips = ARRAY_SIZE(addresses_A_1),
1538 .ips = addresses_A_1,
1539 .apply_expected = True
1543 .type = WREPL_TYPE_GROUP,
1544 .state = WREPL_STATE_ACTIVE,
1545 .node = WREPL_NODE_B,
1547 .num_ips = ARRAY_SIZE(addresses_B_1),
1548 .ips = addresses_B_1,
1549 .apply_expected = True
1554 * unique,tombstone vs. group,tombstone
1555 * => should be replaced
1558 .line = __location__,
1559 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1562 .type = WREPL_TYPE_UNIQUE,
1563 .state = WREPL_STATE_TOMBSTONE,
1564 .node = WREPL_NODE_B,
1566 .num_ips = ARRAY_SIZE(addresses_B_1),
1567 .ips = addresses_B_1,
1568 .apply_expected = True
1572 .type = WREPL_TYPE_GROUP,
1573 .state = WREPL_STATE_TOMBSTONE,
1574 .node = WREPL_NODE_B,
1576 .num_ips = ARRAY_SIZE(addresses_A_1),
1577 .ips = addresses_A_1,
1578 .apply_expected = True
1583 * unique vs special groups section,
1586 * unique,active vs. sgroup,active
1587 * => should NOT be replaced
1590 .line = __location__,
1591 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1594 .type = WREPL_TYPE_UNIQUE,
1595 .state = WREPL_STATE_ACTIVE,
1596 .node = WREPL_NODE_B,
1598 .num_ips = ARRAY_SIZE(addresses_A_1),
1599 .ips = addresses_A_1,
1600 .apply_expected = True
1604 .type = WREPL_TYPE_SGROUP,
1605 .state = WREPL_STATE_ACTIVE,
1606 .node = WREPL_NODE_B,
1608 .num_ips = ARRAY_SIZE(addresses_A_1),
1609 .ips = addresses_A_1,
1610 .apply_expected = False
1615 * unique,active vs. sgroup,tombstone
1616 * => should NOT be replaced
1619 .line = __location__,
1620 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1623 .type = WREPL_TYPE_UNIQUE,
1624 .state = WREPL_STATE_ACTIVE,
1625 .node = WREPL_NODE_B,
1627 .num_ips = ARRAY_SIZE(addresses_A_1),
1628 .ips = addresses_A_1,
1629 .apply_expected = True
1633 .type = WREPL_TYPE_SGROUP,
1634 .state = WREPL_STATE_TOMBSTONE,
1635 .node = WREPL_NODE_B,
1637 .num_ips = ARRAY_SIZE(addresses_A_1),
1638 .ips = addresses_A_1,
1639 .apply_expected = False
1644 * unique,released vs. sgroup,active
1645 * => should be replaced
1648 .line = __location__,
1649 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1652 .type = WREPL_TYPE_UNIQUE,
1653 .state = WREPL_STATE_RELEASED,
1654 .node = WREPL_NODE_B,
1656 .num_ips = ARRAY_SIZE(addresses_A_1),
1657 .ips = addresses_A_1,
1658 .apply_expected = False
1662 .type = WREPL_TYPE_SGROUP,
1663 .state = WREPL_STATE_ACTIVE,
1664 .node = WREPL_NODE_B,
1666 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1667 .ips = addresses_B_3_4,
1668 .apply_expected = True
1673 * unique,released vs. sgroup,tombstone
1674 * => should be replaced
1677 .line = __location__,
1678 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1681 .type = WREPL_TYPE_UNIQUE,
1682 .state = WREPL_STATE_RELEASED,
1683 .node = WREPL_NODE_B,
1685 .num_ips = ARRAY_SIZE(addresses_B_1),
1686 .ips = addresses_B_1,
1687 .apply_expected = False
1691 .type = WREPL_TYPE_SGROUP,
1692 .state = WREPL_STATE_TOMBSTONE,
1693 .node = WREPL_NODE_B,
1695 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1696 .ips = addresses_A_3_4,
1697 .apply_expected = True
1702 * unique,tombstone vs. sgroup,active
1703 * => should be replaced
1706 .line = __location__,
1707 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1710 .type = WREPL_TYPE_UNIQUE,
1711 .state = WREPL_STATE_TOMBSTONE,
1712 .node = WREPL_NODE_B,
1714 .num_ips = ARRAY_SIZE(addresses_A_1),
1715 .ips = addresses_A_1,
1716 .apply_expected = True
1720 .type = WREPL_TYPE_SGROUP,
1721 .state = WREPL_STATE_ACTIVE,
1722 .node = WREPL_NODE_B,
1724 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1725 .ips = addresses_B_3_4,
1726 .apply_expected = True
1731 * unique,tombstone vs. sgroup,tombstone
1732 * => should be replaced
1735 .line = __location__,
1736 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1739 .type = WREPL_TYPE_UNIQUE,
1740 .state = WREPL_STATE_TOMBSTONE,
1741 .node = WREPL_NODE_B,
1743 .num_ips = ARRAY_SIZE(addresses_B_1),
1744 .ips = addresses_B_1,
1745 .apply_expected = True
1749 .type = WREPL_TYPE_SGROUP,
1750 .state = WREPL_STATE_TOMBSTONE,
1751 .node = WREPL_NODE_B,
1753 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1754 .ips = addresses_A_3_4,
1755 .apply_expected = True
1760 * unique vs multi homed section,
1763 * unique,active vs. mhomed,active
1764 * => should be replaced
1767 .line = __location__,
1768 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1771 .type = WREPL_TYPE_UNIQUE,
1772 .state = WREPL_STATE_ACTIVE,
1773 .node = WREPL_NODE_B,
1775 .num_ips = ARRAY_SIZE(addresses_A_1),
1776 .ips = addresses_A_1,
1777 .apply_expected = True
1781 .type = WREPL_TYPE_MHOMED,
1782 .state = WREPL_STATE_ACTIVE,
1783 .node = WREPL_NODE_B,
1785 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1786 .ips = addresses_B_3_4,
1787 .apply_expected = True
1792 * unique,active vs. mhomed,tombstone
1793 * => should NOT be replaced
1796 .line = __location__,
1797 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1800 .type = WREPL_TYPE_UNIQUE,
1801 .state = WREPL_STATE_ACTIVE,
1802 .node = WREPL_NODE_B,
1804 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1805 .ips = addresses_B_3_4,
1806 .apply_expected = True
1810 .type = WREPL_TYPE_MHOMED,
1811 .state = WREPL_STATE_TOMBSTONE,
1812 .node = WREPL_NODE_B,
1814 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1815 .ips = addresses_B_3_4,
1816 .apply_expected = False
1821 * unique,released vs. mhomed,active
1822 * => should be replaced
1825 .line = __location__,
1826 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1829 .type = WREPL_TYPE_UNIQUE,
1830 .state = WREPL_STATE_RELEASED,
1831 .node = WREPL_NODE_B,
1833 .num_ips = ARRAY_SIZE(addresses_B_1),
1834 .ips = addresses_B_1,
1835 .apply_expected = False
1839 .type = WREPL_TYPE_MHOMED,
1840 .state = WREPL_STATE_ACTIVE,
1841 .node = WREPL_NODE_B,
1843 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1844 .ips = addresses_A_3_4,
1845 .apply_expected = True
1850 * unique,released vs. mhomed,tombstone
1851 * => should be replaced
1854 .line = __location__,
1855 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1858 .type = WREPL_TYPE_UNIQUE,
1859 .state = WREPL_STATE_RELEASED,
1860 .node = WREPL_NODE_B,
1862 .num_ips = ARRAY_SIZE(addresses_A_1),
1863 .ips = addresses_A_1,
1864 .apply_expected = False
1868 .type = WREPL_TYPE_MHOMED,
1869 .state = WREPL_STATE_TOMBSTONE,
1870 .node = WREPL_NODE_B,
1872 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1873 .ips = addresses_B_3_4,
1874 .apply_expected = True
1879 * unique,tombstone vs. mhomed,active
1880 * => should be replaced
1883 .line = __location__,
1884 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1887 .type = WREPL_TYPE_UNIQUE,
1888 .state = WREPL_STATE_TOMBSTONE,
1889 .node = WREPL_NODE_B,
1891 .num_ips = ARRAY_SIZE(addresses_B_1),
1892 .ips = addresses_B_1,
1893 .apply_expected = True
1897 .type = WREPL_TYPE_MHOMED,
1898 .state = WREPL_STATE_ACTIVE,
1899 .node = WREPL_NODE_B,
1901 .num_ips = ARRAY_SIZE(addresses_A_3_4),
1902 .ips = addresses_A_3_4,
1903 .apply_expected = True
1908 * unique,tombstone vs. mhomed,tombstone
1909 * => should be replaced
1912 .line = __location__,
1913 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1916 .type = WREPL_TYPE_UNIQUE,
1917 .state = WREPL_STATE_TOMBSTONE,
1918 .node = WREPL_NODE_B,
1920 .num_ips = ARRAY_SIZE(addresses_A_1),
1921 .ips = addresses_A_1,
1922 .apply_expected = True
1926 .type = WREPL_TYPE_MHOMED,
1927 .state = WREPL_STATE_TOMBSTONE,
1928 .node = WREPL_NODE_B,
1930 .num_ips = ARRAY_SIZE(addresses_B_3_4),
1931 .ips = addresses_B_3_4,
1932 .apply_expected = True
1937 * normal groups vs unique section,
1940 * group,active vs. unique,active
1941 * => should NOT be replaced
1944 .line = __location__,
1945 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1948 .type = WREPL_TYPE_GROUP,
1949 .state = WREPL_STATE_ACTIVE,
1950 .node = WREPL_NODE_B,
1952 .num_ips = ARRAY_SIZE(addresses_A_1),
1953 .ips = addresses_A_1,
1954 .apply_expected = True
1958 .type = WREPL_TYPE_UNIQUE,
1959 .state = WREPL_STATE_ACTIVE,
1960 .node = WREPL_NODE_B,
1962 .num_ips = ARRAY_SIZE(addresses_A_1),
1963 .ips = addresses_A_1,
1964 .apply_expected = False
1969 * group,active vs. unique,tombstone
1970 * => should NOT be replaced
1973 .line = __location__,
1974 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
1977 .type = WREPL_TYPE_GROUP,
1978 .state = WREPL_STATE_ACTIVE,
1979 .node = WREPL_NODE_B,
1981 .num_ips = ARRAY_SIZE(addresses_A_1),
1982 .ips = addresses_A_1,
1983 .apply_expected = True
1987 .type = WREPL_TYPE_UNIQUE,
1988 .state = WREPL_STATE_TOMBSTONE,
1989 .node = WREPL_NODE_B,
1991 .num_ips = ARRAY_SIZE(addresses_A_1),
1992 .ips = addresses_A_1,
1993 .apply_expected = False
1998 * group,released vs. unique,active
1999 * => should NOT be replaced
2002 .line = __location__,
2003 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2006 .type = WREPL_TYPE_GROUP,
2007 .state = WREPL_STATE_RELEASED,
2008 .node = WREPL_NODE_B,
2010 .num_ips = ARRAY_SIZE(addresses_A_1),
2011 .ips = addresses_A_1,
2012 .apply_expected = False
2016 .type = WREPL_TYPE_UNIQUE,
2017 .state = WREPL_STATE_ACTIVE,
2018 .node = WREPL_NODE_B,
2020 .num_ips = ARRAY_SIZE(addresses_A_1),
2021 .ips = addresses_A_1,
2022 .apply_expected = False
2027 * group,released vs. unique,tombstone
2028 * => should NOT be replaced
2031 .line = __location__,
2032 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2035 .type = WREPL_TYPE_GROUP,
2036 .state = WREPL_STATE_RELEASED,
2037 .node = WREPL_NODE_B,
2039 .num_ips = ARRAY_SIZE(addresses_A_1),
2040 .ips = addresses_A_1,
2041 .apply_expected = False
2045 .type = WREPL_TYPE_UNIQUE,
2046 .state = WREPL_STATE_TOMBSTONE,
2047 .node = WREPL_NODE_B,
2049 .num_ips = ARRAY_SIZE(addresses_A_1),
2050 .ips = addresses_A_1,
2051 .apply_expected = False
2056 * group,tombstone vs. unique,active
2057 * => should NOT be replaced
2060 .line = __location__,
2061 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2064 .type = WREPL_TYPE_GROUP,
2065 .state = WREPL_STATE_TOMBSTONE,
2066 .node = WREPL_NODE_B,
2068 .num_ips = ARRAY_SIZE(addresses_A_1),
2069 .ips = addresses_A_1,
2070 .apply_expected = True
2074 .type = WREPL_TYPE_UNIQUE,
2075 .state = WREPL_STATE_ACTIVE,
2076 .node = WREPL_NODE_B,
2078 .num_ips = ARRAY_SIZE(addresses_A_1),
2079 .ips = addresses_A_1,
2080 .apply_expected = False
2085 * group,tombstone vs. unique,tombstone
2086 * => should NOT be replaced
2089 .line = __location__,
2090 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2093 .type = WREPL_TYPE_GROUP,
2094 .state = WREPL_STATE_TOMBSTONE,
2095 .node = WREPL_NODE_B,
2097 .num_ips = ARRAY_SIZE(addresses_A_1),
2098 .ips = addresses_A_1,
2099 .apply_expected = True
2103 .type = WREPL_TYPE_UNIQUE,
2104 .state = WREPL_STATE_TOMBSTONE,
2105 .node = WREPL_NODE_B,
2107 .num_ips = ARRAY_SIZE(addresses_A_1),
2108 .ips = addresses_A_1,
2109 .apply_expected = False
2114 * normal groups vs normal groups section,
2117 * group,active vs. group,active
2118 * => should NOT be replaced
2121 .line = __location__,
2122 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2125 .type = WREPL_TYPE_GROUP,
2126 .state = WREPL_STATE_ACTIVE,
2127 .node = WREPL_NODE_B,
2129 .num_ips = ARRAY_SIZE(addresses_A_1),
2130 .ips = addresses_A_1,
2131 .apply_expected = True
2135 .type = WREPL_TYPE_GROUP,
2136 .state = WREPL_STATE_ACTIVE,
2137 .node = WREPL_NODE_B,
2139 .num_ips = ARRAY_SIZE(addresses_A_1),
2140 .ips = addresses_A_1,
2141 .apply_expected = False
2146 * group,active vs. group,tombstone
2147 * => should NOT be replaced
2150 .line = __location__,
2151 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2154 .type = WREPL_TYPE_GROUP,
2155 .state = WREPL_STATE_ACTIVE,
2156 .node = WREPL_NODE_B,
2158 .num_ips = ARRAY_SIZE(addresses_A_1),
2159 .ips = addresses_A_1,
2160 .apply_expected = True
2164 .type = WREPL_TYPE_GROUP,
2165 .state = WREPL_STATE_TOMBSTONE,
2166 .node = WREPL_NODE_B,
2168 .num_ips = ARRAY_SIZE(addresses_A_1),
2169 .ips = addresses_A_1,
2170 .apply_expected = False
2175 * group,released vs. group,active
2176 * => should be replaced
2179 .line = __location__,
2180 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2183 .type = WREPL_TYPE_GROUP,
2184 .state = WREPL_STATE_RELEASED,
2185 .node = WREPL_NODE_B,
2187 .num_ips = ARRAY_SIZE(addresses_A_1),
2188 .ips = addresses_A_1,
2189 .apply_expected = False
2193 .type = WREPL_TYPE_GROUP,
2194 .state = WREPL_STATE_ACTIVE,
2195 .node = WREPL_NODE_B,
2197 .num_ips = ARRAY_SIZE(addresses_B_1),
2198 .ips = addresses_B_1,
2199 .apply_expected = True
2204 * group,released vs. group,tombstone
2205 * => should be replaced
2208 .line = __location__,
2209 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2212 .type = WREPL_TYPE_GROUP,
2213 .state = WREPL_STATE_RELEASED,
2214 .node = WREPL_NODE_B,
2216 .num_ips = ARRAY_SIZE(addresses_A_1),
2217 .ips = addresses_A_1,
2218 .apply_expected = False
2222 .type = WREPL_TYPE_GROUP,
2223 .state = WREPL_STATE_TOMBSTONE,
2224 .node = WREPL_NODE_B,
2226 .num_ips = ARRAY_SIZE(addresses_B_1),
2227 .ips = addresses_B_1,
2228 .apply_expected = True
2233 * group,tombstone vs. group,active
2234 * => should be replaced
2237 .line = __location__,
2238 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2241 .type = WREPL_TYPE_GROUP,
2242 .state = WREPL_STATE_TOMBSTONE,
2243 .node = WREPL_NODE_B,
2245 .num_ips = ARRAY_SIZE(addresses_B_1),
2246 .ips = addresses_B_1,
2247 .apply_expected = True
2251 .type = WREPL_TYPE_GROUP,
2252 .state = WREPL_STATE_ACTIVE,
2253 .node = WREPL_NODE_B,
2255 .num_ips = ARRAY_SIZE(addresses_A_1),
2256 .ips = addresses_A_1,
2257 .apply_expected = True
2262 * group,tombstone vs. group,tombstone
2263 * => should be replaced
2266 .line = __location__,
2267 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2270 .type = WREPL_TYPE_GROUP,
2271 .state = WREPL_STATE_TOMBSTONE,
2272 .node = WREPL_NODE_B,
2274 .num_ips = ARRAY_SIZE(addresses_A_1),
2275 .ips = addresses_A_1,
2276 .apply_expected = True
2280 .type = WREPL_TYPE_GROUP,
2281 .state = WREPL_STATE_TOMBSTONE,
2282 .node = WREPL_NODE_B,
2284 .num_ips = ARRAY_SIZE(addresses_B_1),
2285 .ips = addresses_B_1,
2286 .apply_expected = True
2291 * normal groups vs special groups section,
2294 * group,active vs. sgroup,active
2295 * => should NOT be replaced
2298 .line = __location__,
2299 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2302 .type = WREPL_TYPE_GROUP,
2303 .state = WREPL_STATE_ACTIVE,
2304 .node = WREPL_NODE_B,
2306 .num_ips = ARRAY_SIZE(addresses_B_1),
2307 .ips = addresses_B_1,
2308 .apply_expected = True
2312 .type = WREPL_TYPE_SGROUP,
2313 .state = WREPL_STATE_ACTIVE,
2314 .node = WREPL_NODE_B,
2316 .num_ips = ARRAY_SIZE(addresses_B_1),
2317 .ips = addresses_B_1,
2318 .apply_expected = False
2323 * group,active vs. sgroup,tombstone
2324 * => should NOT be replaced
2327 .line = __location__,
2328 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2331 .type = WREPL_TYPE_GROUP,
2332 .state = WREPL_STATE_ACTIVE,
2333 .node = WREPL_NODE_B,
2335 .num_ips = ARRAY_SIZE(addresses_B_1),
2336 .ips = addresses_B_1,
2337 .apply_expected = True
2341 .type = WREPL_TYPE_SGROUP,
2342 .state = WREPL_STATE_TOMBSTONE,
2343 .node = WREPL_NODE_B,
2345 .num_ips = ARRAY_SIZE(addresses_B_1),
2346 .ips = addresses_B_1,
2347 .apply_expected = False
2352 * group,released vs. sgroup,active
2353 * => should be replaced
2356 .line = __location__,
2357 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2360 .type = WREPL_TYPE_GROUP,
2361 .state = WREPL_STATE_RELEASED,
2362 .node = WREPL_NODE_B,
2364 .num_ips = ARRAY_SIZE(addresses_A_1),
2365 .ips = addresses_A_1,
2366 .apply_expected = False
2370 .type = WREPL_TYPE_SGROUP,
2371 .state = WREPL_STATE_ACTIVE,
2372 .node = WREPL_NODE_B,
2374 .num_ips = ARRAY_SIZE(addresses_B_1),
2375 .ips = addresses_B_1,
2376 .apply_expected = True
2381 * group,released vs. sgroup,tombstone
2382 * => should NOT be replaced
2385 .line = __location__,
2386 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2389 .type = WREPL_TYPE_GROUP,
2390 .state = WREPL_STATE_RELEASED,
2391 .node = WREPL_NODE_B,
2393 .num_ips = ARRAY_SIZE(addresses_B_1),
2394 .ips = addresses_B_1,
2395 .apply_expected = False
2399 .type = WREPL_TYPE_SGROUP,
2400 .state = WREPL_STATE_TOMBSTONE,
2401 .node = WREPL_NODE_B,
2403 .num_ips = ARRAY_SIZE(addresses_B_1),
2404 .ips = addresses_B_1,
2405 .apply_expected = False
2410 * group,tombstone vs. sgroup,active
2411 * => should be replaced
2414 .line = __location__,
2415 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2418 .type = WREPL_TYPE_GROUP,
2419 .state = WREPL_STATE_TOMBSTONE,
2420 .node = WREPL_NODE_B,
2422 .num_ips = ARRAY_SIZE(addresses_B_1),
2423 .ips = addresses_B_1,
2424 .apply_expected = True
2428 .type = WREPL_TYPE_SGROUP,
2429 .state = WREPL_STATE_ACTIVE,
2430 .node = WREPL_NODE_B,
2432 .num_ips = ARRAY_SIZE(addresses_A_1),
2433 .ips = addresses_A_1,
2434 .apply_expected = True
2439 * group,tombstone vs. sgroup,tombstone
2440 * => should be replaced
2443 .line = __location__,
2444 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2447 .type = WREPL_TYPE_GROUP,
2448 .state = WREPL_STATE_TOMBSTONE,
2449 .node = WREPL_NODE_B,
2451 .num_ips = ARRAY_SIZE(addresses_A_1),
2452 .ips = addresses_A_1,
2453 .apply_expected = True
2457 .type = WREPL_TYPE_SGROUP,
2458 .state = WREPL_STATE_TOMBSTONE,
2459 .node = WREPL_NODE_B,
2461 .num_ips = ARRAY_SIZE(addresses_B_1),
2462 .ips = addresses_B_1,
2463 .apply_expected = True
2468 * normal groups vs multi homed section,
2471 * group,active vs. mhomed,active
2472 * => should NOT be replaced
2475 .line = __location__,
2476 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2479 .type = WREPL_TYPE_GROUP,
2480 .state = WREPL_STATE_ACTIVE,
2481 .node = WREPL_NODE_B,
2483 .num_ips = ARRAY_SIZE(addresses_B_1),
2484 .ips = addresses_B_1,
2485 .apply_expected = True
2489 .type = WREPL_TYPE_MHOMED,
2490 .state = WREPL_STATE_ACTIVE,
2491 .node = WREPL_NODE_B,
2493 .num_ips = ARRAY_SIZE(addresses_B_1),
2494 .ips = addresses_B_1,
2495 .apply_expected = False
2500 * group,active vs. mhomed,tombstone
2501 * => should NOT be replaced
2504 .line = __location__,
2505 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2508 .type = WREPL_TYPE_GROUP,
2509 .state = WREPL_STATE_ACTIVE,
2510 .node = WREPL_NODE_B,
2512 .num_ips = ARRAY_SIZE(addresses_B_1),
2513 .ips = addresses_B_1,
2514 .apply_expected = True
2518 .type = WREPL_TYPE_MHOMED,
2519 .state = WREPL_STATE_TOMBSTONE,
2520 .node = WREPL_NODE_B,
2522 .num_ips = ARRAY_SIZE(addresses_B_1),
2523 .ips = addresses_B_1,
2524 .apply_expected = False
2529 * group,released vs. mhomed,active
2530 * => should NOT be replaced
2533 .line = __location__,
2534 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2537 .type = WREPL_TYPE_GROUP,
2538 .state = WREPL_STATE_RELEASED,
2539 .node = WREPL_NODE_B,
2541 .num_ips = ARRAY_SIZE(addresses_B_1),
2542 .ips = addresses_B_1,
2543 .apply_expected = False
2547 .type = WREPL_TYPE_MHOMED,
2548 .state = WREPL_STATE_ACTIVE,
2549 .node = WREPL_NODE_B,
2551 .num_ips = ARRAY_SIZE(addresses_B_1),
2552 .ips = addresses_B_1,
2553 .apply_expected = False
2558 * group,released vs. mhomed,tombstone
2559 * => should NOT be replaced
2562 .line = __location__,
2563 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2566 .type = WREPL_TYPE_GROUP,
2567 .state = WREPL_STATE_RELEASED,
2568 .node = WREPL_NODE_B,
2570 .num_ips = ARRAY_SIZE(addresses_B_1),
2571 .ips = addresses_B_1,
2572 .apply_expected = False
2576 .type = WREPL_TYPE_MHOMED,
2577 .state = WREPL_STATE_TOMBSTONE,
2578 .node = WREPL_NODE_B,
2580 .num_ips = ARRAY_SIZE(addresses_B_1),
2581 .ips = addresses_B_1,
2582 .apply_expected = False
2587 * group,tombstone vs. mhomed,active
2588 * => should be replaced
2591 .line = __location__,
2592 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2595 .type = WREPL_TYPE_GROUP,
2596 .state = WREPL_STATE_TOMBSTONE,
2597 .node = WREPL_NODE_B,
2599 .num_ips = ARRAY_SIZE(addresses_B_1),
2600 .ips = addresses_B_1,
2601 .apply_expected = True
2605 .type = WREPL_TYPE_MHOMED,
2606 .state = WREPL_STATE_ACTIVE,
2607 .node = WREPL_NODE_B,
2609 .num_ips = ARRAY_SIZE(addresses_A_1),
2610 .ips = addresses_A_1,
2611 .apply_expected = True
2616 * group,tombstone vs. mhomed,tombstone
2617 * => should be replaced
2620 .line = __location__,
2621 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2624 .type = WREPL_TYPE_GROUP,
2625 .state = WREPL_STATE_TOMBSTONE,
2626 .node = WREPL_NODE_B,
2628 .num_ips = ARRAY_SIZE(addresses_A_1),
2629 .ips = addresses_A_1,
2630 .apply_expected = True
2634 .type = WREPL_TYPE_MHOMED,
2635 .state = WREPL_STATE_TOMBSTONE,
2636 .node = WREPL_NODE_B,
2638 .num_ips = ARRAY_SIZE(addresses_B_1),
2639 .ips = addresses_B_1,
2640 .apply_expected = True
2645 * special groups vs unique section,
2648 * sgroup,active vs. unique,active
2649 * => should NOT be replaced
2652 .line = __location__,
2653 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2656 .type = WREPL_TYPE_SGROUP,
2657 .state = WREPL_STATE_ACTIVE,
2658 .node = WREPL_NODE_B,
2660 .num_ips = ARRAY_SIZE(addresses_B_1),
2661 .ips = addresses_B_1,
2662 .apply_expected = True
2666 .type = WREPL_TYPE_UNIQUE,
2667 .state = WREPL_STATE_ACTIVE,
2668 .node = WREPL_NODE_B,
2670 .num_ips = ARRAY_SIZE(addresses_B_1),
2671 .ips = addresses_B_1,
2672 .apply_expected = False
2677 * sgroup,active vs. unique,tombstone
2678 * => should NOT be replaced
2681 .line = __location__,
2682 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2685 .type = WREPL_TYPE_SGROUP,
2686 .state = WREPL_STATE_ACTIVE,
2687 .node = WREPL_NODE_B,
2689 .num_ips = ARRAY_SIZE(addresses_B_1),
2690 .ips = addresses_B_1,
2691 .apply_expected = True
2695 .type = WREPL_TYPE_UNIQUE,
2696 .state = WREPL_STATE_TOMBSTONE,
2697 .node = WREPL_NODE_B,
2699 .num_ips = ARRAY_SIZE(addresses_B_1),
2700 .ips = addresses_B_1,
2701 .apply_expected = False
2706 * sgroup,released vs. unique,active
2707 * => should be replaced
2710 .line = __location__,
2711 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2714 .type = WREPL_TYPE_SGROUP,
2715 .state = WREPL_STATE_RELEASED,
2716 .node = WREPL_NODE_B,
2718 .num_ips = ARRAY_SIZE(addresses_B_1),
2719 .ips = addresses_B_1,
2720 .apply_expected = False
2724 .type = WREPL_TYPE_UNIQUE,
2725 .state = WREPL_STATE_ACTIVE,
2726 .node = WREPL_NODE_B,
2728 .num_ips = ARRAY_SIZE(addresses_A_1),
2729 .ips = addresses_A_1,
2730 .apply_expected = True
2735 * sgroup,released vs. unique,tombstone
2736 * => should be replaced
2739 .line = __location__,
2740 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2743 .type = WREPL_TYPE_SGROUP,
2744 .state = WREPL_STATE_RELEASED,
2745 .node = WREPL_NODE_B,
2747 .num_ips = ARRAY_SIZE(addresses_A_1),
2748 .ips = addresses_A_1,
2749 .apply_expected = False
2753 .type = WREPL_TYPE_UNIQUE,
2754 .state = WREPL_STATE_TOMBSTONE,
2755 .node = WREPL_NODE_B,
2757 .num_ips = ARRAY_SIZE(addresses_B_1),
2758 .ips = addresses_B_1,
2759 .apply_expected = True
2764 * sgroup,tombstone vs. unique,active
2765 * => should be replaced
2768 .line = __location__,
2769 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2772 .type = WREPL_TYPE_SGROUP,
2773 .state = WREPL_STATE_TOMBSTONE,
2774 .node = WREPL_NODE_B,
2776 .num_ips = ARRAY_SIZE(addresses_A_1),
2777 .ips = addresses_A_1,
2778 .apply_expected = True
2782 .type = WREPL_TYPE_UNIQUE,
2783 .state = WREPL_STATE_ACTIVE,
2784 .node = WREPL_NODE_B,
2786 .num_ips = ARRAY_SIZE(addresses_B_1),
2787 .ips = addresses_B_1,
2788 .apply_expected = True
2793 * sgroup,tombstone vs. unique,tombstone
2794 * => should be replaced
2797 .line = __location__,
2798 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2801 .type = WREPL_TYPE_SGROUP,
2802 .state = WREPL_STATE_TOMBSTONE,
2803 .node = WREPL_NODE_B,
2805 .num_ips = ARRAY_SIZE(addresses_B_1),
2806 .ips = addresses_B_1,
2807 .apply_expected = True
2811 .type = WREPL_TYPE_UNIQUE,
2812 .state = WREPL_STATE_TOMBSTONE,
2813 .node = WREPL_NODE_B,
2815 .num_ips = ARRAY_SIZE(addresses_A_1),
2816 .ips = addresses_A_1,
2817 .apply_expected = True
2822 * special groups vs normal group section,
2825 * sgroup,active vs. group,active
2826 * => should NOT be replaced
2829 .line = __location__,
2830 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2833 .type = WREPL_TYPE_SGROUP,
2834 .state = WREPL_STATE_ACTIVE,
2835 .node = WREPL_NODE_B,
2837 .num_ips = ARRAY_SIZE(addresses_A_1),
2838 .ips = addresses_A_1,
2839 .apply_expected = True
2843 .type = WREPL_TYPE_GROUP,
2844 .state = WREPL_STATE_ACTIVE,
2845 .node = WREPL_NODE_B,
2847 .num_ips = ARRAY_SIZE(addresses_A_1),
2848 .ips = addresses_A_1,
2849 .apply_expected = False
2854 * sgroup,active vs. group,tombstone
2855 * => should NOT be replaced
2858 .line = __location__,
2859 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2862 .type = WREPL_TYPE_SGROUP,
2863 .state = WREPL_STATE_ACTIVE,
2864 .node = WREPL_NODE_B,
2866 .num_ips = ARRAY_SIZE(addresses_A_1),
2867 .ips = addresses_A_1,
2868 .apply_expected = True
2872 .type = WREPL_TYPE_GROUP,
2873 .state = WREPL_STATE_TOMBSTONE,
2874 .node = WREPL_NODE_B,
2876 .num_ips = ARRAY_SIZE(addresses_A_1),
2877 .ips = addresses_A_1,
2878 .apply_expected = False
2883 * sgroup,released vs. group,active
2884 * => should be replaced
2887 .line = __location__,
2888 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2891 .type = WREPL_TYPE_SGROUP,
2892 .state = WREPL_STATE_RELEASED,
2893 .node = WREPL_NODE_B,
2895 .num_ips = ARRAY_SIZE(addresses_A_1),
2896 .ips = addresses_A_1,
2897 .apply_expected = False
2901 .type = WREPL_TYPE_GROUP,
2902 .state = WREPL_STATE_ACTIVE,
2903 .node = WREPL_NODE_B,
2905 .num_ips = ARRAY_SIZE(addresses_B_1),
2906 .ips = addresses_B_1,
2907 .apply_expected = True
2912 * sgroup,released vs. group,tombstone
2913 * => should be replaced
2916 .line = __location__,
2917 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2920 .type = WREPL_TYPE_SGROUP,
2921 .state = WREPL_STATE_RELEASED,
2922 .node = WREPL_NODE_B,
2924 .num_ips = ARRAY_SIZE(addresses_B_1),
2925 .ips = addresses_B_1,
2926 .apply_expected = False
2930 .type = WREPL_TYPE_GROUP,
2931 .state = WREPL_STATE_TOMBSTONE,
2932 .node = WREPL_NODE_B,
2934 .num_ips = ARRAY_SIZE(addresses_A_1),
2935 .ips = addresses_A_1,
2936 .apply_expected = True
2941 * sgroup,tombstone vs. group,active
2942 * => should NOT be replaced
2945 .line = __location__,
2946 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2949 .type = WREPL_TYPE_SGROUP,
2950 .state = WREPL_STATE_TOMBSTONE,
2951 .node = WREPL_NODE_B,
2953 .num_ips = ARRAY_SIZE(addresses_A_1),
2954 .ips = addresses_A_1,
2955 .apply_expected = True
2959 .type = WREPL_TYPE_GROUP,
2960 .state = WREPL_STATE_ACTIVE,
2961 .node = WREPL_NODE_B,
2963 .num_ips = ARRAY_SIZE(addresses_B_1),
2964 .ips = addresses_B_1,
2965 .apply_expected = True
2970 * sgroup,tombstone vs. group,tombstone
2971 * => should NOT be replaced
2974 .line = __location__,
2975 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
2978 .type = WREPL_TYPE_SGROUP,
2979 .state = WREPL_STATE_TOMBSTONE,
2980 .node = WREPL_NODE_B,
2982 .num_ips = ARRAY_SIZE(addresses_B_1),
2983 .ips = addresses_B_1,
2984 .apply_expected = True
2988 .type = WREPL_TYPE_GROUP,
2989 .state = WREPL_STATE_TOMBSTONE,
2990 .node = WREPL_NODE_B,
2992 .num_ips = ARRAY_SIZE(addresses_A_1),
2993 .ips = addresses_A_1,
2994 .apply_expected = True
2999 * special groups (not active) vs special group section,
3002 * sgroup,released vs. sgroup,active
3003 * => should be replaced
3006 .line = __location__,
3007 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3010 .type = WREPL_TYPE_SGROUP,
3011 .state = WREPL_STATE_RELEASED,
3012 .node = WREPL_NODE_B,
3014 .num_ips = ARRAY_SIZE(addresses_A_1),
3015 .ips = addresses_A_1,
3016 .apply_expected = False
3020 .type = WREPL_TYPE_SGROUP,
3021 .state = WREPL_STATE_ACTIVE,
3022 .node = WREPL_NODE_B,
3024 .num_ips = ARRAY_SIZE(addresses_B_1),
3025 .ips = addresses_B_1,
3026 .apply_expected = True
3031 * sgroup,released vs. sgroup,tombstone
3032 * => should be replaced
3035 .line = __location__,
3036 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3039 .type = WREPL_TYPE_SGROUP,
3040 .state = WREPL_STATE_RELEASED,
3041 .node = WREPL_NODE_B,
3043 .num_ips = ARRAY_SIZE(addresses_B_1),
3044 .ips = addresses_B_1,
3045 .apply_expected = False
3049 .type = WREPL_TYPE_SGROUP,
3050 .state = WREPL_STATE_TOMBSTONE,
3051 .node = WREPL_NODE_B,
3053 .num_ips = ARRAY_SIZE(addresses_A_1),
3054 .ips = addresses_A_1,
3055 .apply_expected = True
3060 * sgroup,tombstone vs. sgroup,active
3061 * => should NOT be replaced
3064 .line = __location__,
3065 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3068 .type = WREPL_TYPE_SGROUP,
3069 .state = WREPL_STATE_TOMBSTONE,
3070 .node = WREPL_NODE_B,
3072 .num_ips = ARRAY_SIZE(addresses_A_1),
3073 .ips = addresses_A_1,
3074 .apply_expected = True
3078 .type = WREPL_TYPE_SGROUP,
3079 .state = WREPL_STATE_ACTIVE,
3080 .node = WREPL_NODE_B,
3082 .num_ips = ARRAY_SIZE(addresses_B_1),
3083 .ips = addresses_B_1,
3084 .apply_expected = True
3089 * sgroup,tombstone vs. sgroup,tombstone
3090 * => should NOT be replaced
3093 .line = __location__,
3094 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3097 .type = WREPL_TYPE_SGROUP,
3098 .state = WREPL_STATE_TOMBSTONE,
3099 .node = WREPL_NODE_B,
3101 .num_ips = ARRAY_SIZE(addresses_B_1),
3102 .ips = addresses_B_1,
3103 .apply_expected = True
3107 .type = WREPL_TYPE_SGROUP,
3108 .state = WREPL_STATE_TOMBSTONE,
3109 .node = WREPL_NODE_B,
3111 .num_ips = ARRAY_SIZE(addresses_A_1),
3112 .ips = addresses_A_1,
3113 .apply_expected = True
3118 * special groups vs multi homed section,
3121 * sgroup,active vs. mhomed,active
3122 * => should NOT be replaced
3125 .line = __location__,
3126 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3129 .type = WREPL_TYPE_SGROUP,
3130 .state = WREPL_STATE_ACTIVE,
3131 .node = WREPL_NODE_B,
3133 .num_ips = ARRAY_SIZE(addresses_A_1),
3134 .ips = addresses_A_1,
3135 .apply_expected = True
3139 .type = WREPL_TYPE_MHOMED,
3140 .state = WREPL_STATE_ACTIVE,
3141 .node = WREPL_NODE_B,
3143 .num_ips = ARRAY_SIZE(addresses_A_1),
3144 .ips = addresses_A_1,
3145 .apply_expected = False
3150 * sgroup,active vs. mhomed,tombstone
3151 * => should NOT be replaced
3154 .line = __location__,
3155 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3158 .type = WREPL_TYPE_SGROUP,
3159 .state = WREPL_STATE_ACTIVE,
3160 .node = WREPL_NODE_B,
3162 .num_ips = ARRAY_SIZE(addresses_A_1),
3163 .ips = addresses_A_1,
3164 .apply_expected = True
3168 .type = WREPL_TYPE_MHOMED,
3169 .state = WREPL_STATE_TOMBSTONE,
3170 .node = WREPL_NODE_B,
3172 .num_ips = ARRAY_SIZE(addresses_A_1),
3173 .ips = addresses_A_1,
3174 .apply_expected = False
3179 * sgroup,released vs. mhomed,active
3180 * => should be replaced
3183 .line = __location__,
3184 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3187 .type = WREPL_TYPE_SGROUP,
3188 .state = WREPL_STATE_RELEASED,
3189 .node = WREPL_NODE_B,
3191 .num_ips = ARRAY_SIZE(addresses_A_1),
3192 .ips = addresses_A_1,
3193 .apply_expected = False
3197 .type = WREPL_TYPE_MHOMED,
3198 .state = WREPL_STATE_ACTIVE,
3199 .node = WREPL_NODE_B,
3201 .num_ips = ARRAY_SIZE(addresses_B_1),
3202 .ips = addresses_B_1,
3203 .apply_expected = True
3208 * sgroup,released vs. mhomed,tombstone
3209 * => should be replaced
3212 .line = __location__,
3213 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3216 .type = WREPL_TYPE_SGROUP,
3217 .state = WREPL_STATE_RELEASED,
3218 .node = WREPL_NODE_B,
3220 .num_ips = ARRAY_SIZE(addresses_B_1),
3221 .ips = addresses_B_1,
3222 .apply_expected = False
3226 .type = WREPL_TYPE_MHOMED,
3227 .state = WREPL_STATE_TOMBSTONE,
3228 .node = WREPL_NODE_B,
3230 .num_ips = ARRAY_SIZE(addresses_A_1),
3231 .ips = addresses_A_1,
3232 .apply_expected = True
3237 * sgroup,tombstone vs. mhomed,active
3238 * => should be replaced
3241 .line = __location__,
3242 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3245 .type = WREPL_TYPE_SGROUP,
3246 .state = WREPL_STATE_TOMBSTONE,
3247 .node = WREPL_NODE_B,
3249 .num_ips = ARRAY_SIZE(addresses_A_1),
3250 .ips = addresses_A_1,
3251 .apply_expected = True
3255 .type = WREPL_TYPE_MHOMED,
3256 .state = WREPL_STATE_ACTIVE,
3257 .node = WREPL_NODE_B,
3259 .num_ips = ARRAY_SIZE(addresses_B_1),
3260 .ips = addresses_B_1,
3261 .apply_expected = True
3266 * sgroup,tombstone vs. mhomed,tombstone
3267 * => should be replaced
3270 .line = __location__,
3271 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3274 .type = WREPL_TYPE_SGROUP,
3275 .state = WREPL_STATE_TOMBSTONE,
3276 .node = WREPL_NODE_B,
3278 .num_ips = ARRAY_SIZE(addresses_B_1),
3279 .ips = addresses_B_1,
3280 .apply_expected = True
3284 .type = WREPL_TYPE_MHOMED,
3285 .state = WREPL_STATE_TOMBSTONE,
3286 .node = WREPL_NODE_B,
3288 .num_ips = ARRAY_SIZE(addresses_A_1),
3289 .ips = addresses_A_1,
3290 .apply_expected = True
3295 * multi homed vs. unique section,
3298 * mhomed,active vs. unique,active
3299 * => should be replaced
3302 .line = __location__,
3303 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3306 .type = WREPL_TYPE_MHOMED,
3307 .state = WREPL_STATE_ACTIVE,
3308 .node = WREPL_NODE_B,
3310 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3311 .ips = addresses_A_3_4,
3312 .apply_expected = True
3316 .type = WREPL_TYPE_UNIQUE,
3317 .state = WREPL_STATE_ACTIVE,
3318 .node = WREPL_NODE_B,
3320 .num_ips = ARRAY_SIZE(addresses_B_1),
3321 .ips = addresses_B_1,
3322 .apply_expected = True
3327 * mhomed,active vs. unique,tombstone
3328 * => should NOT be replaced
3331 .line = __location__,
3332 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3335 .type = WREPL_TYPE_MHOMED,
3336 .state = WREPL_STATE_ACTIVE,
3337 .node = WREPL_NODE_B,
3339 .num_ips = ARRAY_SIZE(addresses_B_1),
3340 .ips = addresses_B_1,
3341 .apply_expected = True
3345 .type = WREPL_TYPE_UNIQUE,
3346 .state = WREPL_STATE_TOMBSTONE,
3347 .node = WREPL_NODE_B,
3349 .num_ips = ARRAY_SIZE(addresses_B_1),
3350 .ips = addresses_B_1,
3351 .apply_expected = False
3356 * mhomed,released vs. unique,active
3357 * => should be replaced
3360 .line = __location__,
3361 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3364 .type = WREPL_TYPE_MHOMED,
3365 .state = WREPL_STATE_RELEASED,
3366 .node = WREPL_NODE_B,
3368 .num_ips = ARRAY_SIZE(addresses_A_1),
3369 .ips = addresses_A_1,
3370 .apply_expected = False
3374 .type = WREPL_TYPE_UNIQUE,
3375 .state = WREPL_STATE_ACTIVE,
3376 .node = WREPL_NODE_B,
3378 .num_ips = ARRAY_SIZE(addresses_B_1),
3379 .ips = addresses_B_1,
3380 .apply_expected = True
3385 * mhomed,released vs. uinique,tombstone
3386 * => should be replaced
3389 .line = __location__,
3390 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3393 .type = WREPL_TYPE_MHOMED,
3394 .state = WREPL_STATE_RELEASED,
3395 .node = WREPL_NODE_B,
3397 .num_ips = ARRAY_SIZE(addresses_B_1),
3398 .ips = addresses_B_1,
3399 .apply_expected = False
3403 .type = WREPL_TYPE_UNIQUE,
3404 .state = WREPL_STATE_TOMBSTONE,
3405 .node = WREPL_NODE_B,
3407 .num_ips = ARRAY_SIZE(addresses_A_1),
3408 .ips = addresses_A_1,
3409 .apply_expected = True
3414 * mhomed,tombstone vs. unique,active
3415 * => should be replaced
3418 .line = __location__,
3419 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3422 .type = WREPL_TYPE_MHOMED,
3423 .state = WREPL_STATE_TOMBSTONE,
3424 .node = WREPL_NODE_B,
3426 .num_ips = ARRAY_SIZE(addresses_A_1),
3427 .ips = addresses_A_1,
3428 .apply_expected = True
3432 .type = WREPL_TYPE_UNIQUE,
3433 .state = WREPL_STATE_ACTIVE,
3434 .node = WREPL_NODE_B,
3436 .num_ips = ARRAY_SIZE(addresses_B_1),
3437 .ips = addresses_B_1,
3438 .apply_expected = True
3443 * mhomed,tombstone vs. uinique,tombstone
3444 * => should be replaced
3447 .line = __location__,
3448 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3451 .type = WREPL_TYPE_MHOMED,
3452 .state = WREPL_STATE_TOMBSTONE,
3453 .node = WREPL_NODE_B,
3455 .num_ips = ARRAY_SIZE(addresses_B_1),
3456 .ips = addresses_B_1,
3457 .apply_expected = True
3461 .type = WREPL_TYPE_UNIQUE,
3462 .state = WREPL_STATE_TOMBSTONE,
3463 .node = WREPL_NODE_B,
3465 .num_ips = ARRAY_SIZE(addresses_A_1),
3466 .ips = addresses_A_1,
3467 .apply_expected = True
3472 * multi homed vs. normal group section,
3475 * mhomed,active vs. group,active
3476 * => should be replaced
3479 .line = __location__,
3480 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3483 .type = WREPL_TYPE_MHOMED,
3484 .state = WREPL_STATE_ACTIVE,
3485 .node = WREPL_NODE_B,
3487 .num_ips = ARRAY_SIZE(addresses_A_1),
3488 .ips = addresses_A_1,
3489 .apply_expected = True
3493 .type = WREPL_TYPE_GROUP,
3494 .state = WREPL_STATE_ACTIVE,
3495 .node = WREPL_NODE_B,
3497 .num_ips = ARRAY_SIZE(addresses_B_1),
3498 .ips = addresses_B_1,
3499 .apply_expected = True
3504 * mhomed,active vs. group,tombstone
3505 * => should NOT be replaced
3508 .line = __location__,
3509 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3512 .type = WREPL_TYPE_MHOMED,
3513 .state = WREPL_STATE_ACTIVE,
3514 .node = WREPL_NODE_B,
3516 .num_ips = ARRAY_SIZE(addresses_B_1),
3517 .ips = addresses_B_1,
3518 .apply_expected = True
3522 .type = WREPL_TYPE_GROUP,
3523 .state = WREPL_STATE_TOMBSTONE,
3524 .node = WREPL_NODE_B,
3526 .num_ips = ARRAY_SIZE(addresses_B_1),
3527 .ips = addresses_B_1,
3528 .apply_expected = False
3533 * mhomed,released vs. group,active
3534 * => should be replaced
3537 .line = __location__,
3538 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3541 .type = WREPL_TYPE_MHOMED,
3542 .state = WREPL_STATE_RELEASED,
3543 .node = WREPL_NODE_B,
3545 .num_ips = ARRAY_SIZE(addresses_B_1),
3546 .ips = addresses_B_1,
3547 .apply_expected = False
3551 .type = WREPL_TYPE_GROUP,
3552 .state = WREPL_STATE_ACTIVE,
3553 .node = WREPL_NODE_B,
3555 .num_ips = ARRAY_SIZE(addresses_A_1),
3556 .ips = addresses_A_1,
3557 .apply_expected = True
3562 * mhomed,released vs. group,tombstone
3563 * => should be replaced
3566 .line = __location__,
3567 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3570 .type = WREPL_TYPE_MHOMED,
3571 .state = WREPL_STATE_RELEASED,
3572 .node = WREPL_NODE_B,
3574 .num_ips = ARRAY_SIZE(addresses_A_1),
3575 .ips = addresses_A_1,
3576 .apply_expected = False
3580 .type = WREPL_TYPE_GROUP,
3581 .state = WREPL_STATE_TOMBSTONE,
3582 .node = WREPL_NODE_B,
3584 .num_ips = ARRAY_SIZE(addresses_B_1),
3585 .ips = addresses_B_1,
3586 .apply_expected = True
3591 * mhomed,tombstone vs. group,active
3592 * => should be replaced
3595 .line = __location__,
3596 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3599 .type = WREPL_TYPE_MHOMED,
3600 .state = WREPL_STATE_TOMBSTONE,
3601 .node = WREPL_NODE_B,
3603 .num_ips = ARRAY_SIZE(addresses_B_1),
3604 .ips = addresses_B_1,
3605 .apply_expected = True
3609 .type = WREPL_TYPE_GROUP,
3610 .state = WREPL_STATE_ACTIVE,
3611 .node = WREPL_NODE_B,
3613 .num_ips = ARRAY_SIZE(addresses_A_1),
3614 .ips = addresses_A_1,
3615 .apply_expected = True
3620 * mhomed,tombstone vs. group,tombstone
3621 * => should be replaced
3624 .line = __location__,
3625 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3628 .type = WREPL_TYPE_MHOMED,
3629 .state = WREPL_STATE_TOMBSTONE,
3630 .node = WREPL_NODE_B,
3632 .num_ips = ARRAY_SIZE(addresses_A_1),
3633 .ips = addresses_A_1,
3634 .apply_expected = True
3638 .type = WREPL_TYPE_GROUP,
3639 .state = WREPL_STATE_TOMBSTONE,
3640 .node = WREPL_NODE_B,
3642 .num_ips = ARRAY_SIZE(addresses_B_1),
3643 .ips = addresses_B_1,
3644 .apply_expected = True
3649 * multi homed vs. special group section,
3652 * mhomed,active vs. sgroup,active
3653 * => should NOT be replaced
3656 .line = __location__,
3657 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3660 .type = WREPL_TYPE_MHOMED,
3661 .state = WREPL_STATE_ACTIVE,
3662 .node = WREPL_NODE_B,
3664 .num_ips = ARRAY_SIZE(addresses_A_1),
3665 .ips = addresses_A_1,
3666 .apply_expected = True
3670 .type = WREPL_TYPE_SGROUP,
3671 .state = WREPL_STATE_ACTIVE,
3672 .node = WREPL_NODE_B,
3674 .num_ips = ARRAY_SIZE(addresses_A_1),
3675 .ips = addresses_A_1,
3676 .apply_expected = False
3681 * mhomed,active vs. sgroup,tombstone
3682 * => should NOT be replaced
3685 .line = __location__,
3686 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3689 .type = WREPL_TYPE_MHOMED,
3690 .state = WREPL_STATE_ACTIVE,
3691 .node = WREPL_NODE_B,
3693 .num_ips = ARRAY_SIZE(addresses_A_1),
3694 .ips = addresses_A_1,
3695 .apply_expected = True
3699 .type = WREPL_TYPE_SGROUP,
3700 .state = WREPL_STATE_TOMBSTONE,
3701 .node = WREPL_NODE_B,
3703 .num_ips = ARRAY_SIZE(addresses_A_1),
3704 .ips = addresses_A_1,
3705 .apply_expected = False
3710 * mhomed,released vs. sgroup,active
3711 * => should be replaced
3714 .line = __location__,
3715 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3718 .type = WREPL_TYPE_MHOMED,
3719 .state = WREPL_STATE_RELEASED,
3720 .node = WREPL_NODE_B,
3722 .num_ips = ARRAY_SIZE(addresses_A_1),
3723 .ips = addresses_A_1,
3724 .apply_expected = False
3728 .type = WREPL_TYPE_SGROUP,
3729 .state = WREPL_STATE_ACTIVE,
3730 .node = WREPL_NODE_B,
3732 .num_ips = ARRAY_SIZE(addresses_B_1),
3733 .ips = addresses_B_1,
3734 .apply_expected = True
3739 * mhomed,released vs. sgroup,tombstone
3740 * => should be replaced
3743 .line = __location__,
3744 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3747 .type = WREPL_TYPE_MHOMED,
3748 .state = WREPL_STATE_RELEASED,
3749 .node = WREPL_NODE_B,
3751 .num_ips = ARRAY_SIZE(addresses_B_1),
3752 .ips = addresses_B_1,
3753 .apply_expected = False
3757 .type = WREPL_TYPE_SGROUP,
3758 .state = WREPL_STATE_TOMBSTONE,
3759 .node = WREPL_NODE_B,
3761 .num_ips = ARRAY_SIZE(addresses_A_1),
3762 .ips = addresses_A_1,
3763 .apply_expected = True
3768 * mhomed,tombstone vs. sgroup,active
3769 * => should be replaced
3772 .line = __location__,
3773 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3776 .type = WREPL_TYPE_MHOMED,
3777 .state = WREPL_STATE_TOMBSTONE,
3778 .node = WREPL_NODE_B,
3780 .num_ips = ARRAY_SIZE(addresses_A_1),
3781 .ips = addresses_A_1,
3782 .apply_expected = True
3786 .type = WREPL_TYPE_SGROUP,
3787 .state = WREPL_STATE_ACTIVE,
3788 .node = WREPL_NODE_B,
3790 .num_ips = ARRAY_SIZE(addresses_B_1),
3791 .ips = addresses_B_1,
3792 .apply_expected = True
3797 * mhomed,tombstone vs. sgroup,tombstone
3798 * => should be replaced
3801 .line = __location__,
3802 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3805 .type = WREPL_TYPE_MHOMED,
3806 .state = WREPL_STATE_TOMBSTONE,
3807 .node = WREPL_NODE_B,
3809 .num_ips = ARRAY_SIZE(addresses_B_1),
3810 .ips = addresses_B_1,
3811 .apply_expected = True
3815 .type = WREPL_TYPE_SGROUP,
3816 .state = WREPL_STATE_TOMBSTONE,
3817 .node = WREPL_NODE_B,
3819 .num_ips = ARRAY_SIZE(addresses_A_1),
3820 .ips = addresses_A_1,
3821 .apply_expected = True
3826 * multi homed vs. mlti homed section,
3829 * mhomed,active vs. mhomed,active
3830 * => should be replaced
3833 .line = __location__,
3834 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3837 .type = WREPL_TYPE_MHOMED,
3838 .state = WREPL_STATE_ACTIVE,
3839 .node = WREPL_NODE_B,
3841 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3842 .ips = addresses_A_3_4,
3843 .apply_expected = True
3847 .type = WREPL_TYPE_MHOMED,
3848 .state = WREPL_STATE_ACTIVE,
3849 .node = WREPL_NODE_B,
3851 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3852 .ips = addresses_B_3_4,
3853 .apply_expected = True
3858 * mhomed,active vs. mhomed,tombstone
3859 * => should NOT be replaced
3862 .line = __location__,
3863 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3866 .type = WREPL_TYPE_MHOMED,
3867 .state = WREPL_STATE_ACTIVE,
3868 .node = WREPL_NODE_B,
3870 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3871 .ips = addresses_B_3_4,
3872 .apply_expected = True
3876 .type = WREPL_TYPE_MHOMED,
3877 .state = WREPL_STATE_TOMBSTONE,
3878 .node = WREPL_NODE_B,
3880 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3881 .ips = addresses_B_3_4,
3882 .apply_expected = False
3887 * mhomed,released vs. mhomed,active
3888 * => should be replaced
3891 .line = __location__,
3892 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3895 .type = WREPL_TYPE_MHOMED,
3896 .state = WREPL_STATE_RELEASED,
3897 .node = WREPL_NODE_B,
3899 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3900 .ips = addresses_B_3_4,
3901 .apply_expected = False
3905 .type = WREPL_TYPE_MHOMED,
3906 .state = WREPL_STATE_ACTIVE,
3907 .node = WREPL_NODE_B,
3909 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3910 .ips = addresses_A_3_4,
3911 .apply_expected = True
3916 * mhomed,released vs. mhomed,tombstone
3917 * => should be replaced
3920 .line = __location__,
3921 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3924 .type = WREPL_TYPE_MHOMED,
3925 .state = WREPL_STATE_RELEASED,
3926 .node = WREPL_NODE_B,
3928 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3929 .ips = addresses_A_3_4,
3930 .apply_expected = False
3934 .type = WREPL_TYPE_MHOMED,
3935 .state = WREPL_STATE_TOMBSTONE,
3936 .node = WREPL_NODE_B,
3938 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3939 .ips = addresses_B_3_4,
3940 .apply_expected = True
3945 * mhomed,tombstone vs. mhomed,active
3946 * => should be replaced
3949 .line = __location__,
3950 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3953 .type = WREPL_TYPE_MHOMED,
3954 .state = WREPL_STATE_TOMBSTONE,
3955 .node = WREPL_NODE_B,
3957 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3958 .ips = addresses_B_3_4,
3959 .apply_expected = True
3963 .type = WREPL_TYPE_MHOMED,
3964 .state = WREPL_STATE_ACTIVE,
3965 .node = WREPL_NODE_B,
3967 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3968 .ips = addresses_A_3_4,
3969 .apply_expected = True
3974 * mhomed,tombstone vs. mhomed,tombstone
3975 * => should be replaced
3978 .line = __location__,
3979 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
3982 .type = WREPL_TYPE_MHOMED,
3983 .state = WREPL_STATE_TOMBSTONE,
3984 .node = WREPL_NODE_B,
3986 .num_ips = ARRAY_SIZE(addresses_A_3_4),
3987 .ips = addresses_A_3_4,
3988 .apply_expected = True
3992 .type = WREPL_TYPE_MHOMED,
3993 .state = WREPL_STATE_TOMBSTONE,
3994 .node = WREPL_NODE_B,
3996 .num_ips = ARRAY_SIZE(addresses_B_3_4),
3997 .ips = addresses_B_3_4,
3998 .apply_expected = True
4002 .line = __location__,
4003 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4007 .type = WREPL_TYPE_UNIQUE,
4008 .state = WREPL_STATE_TOMBSTONE,
4009 .node = WREPL_NODE_B,
4011 .num_ips = ARRAY_SIZE(addresses_B_1),
4012 .ips = addresses_B_1,
4013 .apply_expected = True,
4017 .type = WREPL_TYPE_UNIQUE,
4018 .state = WREPL_STATE_TOMBSTONE,
4019 .node = WREPL_NODE_B,
4021 .num_ips = ARRAY_SIZE(addresses_A_1),
4022 .ips = addresses_A_1,
4023 .apply_expected = True,
4027 * special group vs special group section,
4030 * sgroup,active vs. sgroup,active same addresses
4031 * => should be NOT replaced
4034 .line = __location__,
4035 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4036 .comment= "A:A_3_4 vs. B:A_3_4",
4040 .type = WREPL_TYPE_SGROUP,
4041 .state = WREPL_STATE_ACTIVE,
4042 .node = WREPL_NODE_B,
4044 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4045 .ips = addresses_A_3_4,
4046 .apply_expected = True
4050 .type = WREPL_TYPE_SGROUP,
4051 .state = WREPL_STATE_ACTIVE,
4052 .node = WREPL_NODE_B,
4054 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4055 .ips = addresses_A_3_4,
4056 .apply_expected = False,
4057 .sgroup_cleanup = True
4061 * sgroup,active vs. sgroup,active same addresses
4062 * => should be NOT replaced
4065 .line = __location__,
4066 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4067 .comment= "A:A_3_4 vs. B:NULL",
4071 .type = WREPL_TYPE_SGROUP,
4072 .state = WREPL_STATE_ACTIVE,
4073 .node = WREPL_NODE_B,
4075 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4076 .ips = addresses_A_3_4,
4077 .apply_expected = True
4081 .type = WREPL_TYPE_SGROUP,
4082 .state = WREPL_STATE_ACTIVE,
4083 .node = WREPL_NODE_B,
4087 .apply_expected = False,
4088 .sgroup_cleanup = True
4092 * sgroup,active vs. sgroup,active subset addresses, special case...
4093 * => should NOT be replaced
4096 .line = __location__,
4097 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4098 .comment= "A:A_3_4_X_3_4 vs. B:A_3_4",
4102 .type = WREPL_TYPE_SGROUP,
4103 .state = WREPL_STATE_ACTIVE,
4104 .node = WREPL_NODE_B,
4106 .num_ips = ARRAY_SIZE(addresses_A_3_4_X_3_4),
4107 .ips = addresses_A_3_4_X_3_4,
4108 .apply_expected = True,
4112 .type = WREPL_TYPE_SGROUP,
4113 .state = WREPL_STATE_ACTIVE,
4114 .node = WREPL_NODE_B,
4116 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4117 .ips = addresses_A_3_4,
4118 .apply_expected = False,
4122 .line = __location__,
4123 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4127 .type = WREPL_TYPE_SGROUP,
4128 .state = WREPL_STATE_ACTIVE,
4129 .node = WREPL_NODE_B,
4133 .apply_expected = False,
4137 .type = WREPL_TYPE_SGROUP,
4138 .state = WREPL_STATE_ACTIVE,
4139 .node = WREPL_NODE_B,
4143 .apply_expected = False,
4147 * sgroup,active vs. sgroup,active different addresses, but owner changed
4148 * => should be replaced
4151 .line = __location__,
4152 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4153 .comment= "A:B_3_4 vs. B:A_3_4",
4157 .type = WREPL_TYPE_SGROUP,
4158 .state = WREPL_STATE_ACTIVE,
4159 .node = WREPL_NODE_B,
4161 .num_ips = ARRAY_SIZE(addresses_B_3_4),
4162 .ips = addresses_B_3_4,
4163 .apply_expected = True,
4167 .type = WREPL_TYPE_SGROUP,
4168 .state = WREPL_STATE_ACTIVE,
4169 .node = WREPL_NODE_B,
4171 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4172 .ips = addresses_A_3_4,
4173 .apply_expected = True,
4174 .sgroup_cleanup = True
4178 * sgroup,active vs. sgroup,active different addresses, but owner changed
4179 * => should be replaced
4182 .line = __location__,
4183 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4184 .comment= "A:A_3_4 vs. B:A_3_4_OWNER_B",
4188 .type = WREPL_TYPE_SGROUP,
4189 .state = WREPL_STATE_ACTIVE,
4190 .node = WREPL_NODE_B,
4192 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4193 .ips = addresses_A_3_4,
4194 .apply_expected = True,
4198 .type = WREPL_TYPE_SGROUP,
4199 .state = WREPL_STATE_ACTIVE,
4200 .node = WREPL_NODE_B,
4202 .num_ips = ARRAY_SIZE(addresses_A_3_4_OWNER_B),
4203 .ips = addresses_A_3_4_OWNER_B,
4204 .apply_expected = True,
4205 .sgroup_cleanup = True
4209 * sgroup,active vs. sgroup,active different addresses, but owner changed
4210 * => should be replaced
4213 .line = __location__,
4214 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4215 .comment= "A:A_3_4_OWNER_B vs. B:A_3_4",
4219 .type = WREPL_TYPE_SGROUP,
4220 .state = WREPL_STATE_ACTIVE,
4221 .node = WREPL_NODE_B,
4223 .num_ips = ARRAY_SIZE(addresses_A_3_4_OWNER_B),
4224 .ips = addresses_A_3_4_OWNER_B,
4225 .apply_expected = True,
4229 .type = WREPL_TYPE_SGROUP,
4230 .state = WREPL_STATE_ACTIVE,
4231 .node = WREPL_NODE_B,
4233 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4234 .ips = addresses_A_3_4,
4235 .apply_expected = True,
4236 .sgroup_cleanup = True
4240 * sgroup,active vs. sgroup,active different addresses
4241 * => should be merged
4244 .line = __location__,
4245 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4246 .comment= "A:A_3_4 vs. B:B_3_4 => C:A_3_4_B_3_4",
4250 .type = WREPL_TYPE_SGROUP,
4251 .state = WREPL_STATE_ACTIVE,
4252 .node = WREPL_NODE_B,
4254 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4255 .ips = addresses_A_3_4,
4256 .apply_expected = True,
4260 .type = WREPL_TYPE_SGROUP,
4261 .state = WREPL_STATE_ACTIVE,
4262 .node = WREPL_NODE_B,
4264 .num_ips = ARRAY_SIZE(addresses_B_3_4),
4265 .ips = addresses_B_3_4,
4266 .sgroup_merge = True,
4267 .sgroup_cleanup = True,
4271 * sgroup,active vs. sgroup,active different addresses, special case...
4272 * => should be merged
4275 .line = __location__,
4276 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4277 .comment= "A:B_3_4_X_3_4 vs. B:A_3_4 => B:A_3_4_X_3_4",
4281 .type = WREPL_TYPE_SGROUP,
4282 .state = WREPL_STATE_ACTIVE,
4283 .node = WREPL_NODE_B,
4285 .num_ips = ARRAY_SIZE(addresses_B_3_4_X_3_4),
4286 .ips = addresses_B_3_4_X_3_4,
4287 .apply_expected = True,
4291 .type = WREPL_TYPE_SGROUP,
4292 .state = WREPL_STATE_ACTIVE,
4293 .node = WREPL_NODE_B,
4295 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4296 .ips = addresses_A_3_4,
4297 .sgroup_merge = True,
4298 .merge_owner = &ctx->b,
4299 .sgroup_cleanup = False
4303 .line = __location__,
4304 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4308 .type = WREPL_TYPE_SGROUP,
4309 .state = WREPL_STATE_ACTIVE,
4310 .node = WREPL_NODE_B,
4312 .num_ips = ARRAY_SIZE(addresses_A_3_4_X_3_4_OWNER_B),
4313 .ips = addresses_A_3_4_X_3_4_OWNER_B,
4314 .apply_expected = True,
4318 .type = WREPL_TYPE_SGROUP,
4319 .state = WREPL_STATE_ACTIVE,
4320 .node = WREPL_NODE_B,
4324 .apply_expected = False,
4328 * sgroup,active vs. sgroup,active different addresses, special case...
4329 * => should be merged
4332 .line = __location__,
4333 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4334 .comment= "A:X_3_4 vs. B:A_3_4 => C:A_3_4_X_3_4",
4338 .type = WREPL_TYPE_SGROUP,
4339 .state = WREPL_STATE_ACTIVE,
4340 .node = WREPL_NODE_B,
4342 .num_ips = ARRAY_SIZE(addresses_X_3_4),
4343 .ips = addresses_X_3_4,
4344 .apply_expected = True,
4348 .type = WREPL_TYPE_SGROUP,
4349 .state = WREPL_STATE_ACTIVE,
4350 .node = WREPL_NODE_B,
4352 .num_ips = ARRAY_SIZE(addresses_A_3_4),
4353 .ips = addresses_A_3_4,
4354 .sgroup_merge = True,
4355 .sgroup_cleanup = False
4359 .line = __location__,
4360 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4364 .type = WREPL_TYPE_SGROUP,
4365 .state = WREPL_STATE_ACTIVE,
4366 .node = WREPL_NODE_B,
4370 .apply_expected = False,
4374 .type = WREPL_TYPE_SGROUP,
4375 .state = WREPL_STATE_ACTIVE,
4376 .node = WREPL_NODE_B,
4380 .apply_expected = False,
4384 * sgroup,active vs. sgroup,active different addresses, special case...
4385 * => should be merged
4388 .line = __location__,
4389 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4390 .comment= "A:A_3_4_X_3_4 vs. B:A_3_4_OWNER_B => B:A_3_4_OWNER_B_X_3_4",
4394 .type = WREPL_TYPE_SGROUP,
4395 .state = WREPL_STATE_ACTIVE,
4396 .node = WREPL_NODE_B,
4398 .num_ips = ARRAY_SIZE(addresses_A_3_4_X_3_4),
4399 .ips = addresses_A_3_4_X_3_4,
4400 .apply_expected = True,
4404 .type = WREPL_TYPE_SGROUP,
4405 .state = WREPL_STATE_ACTIVE,
4406 .node = WREPL_NODE_B,
4408 .num_ips = ARRAY_SIZE(addresses_A_3_4_OWNER_B),
4409 .ips = addresses_A_3_4_OWNER_B,
4410 .sgroup_merge = True,
4411 .merge_owner = &ctx->b,
4415 .line = __location__,
4416 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4420 .type = WREPL_TYPE_SGROUP,
4421 .state = WREPL_STATE_ACTIVE,
4422 .node = WREPL_NODE_B,
4426 .apply_expected = False,
4430 .type = WREPL_TYPE_SGROUP,
4431 .state = WREPL_STATE_ACTIVE,
4432 .node = WREPL_NODE_B,
4436 .apply_expected = False,
4440 * sgroup,active vs. sgroup,active partly different addresses, special case...
4441 * => should be merged
4444 .line = __location__,
4445 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4446 .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",
4450 .type = WREPL_TYPE_SGROUP,
4451 .state = WREPL_STATE_ACTIVE,
4452 .node = WREPL_NODE_B,
4454 .num_ips = ARRAY_SIZE(addresses_B_3_4_X_3_4),
4455 .ips = addresses_B_3_4_X_3_4,
4456 .apply_expected = True,
4460 .type = WREPL_TYPE_SGROUP,
4461 .state = WREPL_STATE_ACTIVE,
4462 .node = WREPL_NODE_B,
4464 .num_ips = ARRAY_SIZE(addresses_B_3_4_X_1_2),
4465 .ips = addresses_B_3_4_X_1_2,
4466 .sgroup_merge = True,
4467 .sgroup_cleanup = False
4471 .line = __location__,
4472 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4476 .type = WREPL_TYPE_SGROUP,
4477 .state = WREPL_STATE_ACTIVE,
4478 .node = WREPL_NODE_B,
4482 .apply_expected = False,
4486 .type = WREPL_TYPE_SGROUP,
4487 .state = WREPL_STATE_ACTIVE,
4488 .node = WREPL_NODE_B,
4492 .apply_expected = False,
4496 * sgroup,active vs. sgroup,active different addresses, special case...
4497 * => should be merged
4500 .line = __location__,
4501 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4502 .comment= "A:A_3_4_B_3_4 vs. B:NULL => B:A_3_4",
4506 .type = WREPL_TYPE_SGROUP,
4507 .state = WREPL_STATE_ACTIVE,
4508 .node = WREPL_NODE_B,
4510 .num_ips = ARRAY_SIZE(addresses_A_3_4_B_3_4),
4511 .ips = addresses_A_3_4_B_3_4,
4512 .apply_expected = True,
4516 .type = WREPL_TYPE_SGROUP,
4517 .state = WREPL_STATE_ACTIVE,
4518 .node = WREPL_NODE_B,
4522 .sgroup_merge = True,
4523 .merge_owner = &ctx->b,
4524 .sgroup_cleanup = True
4528 .line = __location__,
4529 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4533 .type = WREPL_TYPE_SGROUP,
4534 .state = WREPL_STATE_ACTIVE,
4535 .node = WREPL_NODE_B,
4539 .apply_expected = False,
4543 .type = WREPL_TYPE_UNIQUE,
4544 .state = WREPL_STATE_TOMBSTONE,
4545 .node = WREPL_NODE_B,
4547 .num_ips = ARRAY_SIZE(addresses_A_1),
4548 .ips = addresses_A_1,
4549 .apply_expected = True,
4553 * sgroup,active vs. sgroup,active different addresses, special case...
4554 * => should be merged
4557 .line = __location__,
4558 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4559 .comment= "A:B_3_4_X_3_4 vs. B:NULL => B:X_3_4",
4563 .type = WREPL_TYPE_SGROUP,
4564 .state = WREPL_STATE_ACTIVE,
4565 .node = WREPL_NODE_B,
4567 .num_ips = ARRAY_SIZE(addresses_B_3_4_X_3_4),
4568 .ips = addresses_B_3_4_X_3_4,
4569 .apply_expected = True,
4573 .type = WREPL_TYPE_SGROUP,
4574 .state = WREPL_STATE_ACTIVE,
4575 .node = WREPL_NODE_B,
4579 .sgroup_merge = True,
4580 .merge_owner = &ctx->b,
4581 .sgroup_cleanup = True
4585 .line = __location__,
4586 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4590 .type = WREPL_TYPE_SGROUP,
4591 .state = WREPL_STATE_ACTIVE,
4592 .node = WREPL_NODE_B,
4596 .apply_expected = False,
4600 .type = WREPL_TYPE_UNIQUE,
4601 .state = WREPL_STATE_TOMBSTONE,
4602 .node = WREPL_NODE_B,
4604 .num_ips = ARRAY_SIZE(addresses_A_1),
4605 .ips = addresses_A_1,
4606 .apply_expected = True,
4610 * This should be the last record in this array,
4611 * we need to make sure the we leave a tombstoned unique entry
4615 .line = __location__,
4616 .name = _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
4620 .type = WREPL_TYPE_UNIQUE,
4621 .state = WREPL_STATE_TOMBSTONE,
4622 .node = WREPL_NODE_B,
4624 .num_ips = ARRAY_SIZE(addresses_A_1),
4625 .ips = addresses_A_1,
4626 .apply_expected = True
4630 .type = WREPL_TYPE_UNIQUE,
4631 .state = WREPL_STATE_TOMBSTONE,
4632 .node = WREPL_NODE_B,
4634 .num_ips = ARRAY_SIZE(addresses_A_1),
4635 .ips = addresses_A_1,
4636 .apply_expected = True
4638 }}; /* do not add entries here, this should be the last record! */
4640 wins_name_r1 = &wins_name1;
4641 wins_name_r2 = &wins_name2;
4643 printf("Test Replica Conflicts with different owners\n");
4645 for(i=0; ret && i < ARRAY_SIZE(records); i++) {
4647 if (!records[i].extra && !records[i].cleanup) {
4648 /* we should test the worst cases */
4649 if (records[i].r2.apply_expected && records[i].r1.ips==records[i].r2.ips) {
4650 printf("(%s) Programmer error, invalid record[%u]: %s\n",
4651 __location__, i, records[i].line);
4653 } else if (!records[i].r2.apply_expected && records[i].r1.ips!=records[i].r2.ips) {
4654 printf("(%s) Programmer error, invalid record[%u]: %s\n",
4655 __location__, i, records[i].line);
4660 if (!records[i].cleanup) {
4661 const char *expected;
4664 if (records[i].r2.sgroup_merge) {
4665 expected = "SGROUP_MERGE";
4666 } else if (records[i].r2.apply_expected) {
4667 expected = "REPLACE";
4669 expected = "NOT REPLACE";
4672 if (!records[i].r1.ips && !records[i].r2.ips) {
4673 ips = "with no ip(s)";
4674 } else if (records[i].r1.ips==records[i].r2.ips) {
4675 ips = "with same ip(s)";
4677 ips = "with different ip(s)";
4680 printf("%s,%s%s vs. %s,%s%s %s => %s\n",
4681 wrepl_name_type_string(records[i].r1.type),
4682 wrepl_name_state_string(records[i].r1.state),
4683 (records[i].r1.is_static?",static":""),
4684 wrepl_name_type_string(records[i].r2.type),
4685 wrepl_name_state_string(records[i].r2.state),
4686 (records[i].r2.is_static?",static":""),
4687 (records[i].comment?records[i].comment:ips),
4694 wins_name_r1->name = &records[i].name;
4695 wins_name_r1->flags = WREPL_NAME_FLAGS(records[i].r1.type,
4696 records[i].r1.state,
4698 records[i].r1.is_static);
4699 wins_name_r1->id = ++records[i].r1.owner->max_version;
4700 if (wins_name_r1->flags & 2) {
4701 wins_name_r1->addresses.addresses.num_ips = records[i].r1.num_ips;
4702 wins_name_r1->addresses.addresses.ips = discard_const(records[i].r1.ips);
4704 wins_name_r1->addresses.ip = records[i].r1.ips[0].ip;
4706 wins_name_r1->unknown = "255.255.255.255";
4709 ret &= test_wrepl_update_one(ctx, records[i].r1.owner, wins_name_r1);
4710 ret &= test_wrepl_is_applied(ctx, records[i].r1.owner,
4711 wins_name_r1, records[i].r1.apply_expected);
4716 wins_name_r2->name = &records[i].name;
4717 wins_name_r2->flags = WREPL_NAME_FLAGS(records[i].r2.type,
4718 records[i].r2.state,
4720 records[i].r2.is_static);
4721 wins_name_r2->id = ++records[i].r2.owner->max_version;
4722 if (wins_name_r2->flags & 2) {
4723 wins_name_r2->addresses.addresses.num_ips = records[i].r2.num_ips;
4724 wins_name_r2->addresses.addresses.ips = discard_const(records[i].r2.ips);
4726 wins_name_r2->addresses.ip = records[i].r2.ips[0].ip;
4728 wins_name_r2->unknown = "255.255.255.255";
4731 ret &= test_wrepl_update_one(ctx, records[i].r2.owner, wins_name_r2);
4732 if (records[i].r1.state == WREPL_STATE_RELEASED) {
4733 ret &= test_wrepl_is_applied(ctx, records[i].r1.owner,
4734 wins_name_r1, False);
4735 } else if (records[i].r2.sgroup_merge) {
4736 ret &= test_wrepl_sgroup_merged(ctx, records[i].r2.merge_owner,
4737 records[i].r1.owner,
4738 records[i].r1.num_ips, records[i].r1.ips,
4739 records[i].r2.owner,
4740 records[i].r2.num_ips, records[i].r2.ips,
4742 } else if (records[i].r1.owner != records[i].r2.owner) {
4744 _expected = (records[i].r1.apply_expected && !records[i].r2.apply_expected);
4745 ret &= test_wrepl_is_applied(ctx, records[i].r1.owner,
4746 wins_name_r1, _expected);
4748 if (records[i].r2.state == WREPL_STATE_RELEASED) {
4749 ret &= test_wrepl_is_applied(ctx, records[i].r2.owner,
4750 wins_name_r2, False);
4751 } else if (!records[i].r2.sgroup_merge) {
4752 ret &= test_wrepl_is_applied(ctx, records[i].r2.owner,
4753 wins_name_r2, records[i].r2.apply_expected);
4756 if (records[i].r2.sgroup_cleanup) {
4758 printf("failed before sgroup_cleanup record[%u]: %s\n", i, records[i].line);
4762 /* clean up the SGROUP record */
4763 wins_name_r1->name = &records[i].name;
4764 wins_name_r1->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
4766 WREPL_NODE_B, False);
4767 wins_name_r1->id = ++records[i].r1.owner->max_version;
4768 wins_name_r1->addresses.addresses.num_ips = 0;
4769 wins_name_r1->addresses.addresses.ips = NULL;
4770 wins_name_r1->unknown = "255.255.255.255";
4771 ret &= test_wrepl_update_one(ctx, records[i].r1.owner, wins_name_r1);
4773 /* here we test how names from an owner are deleted */
4774 if (records[i].r2.sgroup_merge && records[i].r2.num_ips) {
4775 ret &= test_wrepl_sgroup_merged(ctx, NULL,
4776 records[i].r2.owner,
4777 records[i].r2.num_ips, records[i].r2.ips,
4778 records[i].r1.owner,
4783 /* clean up the SGROUP record */
4784 wins_name_r2->name = &records[i].name;
4785 wins_name_r2->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
4787 WREPL_NODE_B, False);
4788 wins_name_r2->id = ++records[i].r2.owner->max_version;
4789 wins_name_r2->addresses.addresses.num_ips = 0;
4790 wins_name_r2->addresses.addresses.ips = NULL;
4791 wins_name_r2->unknown = "255.255.255.255";
4792 ret &= test_wrepl_update_one(ctx, records[i].r2.owner, wins_name_r2);
4794 /* take ownership of the SGROUP record */
4795 wins_name_r2->name = &records[i].name;
4796 wins_name_r2->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
4798 WREPL_NODE_B, False);
4799 wins_name_r2->id = ++records[i].r2.owner->max_version;
4800 wins_name_r2->addresses.addresses.num_ips = ARRAY_SIZE(addresses_B_1);
4801 wins_name_r2->addresses.addresses.ips = discard_const(addresses_B_1);
4802 wins_name_r2->unknown = "255.255.255.255";
4803 ret &= test_wrepl_update_one(ctx, records[i].r2.owner, wins_name_r2);
4804 ret &= test_wrepl_is_applied(ctx, records[i].r2.owner, wins_name_r2, True);
4806 /* overwrite the SGROUP record with unique,tombstone */
4807 wins_name_r2->name = &records[i].name;
4808 wins_name_r2->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
4809 WREPL_STATE_TOMBSTONE,
4810 WREPL_NODE_B, False);
4811 wins_name_r2->id = ++records[i].r2.owner->max_version;
4812 wins_name_r2->addresses.addresses.num_ips = ARRAY_SIZE(addresses_B_1);
4813 wins_name_r2->addresses.addresses.ips = discard_const(addresses_B_1);
4814 wins_name_r2->unknown = "255.255.255.255";
4815 ret &= test_wrepl_update_one(ctx, records[i].r2.owner, wins_name_r2);
4816 ret &= test_wrepl_is_applied(ctx, records[i].r2.owner, wins_name_r2, True);
4819 printf("failed in sgroup_cleanup record[%u]: %s\n", i, records[i].line);
4824 /* the first one is a cleanup run */
4825 if (!ret && i == 0) ret = True;
4828 printf("conflict handled wrong or record[%u]: %s\n", i, records[i].line);
4836 static BOOL test_conflict_owned_released_vs_replica(struct test_wrepl_conflict_conn *ctx)
4840 struct wrepl_wins_name wins_name_;
4841 struct wrepl_wins_name *wins_name = &wins_name_;
4842 struct nbt_name_register name_register_;
4843 struct nbt_name_register *name_register = &name_register_;
4844 struct nbt_name_release release_;
4845 struct nbt_name_release *release = &release_;
4848 const char *line; /* just better debugging */
4849 struct nbt_name name;
4854 const struct wrepl_ip *ips;
4855 BOOL apply_expected;
4858 enum wrepl_name_type type;
4859 enum wrepl_name_state state;
4860 enum wrepl_name_node node;
4863 const struct wrepl_ip *ips;
4864 BOOL apply_expected;
4868 * unique vs. unique section
4871 * unique,released vs. unique,active with same ip(s)
4874 .line = __location__,
4875 .name = _NBT_NAME("_UR_UA_SI", 0x00, NULL),
4879 .num_ips = ctx->addresses_best_num,
4880 .ips = ctx->addresses_best,
4881 .apply_expected = True
4884 .type = WREPL_TYPE_UNIQUE,
4885 .state = WREPL_STATE_ACTIVE,
4886 .node = WREPL_NODE_B,
4888 .num_ips = ctx->addresses_best_num,
4889 .ips = ctx->addresses_best,
4890 .apply_expected = True
4894 * unique,released vs. unique,active with different ip(s)
4897 .line = __location__,
4898 .name = _NBT_NAME("_UR_UA_DI", 0x00, NULL),
4902 .num_ips = ctx->addresses_best_num,
4903 .ips = ctx->addresses_best,
4904 .apply_expected = True
4907 .type = WREPL_TYPE_UNIQUE,
4908 .state = WREPL_STATE_ACTIVE,
4909 .node = WREPL_NODE_B,
4911 .num_ips = ARRAY_SIZE(addresses_B_1),
4912 .ips = addresses_B_1,
4913 .apply_expected = True
4917 * unique,released vs. unique,tombstone with same ip(s)
4920 .line = __location__,
4921 .name = _NBT_NAME("_UR_UT_SI", 0x00, NULL),
4925 .num_ips = ctx->addresses_best_num,
4926 .ips = ctx->addresses_best,
4927 .apply_expected = True
4930 .type = WREPL_TYPE_UNIQUE,
4931 .state = WREPL_STATE_TOMBSTONE,
4932 .node = WREPL_NODE_B,
4934 .num_ips = ctx->addresses_best_num,
4935 .ips = ctx->addresses_best,
4936 .apply_expected = True
4940 * unique,released vs. unique,tombstone with different ip(s)
4943 .line = __location__,
4944 .name = _NBT_NAME("_UR_UT_DI", 0x00, NULL),
4948 .num_ips = ctx->addresses_best_num,
4949 .ips = ctx->addresses_best,
4950 .apply_expected = True
4953 .type = WREPL_TYPE_UNIQUE,
4954 .state = WREPL_STATE_TOMBSTONE,
4955 .node = WREPL_NODE_B,
4957 .num_ips = ARRAY_SIZE(addresses_B_1),
4958 .ips = addresses_B_1,
4959 .apply_expected = True
4963 * unique vs. group section
4966 * unique,released vs. group,active with same ip(s)
4969 .line = __location__,
4970 .name = _NBT_NAME("_UR_GA_SI", 0x00, NULL),
4974 .num_ips = ctx->addresses_best_num,
4975 .ips = ctx->addresses_best,
4976 .apply_expected = True
4979 .type = WREPL_TYPE_GROUP,
4980 .state = WREPL_STATE_ACTIVE,
4981 .node = WREPL_NODE_B,
4983 .num_ips = ctx->addresses_best_num,
4984 .ips = ctx->addresses_best,
4985 .apply_expected = True
4989 * unique,released vs. group,active with different ip(s)
4992 .line = __location__,
4993 .name = _NBT_NAME("_UR_GA_DI", 0x00, NULL),
4997 .num_ips = ctx->addresses_best_num,
4998 .ips = ctx->addresses_best,
4999 .apply_expected = True
5002 .type = WREPL_TYPE_GROUP,
5003 .state = WREPL_STATE_ACTIVE,
5004 .node = WREPL_NODE_B,
5006 .num_ips = ARRAY_SIZE(addresses_B_1),
5007 .ips = addresses_B_1,
5008 .apply_expected = True
5012 * unique,released vs. group,tombstone with same ip(s)
5015 .line = __location__,
5016 .name = _NBT_NAME("_UR_GT_SI", 0x00, NULL),
5020 .num_ips = ctx->addresses_best_num,
5021 .ips = ctx->addresses_best,
5022 .apply_expected = True
5025 .type = WREPL_TYPE_GROUP,
5026 .state = WREPL_STATE_TOMBSTONE,
5027 .node = WREPL_NODE_B,
5029 .num_ips = ctx->addresses_best_num,
5030 .ips = ctx->addresses_best,
5031 .apply_expected = True
5035 * unique,released vs. group,tombstone with different ip(s)
5038 .line = __location__,
5039 .name = _NBT_NAME("_UR_GT_DI", 0x00, NULL),
5043 .num_ips = ctx->addresses_best_num,
5044 .ips = ctx->addresses_best,
5045 .apply_expected = True
5048 .type = WREPL_TYPE_GROUP,
5049 .state = WREPL_STATE_TOMBSTONE,
5050 .node = WREPL_NODE_B,
5052 .num_ips = ARRAY_SIZE(addresses_B_1),
5053 .ips = addresses_B_1,
5054 .apply_expected = True
5058 * unique vs. special group section
5061 * unique,released vs. sgroup,active with same ip(s)
5064 .line = __location__,
5065 .name = _NBT_NAME("_UR_SA_SI", 0x00, NULL),
5069 .num_ips = ctx->addresses_best_num,
5070 .ips = ctx->addresses_best,
5071 .apply_expected = True
5074 .type = WREPL_TYPE_SGROUP,
5075 .state = WREPL_STATE_ACTIVE,
5076 .node = WREPL_NODE_B,
5078 .num_ips = ctx->addresses_best_num,
5079 .ips = ctx->addresses_best,
5080 .apply_expected = True
5084 * unique,released vs. sgroup,active with different ip(s)
5087 .line = __location__,
5088 .name = _NBT_NAME("_UR_SA_DI", 0x00, NULL),
5092 .num_ips = ctx->addresses_best_num,
5093 .ips = ctx->addresses_best,
5094 .apply_expected = True
5097 .type = WREPL_TYPE_SGROUP,
5098 .state = WREPL_STATE_ACTIVE,
5099 .node = WREPL_NODE_B,
5101 .num_ips = ARRAY_SIZE(addresses_B_1),
5102 .ips = addresses_B_1,
5103 .apply_expected = True
5107 * unique,released vs. sgroup,tombstone with same ip(s)
5110 .line = __location__,
5111 .name = _NBT_NAME("_UR_ST_SI", 0x00, NULL),
5115 .num_ips = ctx->addresses_best_num,
5116 .ips = ctx->addresses_best,
5117 .apply_expected = True
5120 .type = WREPL_TYPE_SGROUP,
5121 .state = WREPL_STATE_TOMBSTONE,
5122 .node = WREPL_NODE_B,
5124 .num_ips = ctx->addresses_best_num,
5125 .ips = ctx->addresses_best,
5126 .apply_expected = True
5130 * unique,released vs. sgroup,tombstone with different ip(s)
5133 .line = __location__,
5134 .name = _NBT_NAME("_UR_ST_DI", 0x00, NULL),
5138 .num_ips = ctx->addresses_best_num,
5139 .ips = ctx->addresses_best,
5140 .apply_expected = True
5143 .type = WREPL_TYPE_SGROUP,
5144 .state = WREPL_STATE_TOMBSTONE,
5145 .node = WREPL_NODE_B,
5147 .num_ips = ARRAY_SIZE(addresses_B_1),
5148 .ips = addresses_B_1,
5149 .apply_expected = True
5153 * unique vs. multi homed section
5156 * unique,released vs. mhomed,active with same ip(s)
5159 .line = __location__,
5160 .name = _NBT_NAME("_UR_MA_SI", 0x00, NULL),
5164 .num_ips = ctx->addresses_best_num,
5165 .ips = ctx->addresses_best,
5166 .apply_expected = True
5169 .type = WREPL_TYPE_MHOMED,
5170 .state = WREPL_STATE_ACTIVE,
5171 .node = WREPL_NODE_B,
5173 .num_ips = ctx->addresses_best_num,
5174 .ips = ctx->addresses_best,
5175 .apply_expected = True
5179 * unique,released vs. mhomed,active with different ip(s)
5182 .line = __location__,
5183 .name = _NBT_NAME("_UR_MA_DI", 0x00, NULL),
5187 .num_ips = ctx->addresses_best_num,
5188 .ips = ctx->addresses_best,
5189 .apply_expected = True
5192 .type = WREPL_TYPE_MHOMED,
5193 .state = WREPL_STATE_ACTIVE,
5194 .node = WREPL_NODE_B,
5196 .num_ips = ARRAY_SIZE(addresses_B_1),
5197 .ips = addresses_B_1,
5198 .apply_expected = True
5202 * unique,released vs. mhomed,tombstone with same ip(s)
5205 .line = __location__,
5206 .name = _NBT_NAME("_UR_MT_SI", 0x00, NULL),
5210 .num_ips = ctx->addresses_best_num,
5211 .ips = ctx->addresses_best,
5212 .apply_expected = True
5215 .type = WREPL_TYPE_MHOMED,
5216 .state = WREPL_STATE_TOMBSTONE,
5217 .node = WREPL_NODE_B,
5219 .num_ips = ctx->addresses_best_num,
5220 .ips = ctx->addresses_best,
5221 .apply_expected = True
5225 * unique,released vs. mhomed,tombstone with different ip(s)
5228 .line = __location__,
5229 .name = _NBT_NAME("_UR_MT_DI", 0x00, NULL),
5233 .num_ips = ctx->addresses_best_num,
5234 .ips = ctx->addresses_best,
5235 .apply_expected = True
5238 .type = WREPL_TYPE_MHOMED,
5239 .state = WREPL_STATE_TOMBSTONE,
5240 .node = WREPL_NODE_B,
5242 .num_ips = ARRAY_SIZE(addresses_B_1),
5243 .ips = addresses_B_1,
5244 .apply_expected = True
5248 * group vs. unique section
5251 * group,released vs. unique,active with same ip(s)
5254 .line = __location__,
5255 .name = _NBT_NAME("_GR_UA_SI", 0x00, NULL),
5257 .nb_flags = NBT_NM_GROUP,
5259 .num_ips = ctx->addresses_best_num,
5260 .ips = ctx->addresses_best,
5261 .apply_expected = True
5264 .type = WREPL_TYPE_UNIQUE,
5265 .state = WREPL_STATE_ACTIVE,
5266 .node = WREPL_NODE_B,
5268 .num_ips = ctx->addresses_best_num,
5269 .ips = ctx->addresses_best,
5270 .apply_expected = False
5274 * group,released vs. unique,active with different ip(s)
5277 .line = __location__,
5278 .name = _NBT_NAME("_GR_UA_DI", 0x00, NULL),
5280 .nb_flags = NBT_NM_GROUP,
5282 .num_ips = ctx->addresses_best_num,
5283 .ips = ctx->addresses_best,
5284 .apply_expected = True
5287 .type = WREPL_TYPE_UNIQUE,
5288 .state = WREPL_STATE_ACTIVE,
5289 .node = WREPL_NODE_B,
5291 .num_ips = ARRAY_SIZE(addresses_B_1),
5292 .ips = addresses_B_1,
5293 .apply_expected = False
5297 * group,released vs. unique,tombstone with same ip(s)
5300 .line = __location__,
5301 .name = _NBT_NAME("_GR_UT_SI", 0x00, NULL),
5303 .nb_flags = NBT_NM_GROUP,
5305 .num_ips = ctx->addresses_best_num,
5306 .ips = ctx->addresses_best,
5307 .apply_expected = True
5310 .type = WREPL_TYPE_UNIQUE,
5311 .state = WREPL_STATE_TOMBSTONE,
5312 .node = WREPL_NODE_B,
5314 .num_ips = ctx->addresses_best_num,
5315 .ips = ctx->addresses_best,
5316 .apply_expected = False
5320 * group,released vs. unique,tombstone with different ip(s)
5323 .line = __location__,
5324 .name = _NBT_NAME("_GR_UT_DI", 0x00, NULL),
5326 .nb_flags = NBT_NM_GROUP,
5328 .num_ips = ctx->addresses_best_num,
5329 .ips = ctx->addresses_best,
5330 .apply_expected = True
5333 .type = WREPL_TYPE_UNIQUE,
5334 .state = WREPL_STATE_TOMBSTONE,
5335 .node = WREPL_NODE_B,
5337 .num_ips = ARRAY_SIZE(addresses_B_1),
5338 .ips = addresses_B_1,
5339 .apply_expected = False
5343 * group vs. group section
5346 * group,released vs. group,active with same ip(s)
5349 .line = __location__,
5350 .name = _NBT_NAME("_GR_GA_SI", 0x00, NULL),
5352 .nb_flags = NBT_NM_GROUP,
5354 .num_ips = ctx->addresses_best_num,
5355 .ips = ctx->addresses_best,
5356 .apply_expected = True
5359 .type = WREPL_TYPE_GROUP,
5360 .state = WREPL_STATE_ACTIVE,
5361 .node = WREPL_NODE_B,
5363 .num_ips = ctx->addresses_best_num,
5364 .ips = ctx->addresses_best,
5365 .apply_expected = True
5369 * group,released vs. group,active with different ip(s)
5372 .line = __location__,
5373 .name = _NBT_NAME("_GR_GA_DI", 0x00, NULL),
5375 .nb_flags = NBT_NM_GROUP,
5377 .num_ips = ctx->addresses_best_num,
5378 .ips = ctx->addresses_best,
5379 .apply_expected = True
5382 .type = WREPL_TYPE_GROUP,
5383 .state = WREPL_STATE_ACTIVE,
5384 .node = WREPL_NODE_B,
5386 .num_ips = ARRAY_SIZE(addresses_B_1),
5387 .ips = addresses_B_1,
5388 .apply_expected = True
5392 * group,released vs. group,tombstone with same ip(s)
5395 .line = __location__,
5396 .name = _NBT_NAME("_GR_GT_SI", 0x00, NULL),
5398 .nb_flags = NBT_NM_GROUP,
5400 .num_ips = ctx->addresses_best_num,
5401 .ips = ctx->addresses_best,
5402 .apply_expected = True
5405 .type = WREPL_TYPE_GROUP,
5406 .state = WREPL_STATE_TOMBSTONE,
5407 .node = WREPL_NODE_B,
5409 .num_ips = ctx->addresses_best_num,
5410 .ips = ctx->addresses_best,
5411 .apply_expected = True
5415 * group,released vs. group,tombstone with different ip(s)
5418 .line = __location__,
5419 .name = _NBT_NAME("_GR_GT_DI", 0x00, NULL),
5421 .nb_flags = NBT_NM_GROUP,
5423 .num_ips = ctx->addresses_best_num,
5424 .ips = ctx->addresses_best,
5425 .apply_expected = True
5428 .type = WREPL_TYPE_GROUP,
5429 .state = WREPL_STATE_TOMBSTONE,
5430 .node = WREPL_NODE_B,
5432 .num_ips = ARRAY_SIZE(addresses_B_1),
5433 .ips = addresses_B_1,
5434 .apply_expected = True
5438 * group vs. special group section
5441 * group,released vs. sgroup,active with same ip(s)
5444 .line = __location__,
5445 .name = _NBT_NAME("_GR_SA_SI", 0x00, NULL),
5447 .nb_flags = NBT_NM_GROUP,
5449 .num_ips = ctx->addresses_best_num,
5450 .ips = ctx->addresses_best,
5451 .apply_expected = True
5454 .type = WREPL_TYPE_SGROUP,
5455 .state = WREPL_STATE_ACTIVE,
5456 .node = WREPL_NODE_B,
5458 .num_ips = ctx->addresses_best_num,
5459 .ips = ctx->addresses_best,
5460 .apply_expected = False
5464 * group,released vs. sgroup,active with different ip(s)
5467 .line = __location__,
5468 .name = _NBT_NAME("_GR_SA_DI", 0x00, NULL),
5470 .nb_flags = NBT_NM_GROUP,
5472 .num_ips = ctx->addresses_best_num,
5473 .ips = ctx->addresses_best,
5474 .apply_expected = True
5477 .type = WREPL_TYPE_SGROUP,
5478 .state = WREPL_STATE_ACTIVE,
5479 .node = WREPL_NODE_B,
5481 .num_ips = ARRAY_SIZE(addresses_B_1),
5482 .ips = addresses_B_1,
5483 .apply_expected = False
5487 * group,released vs. sgroup,tombstone with same ip(s)
5490 .line = __location__,
5491 .name = _NBT_NAME("_GR_ST_SI", 0x00, NULL),
5493 .nb_flags = NBT_NM_GROUP,
5495 .num_ips = ctx->addresses_best_num,
5496 .ips = ctx->addresses_best,
5497 .apply_expected = True
5500 .type = WREPL_TYPE_SGROUP,
5501 .state = WREPL_STATE_TOMBSTONE,
5502 .node = WREPL_NODE_B,
5504 .num_ips = ctx->addresses_best_num,
5505 .ips = ctx->addresses_best,
5506 .apply_expected = False
5510 * group,released vs. sgroup,tombstone with different ip(s)
5513 .line = __location__,
5514 .name = _NBT_NAME("_GR_ST_DI", 0x00, NULL),
5516 .nb_flags = NBT_NM_GROUP,
5518 .num_ips = ctx->addresses_best_num,
5519 .ips = ctx->addresses_best,
5520 .apply_expected = True
5523 .type = WREPL_TYPE_SGROUP,
5524 .state = WREPL_STATE_TOMBSTONE,
5525 .node = WREPL_NODE_B,
5527 .num_ips = ARRAY_SIZE(addresses_B_1),
5528 .ips = addresses_B_1,
5529 .apply_expected = False
5533 * group vs. multi homed section
5536 * group,released vs. mhomed,active with same ip(s)
5539 .line = __location__,
5540 .name = _NBT_NAME("_GR_MA_SI", 0x00, NULL),
5542 .nb_flags = NBT_NM_GROUP,
5544 .num_ips = ctx->addresses_best_num,
5545 .ips = ctx->addresses_best,
5546 .apply_expected = True
5549 .type = WREPL_TYPE_MHOMED,
5550 .state = WREPL_STATE_ACTIVE,
5551 .node = WREPL_NODE_B,
5553 .num_ips = ctx->addresses_best_num,
5554 .ips = ctx->addresses_best,
5555 .apply_expected = False
5559 * group,released vs. mhomed,active with different ip(s)
5562 .line = __location__,
5563 .name = _NBT_NAME("_GR_MA_DI", 0x00, NULL),
5565 .nb_flags = NBT_NM_GROUP,
5567 .num_ips = ctx->addresses_best_num,
5568 .ips = ctx->addresses_best,
5569 .apply_expected = True
5572 .type = WREPL_TYPE_MHOMED,
5573 .state = WREPL_STATE_ACTIVE,
5574 .node = WREPL_NODE_B,
5576 .num_ips = ARRAY_SIZE(addresses_B_1),
5577 .ips = addresses_B_1,
5578 .apply_expected = False
5582 * group,released vs. mhomed,tombstone with same ip(s)
5585 .line = __location__,
5586 .name = _NBT_NAME("_GR_MT_SI", 0x00, NULL),
5588 .nb_flags = NBT_NM_GROUP,
5590 .num_ips = ctx->addresses_best_num,
5591 .ips = ctx->addresses_best,
5592 .apply_expected = True
5595 .type = WREPL_TYPE_MHOMED,
5596 .state = WREPL_STATE_TOMBSTONE,
5597 .node = WREPL_NODE_B,
5599 .num_ips = ctx->addresses_best_num,
5600 .ips = ctx->addresses_best,
5601 .apply_expected = False
5605 * group,released vs. mhomed,tombstone with different ip(s)
5608 .line = __location__,
5609 .name = _NBT_NAME("_GR_MT_DI", 0x00, NULL),
5611 .nb_flags = NBT_NM_GROUP,
5613 .num_ips = ctx->addresses_best_num,
5614 .ips = ctx->addresses_best,
5615 .apply_expected = True
5618 .type = WREPL_TYPE_MHOMED,
5619 .state = WREPL_STATE_TOMBSTONE,
5620 .node = WREPL_NODE_B,
5622 .num_ips = ARRAY_SIZE(addresses_B_1),
5623 .ips = addresses_B_1,
5624 .apply_expected = False
5628 * special group vs. unique section
5631 * sgroup,released vs. unique,active with same ip(s)
5634 .line = __location__,
5635 .name = _NBT_NAME("_SR_UA_SI", 0x1C, NULL),
5637 .nb_flags = NBT_NM_GROUP,
5639 .num_ips = ctx->addresses_best_num,
5640 .ips = ctx->addresses_best,
5641 .apply_expected = True
5644 .type = WREPL_TYPE_UNIQUE,
5645 .state = WREPL_STATE_ACTIVE,
5646 .node = WREPL_NODE_B,
5648 .num_ips = ctx->addresses_best_num,
5649 .ips = ctx->addresses_best,
5650 .apply_expected = True
5654 * sgroup,released vs. unique,active with different ip(s)
5657 .line = __location__,
5658 .name = _NBT_NAME("_SR_UA_DI", 0x1C, NULL),
5660 .nb_flags = NBT_NM_GROUP,
5662 .num_ips = ctx->addresses_best_num,
5663 .ips = ctx->addresses_best,
5664 .apply_expected = True
5667 .type = WREPL_TYPE_UNIQUE,
5668 .state = WREPL_STATE_ACTIVE,
5669 .node = WREPL_NODE_B,
5671 .num_ips = ARRAY_SIZE(addresses_B_1),
5672 .ips = addresses_B_1,
5673 .apply_expected = True
5677 * sgroup,released vs. unique,tombstone with same ip(s)
5680 .line = __location__,
5681 .name = _NBT_NAME("_SR_UT_SI", 0x1C, NULL),
5683 .nb_flags = NBT_NM_GROUP,
5685 .num_ips = ctx->addresses_best_num,
5686 .ips = ctx->addresses_best,
5687 .apply_expected = True
5690 .type = WREPL_TYPE_UNIQUE,
5691 .state = WREPL_STATE_TOMBSTONE,
5692 .node = WREPL_NODE_B,
5694 .num_ips = ctx->addresses_best_num,
5695 .ips = ctx->addresses_best,
5696 .apply_expected = True
5700 * sgroup,released vs. unique,tombstone with different ip(s)
5703 .line = __location__,
5704 .name = _NBT_NAME("_SR_UT_DI", 0x1C, NULL),
5706 .nb_flags = NBT_NM_GROUP,
5708 .num_ips = ctx->addresses_best_num,
5709 .ips = ctx->addresses_best,
5710 .apply_expected = True
5713 .type = WREPL_TYPE_UNIQUE,
5714 .state = WREPL_STATE_TOMBSTONE,
5715 .node = WREPL_NODE_B,
5717 .num_ips = ARRAY_SIZE(addresses_B_1),
5718 .ips = addresses_B_1,
5719 .apply_expected = True
5723 * special group vs. group section
5726 * sgroup,released vs. group,active with same ip(s)
5729 .line = __location__,
5730 .name = _NBT_NAME("_SR_GA_SI", 0x1C, NULL),
5732 .nb_flags = NBT_NM_GROUP,
5734 .num_ips = ctx->addresses_best_num,
5735 .ips = ctx->addresses_best,
5736 .apply_expected = True
5739 .type = WREPL_TYPE_GROUP,
5740 .state = WREPL_STATE_ACTIVE,
5741 .node = WREPL_NODE_B,
5743 .num_ips = ctx->addresses_best_num,
5744 .ips = ctx->addresses_best,
5745 .apply_expected = True
5749 * sgroup,released vs. group,active with different ip(s)
5752 .line = __location__,
5753 .name = _NBT_NAME("_SR_GA_DI", 0x1C, NULL),
5755 .nb_flags = NBT_NM_GROUP,
5757 .num_ips = ctx->addresses_best_num,
5758 .ips = ctx->addresses_best,
5759 .apply_expected = True
5762 .type = WREPL_TYPE_GROUP,
5763 .state = WREPL_STATE_ACTIVE,
5764 .node = WREPL_NODE_B,
5766 .num_ips = ARRAY_SIZE(addresses_B_1),
5767 .ips = addresses_B_1,
5768 .apply_expected = True
5772 * sgroup,released vs. group,tombstone with same ip(s)
5775 .line = __location__,
5776 .name = _NBT_NAME("_SR_GT_SI", 0x1C, NULL),
5778 .nb_flags = NBT_NM_GROUP,
5780 .num_ips = ctx->addresses_best_num,
5781 .ips = ctx->addresses_best,
5782 .apply_expected = True
5785 .type = WREPL_TYPE_GROUP,
5786 .state = WREPL_STATE_TOMBSTONE,
5787 .node = WREPL_NODE_B,
5789 .num_ips = ctx->addresses_best_num,
5790 .ips = ctx->addresses_best,
5791 .apply_expected = True
5795 * sgroup,released vs. group,tombstone with different ip(s)
5798 .line = __location__,
5799 .name = _NBT_NAME("_SR_GT_DI", 0x1C, NULL),
5801 .nb_flags = NBT_NM_GROUP,
5803 .num_ips = ctx->addresses_best_num,
5804 .ips = ctx->addresses_best,
5805 .apply_expected = True
5808 .type = WREPL_TYPE_GROUP,
5809 .state = WREPL_STATE_TOMBSTONE,
5810 .node = WREPL_NODE_B,
5812 .num_ips = ARRAY_SIZE(addresses_B_1),
5813 .ips = addresses_B_1,
5814 .apply_expected = True
5818 * special group vs. special group section
5821 * sgroup,released vs. sgroup,active with same ip(s)
5824 .line = __location__,
5825 .name = _NBT_NAME("_SR_SA_SI", 0x1C, NULL),
5827 .nb_flags = NBT_NM_GROUP,
5829 .num_ips = ctx->addresses_best_num,
5830 .ips = ctx->addresses_best,
5831 .apply_expected = True
5834 .type = WREPL_TYPE_SGROUP,
5835 .state = WREPL_STATE_ACTIVE,
5836 .node = WREPL_NODE_B,
5838 .num_ips = ctx->addresses_best_num,
5839 .ips = ctx->addresses_best,
5840 .apply_expected = True
5844 * sgroup,released vs. sgroup,active with different ip(s)
5847 .line = __location__,
5848 .name = _NBT_NAME("_SR_SA_DI", 0x1C, NULL),
5850 .nb_flags = NBT_NM_GROUP,
5852 .num_ips = ctx->addresses_best_num,
5853 .ips = ctx->addresses_best,
5854 .apply_expected = True
5857 .type = WREPL_TYPE_SGROUP,
5858 .state = WREPL_STATE_ACTIVE,
5859 .node = WREPL_NODE_B,
5861 .num_ips = ARRAY_SIZE(addresses_B_1),
5862 .ips = addresses_B_1,
5863 .apply_expected = True
5867 * sgroup,released vs. sgroup,tombstone with same ip(s)
5870 .line = __location__,
5871 .name = _NBT_NAME("_SR_ST_SI", 0x1C, NULL),
5873 .nb_flags = NBT_NM_GROUP,
5875 .num_ips = ctx->addresses_best_num,
5876 .ips = ctx->addresses_best,
5877 .apply_expected = True
5880 .type = WREPL_TYPE_SGROUP,
5881 .state = WREPL_STATE_TOMBSTONE,
5882 .node = WREPL_NODE_B,
5884 .num_ips = ctx->addresses_best_num,
5885 .ips = ctx->addresses_best,
5886 .apply_expected = True
5890 * sgroup,released vs. sgroup,tombstone with different ip(s)
5893 .line = __location__,
5894 .name = _NBT_NAME("_SR_ST_DI", 0x1C, NULL),
5896 .nb_flags = NBT_NM_GROUP,
5898 .num_ips = ctx->addresses_best_num,
5899 .ips = ctx->addresses_best,
5900 .apply_expected = True
5903 .type = WREPL_TYPE_SGROUP,
5904 .state = WREPL_STATE_TOMBSTONE,
5905 .node = WREPL_NODE_B,
5907 .num_ips = ARRAY_SIZE(addresses_B_1),
5908 .ips = addresses_B_1,
5909 .apply_expected = True
5913 * special group vs. multi homed section
5916 * sgroup,released vs. mhomed,active with same ip(s)
5919 .line = __location__,
5920 .name = _NBT_NAME("_SR_MA_SI", 0x1C, NULL),
5922 .nb_flags = NBT_NM_GROUP,
5924 .num_ips = ctx->addresses_best_num,
5925 .ips = ctx->addresses_best,
5926 .apply_expected = True
5929 .type = WREPL_TYPE_MHOMED,
5930 .state = WREPL_STATE_ACTIVE,
5931 .node = WREPL_NODE_B,
5933 .num_ips = ctx->addresses_best_num,
5934 .ips = ctx->addresses_best,
5935 .apply_expected = True
5939 * sgroup,released vs. mhomed,active with different ip(s)
5942 .line = __location__,
5943 .name = _NBT_NAME("_SR_MA_DI", 0x1C, NULL),
5945 .nb_flags = NBT_NM_GROUP,
5947 .num_ips = ctx->addresses_best_num,
5948 .ips = ctx->addresses_best,
5949 .apply_expected = True
5952 .type = WREPL_TYPE_MHOMED,
5953 .state = WREPL_STATE_ACTIVE,
5954 .node = WREPL_NODE_B,
5956 .num_ips = ARRAY_SIZE(addresses_B_1),
5957 .ips = addresses_B_1,
5958 .apply_expected = True
5962 * sgroup,released vs. mhomed,tombstone with same ip(s)
5965 .line = __location__,
5966 .name = _NBT_NAME("_SR_MT_SI", 0x1C, NULL),
5968 .nb_flags = NBT_NM_GROUP,
5970 .num_ips = ctx->addresses_best_num,
5971 .ips = ctx->addresses_best,
5972 .apply_expected = True
5975 .type = WREPL_TYPE_MHOMED,
5976 .state = WREPL_STATE_TOMBSTONE,
5977 .node = WREPL_NODE_B,
5979 .num_ips = ctx->addresses_best_num,
5980 .ips = ctx->addresses_best,
5981 .apply_expected = True
5985 * sgroup,released vs. mhomed,tombstone with different ip(s)
5988 .line = __location__,
5989 .name = _NBT_NAME("_SR_MT_DI", 0x1C, NULL),
5991 .nb_flags = NBT_NM_GROUP,
5993 .num_ips = ctx->addresses_best_num,
5994 .ips = ctx->addresses_best,
5995 .apply_expected = True
5998 .type = WREPL_TYPE_MHOMED,
5999 .state = WREPL_STATE_TOMBSTONE,
6000 .node = WREPL_NODE_B,
6002 .num_ips = ARRAY_SIZE(addresses_B_1),
6003 .ips = addresses_B_1,
6004 .apply_expected = True
6008 * multi homed vs. unique section
6011 * mhomed,released vs. unique,active with same ip(s)
6014 .line = __location__,
6015 .name = _NBT_NAME("_MR_UA_SI", 0x00, NULL),
6019 .num_ips = ctx->addresses_best_num,
6020 .ips = ctx->addresses_best,
6021 .apply_expected = True
6024 .type = WREPL_TYPE_UNIQUE,
6025 .state = WREPL_STATE_ACTIVE,
6026 .node = WREPL_NODE_B,
6028 .num_ips = ctx->addresses_best_num,
6029 .ips = ctx->addresses_best,
6030 .apply_expected = True
6034 * mhomed,released vs. unique,active with different ip(s)
6037 .line = __location__,
6038 .name = _NBT_NAME("_MR_UA_DI", 0x00, NULL),
6042 .num_ips = ctx->addresses_best_num,
6043 .ips = ctx->addresses_best,
6044 .apply_expected = True
6047 .type = WREPL_TYPE_UNIQUE,
6048 .state = WREPL_STATE_ACTIVE,
6049 .node = WREPL_NODE_B,
6051 .num_ips = ARRAY_SIZE(addresses_B_1),
6052 .ips = addresses_B_1,
6053 .apply_expected = True
6057 * mhomed,released vs. unique,tombstone with same ip(s)
6060 .line = __location__,
6061 .name = _NBT_NAME("_MR_UT_SI", 0x00, NULL),
6065 .num_ips = ctx->addresses_best_num,
6066 .ips = ctx->addresses_best,
6067 .apply_expected = True
6070 .type = WREPL_TYPE_UNIQUE,
6071 .state = WREPL_STATE_TOMBSTONE,
6072 .node = WREPL_NODE_B,
6074 .num_ips = ctx->addresses_best_num,
6075 .ips = ctx->addresses_best,
6076 .apply_expected = True
6080 * mhomed,released vs. unique,tombstone with different ip(s)
6083 .line = __location__,
6084 .name = _NBT_NAME("_MR_UT_DI", 0x00, NULL),
6088 .num_ips = ctx->addresses_best_num,
6089 .ips = ctx->addresses_best,
6090 .apply_expected = True
6093 .type = WREPL_TYPE_UNIQUE,
6094 .state = WREPL_STATE_TOMBSTONE,
6095 .node = WREPL_NODE_B,
6097 .num_ips = ARRAY_SIZE(addresses_B_1),
6098 .ips = addresses_B_1,
6099 .apply_expected = True
6103 * multi homed vs. group section
6106 * mhomed,released vs. group,active with same ip(s)
6109 .line = __location__,
6110 .name = _NBT_NAME("_MR_GA_SI", 0x00, NULL),
6114 .num_ips = ctx->addresses_best_num,
6115 .ips = ctx->addresses_best,
6116 .apply_expected = True
6119 .type = WREPL_TYPE_GROUP,
6120 .state = WREPL_STATE_ACTIVE,
6121 .node = WREPL_NODE_B,
6123 .num_ips = ctx->addresses_best_num,
6124 .ips = ctx->addresses_best,
6125 .apply_expected = True
6129 * mhomed,released vs. group,active with different ip(s)
6132 .line = __location__,
6133 .name = _NBT_NAME("_MR_GA_DI", 0x00, NULL),
6137 .num_ips = ctx->addresses_best_num,
6138 .ips = ctx->addresses_best,
6139 .apply_expected = True
6142 .type = WREPL_TYPE_GROUP,
6143 .state = WREPL_STATE_ACTIVE,
6144 .node = WREPL_NODE_B,
6146 .num_ips = ARRAY_SIZE(addresses_B_1),
6147 .ips = addresses_B_1,
6148 .apply_expected = True
6152 * mhomed,released vs. group,tombstone with same ip(s)
6155 .line = __location__,
6156 .name = _NBT_NAME("_MR_GT_SI", 0x00, NULL),
6160 .num_ips = ctx->addresses_best_num,
6161 .ips = ctx->addresses_best,
6162 .apply_expected = True
6165 .type = WREPL_TYPE_GROUP,
6166 .state = WREPL_STATE_TOMBSTONE,
6167 .node = WREPL_NODE_B,
6169 .num_ips = ctx->addresses_best_num,
6170 .ips = ctx->addresses_best,
6171 .apply_expected = True
6175 * mhomed,released vs. group,tombstone with different ip(s)
6178 .line = __location__,
6179 .name = _NBT_NAME("_MR_GT_DI", 0x00, NULL),
6183 .num_ips = ctx->addresses_best_num,
6184 .ips = ctx->addresses_best,
6185 .apply_expected = True
6188 .type = WREPL_TYPE_GROUP,
6189 .state = WREPL_STATE_TOMBSTONE,
6190 .node = WREPL_NODE_B,
6192 .num_ips = ARRAY_SIZE(addresses_B_1),
6193 .ips = addresses_B_1,
6194 .apply_expected = True
6198 * multi homed vs. special group section
6201 * mhomed,released vs. sgroup,active with same ip(s)
6204 .line = __location__,
6205 .name = _NBT_NAME("_MR_SA_SI", 0x00, NULL),
6209 .num_ips = ctx->addresses_best_num,
6210 .ips = ctx->addresses_best,
6211 .apply_expected = True
6214 .type = WREPL_TYPE_SGROUP,
6215 .state = WREPL_STATE_ACTIVE,
6216 .node = WREPL_NODE_B,
6218 .num_ips = ctx->addresses_best_num,
6219 .ips = ctx->addresses_best,
6220 .apply_expected = True
6224 * mhomed,released vs. sgroup,active with different ip(s)
6227 .line = __location__,
6228 .name = _NBT_NAME("_MR_SA_DI", 0x00, NULL),
6232 .num_ips = ctx->addresses_best_num,
6233 .ips = ctx->addresses_best,
6234 .apply_expected = True
6237 .type = WREPL_TYPE_SGROUP,
6238 .state = WREPL_STATE_ACTIVE,
6239 .node = WREPL_NODE_B,
6241 .num_ips = ARRAY_SIZE(addresses_B_1),
6242 .ips = addresses_B_1,
6243 .apply_expected = True
6247 * mhomed,released vs. sgroup,tombstone with same ip(s)
6250 .line = __location__,
6251 .name = _NBT_NAME("_MR_ST_SI", 0x00, NULL),
6255 .num_ips = ctx->addresses_best_num,
6256 .ips = ctx->addresses_best,
6257 .apply_expected = True
6260 .type = WREPL_TYPE_SGROUP,
6261 .state = WREPL_STATE_TOMBSTONE,
6262 .node = WREPL_NODE_B,
6264 .num_ips = ctx->addresses_best_num,
6265 .ips = ctx->addresses_best,
6266 .apply_expected = True
6270 * mhomed,released vs. sgroup,tombstone with different ip(s)
6273 .line = __location__,
6274 .name = _NBT_NAME("_MR_ST_DI", 0x00, NULL),
6278 .num_ips = ctx->addresses_best_num,
6279 .ips = ctx->addresses_best,
6280 .apply_expected = True
6283 .type = WREPL_TYPE_SGROUP,
6284 .state = WREPL_STATE_TOMBSTONE,
6285 .node = WREPL_NODE_B,
6287 .num_ips = ARRAY_SIZE(addresses_B_1),
6288 .ips = addresses_B_1,
6289 .apply_expected = True
6293 * multi homed vs. multi homed section
6296 * mhomed,released vs. mhomed,active with same ip(s)
6299 .line = __location__,
6300 .name = _NBT_NAME("_MR_MA_SI", 0x00, NULL),
6304 .num_ips = ctx->addresses_best_num,
6305 .ips = ctx->addresses_best,
6306 .apply_expected = True
6309 .type = WREPL_TYPE_MHOMED,
6310 .state = WREPL_STATE_ACTIVE,
6311 .node = WREPL_NODE_B,
6313 .num_ips = ctx->addresses_best_num,
6314 .ips = ctx->addresses_best,
6315 .apply_expected = True
6319 * mhomed,released vs. mhomed,active with different ip(s)
6322 .line = __location__,
6323 .name = _NBT_NAME("_MR_MA_DI", 0x00, NULL),
6327 .num_ips = ctx->addresses_best_num,
6328 .ips = ctx->addresses_best,
6329 .apply_expected = True
6332 .type = WREPL_TYPE_MHOMED,
6333 .state = WREPL_STATE_ACTIVE,
6334 .node = WREPL_NODE_B,
6336 .num_ips = ARRAY_SIZE(addresses_B_1),
6337 .ips = addresses_B_1,
6338 .apply_expected = True
6342 * mhomed,released vs. mhomed,tombstone with same ip(s)
6345 .line = __location__,
6346 .name = _NBT_NAME("_MR_MT_SI", 0x00, NULL),
6350 .num_ips = ctx->addresses_best_num,
6351 .ips = ctx->addresses_best,
6352 .apply_expected = True
6355 .type = WREPL_TYPE_MHOMED,
6356 .state = WREPL_STATE_TOMBSTONE,
6357 .node = WREPL_NODE_B,
6359 .num_ips = ctx->addresses_best_num,
6360 .ips = ctx->addresses_best,
6361 .apply_expected = True
6365 * mhomed,released vs. mhomed,tombstone with different ip(s)
6368 .line = __location__,
6369 .name = _NBT_NAME("_MR_MT_DI", 0x00, NULL),
6373 .num_ips = ctx->addresses_best_num,
6374 .ips = ctx->addresses_best,
6375 .apply_expected = True
6378 .type = WREPL_TYPE_MHOMED,
6379 .state = WREPL_STATE_TOMBSTONE,
6380 .node = WREPL_NODE_B,
6382 .num_ips = ARRAY_SIZE(addresses_B_1),
6383 .ips = addresses_B_1,
6384 .apply_expected = True
6389 printf("Test Replica records vs. owned released records\n");
6391 for(i=0; ret && i < ARRAY_SIZE(records); i++) {
6392 printf("%s => %s\n", nbt_name_string(ctx, &records[i].name),
6393 (records[i].replica.apply_expected?"REPLACE":"NOT REPLACE"));
6398 name_register->in.name = records[i].name;
6399 name_register->in.dest_addr = ctx->address;
6400 name_register->in.address = records[i].wins.ips[0].ip;
6401 name_register->in.nb_flags = records[i].wins.nb_flags;
6402 name_register->in.register_demand= False;
6403 name_register->in.broadcast = False;
6404 name_register->in.multi_homed = records[i].wins.mhomed;
6405 name_register->in.ttl = 300000;
6406 name_register->in.timeout = 70;
6407 name_register->in.retries = 0;
6409 status = nbt_name_register(ctx->nbtsock, ctx, name_register);
6410 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
6411 printf("No response from %s for name register\n", ctx->address);
6414 if (!NT_STATUS_IS_OK(status)) {
6415 printf("Bad response from %s for name register - %s\n",
6416 ctx->address, nt_errstr(status));
6419 CHECK_VALUE(name_register->out.rcode, 0);
6420 CHECK_VALUE_STRING(name_register->out.reply_from, ctx->address);
6421 CHECK_VALUE(name_register->out.name.type, records[i].name.type);
6422 CHECK_VALUE_STRING(name_register->out.name.name, records[i].name.name);
6423 CHECK_VALUE_STRING(name_register->out.name.scope, records[i].name.scope);
6424 CHECK_VALUE_STRING(name_register->out.reply_addr, records[i].wins.ips[0].ip);
6426 /* release the record */
6427 release->in.name = records[i].name;
6428 release->in.dest_addr = ctx->address;
6429 release->in.address = records[i].wins.ips[0].ip;
6430 release->in.nb_flags = records[i].wins.nb_flags;
6431 release->in.broadcast = False;
6432 release->in.timeout = 30;
6433 release->in.retries = 0;
6435 status = nbt_name_release(ctx->nbtsock, ctx, release);
6436 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
6437 printf("No response from %s for name release\n", ctx->address);
6440 if (!NT_STATUS_IS_OK(status)) {
6441 printf("Bad response from %s for name query - %s\n",
6442 ctx->address, nt_errstr(status));
6445 CHECK_VALUE(release->out.rcode, 0);
6450 wins_name->name = &records[i].name;
6451 wins_name->flags = WREPL_NAME_FLAGS(records[i].replica.type,
6452 records[i].replica.state,
6453 records[i].replica.node,
6454 records[i].replica.is_static);
6455 wins_name->id = ++ctx->b.max_version;
6456 if (wins_name->flags & 2) {
6457 wins_name->addresses.addresses.num_ips = records[i].replica.num_ips;
6458 wins_name->addresses.addresses.ips = discard_const(records[i].replica.ips);
6460 wins_name->addresses.ip = records[i].replica.ips[0].ip;
6462 wins_name->unknown = "255.255.255.255";
6464 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
6465 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name,
6466 records[i].replica.apply_expected);
6468 if (records[i].replica.apply_expected) {
6469 wins_name->name = &records[i].name;
6470 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE,
6471 WREPL_STATE_TOMBSTONE,
6472 WREPL_NODE_B, False);
6473 wins_name->id = ++ctx->b.max_version;
6474 wins_name->addresses.ip = addresses_B_1[0].ip;
6475 wins_name->unknown = "255.255.255.255";
6477 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
6478 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name, True);
6480 release->in.name = records[i].name;
6481 release->in.dest_addr = ctx->address;
6482 release->in.address = records[i].wins.ips[0].ip;
6483 release->in.nb_flags = records[i].wins.nb_flags;
6484 release->in.broadcast = False;
6485 release->in.timeout = 30;
6486 release->in.retries = 0;
6488 status = nbt_name_release(ctx->nbtsock, ctx, release);
6489 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
6490 printf("No response from %s for name release\n", ctx->address);
6493 if (!NT_STATUS_IS_OK(status)) {
6494 printf("Bad response from %s for name query - %s\n",
6495 ctx->address, nt_errstr(status));
6498 CHECK_VALUE(release->out.rcode, 0);
6502 printf("conflict handled wrong or record[%u]: %s\n", i, records[i].line);
6510 struct test_conflict_owned_active_vs_replica_struct {
6511 const char *line; /* just better debugging */
6512 const char *section; /* just better debugging */
6513 struct nbt_name name;
6514 const char *comment;
6520 const struct wrepl_ip *ips;
6521 BOOL apply_expected;
6526 BOOL expect_release;
6529 /* when num_ips == 0, then .wins.ips are used */
6531 const struct wrepl_ip *ips;
6534 enum wrepl_name_type type;
6535 enum wrepl_name_state state;
6536 enum wrepl_name_node node;
6539 const struct wrepl_ip *ips;
6540 BOOL apply_expected;
6546 static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket *nbtsock,
6547 struct nbt_name_packet *req_packet,
6548 const struct nbt_peer_socket *src);
6550 static BOOL test_conflict_owned_active_vs_replica(struct test_wrepl_conflict_conn *ctx)
6554 struct wrepl_wins_name wins_name_;
6555 struct wrepl_wins_name *wins_name = &wins_name_;
6556 struct nbt_name_register name_register_;
6557 struct nbt_name_register *name_register = &name_register_;
6558 struct nbt_name_release release_;
6559 struct nbt_name_release *release = &release_;
6561 struct test_conflict_owned_active_vs_replica_struct records[] = {
6563 * unique vs. unique section
6566 * unique,active vs. unique,active with same ip(s), unchecked
6569 .line = __location__,
6570 .name = _NBT_NAME("_UA_UA_SI_U", 0x00, NULL),
6574 .num_ips = ctx->addresses_best_num,
6575 .ips = ctx->addresses_best,
6576 .apply_expected = True
6582 .type = WREPL_TYPE_UNIQUE,
6583 .state = WREPL_STATE_ACTIVE,
6584 .node = WREPL_NODE_B,
6586 .num_ips = ctx->addresses_best_num,
6587 .ips = ctx->addresses_best,
6588 .apply_expected = True
6592 * unique,active vs. unique,active with different ip(s), positive response
6595 .line = __location__,
6596 .name = _NBT_NAME("_UA_UA_DI_P", 0x00, NULL),
6600 .num_ips = ctx->addresses_best_num,
6601 .ips = ctx->addresses_best,
6602 .apply_expected = True
6609 .type = WREPL_TYPE_UNIQUE,
6610 .state = WREPL_STATE_ACTIVE,
6611 .node = WREPL_NODE_B,
6613 .num_ips = ARRAY_SIZE(addresses_B_1),
6614 .ips = addresses_B_1,
6615 .apply_expected = False
6619 * unique,active vs. unique,active with different ip(s), positive response other ips
6622 .line = __location__,
6623 .name = _NBT_NAME("_UA_UA_DI_O", 0x00, NULL),
6627 .num_ips = ctx->addresses_best_num,
6628 .ips = ctx->addresses_best,
6629 .apply_expected = True
6634 .num_ips = ARRAY_SIZE(addresses_A_3_4),
6635 .ips = addresses_A_3_4,
6638 .type = WREPL_TYPE_UNIQUE,
6639 .state = WREPL_STATE_ACTIVE,
6640 .node = WREPL_NODE_B,
6642 .num_ips = ARRAY_SIZE(addresses_B_1),
6643 .ips = addresses_B_1,
6644 .apply_expected = False
6648 * unique,active vs. unique,active with different ip(s), negative response
6651 .line = __location__,
6652 .name = _NBT_NAME("_UA_UA_DI_N", 0x00, NULL),
6656 .num_ips = ctx->addresses_best_num,
6657 .ips = ctx->addresses_best,
6658 .apply_expected = True
6665 .type = WREPL_TYPE_UNIQUE,
6666 .state = WREPL_STATE_ACTIVE,
6667 .node = WREPL_NODE_B,
6669 .num_ips = ARRAY_SIZE(addresses_B_1),
6670 .ips = addresses_B_1,
6671 .apply_expected = True
6675 * unique,active vs. unique,tombstone with same ip(s), unchecked
6678 .line = __location__,
6679 .name = _NBT_NAME("_UA_UT_SI_U", 0x00, NULL),
6683 .num_ips = ctx->addresses_best_num,
6684 .ips = ctx->addresses_best,
6685 .apply_expected = True
6691 .type = WREPL_TYPE_UNIQUE,
6692 .state = WREPL_STATE_TOMBSTONE,
6693 .node = WREPL_NODE_B,
6695 .num_ips = ctx->addresses_best_num,
6696 .ips = ctx->addresses_best,
6697 .apply_expected = False
6701 * unique,active vs. unique,tombstone with different ip(s), unchecked
6704 .line = __location__,
6705 .name = _NBT_NAME("_UA_UT_DI_U", 0x00, NULL),
6709 .num_ips = ctx->addresses_best_num,
6710 .ips = ctx->addresses_best,
6711 .apply_expected = True
6717 .type = WREPL_TYPE_UNIQUE,
6718 .state = WREPL_STATE_TOMBSTONE,
6719 .node = WREPL_NODE_B,
6721 .num_ips = ARRAY_SIZE(addresses_B_1),
6722 .ips = addresses_B_1,
6723 .apply_expected = False
6727 * unique vs. group section
6730 * unique,active vs. group,active with same ip(s), release expected
6733 .line = __location__,
6734 .name = _NBT_NAME("_UA_GA_SI_R", 0x00, NULL),
6738 .num_ips = ctx->addresses_best_num,
6739 .ips = ctx->addresses_best,
6740 .apply_expected = True
6744 .expect_release = True,
6747 .type = WREPL_TYPE_GROUP,
6748 .state = WREPL_STATE_ACTIVE,
6749 .node = WREPL_NODE_B,
6751 .num_ips = ctx->addresses_best_num,
6752 .ips = ctx->addresses_best,
6753 .apply_expected = True
6757 * unique,active vs. group,active with different ip(s), release expected
6760 .line = __location__,
6761 .name = _NBT_NAME("_UA_GA_DI_R", 0x00, NULL),
6765 .num_ips = ctx->addresses_best_num,
6766 .ips = ctx->addresses_best,
6767 .apply_expected = True
6771 .expect_release = True,
6774 .type = WREPL_TYPE_GROUP,
6775 .state = WREPL_STATE_ACTIVE,
6776 .node = WREPL_NODE_B,
6778 .num_ips = ARRAY_SIZE(addresses_B_1),
6779 .ips = addresses_B_1,
6780 .apply_expected = True
6784 * unique,active vs. group,tombstone with same ip(s), unchecked
6787 .line = __location__,
6788 .name = _NBT_NAME("_UA_GT_SI_U", 0x00, NULL),
6792 .num_ips = ctx->addresses_best_num,
6793 .ips = ctx->addresses_best,
6794 .apply_expected = True
6800 .type = WREPL_TYPE_GROUP,
6801 .state = WREPL_STATE_TOMBSTONE,
6802 .node = WREPL_NODE_B,
6804 .num_ips = ctx->addresses_best_num,
6805 .ips = ctx->addresses_best,
6806 .apply_expected = False
6810 * unique,active vs. group,tombstone with different ip(s), unchecked
6813 .line = __location__,
6814 .name = _NBT_NAME("_UA_GT_DI_U", 0x00, NULL),
6818 .num_ips = ctx->addresses_best_num,
6819 .ips = ctx->addresses_best,
6820 .apply_expected = True
6826 .type = WREPL_TYPE_GROUP,
6827 .state = WREPL_STATE_TOMBSTONE,
6828 .node = WREPL_NODE_B,
6830 .num_ips = ARRAY_SIZE(addresses_B_1),
6831 .ips = addresses_B_1,
6832 .apply_expected = False
6836 * unique vs. special group section
6839 * unique,active vs. sgroup,active with same ip(s), release expected
6842 .line = __location__,
6843 .name = _NBT_NAME("_UA_SA_SI_R", 0x00, NULL),
6847 .num_ips = ctx->addresses_best_num,
6848 .ips = ctx->addresses_best,
6849 .apply_expected = True
6853 .expect_release = True,
6856 .type = WREPL_TYPE_SGROUP,
6857 .state = WREPL_STATE_ACTIVE,
6858 .node = WREPL_NODE_B,
6860 .num_ips = ctx->addresses_best_num,
6861 .ips = ctx->addresses_best,
6862 .apply_expected = True
6866 * unique,active vs. group,active with different ip(s), release expected
6869 .line = __location__,
6870 .name = _NBT_NAME("_UA_SA_DI_R", 0x00, NULL),
6874 .num_ips = ctx->addresses_best_num,
6875 .ips = ctx->addresses_best,
6876 .apply_expected = True
6880 .expect_release = True,
6883 .type = WREPL_TYPE_SGROUP,
6884 .state = WREPL_STATE_ACTIVE,
6885 .node = WREPL_NODE_B,
6887 .num_ips = ARRAY_SIZE(addresses_B_1),
6888 .ips = addresses_B_1,
6889 .apply_expected = True
6893 * unique,active vs. sgroup,tombstone with same ip(s), unchecked
6896 .line = __location__,
6897 .name = _NBT_NAME("_UA_ST_SI_U", 0x00, NULL),
6901 .num_ips = ctx->addresses_best_num,
6902 .ips = ctx->addresses_best,
6903 .apply_expected = True
6909 .type = WREPL_TYPE_SGROUP,
6910 .state = WREPL_STATE_TOMBSTONE,
6911 .node = WREPL_NODE_B,
6913 .num_ips = ctx->addresses_best_num,
6914 .ips = ctx->addresses_best,
6915 .apply_expected = False
6919 * unique,active vs. sgroup,tombstone with different ip(s), unchecked
6922 .line = __location__,
6923 .name = _NBT_NAME("_UA_ST_DI_U", 0x00, NULL),
6927 .num_ips = ctx->addresses_best_num,
6928 .ips = ctx->addresses_best,
6929 .apply_expected = True
6935 .type = WREPL_TYPE_SGROUP,
6936 .state = WREPL_STATE_TOMBSTONE,
6937 .node = WREPL_NODE_B,
6939 .num_ips = ARRAY_SIZE(addresses_B_1),
6940 .ips = addresses_B_1,
6941 .apply_expected = False
6945 * unique vs. multi homed section
6948 * unique,active vs. mhomed,active with same ip(s), unchecked
6951 .line = __location__,
6952 .name = _NBT_NAME("_UA_MA_SI_U", 0x00, NULL),
6956 .num_ips = ctx->addresses_best_num,
6957 .ips = ctx->addresses_best,
6958 .apply_expected = True
6964 .type = WREPL_TYPE_MHOMED,
6965 .state = WREPL_STATE_ACTIVE,
6966 .node = WREPL_NODE_B,
6968 .num_ips = ctx->addresses_best_num,
6969 .ips = ctx->addresses_best,
6970 .apply_expected = True
6974 * unique,active vs. mhomed,active with superset ip(s), unchecked
6977 .line = __location__,
6978 .name = _NBT_NAME("_UA_MA_SP_U", 0x00, NULL),
6982 .num_ips = ctx->addresses_best_num,
6983 .ips = ctx->addresses_best,
6984 .apply_expected = True
6990 .type = WREPL_TYPE_MHOMED,
6991 .state = WREPL_STATE_ACTIVE,
6992 .node = WREPL_NODE_B,
6994 .num_ips = ctx->addresses_all_num,
6995 .ips = ctx->addresses_all,
6996 .apply_expected = True
7000 * unique,active vs. mhomed,active with different ip(s), positive response
7003 .line = __location__,
7004 .name = _NBT_NAME("_UA_MA_DI_P", 0x00, NULL),
7008 .num_ips = ctx->addresses_best_num,
7009 .ips = ctx->addresses_best,
7010 .apply_expected = True
7017 .type = WREPL_TYPE_MHOMED,
7018 .state = WREPL_STATE_ACTIVE,
7019 .node = WREPL_NODE_B,
7021 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7022 .ips = addresses_B_3_4,
7023 .apply_expected = False
7027 * unique,active vs. mhomed,active with different ip(s), positive response other ips
7030 .line = __location__,
7031 .name = _NBT_NAME("_UA_MA_DI_O", 0x00, NULL),
7035 .num_ips = ctx->addresses_best_num,
7036 .ips = ctx->addresses_best,
7037 .apply_expected = True
7042 .num_ips = ARRAY_SIZE(addresses_A_3_4),
7043 .ips = addresses_A_3_4,
7046 .type = WREPL_TYPE_MHOMED,
7047 .state = WREPL_STATE_ACTIVE,
7048 .node = WREPL_NODE_B,
7050 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7051 .ips = addresses_B_3_4,
7052 .apply_expected = False
7056 * unique,active vs. mhomed,active with different ip(s), negative response
7059 .line = __location__,
7060 .name = _NBT_NAME("_UA_MA_DI_N", 0x00, NULL),
7064 .num_ips = ctx->addresses_best_num,
7065 .ips = ctx->addresses_best,
7066 .apply_expected = True
7073 .type = WREPL_TYPE_MHOMED,
7074 .state = WREPL_STATE_ACTIVE,
7075 .node = WREPL_NODE_B,
7077 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7078 .ips = addresses_B_3_4,
7079 .apply_expected = True
7083 * unique,active vs. mhomed,tombstone with same ip(s), unchecked
7086 .line = __location__,
7087 .name = _NBT_NAME("_UA_MT_SI_U", 0x00, NULL),
7091 .num_ips = ctx->addresses_best_num,
7092 .ips = ctx->addresses_best,
7093 .apply_expected = True
7099 .type = WREPL_TYPE_MHOMED,
7100 .state = WREPL_STATE_TOMBSTONE,
7101 .node = WREPL_NODE_B,
7103 .num_ips = ctx->addresses_best_num,
7104 .ips = ctx->addresses_best,
7105 .apply_expected = False
7109 * unique,active vs. mhomed,tombstone with different ip(s), unchecked
7112 .line = __location__,
7113 .name = _NBT_NAME("_UA_MT_DI_U", 0x00, NULL),
7117 .num_ips = ctx->addresses_best_num,
7118 .ips = ctx->addresses_best,
7119 .apply_expected = True
7125 .type = WREPL_TYPE_MHOMED,
7126 .state = WREPL_STATE_TOMBSTONE,
7127 .node = WREPL_NODE_B,
7129 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7130 .ips = addresses_B_3_4,
7131 .apply_expected = False
7135 * normal group vs. unique section
7138 * group,active vs. unique,active with same ip(s), unchecked
7141 .line = __location__,
7142 .name = _NBT_NAME("_GA_UA_SI_U", 0x00, NULL),
7144 .nb_flags = NBT_NM_GROUP,
7146 .num_ips = ctx->addresses_best_num,
7147 .ips = ctx->addresses_best,
7148 .apply_expected = True
7154 .type = WREPL_TYPE_UNIQUE,
7155 .state = WREPL_STATE_ACTIVE,
7156 .node = WREPL_NODE_B,
7158 .num_ips = ctx->addresses_best_num,
7159 .ips = ctx->addresses_best,
7160 .apply_expected = False
7164 * group,active vs. unique,active with different ip(s), unchecked
7167 .line = __location__,
7168 .name = _NBT_NAME("_GA_UA_DI_U", 0x00, NULL),
7170 .nb_flags = NBT_NM_GROUP,
7172 .num_ips = ctx->addresses_best_num,
7173 .ips = ctx->addresses_best,
7174 .apply_expected = True
7180 .type = WREPL_TYPE_UNIQUE,
7181 .state = WREPL_STATE_ACTIVE,
7182 .node = WREPL_NODE_B,
7184 .num_ips = ARRAY_SIZE(addresses_B_1),
7185 .ips = addresses_B_1,
7186 .apply_expected = False
7190 * group,active vs. unique,tombstone with same ip(s), unchecked
7193 .line = __location__,
7194 .name = _NBT_NAME("_GA_UT_SI_U", 0x00, NULL),
7196 .nb_flags = NBT_NM_GROUP,
7198 .num_ips = ctx->addresses_best_num,
7199 .ips = ctx->addresses_best,
7200 .apply_expected = True
7206 .type = WREPL_TYPE_UNIQUE,
7207 .state = WREPL_STATE_TOMBSTONE,
7208 .node = WREPL_NODE_B,
7210 .num_ips = ctx->addresses_best_num,
7211 .ips = ctx->addresses_best,
7212 .apply_expected = False
7216 * group,active vs. unique,tombstone with different ip(s), unchecked
7219 .line = __location__,
7220 .name = _NBT_NAME("_GA_UT_DI_U", 0x00, NULL),
7222 .nb_flags = NBT_NM_GROUP,
7224 .num_ips = ctx->addresses_best_num,
7225 .ips = ctx->addresses_best,
7226 .apply_expected = True
7232 .type = WREPL_TYPE_UNIQUE,
7233 .state = WREPL_STATE_TOMBSTONE,
7234 .node = WREPL_NODE_B,
7236 .num_ips = ARRAY_SIZE(addresses_B_1),
7237 .ips = addresses_B_1,
7238 .apply_expected = False
7242 * normal group vs. normal group section
7245 * group,active vs. group,active with same ip(s), unchecked
7248 .line = __location__,
7249 .name = _NBT_NAME("_GA_GA_SI_U", 0x00, NULL),
7251 .nb_flags = NBT_NM_GROUP,
7253 .num_ips = ctx->addresses_best_num,
7254 .ips = ctx->addresses_best,
7255 .apply_expected = True
7261 .type = WREPL_TYPE_GROUP,
7262 .state = WREPL_STATE_ACTIVE,
7263 .node = WREPL_NODE_B,
7265 .num_ips = ctx->addresses_best_num,
7266 .ips = ctx->addresses_best,
7267 .apply_expected = True
7271 * group,active vs. group,active with different ip(s), unchecked
7274 .line = __location__,
7275 .name = _NBT_NAME("_GA_GA_DI_U", 0x00, NULL),
7277 .nb_flags = NBT_NM_GROUP,
7279 .num_ips = ctx->addresses_best_num,
7280 .ips = ctx->addresses_best,
7281 .apply_expected = True
7287 .type = WREPL_TYPE_GROUP,
7288 .state = WREPL_STATE_ACTIVE,
7289 .node = WREPL_NODE_B,
7291 .num_ips = ARRAY_SIZE(addresses_B_1),
7292 .ips = addresses_B_1,
7293 .apply_expected = True
7297 * group,active vs. group,tombstone with same ip(s), unchecked
7300 .line = __location__,
7301 .name = _NBT_NAME("_GA_GT_SI_U", 0x00, NULL),
7303 .nb_flags = NBT_NM_GROUP,
7305 .num_ips = ctx->addresses_best_num,
7306 .ips = ctx->addresses_best,
7307 .apply_expected = True
7313 .type = WREPL_TYPE_GROUP,
7314 .state = WREPL_STATE_TOMBSTONE,
7315 .node = WREPL_NODE_B,
7317 .num_ips = ctx->addresses_best_num,
7318 .ips = ctx->addresses_best,
7319 .apply_expected = False
7323 * group,active vs. group,tombstone with different ip(s), unchecked
7326 .line = __location__,
7327 .name = _NBT_NAME("_GA_GT_DI_U", 0x00, NULL),
7329 .nb_flags = NBT_NM_GROUP,
7331 .num_ips = ctx->addresses_best_num,
7332 .ips = ctx->addresses_best,
7333 .apply_expected = True
7339 .type = WREPL_TYPE_GROUP,
7340 .state = WREPL_STATE_TOMBSTONE,
7341 .node = WREPL_NODE_B,
7343 .num_ips = ARRAY_SIZE(addresses_B_1),
7344 .ips = addresses_B_1,
7345 .apply_expected = False
7349 * normal group vs. special group section
7352 * group,active vs. sgroup,active with same ip(s), unchecked
7355 .line = __location__,
7356 .name = _NBT_NAME("_GA_SA_SI_U", 0x00, NULL),
7358 .nb_flags = NBT_NM_GROUP,
7360 .num_ips = ctx->addresses_best_num,
7361 .ips = ctx->addresses_best,
7362 .apply_expected = True
7368 .type = WREPL_TYPE_SGROUP,
7369 .state = WREPL_STATE_ACTIVE,
7370 .node = WREPL_NODE_B,
7372 .num_ips = ctx->addresses_best_num,
7373 .ips = ctx->addresses_best,
7374 .apply_expected = False
7378 * group,active vs. sgroup,active with different ip(s), unchecked
7381 .line = __location__,
7382 .name = _NBT_NAME("_GA_SA_DI_U", 0x00, NULL),
7384 .nb_flags = NBT_NM_GROUP,
7386 .num_ips = ctx->addresses_best_num,
7387 .ips = ctx->addresses_best,
7388 .apply_expected = True
7394 .type = WREPL_TYPE_SGROUP,
7395 .state = WREPL_STATE_ACTIVE,
7396 .node = WREPL_NODE_B,
7398 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7399 .ips = addresses_B_3_4,
7400 .apply_expected = False
7404 * group,active vs. sgroup,tombstone with same ip(s), unchecked
7407 .line = __location__,
7408 .name = _NBT_NAME("_GA_ST_SI_U", 0x00, NULL),
7410 .nb_flags = NBT_NM_GROUP,
7412 .num_ips = ctx->addresses_best_num,
7413 .ips = ctx->addresses_best,
7414 .apply_expected = True
7420 .type = WREPL_TYPE_SGROUP,
7421 .state = WREPL_STATE_TOMBSTONE,
7422 .node = WREPL_NODE_B,
7424 .num_ips = ctx->addresses_best_num,
7425 .ips = ctx->addresses_best,
7426 .apply_expected = False
7430 * group,active vs. sgroup,tombstone with different ip(s), unchecked
7433 .line = __location__,
7434 .name = _NBT_NAME("_GA_ST_DI_U", 0x00, NULL),
7436 .nb_flags = NBT_NM_GROUP,
7438 .num_ips = ctx->addresses_best_num,
7439 .ips = ctx->addresses_best,
7440 .apply_expected = True
7446 .type = WREPL_TYPE_SGROUP,
7447 .state = WREPL_STATE_TOMBSTONE,
7448 .node = WREPL_NODE_B,
7450 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7451 .ips = addresses_B_3_4,
7452 .apply_expected = False
7456 * normal group vs. multi homed section
7459 * group,active vs. mhomed,active with same ip(s), unchecked
7462 .line = __location__,
7463 .name = _NBT_NAME("_GA_MA_SI_U", 0x00, NULL),
7465 .nb_flags = NBT_NM_GROUP,
7467 .num_ips = ctx->addresses_best_num,
7468 .ips = ctx->addresses_best,
7469 .apply_expected = True
7475 .type = WREPL_TYPE_MHOMED,
7476 .state = WREPL_STATE_ACTIVE,
7477 .node = WREPL_NODE_B,
7479 .num_ips = ctx->addresses_best_num,
7480 .ips = ctx->addresses_best,
7481 .apply_expected = False
7485 * group,active vs. mhomed,active with different ip(s), unchecked
7488 .line = __location__,
7489 .name = _NBT_NAME("_GA_MA_DI_U", 0x00, NULL),
7491 .nb_flags = NBT_NM_GROUP,
7493 .num_ips = ctx->addresses_best_num,
7494 .ips = ctx->addresses_best,
7495 .apply_expected = True
7501 .type = WREPL_TYPE_MHOMED,
7502 .state = WREPL_STATE_ACTIVE,
7503 .node = WREPL_NODE_B,
7505 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7506 .ips = addresses_B_3_4,
7507 .apply_expected = False
7511 * group,active vs. mhomed,tombstone with same ip(s), unchecked
7514 .line = __location__,
7515 .name = _NBT_NAME("_GA_MT_SI_U", 0x00, NULL),
7517 .nb_flags = NBT_NM_GROUP,
7519 .num_ips = ctx->addresses_best_num,
7520 .ips = ctx->addresses_best,
7521 .apply_expected = True
7527 .type = WREPL_TYPE_MHOMED,
7528 .state = WREPL_STATE_TOMBSTONE,
7529 .node = WREPL_NODE_B,
7531 .num_ips = ctx->addresses_best_num,
7532 .ips = ctx->addresses_best,
7533 .apply_expected = False
7537 * group,active vs. mhomed,tombstone with different ip(s), unchecked
7540 .line = __location__,
7541 .name = _NBT_NAME("_GA_MT_DI_U", 0x00, NULL),
7543 .nb_flags = NBT_NM_GROUP,
7545 .num_ips = ctx->addresses_best_num,
7546 .ips = ctx->addresses_best,
7547 .apply_expected = True
7553 .type = WREPL_TYPE_MHOMED,
7554 .state = WREPL_STATE_TOMBSTONE,
7555 .node = WREPL_NODE_B,
7557 .num_ips = ARRAY_SIZE(addresses_B_3_4),
7558 .ips = addresses_B_3_4,
7559 .apply_expected = False
7563 * special group vs. unique section
7566 * sgroup,active vs. unique,active with same ip(s), unchecked
7569 .line = __location__,
7570 .name = _NBT_NAME("_SA_UA_SI_U", 0x1C, NULL),
7572 .nb_flags = NBT_NM_GROUP,
7574 .num_ips = ctx->addresses_best_num,
7575 .ips = ctx->addresses_best,
7576 .apply_expected = True
7582 .type = WREPL_TYPE_UNIQUE,
7583 .state = WREPL_STATE_ACTIVE,
7584 .node = WREPL_NODE_B,
7586 .num_ips = ctx->addresses_best_num,
7587 .ips = ctx->addresses_best,
7588 .apply_expected = False
7592 * sgroup,active vs. unique,active with different ip(s), unchecked
7595 .line = __location__,
7596 .name = _NBT_NAME("_SA_UA_DI_U", 0x1C, NULL),
7598 .nb_flags = NBT_NM_GROUP,
7600 .num_ips = ctx->addresses_best_num,
7601 .ips = ctx->addresses_best,
7602 .apply_expected = True
7608 .type = WREPL_TYPE_UNIQUE,
7609 .state = WREPL_STATE_ACTIVE,
7610 .node = WREPL_NODE_B,
7612 .num_ips = ARRAY_SIZE(addresses_B_1),
7613 .ips = addresses_B_1,
7614 .apply_expected = False
7618 * sgroup,active vs. unique,tombstone with same ip(s), unchecked
7621 .line = __location__,
7622 .name = _NBT_NAME("_SA_UT_SI_U", 0x1C, NULL),
7624 .nb_flags = NBT_NM_GROUP,
7626 .num_ips = ctx->addresses_best_num,
7627 .ips = ctx->addresses_best,
7628 .apply_expected = True
7634 .type = WREPL_TYPE_UNIQUE,
7635 .state = WREPL_STATE_TOMBSTONE,
7636 .node = WREPL_NODE_B,
7638 .num_ips = ctx->addresses_best_num,
7639 .ips = ctx->addresses_best,
7640 .apply_expected = False
7644 * sgroup,active vs. unique,tombstone with different ip(s), unchecked
7647 .line = __location__,
7648 .name = _NBT_NAME("_SA_UT_DI_U", 0x1C, NULL),
7650 .nb_flags = NBT_NM_GROUP,
7652 .num_ips = ctx->addresses_best_num,
7653 .ips = ctx->addresses_best,
7654 .apply_expected = True
7660 .type = WREPL_TYPE_UNIQUE,
7661 .state = WREPL_STATE_TOMBSTONE,
7662 .node = WREPL_NODE_B,
7664 .num_ips = ARRAY_SIZE(addresses_B_1),
7665 .ips = addresses_B_1,
7666 .apply_expected = False
7670 * special group vs. normal group section
7673 * sgroup,active vs. group,active with same ip(s), unchecked
7676 .line = __location__,
7677 .name = _NBT_NAME("_SA_GA_SI_U", 0x1C, NULL),
7679 .nb_flags = NBT_NM_GROUP,
7681 .num_ips = ctx->addresses_best_num,
7682 .ips = ctx->addresses_best,
7683 .apply_expected = True
7689 .type = WREPL_TYPE_GROUP,
7690 .state = WREPL_STATE_ACTIVE,
7691 .node = WREPL_NODE_B,
7693 .num_ips = ctx->addresses_best_num,
7694 .ips = ctx->addresses_best,
7695 .apply_expected = False
7699 * sgroup,active vs. group,active with different ip(s), unchecked
7702 .line = __location__,
7703 .name = _NBT_NAME("_SA_GA_DI_U", 0x1C, NULL),
7705 .nb_flags = NBT_NM_GROUP,
7707 .num_ips = ctx->addresses_best_num,
7708 .ips = ctx->addresses_best,
7709 .apply_expected = True
7715 .type = WREPL_TYPE_GROUP,
7716 .state = WREPL_STATE_ACTIVE,
7717 .node = WREPL_NODE_B,
7719 .num_ips = ARRAY_SIZE(addresses_B_1),
7720 .ips = addresses_B_1,
7721 .apply_expected = False
7725 * sgroup,active vs. group,tombstone with same ip(s), unchecked
7728 .line = __location__,
7729 .name = _NBT_NAME("_SA_GT_SI_U", 0x1C, NULL),
7731 .nb_flags = NBT_NM_GROUP,
7733 .num_ips = ctx->addresses_best_num,
7734 .ips = ctx->addresses_best,
7735 .apply_expected = True
7741 .type = WREPL_TYPE_GROUP,
7742 .state = WREPL_STATE_TOMBSTONE,
7743 .node = WREPL_NODE_B,
7745 .num_ips = ctx->addresses_best_num,
7746 .ips = ctx->addresses_best,
7747 .apply_expected = False
7751 * sgroup,active vs. group,tombstone with different ip(s), unchecked
7754 .line = __location__,
7755 .name = _NBT_NAME("_SA_GT_DI_U", 0x1C, NULL),
7757 .nb_flags = NBT_NM_GROUP,
7759 .num_ips = ctx->addresses_best_num,
7760 .ips = ctx->addresses_best,
7761 .apply_expected = True
7767 .type = WREPL_TYPE_GROUP,
7768 .state = WREPL_STATE_TOMBSTONE,
7769 .node = WREPL_NODE_B,
7771 .num_ips = ARRAY_SIZE(addresses_B_1),
7772 .ips = addresses_B_1,
7773 .apply_expected = False
7777 * special group vs. multi homed section
7780 * sgroup,active vs. mhomed,active with same ip(s), unchecked
7783 .line = __location__,
7784 .name = _NBT_NAME("_SA_MA_SI_U", 0x1C, NULL),
7786 .nb_flags = NBT_NM_GROUP,
7788 .num_ips = ctx->addresses_best_num,
7789 .ips = ctx->addresses_best,
7790 .apply_expected = True
7796 .type = WREPL_TYPE_MHOMED,
7797 .state = WREPL_STATE_ACTIVE,
7798 .node = WREPL_NODE_B,
7800 .num_ips = ctx->addresses_best_num,
7801 .ips = ctx->addresses_best,
7802 .apply_expected = False
7806 * sgroup,active vs. mhomed,active with different ip(s), unchecked
7809 .line = __location__,
7810 .name = _NBT_NAME("_SA_MA_DI_U", 0x1C, NULL),
7812 .nb_flags = NBT_NM_GROUP,
7814 .num_ips = ctx->addresses_best_num,
7815 .ips = ctx->addresses_best,
7816 .apply_expected = True
7822 .type = WREPL_TYPE_MHOMED,
7823 .state = WREPL_STATE_ACTIVE,
7824 .node = WREPL_NODE_B,
7826 .num_ips = ARRAY_SIZE(addresses_B_1),
7827 .ips = addresses_B_1,
7828 .apply_expected = False
7832 * sgroup,active vs. mhomed,tombstone with same ip(s), unchecked
7835 .line = __location__,
7836 .name = _NBT_NAME("_SA_MT_SI_U", 0x1C, NULL),
7838 .nb_flags = NBT_NM_GROUP,
7840 .num_ips = ctx->addresses_best_num,
7841 .ips = ctx->addresses_best,
7842 .apply_expected = True
7848 .type = WREPL_TYPE_MHOMED,
7849 .state = WREPL_STATE_TOMBSTONE,
7850 .node = WREPL_NODE_B,
7852 .num_ips = ctx->addresses_best_num,
7853 .ips = ctx->addresses_best,
7854 .apply_expected = False
7858 * sgroup,active vs. mhomed,tombstone with different ip(s), unchecked
7861 .line = __location__,
7862 .name = _NBT_NAME("_SA_MT_DI_U", 0x1C, NULL),
7864 .nb_flags = NBT_NM_GROUP,
7866 .num_ips = ctx->addresses_best_num,
7867 .ips = ctx->addresses_best,
7868 .apply_expected = True
7874 .type = WREPL_TYPE_MHOMED,
7875 .state = WREPL_STATE_TOMBSTONE,
7876 .node = WREPL_NODE_B,
7878 .num_ips = ARRAY_SIZE(addresses_B_1),
7879 .ips = addresses_B_1,
7880 .apply_expected = False
7884 * multi homed vs. unique section
7887 * mhomed,active vs. unique,active with same ip(s), unchecked
7890 .line = __location__,
7891 .name = _NBT_NAME("_MA_UA_SI_U", 0x00, NULL),
7895 .num_ips = ctx->addresses_best_num,
7896 .ips = ctx->addresses_best,
7897 .apply_expected = True
7903 .type = WREPL_TYPE_UNIQUE,
7904 .state = WREPL_STATE_ACTIVE,
7905 .node = WREPL_NODE_B,
7907 .num_ips = ctx->addresses_best_num,
7908 .ips = ctx->addresses_best,
7909 .apply_expected = True
7913 * mhomed,active vs. unique,active with different ip(s), positive response
7916 .line = __location__,
7917 .name = _NBT_NAME("_MA_UA_DI_P", 0x00, NULL),
7921 .num_ips = ctx->addresses_best_num,
7922 .ips = ctx->addresses_best,
7923 .apply_expected = True
7930 .type = WREPL_TYPE_UNIQUE,
7931 .state = WREPL_STATE_ACTIVE,
7932 .node = WREPL_NODE_B,
7934 .num_ips = ARRAY_SIZE(addresses_B_1),
7935 .ips = addresses_B_1,
7936 .apply_expected = False
7940 * mhomed,active vs. unique,active with different ip(s), positive response other ips
7943 .line = __location__,
7944 .name = _NBT_NAME("_MA_UA_DI_O", 0x00, NULL),
7948 .num_ips = ctx->addresses_best_num,
7949 .ips = ctx->addresses_best,
7950 .apply_expected = True
7955 .num_ips = ARRAY_SIZE(addresses_A_3_4),
7956 .ips = addresses_A_3_4,
7959 .type = WREPL_TYPE_UNIQUE,
7960 .state = WREPL_STATE_ACTIVE,
7961 .node = WREPL_NODE_B,
7963 .num_ips = ARRAY_SIZE(addresses_B_1),
7964 .ips = addresses_B_1,
7965 .apply_expected = False
7969 * mhomed,active vs. unique,active with different ip(s), negative response
7972 .line = __location__,
7973 .name = _NBT_NAME("_MA_UA_DI_N", 0x00, NULL),
7977 .num_ips = ctx->addresses_best_num,
7978 .ips = ctx->addresses_best,
7979 .apply_expected = True
7986 .type = WREPL_TYPE_UNIQUE,
7987 .state = WREPL_STATE_ACTIVE,
7988 .node = WREPL_NODE_B,
7990 .num_ips = ARRAY_SIZE(addresses_B_1),
7991 .ips = addresses_B_1,
7992 .apply_expected = True
7996 * mhomed,active vs. unique,tombstone with same ip(s), unchecked
7999 .line = __location__,
8000 .name = _NBT_NAME("_MA_UT_SI_U", 0x00, NULL),
8004 .num_ips = ctx->addresses_best_num,
8005 .ips = ctx->addresses_best,
8006 .apply_expected = True
8012 .type = WREPL_TYPE_UNIQUE,
8013 .state = WREPL_STATE_TOMBSTONE,
8014 .node = WREPL_NODE_B,
8016 .num_ips = ctx->addresses_best_num,
8017 .ips = ctx->addresses_best,
8018 .apply_expected = False
8022 * mhomed,active vs. unique,tombstone with different ip(s), unchecked
8025 .line = __location__,
8026 .name = _NBT_NAME("_MA_UT_DI_U", 0x00, NULL),
8030 .num_ips = ctx->addresses_best_num,
8031 .ips = ctx->addresses_best,
8032 .apply_expected = True
8038 .type = WREPL_TYPE_UNIQUE,
8039 .state = WREPL_STATE_TOMBSTONE,
8040 .node = WREPL_NODE_B,
8042 .num_ips = ARRAY_SIZE(addresses_B_1),
8043 .ips = addresses_B_1,
8044 .apply_expected = False
8048 * multi homed vs. normal group section
8051 * mhomed,active vs. group,active with same ip(s), release expected
8054 .line = __location__,
8055 .name = _NBT_NAME("_MA_GA_SI_R", 0x00, NULL),
8059 .num_ips = ctx->addresses_best_num,
8060 .ips = ctx->addresses_best,
8061 .apply_expected = True
8065 .expect_release = True,
8068 .type = WREPL_TYPE_GROUP,
8069 .state = WREPL_STATE_ACTIVE,
8070 .node = WREPL_NODE_B,
8072 .num_ips = ctx->addresses_best_num,
8073 .ips = ctx->addresses_best,
8074 .apply_expected = True
8078 * mhomed,active vs. group,active with different ip(s), release expected
8081 .line = __location__,
8082 .name = _NBT_NAME("_MA_GA_DI_R", 0x00, NULL),
8086 .num_ips = ctx->addresses_best_num,
8087 .ips = ctx->addresses_best,
8088 .apply_expected = True
8092 .expect_release = True,
8095 .type = WREPL_TYPE_GROUP,
8096 .state = WREPL_STATE_ACTIVE,
8097 .node = WREPL_NODE_B,
8099 .num_ips = ARRAY_SIZE(addresses_B_1),
8100 .ips = addresses_B_1,
8101 .apply_expected = True
8105 * mhomed,active vs. group,tombstone with same ip(s), unchecked
8108 .line = __location__,
8109 .name = _NBT_NAME("_MA_GT_SI_U", 0x00, NULL),
8113 .num_ips = ctx->addresses_best_num,
8114 .ips = ctx->addresses_best,
8115 .apply_expected = True
8121 .type = WREPL_TYPE_GROUP,
8122 .state = WREPL_STATE_TOMBSTONE,
8123 .node = WREPL_NODE_B,
8125 .num_ips = ctx->addresses_best_num,
8126 .ips = ctx->addresses_best,
8127 .apply_expected = False
8131 * mhomed,active vs. group,tombstone with different ip(s), unchecked
8134 .line = __location__,
8135 .name = _NBT_NAME("_MA_GT_DI_U", 0x00, NULL),
8139 .num_ips = ctx->addresses_best_num,
8140 .ips = ctx->addresses_best,
8141 .apply_expected = True
8147 .type = WREPL_TYPE_GROUP,
8148 .state = WREPL_STATE_TOMBSTONE,
8149 .node = WREPL_NODE_B,
8151 .num_ips = ARRAY_SIZE(addresses_B_1),
8152 .ips = addresses_B_1,
8153 .apply_expected = False
8157 * multi homed vs. special group section
8160 * mhomed,active vs. sgroup,active with same ip(s), release expected
8163 .line = __location__,
8164 .name = _NBT_NAME("_MA_SA_SI_R", 0x00, NULL),
8168 .num_ips = ctx->addresses_best_num,
8169 .ips = ctx->addresses_best,
8170 .apply_expected = True
8174 .expect_release = True,
8177 .type = WREPL_TYPE_SGROUP,
8178 .state = WREPL_STATE_ACTIVE,
8179 .node = WREPL_NODE_B,
8181 .num_ips = ctx->addresses_best_num,
8182 .ips = ctx->addresses_best,
8183 .apply_expected = True
8187 * mhomed,active vs. group,active with different ip(s), release expected
8190 .line = __location__,
8191 .name = _NBT_NAME("_MA_SA_DI_R", 0x00, NULL),
8195 .num_ips = ctx->addresses_best_num,
8196 .ips = ctx->addresses_best,
8197 .apply_expected = True
8201 .expect_release = True,
8204 .type = WREPL_TYPE_SGROUP,
8205 .state = WREPL_STATE_ACTIVE,
8206 .node = WREPL_NODE_B,
8208 .num_ips = ARRAY_SIZE(addresses_B_1),
8209 .ips = addresses_B_1,
8210 .apply_expected = True
8214 * mhomed,active vs. sgroup,tombstone with same ip(s), unchecked
8217 .line = __location__,
8218 .name = _NBT_NAME("_MA_ST_SI_U", 0x00, NULL),
8222 .num_ips = ctx->addresses_best_num,
8223 .ips = ctx->addresses_best,
8224 .apply_expected = True
8230 .type = WREPL_TYPE_SGROUP,
8231 .state = WREPL_STATE_TOMBSTONE,
8232 .node = WREPL_NODE_B,
8234 .num_ips = ctx->addresses_best_num,
8235 .ips = ctx->addresses_best,
8236 .apply_expected = False
8240 * mhomed,active vs. sgroup,tombstone with different ip(s), unchecked
8243 .line = __location__,
8244 .name = _NBT_NAME("_MA_ST_DI_U", 0x00, NULL),
8248 .num_ips = ctx->addresses_best_num,
8249 .ips = ctx->addresses_best,
8250 .apply_expected = True
8256 .type = WREPL_TYPE_SGROUP,
8257 .state = WREPL_STATE_TOMBSTONE,
8258 .node = WREPL_NODE_B,
8260 .num_ips = ARRAY_SIZE(addresses_B_1),
8261 .ips = addresses_B_1,
8262 .apply_expected = False
8266 * multi homed vs. multi homed section
8269 * mhomed,active vs. mhomed,active with same ip(s), unchecked
8272 .line = __location__,
8273 .name = _NBT_NAME("_MA_MA_SI_U", 0x00, NULL),
8277 .num_ips = ctx->addresses_best_num,
8278 .ips = ctx->addresses_best,
8279 .apply_expected = True
8285 .type = WREPL_TYPE_MHOMED,
8286 .state = WREPL_STATE_ACTIVE,
8287 .node = WREPL_NODE_B,
8289 .num_ips = ctx->addresses_best_num,
8290 .ips = ctx->addresses_best,
8291 .apply_expected = True
8295 * mhomed,active vs. mhomed,active with superset ip(s), unchecked
8298 .line = __location__,
8299 .name = _NBT_NAME("_MA_MA_SP_U", 0x00, NULL),
8303 .num_ips = ctx->addresses_best_num,
8304 .ips = ctx->addresses_best,
8305 .apply_expected = True
8311 .type = WREPL_TYPE_MHOMED,
8312 .state = WREPL_STATE_ACTIVE,
8313 .node = WREPL_NODE_B,
8315 .num_ips = ctx->addresses_all_num,
8316 .ips = ctx->addresses_all,
8317 .apply_expected = True
8321 * mhomed,active vs. mhomed,active with different ip(s), positive response
8324 .line = __location__,
8325 .name = _NBT_NAME("_MA_MA_DI_P", 0x00, NULL),
8329 .num_ips = ctx->addresses_best_num,
8330 .ips = ctx->addresses_best,
8331 .apply_expected = True
8338 .type = WREPL_TYPE_MHOMED,
8339 .state = WREPL_STATE_ACTIVE,
8340 .node = WREPL_NODE_B,
8342 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8343 .ips = addresses_B_3_4,
8344 .apply_expected = False
8348 * mhomed,active vs. mhomed,active with different ip(s), positive response other ips
8351 .line = __location__,
8352 .name = _NBT_NAME("_MA_MA_DI_O", 0x00, NULL),
8356 .num_ips = ctx->addresses_best_num,
8357 .ips = ctx->addresses_best,
8358 .apply_expected = True
8363 .num_ips = ARRAY_SIZE(addresses_A_3_4),
8364 .ips = addresses_A_3_4,
8367 .type = WREPL_TYPE_MHOMED,
8368 .state = WREPL_STATE_ACTIVE,
8369 .node = WREPL_NODE_B,
8371 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8372 .ips = addresses_B_3_4,
8373 .apply_expected = False
8377 * mhomed,active vs. mhomed,active with different ip(s), negative response
8380 .line = __location__,
8381 .name = _NBT_NAME("_MA_MA_DI_N", 0x00, NULL),
8385 .num_ips = ctx->addresses_best_num,
8386 .ips = ctx->addresses_best,
8387 .apply_expected = True
8394 .type = WREPL_TYPE_MHOMED,
8395 .state = WREPL_STATE_ACTIVE,
8396 .node = WREPL_NODE_B,
8398 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8399 .ips = addresses_B_3_4,
8400 .apply_expected = True
8404 * mhomed,active vs. mhomed,tombstone with same ip(s), unchecked
8407 .line = __location__,
8408 .name = _NBT_NAME("_MA_MT_SI_U", 0x00, NULL),
8412 .num_ips = ctx->addresses_best_num,
8413 .ips = ctx->addresses_best,
8414 .apply_expected = True
8420 .type = WREPL_TYPE_MHOMED,
8421 .state = WREPL_STATE_TOMBSTONE,
8422 .node = WREPL_NODE_B,
8424 .num_ips = ctx->addresses_best_num,
8425 .ips = ctx->addresses_best,
8426 .apply_expected = False
8430 * mhomed,active vs. mhomed,tombstone with different ip(s), unchecked
8433 .line = __location__,
8434 .name = _NBT_NAME("_MA_MT_DI_U", 0x00, NULL),
8438 .num_ips = ctx->addresses_best_num,
8439 .ips = ctx->addresses_best,
8440 .apply_expected = True
8446 .type = WREPL_TYPE_MHOMED,
8447 .state = WREPL_STATE_TOMBSTONE,
8448 .node = WREPL_NODE_B,
8450 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8451 .ips = addresses_B_3_4,
8452 .apply_expected = False
8456 * some more multi homed test, including merging
8459 * mhomed,active vs. mhomed,active with superset ip(s), unchecked
8462 .line = __location__,
8463 .section= "Test Replica vs. owned active: some more MHOMED combinations",
8464 .name = _NBT_NAME("_MA_MA_SP_U", 0x00, NULL),
8465 .comment= "C:MHOMED vs. B:ALL => B:ALL",
8466 .skip = (ctx->addresses_all_num < 3),
8470 .num_ips = ctx->addresses_mhomed_num,
8471 .ips = ctx->addresses_mhomed,
8472 .apply_expected = True
8478 .type = WREPL_TYPE_MHOMED,
8479 .state = WREPL_STATE_ACTIVE,
8480 .node = WREPL_NODE_B,
8482 .num_ips = ctx->addresses_all_num,
8483 .ips = ctx->addresses_all,
8484 .apply_expected = True
8488 * mhomed,active vs. mhomed,active with same ips, unchecked
8491 .line = __location__,
8492 .name = _NBT_NAME("_MA_MA_SM_U", 0x00, NULL),
8493 .comment= "C:MHOMED vs. B:MHOMED => B:MHOMED",
8494 .skip = (ctx->addresses_mhomed_num < 2),
8498 .num_ips = ctx->addresses_mhomed_num,
8499 .ips = ctx->addresses_mhomed,
8500 .apply_expected = True
8506 .type = WREPL_TYPE_MHOMED,
8507 .state = WREPL_STATE_ACTIVE,
8508 .node = WREPL_NODE_B,
8510 .num_ips = ctx->addresses_mhomed_num,
8511 .ips = ctx->addresses_mhomed,
8512 .apply_expected = True
8516 * mhomed,active vs. mhomed,active with subset ip(s), positive response
8519 .line = __location__,
8520 .name = _NBT_NAME("_MA_MA_SB_P", 0x00, NULL),
8521 .comment= "C:MHOMED vs. B:BEST (C:MHOMED) => B:MHOMED",
8522 .skip = (ctx->addresses_mhomed_num < 2),
8526 .num_ips = ctx->addresses_mhomed_num,
8527 .ips = ctx->addresses_mhomed,
8528 .apply_expected = True
8535 .type = WREPL_TYPE_MHOMED,
8536 .state = WREPL_STATE_ACTIVE,
8537 .node = WREPL_NODE_B,
8539 .num_ips = ctx->addresses_best_num,
8540 .ips = ctx->addresses_best,
8541 .mhomed_merge = True
8545 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with all addresses
8548 .line = __location__,
8549 .name = _NBT_NAME("_MA_MA_SB_A", 0x00, NULL),
8550 .comment= "C:MHOMED vs. B:BEST (C:ALL) => B:MHOMED",
8551 .skip = (ctx->addresses_all_num < 3),
8555 .num_ips = ctx->addresses_mhomed_num,
8556 .ips = ctx->addresses_mhomed,
8557 .apply_expected = True
8562 .num_ips = ctx->addresses_all_num,
8563 .ips = ctx->addresses_all,
8566 .type = WREPL_TYPE_MHOMED,
8567 .state = WREPL_STATE_ACTIVE,
8568 .node = WREPL_NODE_B,
8570 .num_ips = ctx->addresses_best_num,
8571 .ips = ctx->addresses_best,
8572 .mhomed_merge = True
8576 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with replicas addresses
8577 * TODO: check why the server sends a name release demand for one address?
8578 * the release demand has no effect to the database record...
8581 .line = __location__,
8582 .name = _NBT_NAME("_MA_MA_SB_PRA", 0x00, NULL),
8583 .comment= "C:MHOMED vs. B:BEST (C:BEST) => C:MHOMED",
8584 .skip = (ctx->addresses_all_num < 2),
8588 .num_ips = ctx->addresses_mhomed_num,
8589 .ips = ctx->addresses_mhomed,
8590 .apply_expected = True
8595 .num_ips = ctx->addresses_best_num,
8596 .ips = ctx->addresses_best,
8597 .late_release = True
8600 .type = WREPL_TYPE_MHOMED,
8601 .state = WREPL_STATE_ACTIVE,
8602 .node = WREPL_NODE_B,
8604 .num_ips = ctx->addresses_best_num,
8605 .ips = ctx->addresses_best,
8606 .apply_expected = False
8610 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with other addresses
8613 .line = __location__,
8614 .name = _NBT_NAME("_MA_MA_SB_O", 0x00, NULL),
8615 .comment= "C:MHOMED vs. B:BEST (B:B_3_4) =>C:MHOMED",
8616 .skip = (ctx->addresses_all_num < 2),
8620 .num_ips = ctx->addresses_mhomed_num,
8621 .ips = ctx->addresses_mhomed,
8622 .apply_expected = True
8627 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8628 .ips = addresses_B_3_4,
8631 .type = WREPL_TYPE_MHOMED,
8632 .state = WREPL_STATE_ACTIVE,
8633 .node = WREPL_NODE_B,
8635 .num_ips = ctx->addresses_best_num,
8636 .ips = ctx->addresses_best,
8637 .apply_expected = False
8641 * mhomed,active vs. mhomed,active with subset ip(s), negative response
8644 .line = __location__,
8645 .name = _NBT_NAME("_MA_MA_SB_N", 0x00, NULL),
8646 .comment= "C:MHOMED vs. B:BEST (NEGATIVE) => B:BEST",
8647 .skip = (ctx->addresses_mhomed_num < 2),
8651 .num_ips = ctx->addresses_mhomed_num,
8652 .ips = ctx->addresses_mhomed,
8653 .apply_expected = True
8660 .type = WREPL_TYPE_MHOMED,
8661 .state = WREPL_STATE_ACTIVE,
8662 .node = WREPL_NODE_B,
8664 .num_ips = ctx->addresses_best_num,
8665 .ips = ctx->addresses_best,
8666 .apply_expected = True
8670 * some more multi homed and unique test, including merging
8673 * mhomed,active vs. unique,active with subset ip(s), positive response
8676 .line = __location__,
8677 .section= "Test Replica vs. owned active: some more UNIQUE,MHOMED combinations",
8678 .name = _NBT_NAME("_MA_UA_SB_P", 0x00, NULL),
8679 .comment= "C:MHOMED vs. B:UNIQUE,BEST (C:MHOMED) => B:MHOMED",
8680 .skip = (ctx->addresses_all_num < 2),
8684 .num_ips = ctx->addresses_mhomed_num,
8685 .ips = ctx->addresses_mhomed,
8686 .apply_expected = True
8693 .type = WREPL_TYPE_UNIQUE,
8694 .state = WREPL_STATE_ACTIVE,
8695 .node = WREPL_NODE_B,
8697 .num_ips = ctx->addresses_best_num,
8698 .ips = ctx->addresses_best,
8699 .mhomed_merge = True
8703 * unique,active vs. unique,active with different ip(s), positive response, with replicas address
8704 * TODO: check why the server sends a name release demand for one address?
8705 * the release demand has no effect to the database record...
8708 .line = __location__,
8709 .name = _NBT_NAME("_UA_UA_DI_PRA", 0x00, NULL),
8710 .comment= "C:BEST vs. B:BEST2 (C:BEST2,LR:BEST2) => C:BEST",
8711 .skip = (ctx->addresses_all_num < 2),
8715 .num_ips = ctx->addresses_best_num,
8716 .ips = ctx->addresses_best,
8717 .apply_expected = True
8722 .num_ips = ctx->addresses_best2_num,
8723 .ips = ctx->addresses_best2,
8724 .late_release = True
8727 .type = WREPL_TYPE_UNIQUE,
8728 .state = WREPL_STATE_ACTIVE,
8729 .node = WREPL_NODE_B,
8731 .num_ips = ctx->addresses_best2_num,
8732 .ips = ctx->addresses_best2,
8733 .apply_expected = False,
8737 * unique,active vs. unique,active with different ip(s), positive response, with all addresses
8740 .line = __location__,
8741 .name = _NBT_NAME("_UA_UA_DI_A", 0x00, NULL),
8742 .comment= "C:BEST vs. B:BEST2 (C:ALL) => B:MHOMED",
8743 .skip = (ctx->addresses_all_num < 3),
8747 .num_ips = ctx->addresses_best_num,
8748 .ips = ctx->addresses_best,
8749 .apply_expected = True
8754 .num_ips = ctx->addresses_all_num,
8755 .ips = ctx->addresses_all,
8758 .type = WREPL_TYPE_UNIQUE,
8759 .state = WREPL_STATE_ACTIVE,
8760 .node = WREPL_NODE_B,
8762 .num_ips = ctx->addresses_best2_num,
8763 .ips = ctx->addresses_best2,
8764 .mhomed_merge = True,
8768 * unique,active vs. mhomed,active with different ip(s), positive response, with all addresses
8771 .line = __location__,
8772 .name = _NBT_NAME("_UA_MA_DI_A", 0x00, NULL),
8773 .comment= "C:BEST vs. B:BEST2 (C:ALL) => B:MHOMED",
8774 .skip = (ctx->addresses_all_num < 3),
8778 .num_ips = ctx->addresses_best_num,
8779 .ips = ctx->addresses_best,
8780 .apply_expected = True
8785 .num_ips = ctx->addresses_all_num,
8786 .ips = ctx->addresses_all,
8789 .type = WREPL_TYPE_MHOMED,
8790 .state = WREPL_STATE_ACTIVE,
8791 .node = WREPL_NODE_B,
8793 .num_ips = ctx->addresses_best2_num,
8794 .ips = ctx->addresses_best2,
8795 .mhomed_merge = True,
8799 * special group vs. special group merging section
8802 * sgroup,active vs. sgroup,active with different ip(s)
8805 .line = __location__,
8806 .section= "Test Replica vs. owned active: SGROUP vs. SGROUP tests",
8807 .name = _NBT_NAME("_SA_SA_DI_U", 0x1C, NULL),
8808 .skip = (ctx->addresses_all_num < 3),
8810 .nb_flags = NBT_NM_GROUP,
8812 .num_ips = ctx->addresses_mhomed_num,
8813 .ips = ctx->addresses_mhomed,
8814 .apply_expected = True
8820 .type = WREPL_TYPE_SGROUP,
8821 .state = WREPL_STATE_ACTIVE,
8822 .node = WREPL_NODE_B,
8824 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8825 .ips = addresses_B_3_4,
8826 .sgroup_merge = True
8830 * sgroup,active vs. sgroup,active with same ip(s)
8833 .line = __location__,
8834 .name = _NBT_NAME("_SA_SA_SI_U", 0x1C, NULL),
8835 .skip = (ctx->addresses_all_num < 3),
8837 .nb_flags = NBT_NM_GROUP,
8839 .num_ips = ctx->addresses_mhomed_num,
8840 .ips = ctx->addresses_mhomed,
8841 .apply_expected = True
8847 .type = WREPL_TYPE_SGROUP,
8848 .state = WREPL_STATE_ACTIVE,
8849 .node = WREPL_NODE_B,
8851 .num_ips = ctx->addresses_mhomed_num,
8852 .ips = ctx->addresses_mhomed,
8853 .sgroup_merge = True
8857 * sgroup,active vs. sgroup,active with superset ip(s)
8860 .line = __location__,
8861 .name = _NBT_NAME("_SA_SA_SP_U", 0x1C, NULL),
8862 .skip = (ctx->addresses_all_num < 3),
8864 .nb_flags = NBT_NM_GROUP,
8866 .num_ips = ctx->addresses_mhomed_num,
8867 .ips = ctx->addresses_mhomed,
8868 .apply_expected = True
8874 .type = WREPL_TYPE_SGROUP,
8875 .state = WREPL_STATE_ACTIVE,
8876 .node = WREPL_NODE_B,
8878 .num_ips = ctx->addresses_all_num,
8879 .ips = ctx->addresses_all,
8880 .sgroup_merge = True
8884 * sgroup,active vs. sgroup,active with subset ip(s)
8887 .line = __location__,
8888 .name = _NBT_NAME("_SA_SA_SB_U", 0x1C, NULL),
8889 .skip = (ctx->addresses_all_num < 3),
8891 .nb_flags = NBT_NM_GROUP,
8893 .num_ips = ctx->addresses_mhomed_num,
8894 .ips = ctx->addresses_mhomed,
8895 .apply_expected = True
8901 .type = WREPL_TYPE_SGROUP,
8902 .state = WREPL_STATE_ACTIVE,
8903 .node = WREPL_NODE_B,
8905 .num_ips = ctx->addresses_best_num,
8906 .ips = ctx->addresses_best,
8907 .sgroup_merge = True
8911 * sgroup,active vs. sgroup,tombstone with different ip(s)
8914 .line = __location__,
8915 .name = _NBT_NAME("_SA_ST_DI_U", 0x1C, NULL),
8916 .skip = (ctx->addresses_all_num < 3),
8918 .nb_flags = NBT_NM_GROUP,
8920 .num_ips = ctx->addresses_mhomed_num,
8921 .ips = ctx->addresses_mhomed,
8922 .apply_expected = True
8928 .type = WREPL_TYPE_SGROUP,
8929 .state = WREPL_STATE_TOMBSTONE,
8930 .node = WREPL_NODE_B,
8932 .num_ips = ARRAY_SIZE(addresses_B_3_4),
8933 .ips = addresses_B_3_4,
8934 .apply_expected = False
8938 * sgroup,active vs. sgroup,tombstone with same ip(s)
8941 .line = __location__,
8942 .name = _NBT_NAME("_SA_ST_SI_U", 0x1C, NULL),
8943 .skip = (ctx->addresses_all_num < 3),
8945 .nb_flags = NBT_NM_GROUP,
8947 .num_ips = ctx->addresses_mhomed_num,
8948 .ips = ctx->addresses_mhomed,
8949 .apply_expected = True
8955 .type = WREPL_TYPE_SGROUP,
8956 .state = WREPL_STATE_TOMBSTONE,
8957 .node = WREPL_NODE_B,
8959 .num_ips = ctx->addresses_mhomed_num,
8960 .ips = ctx->addresses_mhomed,
8961 .apply_expected = False
8965 * sgroup,active vs. sgroup,tombstone with superset ip(s)
8968 .line = __location__,
8969 .name = _NBT_NAME("_SA_ST_SP_U", 0x1C, NULL),
8970 .skip = (ctx->addresses_all_num < 3),
8972 .nb_flags = NBT_NM_GROUP,
8974 .num_ips = ctx->addresses_mhomed_num,
8975 .ips = ctx->addresses_mhomed,
8976 .apply_expected = True
8982 .type = WREPL_TYPE_SGROUP,
8983 .state = WREPL_STATE_TOMBSTONE,
8984 .node = WREPL_NODE_B,
8986 .num_ips = ctx->addresses_all_num,
8987 .ips = ctx->addresses_all,
8988 .apply_expected = False
8992 * sgroup,active vs. sgroup,tombstone with subset ip(s)
8995 .line = __location__,
8996 .name = _NBT_NAME("_SA_ST_SB_U", 0x1C, NULL),
8997 .skip = (ctx->addresses_all_num < 3),
8999 .nb_flags = NBT_NM_GROUP,
9001 .num_ips = ctx->addresses_mhomed_num,
9002 .ips = ctx->addresses_mhomed,
9003 .apply_expected = True
9009 .type = WREPL_TYPE_SGROUP,
9010 .state = WREPL_STATE_TOMBSTONE,
9011 .node = WREPL_NODE_B,
9013 .num_ips = ctx->addresses_best_num,
9014 .ips = ctx->addresses_best,
9015 .apply_expected = False
9020 if (!ctx->nbtsock_srv) {
9021 printf("SKIP: Test Replica records vs. owned active records: not bound to port[%d]\n",
9026 printf("Test Replica records vs. owned active records\n");
9028 for(i=0; ret && i < ARRAY_SIZE(records); i++) {
9030 struct test_conflict_owned_active_vs_replica_struct record = records[i];
9031 uint32_t j, count = 1;
9034 if (records[i].wins.mhomed || records[i].name.type == 0x1C) {
9035 count = records[i].wins.num_ips;
9038 if (records[i].section) {
9039 printf("%s\n", records[i].section);
9042 if (records[i].skip) {
9043 printf("%s => SKIPPED\n", nbt_name_string(ctx, &records[i].name));
9047 if (records[i].replica.mhomed_merge) {
9048 action = "MHOMED_MERGE";
9049 } else if (records[i].replica.sgroup_merge) {
9050 action = "SGROUP_MERGE";
9051 } else if (records[i].replica.apply_expected) {
9054 action = "NOT REPLACE";
9057 printf("%s%s%s => %s\n",
9058 nbt_name_string(ctx, &records[i].name),
9059 (records[i].comment?": ":""),
9060 (records[i].comment?records[i].comment:""),
9063 /* Prepare for multi homed registration */
9064 ZERO_STRUCT(records[i].defend);
9065 records[i].defend.timeout = 10;
9066 records[i].defend.positive = True;
9067 nbt_set_incoming_handler(ctx->nbtsock_srv,
9068 test_conflict_owned_active_vs_replica_handler,
9070 if (ctx->nbtsock_srv2) {
9071 nbt_set_incoming_handler(ctx->nbtsock_srv2,
9072 test_conflict_owned_active_vs_replica_handler,
9079 for (j=0; j < count; j++) {
9080 struct nbt_name_request *req;
9082 name_register->in.name = records[i].name;
9083 name_register->in.dest_addr = ctx->address;
9084 name_register->in.address = records[i].wins.ips[j].ip;
9085 name_register->in.nb_flags = records[i].wins.nb_flags;
9086 name_register->in.register_demand= False;
9087 name_register->in.broadcast = False;
9088 name_register->in.multi_homed = records[i].wins.mhomed;
9089 name_register->in.ttl = 300000;
9090 name_register->in.timeout = 70;
9091 name_register->in.retries = 0;
9093 req = nbt_name_register_send(ctx->nbtsock, name_register);
9095 /* push the request on the wire */
9096 event_loop_once(ctx->nbtsock->event_ctx);
9099 * if we register multiple addresses,
9100 * the server will do name queries to see if the old addresses
9103 if (records[i].wins.mhomed && j > 0) {
9104 end = timeval_current_ofs(records[i].defend.timeout,0);
9105 records[i].defend.ret = True;
9106 while (records[i].defend.timeout > 0) {
9107 event_loop_once(ctx->nbtsock_srv->event_ctx);
9108 if (timeval_expired(&end)) break;
9110 ret &= records[i].defend.ret;
9113 status = nbt_name_register_recv(req, ctx, name_register);
9114 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
9115 printf("No response from %s for name register\n", ctx->address);
9118 if (!NT_STATUS_IS_OK(status)) {
9119 printf("Bad response from %s for name register - %s\n",
9120 ctx->address, nt_errstr(status));
9123 CHECK_VALUE(name_register->out.rcode, 0);
9124 CHECK_VALUE_STRING(name_register->out.reply_from, ctx->address);
9125 CHECK_VALUE(name_register->out.name.type, records[i].name.type);
9126 CHECK_VALUE_STRING(name_register->out.name.name, records[i].name.name);
9127 CHECK_VALUE_STRING(name_register->out.name.scope, records[i].name.scope);
9128 CHECK_VALUE_STRING(name_register->out.reply_addr, records[i].wins.ips[j].ip);
9131 /* Prepare for the current test */
9132 records[i].defend = record.defend;
9133 nbt_set_incoming_handler(ctx->nbtsock_srv,
9134 test_conflict_owned_active_vs_replica_handler,
9136 if (ctx->nbtsock_srv2) {
9137 nbt_set_incoming_handler(ctx->nbtsock_srv2,
9138 test_conflict_owned_active_vs_replica_handler,
9145 wins_name->name = &records[i].name;
9146 wins_name->flags = WREPL_NAME_FLAGS(records[i].replica.type,
9147 records[i].replica.state,
9148 records[i].replica.node,
9149 records[i].replica.is_static);
9150 wins_name->id = ++ctx->b.max_version;
9151 if (wins_name->flags & 2) {
9152 wins_name->addresses.addresses.num_ips = records[i].replica.num_ips;
9153 wins_name->addresses.addresses.ips = discard_const(records[i].replica.ips);
9155 wins_name->addresses.ip = records[i].replica.ips[0].ip;
9157 wins_name->unknown = "255.255.255.255";
9159 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9162 * wait for the name query, which is handled in
9163 * test_conflict_owned_active_vs_replica_handler()
9165 end = timeval_current_ofs(records[i].defend.timeout,0);
9166 records[i].defend.ret = True;
9167 while (records[i].defend.timeout > 0) {
9168 event_loop_once(ctx->nbtsock_srv->event_ctx);
9169 if (timeval_expired(&end)) break;
9171 ret &= records[i].defend.ret;
9173 if (records[i].defend.late_release) {
9174 records[i].defend = record.defend;
9175 records[i].defend.expect_release = True;
9177 * wait for the name release demand, which is handled in
9178 * test_conflict_owned_active_vs_replica_handler()
9180 end = timeval_current_ofs(records[i].defend.timeout,0);
9181 records[i].defend.ret = True;
9182 while (records[i].defend.timeout > 0) {
9183 event_loop_once(ctx->nbtsock_srv->event_ctx);
9184 if (timeval_expired(&end)) break;
9186 ret &= records[i].defend.ret;
9189 if (records[i].replica.mhomed_merge) {
9190 ret &= test_wrepl_mhomed_merged(ctx, &ctx->c,
9191 records[i].wins.num_ips, records[i].wins.ips,
9193 records[i].replica.num_ips, records[i].replica.ips,
9195 } else if (records[i].replica.sgroup_merge) {
9196 ret &= test_wrepl_sgroup_merged(ctx, NULL,
9198 records[i].wins.num_ips, records[i].wins.ips,
9200 records[i].replica.num_ips, records[i].replica.ips,
9203 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name,
9204 records[i].replica.apply_expected);
9207 if (records[i].replica.apply_expected ||
9208 records[i].replica.mhomed_merge) {
9209 wins_name->name = &records[i].name;
9210 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE,
9211 WREPL_STATE_TOMBSTONE,
9212 WREPL_NODE_B, False);
9213 wins_name->id = ++ctx->b.max_version;
9214 wins_name->addresses.ip = addresses_B_1[0].ip;
9215 wins_name->unknown = "255.255.255.255";
9217 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9218 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name, True);
9220 for (j=0; j < count; j++) {
9221 struct nbt_name_socket *nbtsock = ctx->nbtsock;
9223 if (ctx->myaddr2 && strcmp(records[i].wins.ips[j].ip, ctx->myaddr2) == 0) {
9224 nbtsock = ctx->nbtsock2;
9227 release->in.name = records[i].name;
9228 release->in.dest_addr = ctx->address;
9229 release->in.address = records[i].wins.ips[j].ip;
9230 release->in.nb_flags = records[i].wins.nb_flags;
9231 release->in.broadcast = False;
9232 release->in.timeout = 30;
9233 release->in.retries = 0;
9235 status = nbt_name_release(nbtsock, ctx, release);
9236 if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) {
9237 printf("No response from %s for name release\n", ctx->address);
9240 if (!NT_STATUS_IS_OK(status)) {
9241 printf("Bad response from %s for name query - %s\n",
9242 ctx->address, nt_errstr(status));
9245 CHECK_VALUE(release->out.rcode, 0);
9248 if (records[i].replica.sgroup_merge) {
9249 /* clean up the SGROUP record */
9250 wins_name->name = &records[i].name;
9251 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
9253 WREPL_NODE_B, False);
9254 wins_name->id = ++ctx->b.max_version;
9255 wins_name->addresses.addresses.num_ips = 0;
9256 wins_name->addresses.addresses.ips = NULL;
9257 wins_name->unknown = "255.255.255.255";
9258 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9260 /* take ownership of the SGROUP record */
9261 wins_name->name = &records[i].name;
9262 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP,
9264 WREPL_NODE_B, False);
9265 wins_name->id = ++ctx->b.max_version;
9266 wins_name->addresses.addresses.num_ips = ARRAY_SIZE(addresses_B_1);
9267 wins_name->addresses.addresses.ips = discard_const(addresses_B_1);
9268 wins_name->unknown = "255.255.255.255";
9269 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9270 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name, True);
9272 /* overwrite the SGROUP record with unique,tombstone */
9273 wins_name->name = &records[i].name;
9274 wins_name->flags = WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE,
9275 WREPL_STATE_TOMBSTONE,
9276 WREPL_NODE_B, False);
9277 wins_name->id = ++ctx->b.max_version;
9278 wins_name->addresses.ip = addresses_A_1[0].ip;
9279 wins_name->unknown = "255.255.255.255";
9280 ret &= test_wrepl_update_one(ctx, &ctx->b, wins_name);
9281 ret &= test_wrepl_is_applied(ctx, &ctx->b, wins_name, True);
9287 printf("conflict handled wrong or record[%u]: %s\n", i, records[i].line);
9295 #define _NBT_ASSERT(v, correct) do { \
9296 if ((v) != (correct)) { \
9297 printf("(%s) Incorrect value %s=%d - should be %s (%d)\n", \
9298 __location__, #v, v, #correct, correct); \
9303 #define _NBT_ASSERT_STRING(v, correct) do { \
9304 if ( ((!v) && (correct)) || \
9305 ((v) && (!correct)) || \
9306 ((v) && (correct) && strcmp(v,correct) != 0)) { \
9307 printf("(%s) Incorrect value %s=%s - should be %s\n", \
9308 __location__, #v, v, correct); \
9313 static void test_conflict_owned_active_vs_replica_handler_query(struct nbt_name_socket *nbtsock,
9314 struct nbt_name_packet *req_packet,
9315 const struct nbt_peer_socket *src)
9317 struct nbt_name *name;
9318 struct nbt_name_packet *rep_packet;
9319 struct test_conflict_owned_active_vs_replica_struct *rec = nbtsock->incoming.private;
9321 _NBT_ASSERT(req_packet->qdcount, 1);
9322 _NBT_ASSERT(req_packet->questions[0].question_type, NBT_QTYPE_NETBIOS);
9323 _NBT_ASSERT(req_packet->questions[0].question_class, NBT_QCLASS_IP);
9325 name = &req_packet->questions[0].name;
9327 _NBT_ASSERT(name->type, rec->name.type);
9328 _NBT_ASSERT_STRING(name->name, rec->name.name);
9329 _NBT_ASSERT_STRING(name->scope, rec->name.scope);
9331 _NBT_ASSERT(rec->defend.expect_release, False);
9333 rep_packet = talloc_zero(nbtsock, struct nbt_name_packet);
9334 if (rep_packet == NULL) return;
9336 rep_packet->name_trn_id = req_packet->name_trn_id;
9337 rep_packet->ancount = 1;
9339 rep_packet->answers = talloc_array(rep_packet, struct nbt_res_rec, 1);
9340 if (rep_packet->answers == NULL) return;
9342 rep_packet->answers[0].name = *name;
9343 rep_packet->answers[0].rr_class = NBT_QCLASS_IP;
9344 rep_packet->answers[0].ttl = 0;
9346 if (rec->defend.positive) {
9347 uint32_t i, num_ips;
9348 const struct wrepl_ip *ips;
9350 if (rec->defend.num_ips > 0) {
9351 num_ips = rec->defend.num_ips;
9352 ips = rec->defend.ips;
9354 num_ips = rec->wins.num_ips;
9355 ips = rec->wins.ips;
9358 /* send a positive reply */
9359 rep_packet->operation =
9362 NBT_FLAG_AUTHORITIVE |
9363 NBT_FLAG_RECURSION_DESIRED |
9364 NBT_FLAG_RECURSION_AVAIL;
9366 rep_packet->answers[0].rr_type = NBT_QTYPE_NETBIOS;
9368 rep_packet->answers[0].rdata.netbios.length = num_ips*6;
9369 rep_packet->answers[0].rdata.netbios.addresses =
9370 talloc_array(rep_packet->answers, struct nbt_rdata_address, num_ips);
9371 if (rep_packet->answers[0].rdata.netbios.addresses == NULL) return;
9373 for (i=0; i < num_ips; i++) {
9374 struct nbt_rdata_address *addr =
9375 &rep_packet->answers[0].rdata.netbios.addresses[i];
9376 addr->nb_flags = rec->wins.nb_flags;
9377 addr->ipaddr = ips[i].ip;
9379 DEBUG(2,("Sending positive name query reply for %s to %s:%d\n",
9380 nbt_name_string(rep_packet, name), src->addr, src->port));
9382 /* send a negative reply */
9383 rep_packet->operation =
9386 NBT_FLAG_AUTHORITIVE |
9389 rep_packet->answers[0].rr_type = NBT_QTYPE_NULL;
9391 ZERO_STRUCT(rep_packet->answers[0].rdata);
9393 DEBUG(2,("Sending negative name query reply for %s to %s:%d\n",
9394 nbt_name_string(rep_packet, name), src->addr, src->port));
9397 nbt_name_reply_send(nbtsock, src, rep_packet);
9398 talloc_free(rep_packet);
9400 /* make sure we push the reply to the wire */
9401 event_loop_once(nbtsock->event_ctx);
9404 rec->defend.timeout = 0;
9405 rec->defend.ret = True;
9408 static void test_conflict_owned_active_vs_replica_handler_release(struct nbt_name_socket *nbtsock,
9409 struct nbt_name_packet *req_packet,
9410 const struct nbt_peer_socket *src)
9412 struct nbt_name *name;
9413 struct nbt_name_packet *rep_packet;
9414 struct test_conflict_owned_active_vs_replica_struct *rec = nbtsock->incoming.private;
9416 _NBT_ASSERT(req_packet->qdcount, 1);
9417 _NBT_ASSERT(req_packet->questions[0].question_type, NBT_QTYPE_NETBIOS);
9418 _NBT_ASSERT(req_packet->questions[0].question_class, NBT_QCLASS_IP);
9420 name = &req_packet->questions[0].name;
9422 _NBT_ASSERT(name->type, rec->name.type);
9423 _NBT_ASSERT_STRING(name->name, rec->name.name);
9424 _NBT_ASSERT_STRING(name->scope, rec->name.scope);
9426 _NBT_ASSERT(rec->defend.expect_release, True);
9428 rep_packet = talloc_zero(nbtsock, struct nbt_name_packet);
9429 if (rep_packet == NULL) return;
9431 rep_packet->name_trn_id = req_packet->name_trn_id;
9432 rep_packet->ancount = 1;
9433 rep_packet->operation =
9435 NBT_OPCODE_RELEASE |
9436 NBT_FLAG_AUTHORITIVE;
9438 rep_packet->answers = talloc_array(rep_packet, struct nbt_res_rec, 1);
9439 if (rep_packet->answers == NULL) return;
9441 rep_packet->answers[0].name = *name;
9442 rep_packet->answers[0].rr_type = NBT_QTYPE_NETBIOS;
9443 rep_packet->answers[0].rr_class = NBT_QCLASS_IP;
9444 rep_packet->answers[0].ttl = req_packet->additional[0].ttl;
9445 rep_packet->answers[0].rdata = req_packet->additional[0].rdata;
9447 DEBUG(2,("Sending name release reply for %s to %s:%d\n",
9448 nbt_name_string(rep_packet, name), src->addr, src->port));
9450 nbt_name_reply_send(nbtsock, src, rep_packet);
9451 talloc_free(rep_packet);
9453 /* make sure we push the reply to the wire */
9454 event_loop_once(nbtsock->event_ctx);
9457 rec->defend.timeout = 0;
9458 rec->defend.ret = True;
9461 static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket *nbtsock,
9462 struct nbt_name_packet *req_packet,
9463 const struct nbt_peer_socket *src)
9465 struct test_conflict_owned_active_vs_replica_struct *rec = nbtsock->incoming.private;
9467 rec->defend.ret = False;
9469 switch (req_packet->operation & NBT_OPCODE) {
9470 case NBT_OPCODE_QUERY:
9471 test_conflict_owned_active_vs_replica_handler_query(nbtsock, req_packet, src);
9473 case NBT_OPCODE_RELEASE:
9474 test_conflict_owned_active_vs_replica_handler_release(nbtsock, req_packet, src);
9477 printf("%s: unexpected incoming packet\n", __location__);
9483 test WINS replication operations
9485 BOOL torture_nbt_winsreplication(void)
9487 const char *address;
9488 struct nbt_name name;
9489 TALLOC_CTX *mem_ctx = talloc_new(NULL);
9492 struct test_wrepl_conflict_conn *ctx;
9494 make_nbt_name_server(&name, lp_parm_string(-1, "torture", "host"));
9496 /* do an initial name resolution to find its IP */
9497 status = resolve_name(&name, mem_ctx, &address, NULL);
9498 if (!NT_STATUS_IS_OK(status)) {
9499 printf("Failed to resolve %s - %s\n",
9500 name.name, nt_errstr(status));
9501 talloc_free(mem_ctx);
9505 ret &= test_assoc_ctx1(mem_ctx, address);
9506 ret &= test_assoc_ctx2(mem_ctx, address);
9508 ret &= test_wins_replication(mem_ctx, address);
9510 ctx = test_create_conflict_ctx(mem_ctx, address);
9511 if (!ctx) return False;
9513 ret &= test_conflict_same_owner(ctx);
9514 ret &= test_conflict_different_owner(ctx);
9515 ret &= test_conflict_owned_released_vs_replica(ctx);
9516 ret &= test_conflict_owned_active_vs_replica(ctx);
9518 talloc_free(mem_ctx);