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 3 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, see <http://www.gnu.org/licenses/>.
24 #include "libcli/wrepl/winsrepl.h"
25 #include "lib/events/events.h"
26 #include "lib/socket/socket.h"
27 #include "system/network.h"
28 #include "lib/socket/netif.h"
29 #include "librpc/gen_ndr/ndr_nbt.h"
30 #include "libcli/nbt/libnbt.h"
31 #include "torture/torture.h"
32 #include "torture/nbt/proto.h"
33 #include "param/param.h"
35 #define CHECK_STATUS(tctx, status, correct) \
36 torture_assert_ntstatus_equal(tctx, status, correct, \
39 #define CHECK_VALUE(tctx, v, correct) \
40 torture_assert(tctx, (v) == (correct), \
41 talloc_asprintf(tctx, "Incorrect value %s=%d - should be %d\n", \
44 #define CHECK_VALUE_UINT64(tctx, v, correct) \
45 torture_assert(tctx, (v) == (correct), \
46 talloc_asprintf(tctx, "Incorrect value %s=%llu - should be %llu\n", \
47 #v, (long long)v, (long long)correct))
49 #define CHECK_VALUE_STRING(tctx, v, correct) \
50 torture_assert_str_equal(tctx, v, correct, "Invalid value")
52 #define _NBT_NAME(n,t,s) {\
58 static const char *wrepl_name_type_string(enum wrepl_name_type type
)
61 case WREPL_TYPE_UNIQUE
: return "UNIQUE";
62 case WREPL_TYPE_GROUP
: return "GROUP";
63 case WREPL_TYPE_SGROUP
: return "SGROUP";
64 case WREPL_TYPE_MHOMED
: return "MHOMED";
66 return "UNKNOWN_TYPE";
69 static const char *wrepl_name_state_string(enum wrepl_name_state state
)
72 case WREPL_STATE_ACTIVE
: return "ACTIVE";
73 case WREPL_STATE_RELEASED
: return "RELEASED";
74 case WREPL_STATE_TOMBSTONE
: return "TOMBSTONE";
75 case WREPL_STATE_RESERVED
: return "RESERVED";
77 return "UNKNOWN_STATE";
81 test how assoc_ctx's are only usable on the connection
84 static bool test_assoc_ctx1(struct torture_context
*tctx
)
87 struct tevent_req
*subreq
;
88 struct wrepl_socket
*wrepl_socket1
;
89 struct wrepl_associate associate1
;
90 struct wrepl_socket
*wrepl_socket2
;
91 struct wrepl_associate associate2
;
92 struct wrepl_packet packet
;
93 struct wrepl_send_ctrl ctrl
;
94 struct wrepl_packet
*rep_packet
;
95 struct wrepl_associate_stop assoc_stop
;
101 if (!torture_nbt_get_name(tctx
, &name
, &address
))
104 torture_comment(tctx
, "Test if assoc_ctx is only valid on the conection it was created on\n");
106 wrepl_socket1
= wrepl_socket_init(tctx
, tctx
->ev
);
107 wrepl_socket2
= wrepl_socket_init(tctx
, tctx
->ev
);
109 torture_comment(tctx
, "Setup 2 wrepl connections\n");
110 status
= wrepl_connect(wrepl_socket1
, wrepl_best_ip(tctx
->lp_ctx
, address
), address
);
111 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
113 status
= wrepl_connect(wrepl_socket2
, wrepl_best_ip(tctx
->lp_ctx
, address
), address
);
114 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
116 torture_comment(tctx
, "Send a start association request (conn1)\n");
117 status
= wrepl_associate(wrepl_socket1
, &associate1
);
118 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
120 torture_comment(tctx
, "association context (conn1): 0x%x\n", associate1
.out
.assoc_ctx
);
122 torture_comment(tctx
, "Send a start association request (conn2)\n");
123 status
= wrepl_associate(wrepl_socket2
, &associate2
);
124 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
126 torture_comment(tctx
, "association context (conn2): 0x%x\n", associate2
.out
.assoc_ctx
);
128 torture_comment(tctx
, "Send a replication table query, with assoc 1 (conn2), the anwser should be on conn1\n");
130 packet
.opcode
= WREPL_OPCODE_BITS
;
131 packet
.assoc_ctx
= associate1
.out
.assoc_ctx
;
132 packet
.mess_type
= WREPL_REPLICATION
;
133 packet
.message
.replication
.command
= WREPL_REPL_TABLE_QUERY
;
135 ctrl
.send_only
= true;
136 subreq
= wrepl_request_send(tctx
, tctx
->ev
, wrepl_socket2
, &packet
, &ctrl
);
137 ok
= tevent_req_poll(subreq
, tctx
->ev
);
139 CHECK_STATUS(tctx
, NT_STATUS_INTERNAL_ERROR
, NT_STATUS_OK
);
141 status
= wrepl_request_recv(subreq
, tctx
, &rep_packet
);
143 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
145 torture_comment(tctx
, "Send a association request (conn2), to make sure the last request was ignored\n");
146 status
= wrepl_associate(wrepl_socket2
, &associate2
);
147 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
149 torture_comment(tctx
, "Send a replication table query, with invalid assoc (conn1), receive answer from conn2\n");
151 packet
.opcode
= WREPL_OPCODE_BITS
;
152 packet
.assoc_ctx
= 0;
153 packet
.mess_type
= WREPL_REPLICATION
;
154 packet
.message
.replication
.command
= WREPL_REPL_TABLE_QUERY
;
155 status
= wrepl_request(wrepl_socket1
, tctx
, &packet
, &rep_packet
);
156 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
158 torture_comment(tctx
, "Send a association request (conn1), to make sure the last request was handled correct\n");
159 status
= wrepl_associate(wrepl_socket1
, &associate2
);
160 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
162 assoc_stop
.in
.assoc_ctx
= associate1
.out
.assoc_ctx
;
163 assoc_stop
.in
.reason
= 4;
164 torture_comment(tctx
, "Send a association stop request (conn1), reson: %u\n", assoc_stop
.in
.reason
);
165 status
= wrepl_associate_stop(wrepl_socket1
, &assoc_stop
);
166 CHECK_STATUS(tctx
, status
, NT_STATUS_END_OF_FILE
);
168 assoc_stop
.in
.assoc_ctx
= associate2
.out
.assoc_ctx
;
169 assoc_stop
.in
.reason
= 0;
170 torture_comment(tctx
, "Send a association stop request (conn2), reson: %u\n", assoc_stop
.in
.reason
);
171 status
= wrepl_associate_stop(wrepl_socket2
, &assoc_stop
);
172 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
174 torture_comment(tctx
, "Close 2 wrepl connections\n");
175 talloc_free(wrepl_socket1
);
176 talloc_free(wrepl_socket2
);
181 test if we always get back the same assoc_ctx
183 static bool test_assoc_ctx2(struct torture_context
*tctx
)
185 struct wrepl_socket
*wrepl_socket
;
186 struct wrepl_associate associate
;
188 struct nbt_name name
;
192 if (!torture_nbt_get_name(tctx
, &name
, &address
))
195 torture_comment(tctx
, "Test if we always get back the same assoc_ctx\n");
197 wrepl_socket
= wrepl_socket_init(tctx
, tctx
->ev
);
199 torture_comment(tctx
, "Setup wrepl connections\n");
200 status
= wrepl_connect(wrepl_socket
, wrepl_best_ip(tctx
->lp_ctx
, address
), address
);
201 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
203 torture_comment(tctx
, "Send 1st start association request\n");
204 status
= wrepl_associate(wrepl_socket
, &associate
);
205 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
206 assoc_ctx1
= associate
.out
.assoc_ctx
;
207 torture_comment(tctx
, "1st association context: 0x%x\n", associate
.out
.assoc_ctx
);
209 torture_comment(tctx
, "Send 2nd start association request\n");
210 status
= wrepl_associate(wrepl_socket
, &associate
);
211 torture_assert_ntstatus_ok(tctx
, status
, "2nd start association failed");
212 torture_assert(tctx
, associate
.out
.assoc_ctx
== assoc_ctx1
,
213 "Different context returned");
214 torture_comment(tctx
, "2nd association context: 0x%x\n", associate
.out
.assoc_ctx
);
216 torture_comment(tctx
, "Send 3rd start association request\n");
217 status
= wrepl_associate(wrepl_socket
, &associate
);
218 torture_assert(tctx
, associate
.out
.assoc_ctx
== assoc_ctx1
,
219 "Different context returned");
220 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
221 torture_comment(tctx
, "3rd association context: 0x%x\n", associate
.out
.assoc_ctx
);
223 torture_comment(tctx
, "Close wrepl connections\n");
224 talloc_free(wrepl_socket
);
230 display a replication entry
232 static void display_entry(struct torture_context
*tctx
, struct wrepl_name
*name
)
236 torture_comment(tctx
, "%s\n", nbt_name_string(tctx
, &name
->name
));
237 torture_comment(tctx
, "\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 torture_comment(tctx
, "\tRAW_FLAGS: 0x%08X OWNER: %-15s\n",
240 name
->raw_flags
, name
->owner
);
241 for (i
=0;i
<name
->num_addresses
;i
++) {
242 torture_comment(tctx
, "\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(struct torture_context
*tctx
)
252 struct wrepl_socket
*wrepl_socket
;
255 struct wrepl_associate associate
;
256 struct wrepl_pull_table pull_table
;
257 struct wrepl_pull_names pull_names
;
258 struct nbt_name name
;
261 if (!torture_nbt_get_name(tctx
, &name
, &address
))
264 torture_comment(tctx
, "Test one pull replication cycle\n");
266 wrepl_socket
= wrepl_socket_init(tctx
, tctx
->ev
);
268 torture_comment(tctx
, "Setup wrepl connections\n");
269 status
= wrepl_connect(wrepl_socket
, wrepl_best_ip(tctx
->lp_ctx
, address
), address
);
270 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
272 torture_comment(tctx
, "Send a start association request\n");
274 status
= wrepl_associate(wrepl_socket
, &associate
);
275 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
277 torture_comment(tctx
, "association context: 0x%x\n", associate
.out
.assoc_ctx
);
279 torture_comment(tctx
, "Send a replication table query\n");
280 pull_table
.in
.assoc_ctx
= associate
.out
.assoc_ctx
;
282 status
= wrepl_pull_table(wrepl_socket
, tctx
, &pull_table
);
283 if (NT_STATUS_EQUAL(NT_STATUS_NETWORK_ACCESS_DENIED
,status
)) {
284 struct wrepl_associate_stop assoc_stop
;
286 assoc_stop
.in
.assoc_ctx
= associate
.out
.assoc_ctx
;
287 assoc_stop
.in
.reason
= 0;
289 wrepl_associate_stop(wrepl_socket
, &assoc_stop
);
291 torture_fail(tctx
, "We are not a valid pull partner for the server");
293 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
295 torture_comment(tctx
, "Found %d replication partners\n", pull_table
.out
.num_partners
);
297 for (i
=0;i
<pull_table
.out
.num_partners
;i
++) {
298 struct wrepl_wins_owner
*partner
= &pull_table
.out
.partners
[i
];
299 torture_comment(tctx
, "%s max_version=%6llu min_version=%6llu type=%d\n",
301 (long long)partner
->max_version
,
302 (long long)partner
->min_version
,
305 pull_names
.in
.assoc_ctx
= associate
.out
.assoc_ctx
;
306 pull_names
.in
.partner
= *partner
;
308 status
= wrepl_pull_names(wrepl_socket
, tctx
, &pull_names
);
309 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
311 torture_comment(tctx
, "Received %d names\n", pull_names
.out
.num_names
);
313 for (j
=0;j
<pull_names
.out
.num_names
;j
++) {
314 display_entry(tctx
, &pull_names
.out
.names
[j
]);
318 torture_comment(tctx
, "Close wrepl connections\n");
319 talloc_free(wrepl_socket
);
323 struct test_wrepl_conflict_conn
{
325 struct wrepl_socket
*pull
;
328 #define TEST_OWNER_A_ADDRESS "127.65.65.1"
329 #define TEST_ADDRESS_A_PREFIX "127.0.65"
330 #define TEST_OWNER_B_ADDRESS "127.66.66.1"
331 #define TEST_ADDRESS_B_PREFIX "127.0.66"
332 #define TEST_OWNER_X_ADDRESS "127.88.88.1"
333 #define TEST_ADDRESS_X_PREFIX "127.0.88"
335 struct wrepl_wins_owner a
, b
, c
, x
;
337 struct socket_address
*myaddr
;
338 struct socket_address
*myaddr2
;
339 struct nbt_name_socket
*nbtsock
;
340 struct nbt_name_socket
*nbtsock2
;
342 struct nbt_name_socket
*nbtsock_srv
;
343 struct nbt_name_socket
*nbtsock_srv2
;
345 uint32_t addresses_best_num
;
346 struct wrepl_ip
*addresses_best
;
348 uint32_t addresses_best2_num
;
349 struct wrepl_ip
*addresses_best2
;
351 uint32_t addresses_all_num
;
352 struct wrepl_ip
*addresses_all
;
354 uint32_t addresses_mhomed_num
;
355 struct wrepl_ip
*addresses_mhomed
;
358 static const struct wrepl_ip addresses_A_1
[] = {
360 .owner
= TEST_OWNER_A_ADDRESS
,
361 .ip
= TEST_ADDRESS_A_PREFIX
".1"
364 static const struct wrepl_ip addresses_A_2
[] = {
366 .owner
= TEST_OWNER_A_ADDRESS
,
367 .ip
= TEST_ADDRESS_A_PREFIX
".2"
370 static const struct wrepl_ip addresses_A_3_4
[] = {
372 .owner
= TEST_OWNER_A_ADDRESS
,
373 .ip
= TEST_ADDRESS_A_PREFIX
".3"
376 .owner
= TEST_OWNER_A_ADDRESS
,
377 .ip
= TEST_ADDRESS_A_PREFIX
".4"
380 static const struct wrepl_ip addresses_A_3_4_X_3_4
[] = {
382 .owner
= TEST_OWNER_A_ADDRESS
,
383 .ip
= TEST_ADDRESS_A_PREFIX
".3"
386 .owner
= TEST_OWNER_A_ADDRESS
,
387 .ip
= TEST_ADDRESS_A_PREFIX
".4"
390 .owner
= TEST_OWNER_X_ADDRESS
,
391 .ip
= TEST_ADDRESS_X_PREFIX
".3"
394 .owner
= TEST_OWNER_X_ADDRESS
,
395 .ip
= TEST_ADDRESS_X_PREFIX
".4"
398 static const struct wrepl_ip addresses_A_3_4_B_3_4
[] = {
400 .owner
= TEST_OWNER_A_ADDRESS
,
401 .ip
= TEST_ADDRESS_A_PREFIX
".3"
404 .owner
= TEST_OWNER_A_ADDRESS
,
405 .ip
= TEST_ADDRESS_A_PREFIX
".4"
408 .owner
= TEST_OWNER_B_ADDRESS
,
409 .ip
= TEST_ADDRESS_B_PREFIX
".3"
412 .owner
= TEST_OWNER_B_ADDRESS
,
413 .ip
= TEST_ADDRESS_B_PREFIX
".4"
416 static const struct wrepl_ip addresses_A_3_4_OWNER_B
[] = {
418 .owner
= TEST_OWNER_B_ADDRESS
,
419 .ip
= TEST_ADDRESS_A_PREFIX
".3"
422 .owner
= TEST_OWNER_B_ADDRESS
,
423 .ip
= TEST_ADDRESS_A_PREFIX
".4"
426 static const struct wrepl_ip addresses_A_3_4_X_3_4_OWNER_B
[] = {
428 .owner
= TEST_OWNER_B_ADDRESS
,
429 .ip
= TEST_ADDRESS_A_PREFIX
".3"
432 .owner
= TEST_OWNER_B_ADDRESS
,
433 .ip
= TEST_ADDRESS_A_PREFIX
".4"
436 .owner
= TEST_OWNER_B_ADDRESS
,
437 .ip
= TEST_ADDRESS_X_PREFIX
".3"
440 .owner
= TEST_OWNER_B_ADDRESS
,
441 .ip
= TEST_ADDRESS_X_PREFIX
".4"
445 static const struct wrepl_ip addresses_A_3_4_X_1_2
[] = {
447 .owner
= TEST_OWNER_A_ADDRESS
,
448 .ip
= TEST_ADDRESS_A_PREFIX
".3"
451 .owner
= TEST_OWNER_A_ADDRESS
,
452 .ip
= TEST_ADDRESS_A_PREFIX
".4"
455 .owner
= TEST_OWNER_X_ADDRESS
,
456 .ip
= TEST_ADDRESS_X_PREFIX
".1"
459 .owner
= TEST_OWNER_X_ADDRESS
,
460 .ip
= TEST_ADDRESS_X_PREFIX
".2"
464 static const struct wrepl_ip addresses_B_1
[] = {
466 .owner
= TEST_OWNER_B_ADDRESS
,
467 .ip
= TEST_ADDRESS_B_PREFIX
".1"
470 static const struct wrepl_ip addresses_B_2
[] = {
472 .owner
= TEST_OWNER_B_ADDRESS
,
473 .ip
= TEST_ADDRESS_B_PREFIX
".2"
476 static const struct wrepl_ip addresses_B_3_4
[] = {
478 .owner
= TEST_OWNER_B_ADDRESS
,
479 .ip
= TEST_ADDRESS_B_PREFIX
".3"
482 .owner
= TEST_OWNER_B_ADDRESS
,
483 .ip
= TEST_ADDRESS_B_PREFIX
".4"
486 static const struct wrepl_ip addresses_B_3_4_X_3_4
[] = {
488 .owner
= TEST_OWNER_B_ADDRESS
,
489 .ip
= TEST_ADDRESS_B_PREFIX
".3"
492 .owner
= TEST_OWNER_B_ADDRESS
,
493 .ip
= TEST_ADDRESS_B_PREFIX
".4"
496 .owner
= TEST_OWNER_X_ADDRESS
,
497 .ip
= TEST_ADDRESS_X_PREFIX
".3"
500 .owner
= TEST_OWNER_X_ADDRESS
,
501 .ip
= TEST_ADDRESS_X_PREFIX
".4"
504 static const struct wrepl_ip addresses_B_3_4_X_1_2
[] = {
506 .owner
= TEST_OWNER_B_ADDRESS
,
507 .ip
= TEST_ADDRESS_B_PREFIX
".3"
510 .owner
= TEST_OWNER_B_ADDRESS
,
511 .ip
= TEST_ADDRESS_B_PREFIX
".4"
514 .owner
= TEST_OWNER_X_ADDRESS
,
515 .ip
= TEST_ADDRESS_X_PREFIX
".1"
518 .owner
= TEST_OWNER_X_ADDRESS
,
519 .ip
= TEST_ADDRESS_X_PREFIX
".2"
523 static const struct wrepl_ip addresses_X_1_2
[] = {
525 .owner
= TEST_OWNER_X_ADDRESS
,
526 .ip
= TEST_ADDRESS_X_PREFIX
".1"
529 .owner
= TEST_OWNER_X_ADDRESS
,
530 .ip
= TEST_ADDRESS_X_PREFIX
".2"
533 static const struct wrepl_ip addresses_X_3_4
[] = {
535 .owner
= TEST_OWNER_X_ADDRESS
,
536 .ip
= TEST_ADDRESS_X_PREFIX
".3"
539 .owner
= TEST_OWNER_X_ADDRESS
,
540 .ip
= TEST_ADDRESS_X_PREFIX
".4"
544 static struct test_wrepl_conflict_conn
*test_create_conflict_ctx(
545 struct torture_context
*tctx
, const char *address
)
547 struct test_wrepl_conflict_conn
*ctx
;
548 struct wrepl_associate associate
;
549 struct wrepl_pull_table pull_table
;
550 struct socket_address
*nbt_srv_addr
;
553 struct interface
*ifaces
;
555 ctx
= talloc_zero(tctx
, struct test_wrepl_conflict_conn
);
556 if (!ctx
) return NULL
;
558 ctx
->address
= address
;
559 ctx
->pull
= wrepl_socket_init(ctx
, tctx
->ev
);
560 if (!ctx
->pull
) return NULL
;
562 torture_comment(tctx
, "Setup wrepl conflict pull connection\n");
563 status
= wrepl_connect(ctx
->pull
, wrepl_best_ip(tctx
->lp_ctx
, ctx
->address
), ctx
->address
);
564 if (!NT_STATUS_IS_OK(status
)) return NULL
;
566 status
= wrepl_associate(ctx
->pull
, &associate
);
567 if (!NT_STATUS_IS_OK(status
)) return NULL
;
569 ctx
->pull_assoc
= associate
.out
.assoc_ctx
;
571 ctx
->a
.address
= TEST_OWNER_A_ADDRESS
;
572 ctx
->a
.max_version
= 0;
573 ctx
->a
.min_version
= 0;
576 ctx
->b
.address
= TEST_OWNER_B_ADDRESS
;
577 ctx
->b
.max_version
= 0;
578 ctx
->b
.min_version
= 0;
581 ctx
->x
.address
= TEST_OWNER_X_ADDRESS
;
582 ctx
->x
.max_version
= 0;
583 ctx
->x
.min_version
= 0;
586 ctx
->c
.address
= address
;
587 ctx
->c
.max_version
= 0;
588 ctx
->c
.min_version
= 0;
591 pull_table
.in
.assoc_ctx
= ctx
->pull_assoc
;
592 status
= wrepl_pull_table(ctx
->pull
, ctx
->pull
, &pull_table
);
593 if (!NT_STATUS_IS_OK(status
)) return NULL
;
595 for (i
=0; i
< pull_table
.out
.num_partners
; i
++) {
596 if (strcmp(TEST_OWNER_A_ADDRESS
,pull_table
.out
.partners
[i
].address
)==0) {
597 ctx
->a
.max_version
= pull_table
.out
.partners
[i
].max_version
;
598 ctx
->a
.min_version
= pull_table
.out
.partners
[i
].min_version
;
600 if (strcmp(TEST_OWNER_B_ADDRESS
,pull_table
.out
.partners
[i
].address
)==0) {
601 ctx
->b
.max_version
= pull_table
.out
.partners
[i
].max_version
;
602 ctx
->b
.min_version
= pull_table
.out
.partners
[i
].min_version
;
604 if (strcmp(TEST_OWNER_X_ADDRESS
,pull_table
.out
.partners
[i
].address
)==0) {
605 ctx
->x
.max_version
= pull_table
.out
.partners
[i
].max_version
;
606 ctx
->x
.min_version
= pull_table
.out
.partners
[i
].min_version
;
608 if (strcmp(address
,pull_table
.out
.partners
[i
].address
)==0) {
609 ctx
->c
.max_version
= pull_table
.out
.partners
[i
].max_version
;
610 ctx
->c
.min_version
= pull_table
.out
.partners
[i
].min_version
;
614 talloc_free(pull_table
.out
.partners
);
616 ctx
->nbtsock
= nbt_name_socket_init(ctx
, tctx
->ev
);
617 if (!ctx
->nbtsock
) return NULL
;
619 load_interface_list(tctx
, tctx
->lp_ctx
, &ifaces
);
621 ctx
->myaddr
= socket_address_from_strings(tctx
, ctx
->nbtsock
->sock
->backend_name
, iface_list_best_ip(ifaces
, address
), 0);
622 if (!ctx
->myaddr
) return NULL
;
624 for (i
= 0; i
< iface_list_count(ifaces
); i
++) {
625 if (strcmp(ctx
->myaddr
->addr
, iface_list_n_ip(ifaces
, i
)) == 0) continue;
626 ctx
->myaddr2
= socket_address_from_strings(tctx
, ctx
->nbtsock
->sock
->backend_name
, iface_list_n_ip(ifaces
, i
), 0);
627 if (!ctx
->myaddr2
) return NULL
;
631 status
= socket_listen(ctx
->nbtsock
->sock
, ctx
->myaddr
, 0, 0);
632 if (!NT_STATUS_IS_OK(status
)) return NULL
;
634 ctx
->nbtsock_srv
= nbt_name_socket_init(ctx
, tctx
->ev
);
635 if (!ctx
->nbtsock_srv
) return NULL
;
637 /* Make a port 137 version of ctx->myaddr */
638 nbt_srv_addr
= socket_address_from_strings(tctx
, ctx
->nbtsock_srv
->sock
->backend_name
, ctx
->myaddr
->addr
, lpcfg_nbt_port(tctx
->lp_ctx
));
639 if (!nbt_srv_addr
) return NULL
;
641 /* And if possible, bind to it. This won't work unless we are root or in sockewrapper */
642 status
= socket_listen(ctx
->nbtsock_srv
->sock
, nbt_srv_addr
, 0, 0);
643 talloc_free(nbt_srv_addr
);
644 if (!NT_STATUS_IS_OK(status
)) {
645 /* this isn't fatal */
646 talloc_free(ctx
->nbtsock_srv
);
647 ctx
->nbtsock_srv
= NULL
;
650 if (ctx
->myaddr2
&& ctx
->nbtsock_srv
) {
651 ctx
->nbtsock2
= nbt_name_socket_init(ctx
, tctx
->ev
);
652 if (!ctx
->nbtsock2
) return NULL
;
654 status
= socket_listen(ctx
->nbtsock2
->sock
, ctx
->myaddr2
, 0, 0);
655 if (!NT_STATUS_IS_OK(status
)) return NULL
;
657 ctx
->nbtsock_srv2
= nbt_name_socket_init(ctx
, ctx
->nbtsock_srv
->event_ctx
);
658 if (!ctx
->nbtsock_srv2
) return NULL
;
660 /* Make a port 137 version of ctx->myaddr2 */
661 nbt_srv_addr
= socket_address_from_strings(tctx
,
662 ctx
->nbtsock_srv
->sock
->backend_name
,
664 lpcfg_nbt_port(tctx
->lp_ctx
));
665 if (!nbt_srv_addr
) return NULL
;
667 /* And if possible, bind to it. This won't work unless we are root or in sockewrapper */
668 status
= socket_listen(ctx
->nbtsock_srv2
->sock
, ctx
->myaddr2
, 0, 0);
669 talloc_free(nbt_srv_addr
);
670 if (!NT_STATUS_IS_OK(status
)) {
671 /* this isn't fatal */
672 talloc_free(ctx
->nbtsock_srv2
);
673 ctx
->nbtsock_srv2
= NULL
;
677 ctx
->addresses_best_num
= 1;
678 ctx
->addresses_best
= talloc_array(ctx
, struct wrepl_ip
, ctx
->addresses_best_num
);
679 if (!ctx
->addresses_best
) return NULL
;
680 ctx
->addresses_best
[0].owner
= ctx
->b
.address
;
681 ctx
->addresses_best
[0].ip
= ctx
->myaddr
->addr
;
683 ctx
->addresses_all_num
= iface_list_count(ifaces
);
684 ctx
->addresses_all
= talloc_array(ctx
, struct wrepl_ip
, ctx
->addresses_all_num
);
685 if (!ctx
->addresses_all
) return NULL
;
686 for (i
=0; i
< ctx
->addresses_all_num
; i
++) {
687 ctx
->addresses_all
[i
].owner
= ctx
->b
.address
;
688 ctx
->addresses_all
[i
].ip
= talloc_strdup(ctx
->addresses_all
, iface_list_n_ip(ifaces
, i
));
689 if (!ctx
->addresses_all
[i
].ip
) return NULL
;
692 if (ctx
->nbtsock_srv2
) {
693 ctx
->addresses_best2_num
= 1;
694 ctx
->addresses_best2
= talloc_array(ctx
, struct wrepl_ip
, ctx
->addresses_best2_num
);
695 if (!ctx
->addresses_best2
) return NULL
;
696 ctx
->addresses_best2
[0].owner
= ctx
->b
.address
;
697 ctx
->addresses_best2
[0].ip
= ctx
->myaddr2
->addr
;
699 ctx
->addresses_mhomed_num
= 2;
700 ctx
->addresses_mhomed
= talloc_array(ctx
, struct wrepl_ip
, ctx
->addresses_mhomed_num
);
701 if (!ctx
->addresses_mhomed
) return NULL
;
702 ctx
->addresses_mhomed
[0].owner
= ctx
->b
.address
;
703 ctx
->addresses_mhomed
[0].ip
= ctx
->myaddr
->addr
;
704 ctx
->addresses_mhomed
[1].owner
= ctx
->b
.address
;
705 ctx
->addresses_mhomed
[1].ip
= ctx
->myaddr2
->addr
;
711 static bool test_wrepl_update_one(struct torture_context
*tctx
,
712 struct test_wrepl_conflict_conn
*ctx
,
713 const struct wrepl_wins_owner
*owner
,
714 const struct wrepl_wins_name
*name
)
716 struct wrepl_socket
*wrepl_socket
;
717 struct wrepl_associate associate
;
718 struct wrepl_packet update_packet
, repl_send
;
719 struct wrepl_table
*update
;
720 struct wrepl_wins_owner wrepl_wins_owners
[1];
721 struct wrepl_packet
*repl_recv
;
722 struct wrepl_wins_owner
*send_request
;
723 struct wrepl_send_reply
*send_reply
;
724 struct wrepl_wins_name wrepl_wins_names
[1];
728 wrepl_socket
= wrepl_socket_init(ctx
, tctx
->ev
);
730 status
= wrepl_connect(wrepl_socket
, wrepl_best_ip(tctx
->lp_ctx
, ctx
->address
), ctx
->address
);
731 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
733 status
= wrepl_associate(wrepl_socket
, &associate
);
734 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
735 assoc_ctx
= associate
.out
.assoc_ctx
;
737 /* now send a WREPL_REPL_UPDATE message */
738 ZERO_STRUCT(update_packet
);
739 update_packet
.opcode
= WREPL_OPCODE_BITS
;
740 update_packet
.assoc_ctx
= assoc_ctx
;
741 update_packet
.mess_type
= WREPL_REPLICATION
;
742 update_packet
.message
.replication
.command
= WREPL_REPL_UPDATE
;
743 update
= &update_packet
.message
.replication
.info
.table
;
745 update
->partner_count
= ARRAY_SIZE(wrepl_wins_owners
);
746 update
->partners
= wrepl_wins_owners
;
747 update
->initiator
= "0.0.0.0";
749 wrepl_wins_owners
[0] = *owner
;
751 status
= wrepl_request(wrepl_socket
, wrepl_socket
,
752 &update_packet
, &repl_recv
);
753 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
754 CHECK_VALUE(tctx
, repl_recv
->mess_type
, WREPL_REPLICATION
);
755 CHECK_VALUE(tctx
, repl_recv
->message
.replication
.command
, WREPL_REPL_SEND_REQUEST
);
756 send_request
= &repl_recv
->message
.replication
.info
.owner
;
758 ZERO_STRUCT(repl_send
);
759 repl_send
.opcode
= WREPL_OPCODE_BITS
;
760 repl_send
.assoc_ctx
= assoc_ctx
;
761 repl_send
.mess_type
= WREPL_REPLICATION
;
762 repl_send
.message
.replication
.command
= WREPL_REPL_SEND_REPLY
;
763 send_reply
= &repl_send
.message
.replication
.info
.reply
;
765 send_reply
->num_names
= ARRAY_SIZE(wrepl_wins_names
);
766 send_reply
->names
= wrepl_wins_names
;
768 wrepl_wins_names
[0] = *name
;
770 status
= wrepl_request(wrepl_socket
, wrepl_socket
,
771 &repl_send
, &repl_recv
);
772 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
773 CHECK_VALUE(tctx
, repl_recv
->mess_type
, WREPL_STOP_ASSOCIATION
);
774 CHECK_VALUE(tctx
, repl_recv
->message
.stop
.reason
, 0);
776 talloc_free(wrepl_socket
);
780 static bool test_wrepl_is_applied(struct torture_context
*tctx
,
781 struct test_wrepl_conflict_conn
*ctx
,
782 const struct wrepl_wins_owner
*owner
,
783 const struct wrepl_wins_name
*name
,
787 struct wrepl_pull_names pull_names
;
788 struct wrepl_name
*names
;
790 pull_names
.in
.assoc_ctx
= ctx
->pull_assoc
;
791 pull_names
.in
.partner
= *owner
;
792 pull_names
.in
.partner
.min_version
= pull_names
.in
.partner
.max_version
;
794 status
= wrepl_pull_names(ctx
->pull
, ctx
->pull
, &pull_names
);
795 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
796 torture_assert(tctx
, pull_names
.out
.num_names
== (expected
?1:0),
797 talloc_asprintf(tctx
, "Invalid number of records returned - expected %d got %d", expected
, pull_names
.out
.num_names
));
799 names
= pull_names
.out
.names
;
802 uint32_t flags
= WREPL_NAME_FLAGS(names
[0].type
,
806 char *expected_scope
= NULL
;
807 CHECK_VALUE(tctx
, names
[0].name
.type
, name
->name
->type
);
808 CHECK_VALUE_STRING(tctx
, names
[0].name
.name
, name
->name
->name
);
810 if (names
[0].name
.scope
) {
811 expected_scope
= talloc_strndup(tctx
,
815 CHECK_VALUE_STRING(tctx
, names
[0].name
.scope
, expected_scope
);
816 CHECK_VALUE(tctx
, flags
, name
->flags
);
817 CHECK_VALUE_UINT64(tctx
, names
[0].version_id
, name
->id
);
820 CHECK_VALUE(tctx
, names
[0].num_addresses
,
821 name
->addresses
.addresses
.num_ips
);
823 CHECK_VALUE(tctx
, names
[0].num_addresses
, 1);
824 CHECK_VALUE_STRING(tctx
, names
[0].addresses
[0].address
,
828 talloc_free(pull_names
.out
.names
);
832 static bool test_wrepl_mhomed_merged(struct torture_context
*tctx
,
833 struct test_wrepl_conflict_conn
*ctx
,
834 const struct wrepl_wins_owner
*owner1
,
835 uint32_t num_ips1
, const struct wrepl_ip
*ips1
,
836 const struct wrepl_wins_owner
*owner2
,
837 uint32_t num_ips2
, const struct wrepl_ip
*ips2
,
838 const struct wrepl_wins_name
*name2
)
841 struct wrepl_pull_names pull_names
;
842 struct wrepl_name
*names
;
845 uint32_t num_ips
= num_ips1
+ num_ips2
;
847 for (i
= 0; i
< num_ips2
; i
++) {
848 for (j
= 0; j
< num_ips1
; j
++) {
849 if (strcmp(ips2
[i
].ip
,ips1
[j
].ip
) == 0) {
856 pull_names
.in
.assoc_ctx
= ctx
->pull_assoc
;
857 pull_names
.in
.partner
= *owner2
;
858 pull_names
.in
.partner
.min_version
= pull_names
.in
.partner
.max_version
;
860 status
= wrepl_pull_names(ctx
->pull
, ctx
->pull
, &pull_names
);
861 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
862 CHECK_VALUE(tctx
, pull_names
.out
.num_names
, 1);
864 names
= pull_names
.out
.names
;
866 flags
= WREPL_NAME_FLAGS(names
[0].type
,
870 CHECK_VALUE(tctx
, names
[0].name
.type
, name2
->name
->type
);
871 CHECK_VALUE_STRING(tctx
, names
[0].name
.name
, name2
->name
->name
);
872 CHECK_VALUE_STRING(tctx
, names
[0].name
.scope
, name2
->name
->scope
);
873 CHECK_VALUE(tctx
, flags
, name2
->flags
| WREPL_TYPE_MHOMED
);
874 CHECK_VALUE_UINT64(tctx
, names
[0].version_id
, name2
->id
);
876 CHECK_VALUE(tctx
, names
[0].num_addresses
, num_ips
);
878 for (i
= 0; i
< names
[0].num_addresses
; i
++) {
879 const char *addr
= names
[0].addresses
[i
].address
;
880 const char *owner
= names
[0].addresses
[i
].owner
;
883 for (j
= 0; j
< num_ips2
; j
++) {
884 if (strcmp(addr
, ips2
[j
].ip
) == 0) {
886 CHECK_VALUE_STRING(tctx
, owner
, owner2
->address
);
893 for (j
= 0; j
< num_ips1
; j
++) {
894 if (strcmp(addr
, ips1
[j
].ip
) == 0) {
896 CHECK_VALUE_STRING(tctx
, owner
, owner1
->address
);
903 CHECK_VALUE_STRING(tctx
, addr
, "not found in address list");
905 talloc_free(pull_names
.out
.names
);
909 static bool test_wrepl_sgroup_merged(struct torture_context
*tctx
,
910 struct test_wrepl_conflict_conn
*ctx
,
911 struct wrepl_wins_owner
*merge_owner
,
912 struct wrepl_wins_owner
*owner1
,
913 uint32_t num_ips1
, const struct wrepl_ip
*ips1
,
914 struct wrepl_wins_owner
*owner2
,
915 uint32_t num_ips2
, const struct wrepl_ip
*ips2
,
916 const struct wrepl_wins_name
*name2
)
919 struct wrepl_pull_names pull_names
;
920 struct wrepl_name
*names
;
921 struct wrepl_name
*name
= NULL
;
924 uint32_t num_ips
= num_ips1
+ num_ips2
;
927 merge_owner
= &ctx
->c
;
930 for (i
= 0; i
< num_ips1
; i
++) {
931 if (owner1
!= &ctx
->c
&& strcmp(ips1
[i
].owner
,owner2
->address
) == 0) {
935 for (j
= 0; j
< num_ips2
; j
++) {
936 if (strcmp(ips1
[i
].ip
,ips2
[j
].ip
) == 0) {
944 pull_names
.in
.assoc_ctx
= ctx
->pull_assoc
;
945 pull_names
.in
.partner
= *merge_owner
;
946 pull_names
.in
.partner
.min_version
= pull_names
.in
.partner
.max_version
;
947 pull_names
.in
.partner
.max_version
= 0;
949 status
= wrepl_pull_names(ctx
->pull
, ctx
->pull
, &pull_names
);
950 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
952 names
= pull_names
.out
.names
;
954 for (i
= 0; i
< pull_names
.out
.num_names
; i
++) {
955 if (names
[i
].name
.type
!= name2
->name
->type
) continue;
956 if (!names
[i
].name
.name
) continue;
957 if (strcmp(names
[i
].name
.name
, name2
->name
->name
) != 0) continue;
958 if (names
[i
].name
.scope
) continue;
963 if (pull_names
.out
.num_names
> 0) {
964 merge_owner
->max_version
= names
[pull_names
.out
.num_names
-1].version_id
;
968 torture_comment(tctx
, "%s: Name '%s' not found\n", __location__
, nbt_name_string(ctx
, name2
->name
));
972 flags
= WREPL_NAME_FLAGS(name
->type
,
976 CHECK_VALUE(tctx
, name
->name
.type
, name2
->name
->type
);
977 CHECK_VALUE_STRING(tctx
, name
->name
.name
, name2
->name
->name
);
978 CHECK_VALUE_STRING(tctx
, name
->name
.scope
, name2
->name
->scope
);
979 CHECK_VALUE(tctx
, flags
, name2
->flags
);
981 CHECK_VALUE(tctx
, name
->num_addresses
, num_ips
);
983 for (i
= 0; i
< name
->num_addresses
; i
++) {
984 const char *addr
= name
->addresses
[i
].address
;
985 const char *owner
= name
->addresses
[i
].owner
;
988 for (j
= 0; j
< num_ips2
; j
++) {
989 if (strcmp(addr
, ips2
[j
].ip
) == 0) {
991 CHECK_VALUE_STRING(tctx
, owner
, ips2
[j
].owner
);
998 for (j
= 0; j
< num_ips1
; j
++) {
999 if (strcmp(addr
, ips1
[j
].ip
) == 0) {
1001 if (owner1
== &ctx
->c
) {
1002 CHECK_VALUE_STRING(tctx
, owner
, owner1
->address
);
1004 CHECK_VALUE_STRING(tctx
, owner
, ips1
[j
].owner
);
1010 if (found
) continue;
1012 CHECK_VALUE_STRING(tctx
, addr
, "not found in address list");
1014 talloc_free(pull_names
.out
.names
);
1018 static char *test_nbt_winsrepl_scope_string(TALLOC_CTX
*mem_ctx
, uint8_t count
)
1023 res
= talloc_array(mem_ctx
, char, count
+1);
1028 for (i
=0; i
< count
; i
++) {
1029 res
[i
] = '0' + (i
%10);
1034 talloc_set_name_const(res
, res
);
1039 static bool test_conflict_same_owner(struct torture_context
*tctx
,
1040 struct test_wrepl_conflict_conn
*ctx
)
1043 struct wrepl_wins_name wins_name1
;
1044 struct wrepl_wins_name wins_name2
;
1045 struct wrepl_wins_name
*wins_name_tmp
;
1046 struct wrepl_wins_name
*wins_name_last
;
1047 struct wrepl_wins_name
*wins_name_cur
;
1049 struct nbt_name names
[] = {
1050 _NBT_NAME("_SAME_OWNER_A", 0x00, NULL
),
1051 _NBT_NAME("_SAME_OWNER_A", 0x00,
1052 test_nbt_winsrepl_scope_string(tctx
, 1)),
1053 _NBT_NAME("_SAME_OWNER_A", 0x00,
1054 test_nbt_winsrepl_scope_string(tctx
, 2)),
1055 _NBT_NAME("_SAME_OWNER_A", 0x00,
1056 test_nbt_winsrepl_scope_string(tctx
, 3)),
1057 _NBT_NAME("_SAME_OWNER_A", 0x00,
1058 test_nbt_winsrepl_scope_string(tctx
, 4)),
1059 _NBT_NAME("_SAME_OWNER_A", 0x00,
1060 test_nbt_winsrepl_scope_string(tctx
, 5)),
1061 _NBT_NAME("_SAME_OWNER_A", 0x00,
1062 test_nbt_winsrepl_scope_string(tctx
, 6)),
1063 _NBT_NAME("_SAME_OWNER_A", 0x00,
1064 test_nbt_winsrepl_scope_string(tctx
, 7)),
1065 _NBT_NAME("_SAME_OWNER_A", 0x00,
1066 test_nbt_winsrepl_scope_string(tctx
, 8)),
1067 _NBT_NAME("_SAME_OWNER_A", 0x00,
1068 test_nbt_winsrepl_scope_string(tctx
, 9)),
1069 _NBT_NAME("_SAME_OWNER_A", 0x00,
1070 test_nbt_winsrepl_scope_string(tctx
, 237)),
1071 _NBT_NAME("_SAME_OWNER_A", 0x00,
1072 test_nbt_winsrepl_scope_string(tctx
, 238)),
1073 _NBT_NAME("_SAME_OWNER_A", 0x1C, NULL
),
1076 enum wrepl_name_type type
;
1077 enum wrepl_name_state state
;
1078 enum wrepl_name_node node
;
1081 const struct wrepl_ip
*ips
;
1084 .type
= WREPL_TYPE_GROUP
,
1085 .state
= WREPL_STATE_ACTIVE
,
1086 .node
= WREPL_NODE_B
,
1088 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1089 .ips
= addresses_A_1
,
1091 .type
= WREPL_TYPE_UNIQUE
,
1092 .state
= WREPL_STATE_ACTIVE
,
1093 .node
= WREPL_NODE_B
,
1095 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1096 .ips
= addresses_A_1
,
1098 .type
= WREPL_TYPE_UNIQUE
,
1099 .state
= WREPL_STATE_ACTIVE
,
1100 .node
= WREPL_NODE_B
,
1102 .num_ips
= ARRAY_SIZE(addresses_A_2
),
1103 .ips
= addresses_A_2
,
1105 .type
= WREPL_TYPE_UNIQUE
,
1106 .state
= WREPL_STATE_ACTIVE
,
1107 .node
= WREPL_NODE_B
,
1109 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1110 .ips
= addresses_A_1
,
1112 .type
= WREPL_TYPE_UNIQUE
,
1113 .state
= WREPL_STATE_ACTIVE
,
1114 .node
= WREPL_NODE_B
,
1116 .num_ips
= ARRAY_SIZE(addresses_A_2
),
1117 .ips
= addresses_A_2
,
1119 .type
= WREPL_TYPE_SGROUP
,
1120 .state
= WREPL_STATE_TOMBSTONE
,
1121 .node
= WREPL_NODE_B
,
1123 .num_ips
= ARRAY_SIZE(addresses_A_2
),
1124 .ips
= addresses_A_2
,
1126 .type
= WREPL_TYPE_MHOMED
,
1127 .state
= WREPL_STATE_TOMBSTONE
,
1128 .node
= WREPL_NODE_B
,
1130 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1131 .ips
= addresses_A_1
,
1133 .type
= WREPL_TYPE_MHOMED
,
1134 .state
= WREPL_STATE_RELEASED
,
1135 .node
= WREPL_NODE_B
,
1137 .num_ips
= ARRAY_SIZE(addresses_A_2
),
1138 .ips
= addresses_A_2
,
1140 .type
= WREPL_TYPE_SGROUP
,
1141 .state
= WREPL_STATE_ACTIVE
,
1142 .node
= WREPL_NODE_B
,
1144 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1145 .ips
= addresses_A_1
,
1147 .type
= WREPL_TYPE_SGROUP
,
1148 .state
= WREPL_STATE_ACTIVE
,
1149 .node
= WREPL_NODE_B
,
1151 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1152 .ips
= addresses_A_3_4
,
1154 .type
= WREPL_TYPE_SGROUP
,
1155 .state
= WREPL_STATE_TOMBSTONE
,
1156 .node
= WREPL_NODE_B
,
1158 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1159 .ips
= addresses_B_3_4
,
1161 /* the last one should always be a unique,tomstone record! */
1162 .type
= WREPL_TYPE_UNIQUE
,
1163 .state
= WREPL_STATE_TOMBSTONE
,
1164 .node
= WREPL_NODE_B
,
1166 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1167 .ips
= addresses_A_1
,
1171 wins_name_tmp
= NULL
;
1172 wins_name_last
= &wins_name2
;
1173 wins_name_cur
= &wins_name1
;
1175 for (j
=0; ret
&& j
< ARRAY_SIZE(names
); j
++) {
1176 torture_comment(tctx
, "Test Replica Conflicts with same owner[%s] for %s\n",
1177 nbt_name_string(ctx
, &names
[j
]), ctx
->a
.address
);
1179 for(i
=0; ret
&& i
< ARRAY_SIZE(records
); i
++) {
1180 wins_name_tmp
= wins_name_last
;
1181 wins_name_last
= wins_name_cur
;
1182 wins_name_cur
= wins_name_tmp
;
1185 torture_comment(tctx
, "%s,%s%s vs. %s,%s%s with %s ip(s) => %s\n",
1186 wrepl_name_type_string(records
[i
-1].type
),
1187 wrepl_name_state_string(records
[i
-1].state
),
1188 (records
[i
-1].is_static
?",static":""),
1189 wrepl_name_type_string(records
[i
].type
),
1190 wrepl_name_state_string(records
[i
].state
),
1191 (records
[i
].is_static
?",static":""),
1192 (records
[i
-1].ips
==records
[i
].ips
?"same":"different"),
1196 wins_name_cur
->name
= &names
[j
];
1197 wins_name_cur
->flags
= WREPL_NAME_FLAGS(records
[i
].type
,
1200 records
[i
].is_static
);
1201 wins_name_cur
->id
= ++ctx
->a
.max_version
;
1202 if (wins_name_cur
->flags
& 2) {
1203 wins_name_cur
->addresses
.addresses
.num_ips
= records
[i
].num_ips
;
1204 wins_name_cur
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
1207 wins_name_cur
->addresses
.ip
= records
[i
].ips
[0].ip
;
1209 wins_name_cur
->unknown
= "255.255.255.255";
1211 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->a
,wins_name_cur
);
1212 if (records
[i
].state
== WREPL_STATE_RELEASED
) {
1213 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->a
, wins_name_last
, false);
1214 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->a
, wins_name_cur
, false);
1216 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->a
, wins_name_cur
, true);
1219 /* the first one is a cleanup run */
1220 if (!ret
&& i
== 0) ret
= true;
1223 torture_comment(tctx
, "conflict handled wrong or record[%u]: %s\n", i
, __location__
);
1231 static bool test_conflict_different_owner(struct torture_context
*tctx
,
1232 struct test_wrepl_conflict_conn
*ctx
)
1235 struct wrepl_wins_name wins_name1
;
1236 struct wrepl_wins_name wins_name2
;
1237 struct wrepl_wins_name
*wins_name_r1
;
1238 struct wrepl_wins_name
*wins_name_r2
;
1241 const char *line
; /* just better debugging */
1242 struct nbt_name name
;
1243 const char *comment
;
1244 bool extra
; /* not the worst case, this is an extra test */
1247 struct wrepl_wins_owner
*owner
;
1248 enum wrepl_name_type type
;
1249 enum wrepl_name_state state
;
1250 enum wrepl_name_node node
;
1253 const struct wrepl_ip
*ips
;
1254 bool apply_expected
;
1256 struct wrepl_wins_owner
*merge_owner
;
1257 bool sgroup_cleanup
;
1261 * NOTE: the first record and the last applied one
1262 * needs to be from the same owner,
1263 * to not conflict in the next smbtorture run!!!
1266 .line
= __location__
,
1267 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1271 .type
= WREPL_TYPE_UNIQUE
,
1272 .state
= WREPL_STATE_TOMBSTONE
,
1273 .node
= WREPL_NODE_B
,
1275 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1276 .ips
= addresses_B_1
,
1277 .apply_expected
= true /* ignored */
1281 .type
= WREPL_TYPE_UNIQUE
,
1282 .state
= WREPL_STATE_TOMBSTONE
,
1283 .node
= WREPL_NODE_B
,
1285 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1286 .ips
= addresses_A_1
,
1287 .apply_expected
= true /* ignored */
1292 * unique vs unique section
1295 * unique,active vs. unique,active
1296 * => should be replaced
1299 .line
= __location__
,
1300 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1303 .type
= WREPL_TYPE_UNIQUE
,
1304 .state
= WREPL_STATE_ACTIVE
,
1305 .node
= WREPL_NODE_B
,
1307 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1308 .ips
= addresses_A_1
,
1309 .apply_expected
= true
1313 .type
= WREPL_TYPE_UNIQUE
,
1314 .state
= WREPL_STATE_ACTIVE
,
1315 .node
= WREPL_NODE_B
,
1317 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1318 .ips
= addresses_B_1
,
1319 .apply_expected
= true
1324 * unique,active vs. unique,tombstone
1325 * => should NOT be replaced
1328 .line
= __location__
,
1329 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1332 .type
= WREPL_TYPE_UNIQUE
,
1333 .state
= WREPL_STATE_ACTIVE
,
1334 .node
= WREPL_NODE_B
,
1336 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1337 .ips
= addresses_B_1
,
1338 .apply_expected
= true
1342 .type
= WREPL_TYPE_UNIQUE
,
1343 .state
= WREPL_STATE_TOMBSTONE
,
1344 .node
= WREPL_NODE_B
,
1346 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1347 .ips
= addresses_B_1
,
1348 .apply_expected
= false
1353 * unique,released vs. unique,active
1354 * => should be replaced
1357 .line
= __location__
,
1358 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1361 .type
= WREPL_TYPE_UNIQUE
,
1362 .state
= WREPL_STATE_RELEASED
,
1363 .node
= WREPL_NODE_B
,
1365 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1366 .ips
= addresses_B_1
,
1367 .apply_expected
= false
1371 .type
= WREPL_TYPE_UNIQUE
,
1372 .state
= WREPL_STATE_ACTIVE
,
1373 .node
= WREPL_NODE_B
,
1375 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1376 .ips
= addresses_A_1
,
1377 .apply_expected
= true
1382 * unique,released vs. unique,tombstone
1383 * => should be replaced
1386 .line
= __location__
,
1387 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1390 .type
= WREPL_TYPE_UNIQUE
,
1391 .state
= WREPL_STATE_RELEASED
,
1392 .node
= WREPL_NODE_B
,
1394 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1395 .ips
= addresses_A_1
,
1396 .apply_expected
= false
1400 .type
= WREPL_TYPE_UNIQUE
,
1401 .state
= WREPL_STATE_TOMBSTONE
,
1402 .node
= WREPL_NODE_B
,
1404 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1405 .ips
= addresses_B_1
,
1406 .apply_expected
= true
1411 * unique,tombstone vs. unique,active
1412 * => should be replaced
1415 .line
= __location__
,
1416 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1419 .type
= WREPL_TYPE_UNIQUE
,
1420 .state
= WREPL_STATE_TOMBSTONE
,
1421 .node
= WREPL_NODE_B
,
1423 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1424 .ips
= addresses_B_1
,
1425 .apply_expected
= true
1429 .type
= WREPL_TYPE_UNIQUE
,
1430 .state
= WREPL_STATE_ACTIVE
,
1431 .node
= WREPL_NODE_B
,
1433 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1434 .ips
= addresses_A_1
,
1435 .apply_expected
= true
1440 * unique,tombstone vs. unique,tombstone
1441 * => should be replaced
1444 .line
= __location__
,
1445 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1448 .type
= WREPL_TYPE_UNIQUE
,
1449 .state
= WREPL_STATE_TOMBSTONE
,
1450 .node
= WREPL_NODE_B
,
1452 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1453 .ips
= addresses_A_1
,
1454 .apply_expected
= true
1458 .type
= WREPL_TYPE_UNIQUE
,
1459 .state
= WREPL_STATE_TOMBSTONE
,
1460 .node
= WREPL_NODE_B
,
1462 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1463 .ips
= addresses_B_1
,
1464 .apply_expected
= true
1470 * unique vs normal groups section,
1473 * unique,active vs. group,active
1474 * => should be replaced
1477 .line
= __location__
,
1478 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1481 .type
= WREPL_TYPE_UNIQUE
,
1482 .state
= WREPL_STATE_ACTIVE
,
1483 .node
= WREPL_NODE_B
,
1485 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1486 .ips
= addresses_B_1
,
1487 .apply_expected
= true
1491 .type
= WREPL_TYPE_GROUP
,
1492 .state
= WREPL_STATE_ACTIVE
,
1493 .node
= WREPL_NODE_B
,
1495 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1496 .ips
= addresses_A_1
,
1497 .apply_expected
= true
1502 * unique,active vs. group,tombstone
1503 * => should NOT be replaced
1506 .line
= __location__
,
1507 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1510 .type
= WREPL_TYPE_UNIQUE
,
1511 .state
= WREPL_STATE_ACTIVE
,
1512 .node
= WREPL_NODE_B
,
1514 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1515 .ips
= addresses_A_1
,
1516 .apply_expected
= true
1520 .type
= WREPL_TYPE_GROUP
,
1521 .state
= WREPL_STATE_TOMBSTONE
,
1522 .node
= WREPL_NODE_B
,
1524 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1525 .ips
= addresses_A_1
,
1526 .apply_expected
= false
1531 * unique,released vs. group,active
1532 * => should be replaced
1535 .line
= __location__
,
1536 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1539 .type
= WREPL_TYPE_UNIQUE
,
1540 .state
= WREPL_STATE_RELEASED
,
1541 .node
= WREPL_NODE_B
,
1543 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1544 .ips
= addresses_A_1
,
1545 .apply_expected
= false
1549 .type
= WREPL_TYPE_GROUP
,
1550 .state
= WREPL_STATE_ACTIVE
,
1551 .node
= WREPL_NODE_B
,
1553 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1554 .ips
= addresses_B_1
,
1555 .apply_expected
= true
1560 * unique,released vs. group,tombstone
1561 * => should be replaced
1564 .line
= __location__
,
1565 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1568 .type
= WREPL_TYPE_UNIQUE
,
1569 .state
= WREPL_STATE_RELEASED
,
1570 .node
= WREPL_NODE_B
,
1572 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1573 .ips
= addresses_B_1
,
1574 .apply_expected
= false
1578 .type
= WREPL_TYPE_GROUP
,
1579 .state
= WREPL_STATE_TOMBSTONE
,
1580 .node
= WREPL_NODE_B
,
1582 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1583 .ips
= addresses_A_1
,
1584 .apply_expected
= true
1589 * unique,tombstone vs. group,active
1590 * => should be replaced
1593 .line
= __location__
,
1594 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1597 .type
= WREPL_TYPE_UNIQUE
,
1598 .state
= WREPL_STATE_TOMBSTONE
,
1599 .node
= WREPL_NODE_B
,
1601 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1602 .ips
= addresses_A_1
,
1603 .apply_expected
= true
1607 .type
= WREPL_TYPE_GROUP
,
1608 .state
= WREPL_STATE_ACTIVE
,
1609 .node
= WREPL_NODE_B
,
1611 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1612 .ips
= addresses_B_1
,
1613 .apply_expected
= true
1618 * unique,tombstone vs. group,tombstone
1619 * => should be replaced
1622 .line
= __location__
,
1623 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1626 .type
= WREPL_TYPE_UNIQUE
,
1627 .state
= WREPL_STATE_TOMBSTONE
,
1628 .node
= WREPL_NODE_B
,
1630 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1631 .ips
= addresses_B_1
,
1632 .apply_expected
= true
1636 .type
= WREPL_TYPE_GROUP
,
1637 .state
= WREPL_STATE_TOMBSTONE
,
1638 .node
= WREPL_NODE_B
,
1640 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1641 .ips
= addresses_A_1
,
1642 .apply_expected
= true
1647 * unique vs special groups section,
1650 * unique,active vs. sgroup,active
1651 * => should NOT be replaced
1654 .line
= __location__
,
1655 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1658 .type
= WREPL_TYPE_UNIQUE
,
1659 .state
= WREPL_STATE_ACTIVE
,
1660 .node
= WREPL_NODE_B
,
1662 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1663 .ips
= addresses_A_1
,
1664 .apply_expected
= true
1668 .type
= WREPL_TYPE_SGROUP
,
1669 .state
= WREPL_STATE_ACTIVE
,
1670 .node
= WREPL_NODE_B
,
1672 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1673 .ips
= addresses_A_1
,
1674 .apply_expected
= false
1679 * unique,active vs. sgroup,tombstone
1680 * => should NOT be replaced
1683 .line
= __location__
,
1684 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1687 .type
= WREPL_TYPE_UNIQUE
,
1688 .state
= WREPL_STATE_ACTIVE
,
1689 .node
= WREPL_NODE_B
,
1691 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1692 .ips
= addresses_A_1
,
1693 .apply_expected
= true
1697 .type
= WREPL_TYPE_SGROUP
,
1698 .state
= WREPL_STATE_TOMBSTONE
,
1699 .node
= WREPL_NODE_B
,
1701 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1702 .ips
= addresses_A_1
,
1703 .apply_expected
= false
1708 * unique,released vs. sgroup,active
1709 * => should be replaced
1712 .line
= __location__
,
1713 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1716 .type
= WREPL_TYPE_UNIQUE
,
1717 .state
= WREPL_STATE_RELEASED
,
1718 .node
= WREPL_NODE_B
,
1720 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1721 .ips
= addresses_A_1
,
1722 .apply_expected
= false
1726 .type
= WREPL_TYPE_SGROUP
,
1727 .state
= WREPL_STATE_ACTIVE
,
1728 .node
= WREPL_NODE_B
,
1730 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1731 .ips
= addresses_B_3_4
,
1732 .apply_expected
= true
1737 * unique,released vs. sgroup,tombstone
1738 * => should be replaced
1741 .line
= __location__
,
1742 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1745 .type
= WREPL_TYPE_UNIQUE
,
1746 .state
= WREPL_STATE_RELEASED
,
1747 .node
= WREPL_NODE_B
,
1749 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1750 .ips
= addresses_B_1
,
1751 .apply_expected
= false
1755 .type
= WREPL_TYPE_SGROUP
,
1756 .state
= WREPL_STATE_TOMBSTONE
,
1757 .node
= WREPL_NODE_B
,
1759 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1760 .ips
= addresses_A_3_4
,
1761 .apply_expected
= true
1766 * unique,tombstone vs. sgroup,active
1767 * => should be replaced
1770 .line
= __location__
,
1771 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1774 .type
= WREPL_TYPE_UNIQUE
,
1775 .state
= WREPL_STATE_TOMBSTONE
,
1776 .node
= WREPL_NODE_B
,
1778 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1779 .ips
= addresses_A_1
,
1780 .apply_expected
= true
1784 .type
= WREPL_TYPE_SGROUP
,
1785 .state
= WREPL_STATE_ACTIVE
,
1786 .node
= WREPL_NODE_B
,
1788 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1789 .ips
= addresses_B_3_4
,
1790 .apply_expected
= true
1795 * unique,tombstone vs. sgroup,tombstone
1796 * => should be replaced
1799 .line
= __location__
,
1800 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1803 .type
= WREPL_TYPE_UNIQUE
,
1804 .state
= WREPL_STATE_TOMBSTONE
,
1805 .node
= WREPL_NODE_B
,
1807 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1808 .ips
= addresses_B_1
,
1809 .apply_expected
= true
1813 .type
= WREPL_TYPE_SGROUP
,
1814 .state
= WREPL_STATE_TOMBSTONE
,
1815 .node
= WREPL_NODE_B
,
1817 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1818 .ips
= addresses_A_3_4
,
1819 .apply_expected
= true
1824 * unique vs multi homed section,
1827 * unique,active vs. mhomed,active
1828 * => should be replaced
1831 .line
= __location__
,
1832 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1835 .type
= WREPL_TYPE_UNIQUE
,
1836 .state
= WREPL_STATE_ACTIVE
,
1837 .node
= WREPL_NODE_B
,
1839 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1840 .ips
= addresses_A_1
,
1841 .apply_expected
= true
1845 .type
= WREPL_TYPE_MHOMED
,
1846 .state
= WREPL_STATE_ACTIVE
,
1847 .node
= WREPL_NODE_B
,
1849 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1850 .ips
= addresses_B_3_4
,
1851 .apply_expected
= true
1856 * unique,active vs. mhomed,tombstone
1857 * => should NOT be replaced
1860 .line
= __location__
,
1861 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1864 .type
= WREPL_TYPE_UNIQUE
,
1865 .state
= WREPL_STATE_ACTIVE
,
1866 .node
= WREPL_NODE_B
,
1868 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1869 .ips
= addresses_B_3_4
,
1870 .apply_expected
= true
1874 .type
= WREPL_TYPE_MHOMED
,
1875 .state
= WREPL_STATE_TOMBSTONE
,
1876 .node
= WREPL_NODE_B
,
1878 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1879 .ips
= addresses_B_3_4
,
1880 .apply_expected
= false
1885 * unique,released vs. mhomed,active
1886 * => should be replaced
1889 .line
= __location__
,
1890 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1893 .type
= WREPL_TYPE_UNIQUE
,
1894 .state
= WREPL_STATE_RELEASED
,
1895 .node
= WREPL_NODE_B
,
1897 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1898 .ips
= addresses_B_1
,
1899 .apply_expected
= false
1903 .type
= WREPL_TYPE_MHOMED
,
1904 .state
= WREPL_STATE_ACTIVE
,
1905 .node
= WREPL_NODE_B
,
1907 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1908 .ips
= addresses_A_3_4
,
1909 .apply_expected
= true
1914 * unique,released vs. mhomed,tombstone
1915 * => should be replaced
1918 .line
= __location__
,
1919 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1922 .type
= WREPL_TYPE_UNIQUE
,
1923 .state
= WREPL_STATE_RELEASED
,
1924 .node
= WREPL_NODE_B
,
1926 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1927 .ips
= addresses_A_1
,
1928 .apply_expected
= false
1932 .type
= WREPL_TYPE_MHOMED
,
1933 .state
= WREPL_STATE_TOMBSTONE
,
1934 .node
= WREPL_NODE_B
,
1936 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1937 .ips
= addresses_B_3_4
,
1938 .apply_expected
= true
1943 * unique,tombstone vs. mhomed,active
1944 * => should be replaced
1947 .line
= __location__
,
1948 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1951 .type
= WREPL_TYPE_UNIQUE
,
1952 .state
= WREPL_STATE_TOMBSTONE
,
1953 .node
= WREPL_NODE_B
,
1955 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1956 .ips
= addresses_B_1
,
1957 .apply_expected
= true
1961 .type
= WREPL_TYPE_MHOMED
,
1962 .state
= WREPL_STATE_ACTIVE
,
1963 .node
= WREPL_NODE_B
,
1965 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1966 .ips
= addresses_A_3_4
,
1967 .apply_expected
= true
1972 * unique,tombstone vs. mhomed,tombstone
1973 * => should be replaced
1976 .line
= __location__
,
1977 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1980 .type
= WREPL_TYPE_UNIQUE
,
1981 .state
= WREPL_STATE_TOMBSTONE
,
1982 .node
= WREPL_NODE_B
,
1984 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1985 .ips
= addresses_A_1
,
1986 .apply_expected
= true
1990 .type
= WREPL_TYPE_MHOMED
,
1991 .state
= WREPL_STATE_TOMBSTONE
,
1992 .node
= WREPL_NODE_B
,
1994 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1995 .ips
= addresses_B_3_4
,
1996 .apply_expected
= true
2001 * normal groups vs unique section,
2004 * group,active vs. unique,active
2005 * => should NOT be replaced
2008 .line
= __location__
,
2009 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2012 .type
= WREPL_TYPE_GROUP
,
2013 .state
= WREPL_STATE_ACTIVE
,
2014 .node
= WREPL_NODE_B
,
2016 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2017 .ips
= addresses_A_1
,
2018 .apply_expected
= true
2022 .type
= WREPL_TYPE_UNIQUE
,
2023 .state
= WREPL_STATE_ACTIVE
,
2024 .node
= WREPL_NODE_B
,
2026 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2027 .ips
= addresses_A_1
,
2028 .apply_expected
= false
2033 * group,active vs. unique,tombstone
2034 * => should NOT be replaced
2037 .line
= __location__
,
2038 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2041 .type
= WREPL_TYPE_GROUP
,
2042 .state
= WREPL_STATE_ACTIVE
,
2043 .node
= WREPL_NODE_B
,
2045 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2046 .ips
= addresses_A_1
,
2047 .apply_expected
= true
2051 .type
= WREPL_TYPE_UNIQUE
,
2052 .state
= WREPL_STATE_TOMBSTONE
,
2053 .node
= WREPL_NODE_B
,
2055 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2056 .ips
= addresses_A_1
,
2057 .apply_expected
= false
2062 * group,released vs. unique,active
2063 * => should NOT be replaced
2066 .line
= __location__
,
2067 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2070 .type
= WREPL_TYPE_GROUP
,
2071 .state
= WREPL_STATE_RELEASED
,
2072 .node
= WREPL_NODE_B
,
2074 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2075 .ips
= addresses_A_1
,
2076 .apply_expected
= false
2080 .type
= WREPL_TYPE_UNIQUE
,
2081 .state
= WREPL_STATE_ACTIVE
,
2082 .node
= WREPL_NODE_B
,
2084 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2085 .ips
= addresses_A_1
,
2086 .apply_expected
= false
2091 * group,released vs. unique,tombstone
2092 * => should NOT be replaced
2095 .line
= __location__
,
2096 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2099 .type
= WREPL_TYPE_GROUP
,
2100 .state
= WREPL_STATE_RELEASED
,
2101 .node
= WREPL_NODE_B
,
2103 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2104 .ips
= addresses_A_1
,
2105 .apply_expected
= false
2109 .type
= WREPL_TYPE_UNIQUE
,
2110 .state
= WREPL_STATE_TOMBSTONE
,
2111 .node
= WREPL_NODE_B
,
2113 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2114 .ips
= addresses_A_1
,
2115 .apply_expected
= false
2120 * group,tombstone vs. unique,active
2121 * => should NOT be replaced
2124 .line
= __location__
,
2125 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2128 .type
= WREPL_TYPE_GROUP
,
2129 .state
= WREPL_STATE_TOMBSTONE
,
2130 .node
= WREPL_NODE_B
,
2132 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2133 .ips
= addresses_A_1
,
2134 .apply_expected
= true
2138 .type
= WREPL_TYPE_UNIQUE
,
2139 .state
= WREPL_STATE_ACTIVE
,
2140 .node
= WREPL_NODE_B
,
2142 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2143 .ips
= addresses_A_1
,
2144 .apply_expected
= false
2149 * group,tombstone vs. unique,tombstone
2150 * => should NOT be replaced
2153 .line
= __location__
,
2154 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2157 .type
= WREPL_TYPE_GROUP
,
2158 .state
= WREPL_STATE_TOMBSTONE
,
2159 .node
= WREPL_NODE_B
,
2161 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2162 .ips
= addresses_A_1
,
2163 .apply_expected
= true
2167 .type
= WREPL_TYPE_UNIQUE
,
2168 .state
= WREPL_STATE_TOMBSTONE
,
2169 .node
= WREPL_NODE_B
,
2171 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2172 .ips
= addresses_A_1
,
2173 .apply_expected
= false
2178 * normal groups vs normal groups section,
2181 * group,active vs. group,active
2182 * => should NOT be replaced
2185 .line
= __location__
,
2186 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2189 .type
= WREPL_TYPE_GROUP
,
2190 .state
= WREPL_STATE_ACTIVE
,
2191 .node
= WREPL_NODE_B
,
2193 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2194 .ips
= addresses_A_1
,
2195 .apply_expected
= true
2199 .type
= WREPL_TYPE_GROUP
,
2200 .state
= WREPL_STATE_ACTIVE
,
2201 .node
= WREPL_NODE_B
,
2203 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2204 .ips
= addresses_A_1
,
2205 .apply_expected
= false
2210 * group,active vs. group,tombstone
2211 * => should NOT be replaced
2214 .line
= __location__
,
2215 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2218 .type
= WREPL_TYPE_GROUP
,
2219 .state
= WREPL_STATE_ACTIVE
,
2220 .node
= WREPL_NODE_B
,
2222 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2223 .ips
= addresses_A_1
,
2224 .apply_expected
= true
2228 .type
= WREPL_TYPE_GROUP
,
2229 .state
= WREPL_STATE_TOMBSTONE
,
2230 .node
= WREPL_NODE_B
,
2232 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2233 .ips
= addresses_A_1
,
2234 .apply_expected
= false
2239 * group,released vs. group,active
2240 * => should be replaced
2243 .line
= __location__
,
2244 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2247 .type
= WREPL_TYPE_GROUP
,
2248 .state
= WREPL_STATE_RELEASED
,
2249 .node
= WREPL_NODE_B
,
2251 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2252 .ips
= addresses_A_1
,
2253 .apply_expected
= false
2257 .type
= WREPL_TYPE_GROUP
,
2258 .state
= WREPL_STATE_ACTIVE
,
2259 .node
= WREPL_NODE_B
,
2261 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2262 .ips
= addresses_B_1
,
2263 .apply_expected
= true
2268 * group,released vs. group,tombstone
2269 * => should be replaced
2272 .line
= __location__
,
2273 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2276 .type
= WREPL_TYPE_GROUP
,
2277 .state
= WREPL_STATE_RELEASED
,
2278 .node
= WREPL_NODE_B
,
2280 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2281 .ips
= addresses_A_1
,
2282 .apply_expected
= false
2286 .type
= WREPL_TYPE_GROUP
,
2287 .state
= WREPL_STATE_TOMBSTONE
,
2288 .node
= WREPL_NODE_B
,
2290 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2291 .ips
= addresses_B_1
,
2292 .apply_expected
= true
2297 * group,tombstone vs. group,active
2298 * => should be replaced
2301 .line
= __location__
,
2302 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2305 .type
= WREPL_TYPE_GROUP
,
2306 .state
= WREPL_STATE_TOMBSTONE
,
2307 .node
= WREPL_NODE_B
,
2309 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2310 .ips
= addresses_B_1
,
2311 .apply_expected
= true
2315 .type
= WREPL_TYPE_GROUP
,
2316 .state
= WREPL_STATE_ACTIVE
,
2317 .node
= WREPL_NODE_B
,
2319 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2320 .ips
= addresses_A_1
,
2321 .apply_expected
= true
2326 * group,tombstone vs. group,tombstone
2327 * => should be replaced
2330 .line
= __location__
,
2331 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2334 .type
= WREPL_TYPE_GROUP
,
2335 .state
= WREPL_STATE_TOMBSTONE
,
2336 .node
= WREPL_NODE_B
,
2338 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2339 .ips
= addresses_A_1
,
2340 .apply_expected
= true
2344 .type
= WREPL_TYPE_GROUP
,
2345 .state
= WREPL_STATE_TOMBSTONE
,
2346 .node
= WREPL_NODE_B
,
2348 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2349 .ips
= addresses_B_1
,
2350 .apply_expected
= true
2355 * normal groups vs special groups section,
2358 * group,active vs. sgroup,active
2359 * => should NOT be replaced
2362 .line
= __location__
,
2363 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2366 .type
= WREPL_TYPE_GROUP
,
2367 .state
= WREPL_STATE_ACTIVE
,
2368 .node
= WREPL_NODE_B
,
2370 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2371 .ips
= addresses_B_1
,
2372 .apply_expected
= true
2376 .type
= WREPL_TYPE_SGROUP
,
2377 .state
= WREPL_STATE_ACTIVE
,
2378 .node
= WREPL_NODE_B
,
2380 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2381 .ips
= addresses_B_1
,
2382 .apply_expected
= false
2387 * group,active vs. sgroup,tombstone
2388 * => should NOT be replaced
2391 .line
= __location__
,
2392 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2395 .type
= WREPL_TYPE_GROUP
,
2396 .state
= WREPL_STATE_ACTIVE
,
2397 .node
= WREPL_NODE_B
,
2399 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2400 .ips
= addresses_B_1
,
2401 .apply_expected
= true
2405 .type
= WREPL_TYPE_SGROUP
,
2406 .state
= WREPL_STATE_TOMBSTONE
,
2407 .node
= WREPL_NODE_B
,
2409 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2410 .ips
= addresses_B_1
,
2411 .apply_expected
= false
2416 * group,released vs. sgroup,active
2417 * => should be replaced
2420 .line
= __location__
,
2421 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2424 .type
= WREPL_TYPE_GROUP
,
2425 .state
= WREPL_STATE_RELEASED
,
2426 .node
= WREPL_NODE_B
,
2428 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2429 .ips
= addresses_A_1
,
2430 .apply_expected
= false
2434 .type
= WREPL_TYPE_SGROUP
,
2435 .state
= WREPL_STATE_ACTIVE
,
2436 .node
= WREPL_NODE_B
,
2438 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2439 .ips
= addresses_B_1
,
2440 .apply_expected
= true
2445 * group,released vs. sgroup,tombstone
2446 * => should NOT be replaced
2449 .line
= __location__
,
2450 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2453 .type
= WREPL_TYPE_GROUP
,
2454 .state
= WREPL_STATE_RELEASED
,
2455 .node
= WREPL_NODE_B
,
2457 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2458 .ips
= addresses_B_1
,
2459 .apply_expected
= false
2463 .type
= WREPL_TYPE_SGROUP
,
2464 .state
= WREPL_STATE_TOMBSTONE
,
2465 .node
= WREPL_NODE_B
,
2467 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2468 .ips
= addresses_B_1
,
2469 .apply_expected
= false
2474 * group,tombstone vs. sgroup,active
2475 * => should be replaced
2478 .line
= __location__
,
2479 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2482 .type
= WREPL_TYPE_GROUP
,
2483 .state
= WREPL_STATE_TOMBSTONE
,
2484 .node
= WREPL_NODE_B
,
2486 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2487 .ips
= addresses_B_1
,
2488 .apply_expected
= true
2492 .type
= WREPL_TYPE_SGROUP
,
2493 .state
= WREPL_STATE_ACTIVE
,
2494 .node
= WREPL_NODE_B
,
2496 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2497 .ips
= addresses_A_1
,
2498 .apply_expected
= true
2503 * group,tombstone vs. sgroup,tombstone
2504 * => should be replaced
2507 .line
= __location__
,
2508 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2511 .type
= WREPL_TYPE_GROUP
,
2512 .state
= WREPL_STATE_TOMBSTONE
,
2513 .node
= WREPL_NODE_B
,
2515 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2516 .ips
= addresses_A_1
,
2517 .apply_expected
= true
2521 .type
= WREPL_TYPE_SGROUP
,
2522 .state
= WREPL_STATE_TOMBSTONE
,
2523 .node
= WREPL_NODE_B
,
2525 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2526 .ips
= addresses_B_1
,
2527 .apply_expected
= true
2532 * normal groups vs multi homed section,
2535 * group,active vs. mhomed,active
2536 * => should NOT be replaced
2539 .line
= __location__
,
2540 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2543 .type
= WREPL_TYPE_GROUP
,
2544 .state
= WREPL_STATE_ACTIVE
,
2545 .node
= WREPL_NODE_B
,
2547 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2548 .ips
= addresses_B_1
,
2549 .apply_expected
= true
2553 .type
= WREPL_TYPE_MHOMED
,
2554 .state
= WREPL_STATE_ACTIVE
,
2555 .node
= WREPL_NODE_B
,
2557 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2558 .ips
= addresses_B_1
,
2559 .apply_expected
= false
2564 * group,active vs. mhomed,tombstone
2565 * => should NOT be replaced
2568 .line
= __location__
,
2569 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2572 .type
= WREPL_TYPE_GROUP
,
2573 .state
= WREPL_STATE_ACTIVE
,
2574 .node
= WREPL_NODE_B
,
2576 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2577 .ips
= addresses_B_1
,
2578 .apply_expected
= true
2582 .type
= WREPL_TYPE_MHOMED
,
2583 .state
= WREPL_STATE_TOMBSTONE
,
2584 .node
= WREPL_NODE_B
,
2586 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2587 .ips
= addresses_B_1
,
2588 .apply_expected
= false
2593 * group,released vs. mhomed,active
2594 * => should NOT be replaced
2597 .line
= __location__
,
2598 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2601 .type
= WREPL_TYPE_GROUP
,
2602 .state
= WREPL_STATE_RELEASED
,
2603 .node
= WREPL_NODE_B
,
2605 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2606 .ips
= addresses_B_1
,
2607 .apply_expected
= false
2611 .type
= WREPL_TYPE_MHOMED
,
2612 .state
= WREPL_STATE_ACTIVE
,
2613 .node
= WREPL_NODE_B
,
2615 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2616 .ips
= addresses_B_1
,
2617 .apply_expected
= false
2622 * group,released vs. mhomed,tombstone
2623 * => should NOT be replaced
2626 .line
= __location__
,
2627 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2630 .type
= WREPL_TYPE_GROUP
,
2631 .state
= WREPL_STATE_RELEASED
,
2632 .node
= WREPL_NODE_B
,
2634 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2635 .ips
= addresses_B_1
,
2636 .apply_expected
= false
2640 .type
= WREPL_TYPE_MHOMED
,
2641 .state
= WREPL_STATE_TOMBSTONE
,
2642 .node
= WREPL_NODE_B
,
2644 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2645 .ips
= addresses_B_1
,
2646 .apply_expected
= false
2651 * group,tombstone vs. mhomed,active
2652 * => should be replaced
2655 .line
= __location__
,
2656 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2659 .type
= WREPL_TYPE_GROUP
,
2660 .state
= WREPL_STATE_TOMBSTONE
,
2661 .node
= WREPL_NODE_B
,
2663 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2664 .ips
= addresses_B_1
,
2665 .apply_expected
= true
2669 .type
= WREPL_TYPE_MHOMED
,
2670 .state
= WREPL_STATE_ACTIVE
,
2671 .node
= WREPL_NODE_B
,
2673 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2674 .ips
= addresses_A_1
,
2675 .apply_expected
= true
2680 * group,tombstone vs. mhomed,tombstone
2681 * => should be replaced
2684 .line
= __location__
,
2685 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2688 .type
= WREPL_TYPE_GROUP
,
2689 .state
= WREPL_STATE_TOMBSTONE
,
2690 .node
= WREPL_NODE_B
,
2692 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2693 .ips
= addresses_A_1
,
2694 .apply_expected
= true
2698 .type
= WREPL_TYPE_MHOMED
,
2699 .state
= WREPL_STATE_TOMBSTONE
,
2700 .node
= WREPL_NODE_B
,
2702 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2703 .ips
= addresses_B_1
,
2704 .apply_expected
= true
2709 * special groups vs unique section,
2712 * sgroup,active vs. unique,active
2713 * => should NOT be replaced
2716 .line
= __location__
,
2717 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2720 .type
= WREPL_TYPE_SGROUP
,
2721 .state
= WREPL_STATE_ACTIVE
,
2722 .node
= WREPL_NODE_B
,
2724 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2725 .ips
= addresses_B_1
,
2726 .apply_expected
= true
2730 .type
= WREPL_TYPE_UNIQUE
,
2731 .state
= WREPL_STATE_ACTIVE
,
2732 .node
= WREPL_NODE_B
,
2734 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2735 .ips
= addresses_B_1
,
2736 .apply_expected
= false
2741 * sgroup,active vs. unique,tombstone
2742 * => should NOT be replaced
2745 .line
= __location__
,
2746 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2749 .type
= WREPL_TYPE_SGROUP
,
2750 .state
= WREPL_STATE_ACTIVE
,
2751 .node
= WREPL_NODE_B
,
2753 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2754 .ips
= addresses_B_1
,
2755 .apply_expected
= true
2759 .type
= WREPL_TYPE_UNIQUE
,
2760 .state
= WREPL_STATE_TOMBSTONE
,
2761 .node
= WREPL_NODE_B
,
2763 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2764 .ips
= addresses_B_1
,
2765 .apply_expected
= false
2770 * sgroup,released vs. unique,active
2771 * => should be replaced
2774 .line
= __location__
,
2775 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2778 .type
= WREPL_TYPE_SGROUP
,
2779 .state
= WREPL_STATE_RELEASED
,
2780 .node
= WREPL_NODE_B
,
2782 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2783 .ips
= addresses_B_1
,
2784 .apply_expected
= false
2788 .type
= WREPL_TYPE_UNIQUE
,
2789 .state
= WREPL_STATE_ACTIVE
,
2790 .node
= WREPL_NODE_B
,
2792 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2793 .ips
= addresses_A_1
,
2794 .apply_expected
= true
2799 * sgroup,released vs. unique,tombstone
2800 * => should be replaced
2803 .line
= __location__
,
2804 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2807 .type
= WREPL_TYPE_SGROUP
,
2808 .state
= WREPL_STATE_RELEASED
,
2809 .node
= WREPL_NODE_B
,
2811 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2812 .ips
= addresses_A_1
,
2813 .apply_expected
= false
2817 .type
= WREPL_TYPE_UNIQUE
,
2818 .state
= WREPL_STATE_TOMBSTONE
,
2819 .node
= WREPL_NODE_B
,
2821 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2822 .ips
= addresses_B_1
,
2823 .apply_expected
= true
2828 * sgroup,tombstone vs. unique,active
2829 * => should be replaced
2832 .line
= __location__
,
2833 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2836 .type
= WREPL_TYPE_SGROUP
,
2837 .state
= WREPL_STATE_TOMBSTONE
,
2838 .node
= WREPL_NODE_B
,
2840 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2841 .ips
= addresses_A_1
,
2842 .apply_expected
= true
2846 .type
= WREPL_TYPE_UNIQUE
,
2847 .state
= WREPL_STATE_ACTIVE
,
2848 .node
= WREPL_NODE_B
,
2850 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2851 .ips
= addresses_B_1
,
2852 .apply_expected
= true
2857 * sgroup,tombstone vs. unique,tombstone
2858 * => should be replaced
2861 .line
= __location__
,
2862 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2865 .type
= WREPL_TYPE_SGROUP
,
2866 .state
= WREPL_STATE_TOMBSTONE
,
2867 .node
= WREPL_NODE_B
,
2869 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2870 .ips
= addresses_B_1
,
2871 .apply_expected
= true
2875 .type
= WREPL_TYPE_UNIQUE
,
2876 .state
= WREPL_STATE_TOMBSTONE
,
2877 .node
= WREPL_NODE_B
,
2879 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2880 .ips
= addresses_A_1
,
2881 .apply_expected
= true
2886 * special groups vs normal group section,
2889 * sgroup,active vs. group,active
2890 * => should NOT be replaced
2893 .line
= __location__
,
2894 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2897 .type
= WREPL_TYPE_SGROUP
,
2898 .state
= WREPL_STATE_ACTIVE
,
2899 .node
= WREPL_NODE_B
,
2901 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2902 .ips
= addresses_A_1
,
2903 .apply_expected
= true
2907 .type
= WREPL_TYPE_GROUP
,
2908 .state
= WREPL_STATE_ACTIVE
,
2909 .node
= WREPL_NODE_B
,
2911 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2912 .ips
= addresses_A_1
,
2913 .apply_expected
= false
2918 * sgroup,active vs. group,tombstone
2919 * => should NOT be replaced
2922 .line
= __location__
,
2923 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2926 .type
= WREPL_TYPE_SGROUP
,
2927 .state
= WREPL_STATE_ACTIVE
,
2928 .node
= WREPL_NODE_B
,
2930 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2931 .ips
= addresses_A_1
,
2932 .apply_expected
= true
2936 .type
= WREPL_TYPE_GROUP
,
2937 .state
= WREPL_STATE_TOMBSTONE
,
2938 .node
= WREPL_NODE_B
,
2940 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2941 .ips
= addresses_A_1
,
2942 .apply_expected
= false
2947 * sgroup,released vs. group,active
2948 * => should be replaced
2951 .line
= __location__
,
2952 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2955 .type
= WREPL_TYPE_SGROUP
,
2956 .state
= WREPL_STATE_RELEASED
,
2957 .node
= WREPL_NODE_B
,
2959 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2960 .ips
= addresses_A_1
,
2961 .apply_expected
= false
2965 .type
= WREPL_TYPE_GROUP
,
2966 .state
= WREPL_STATE_ACTIVE
,
2967 .node
= WREPL_NODE_B
,
2969 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2970 .ips
= addresses_B_1
,
2971 .apply_expected
= true
2976 * sgroup,released vs. group,tombstone
2977 * => should be replaced
2980 .line
= __location__
,
2981 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2984 .type
= WREPL_TYPE_SGROUP
,
2985 .state
= WREPL_STATE_RELEASED
,
2986 .node
= WREPL_NODE_B
,
2988 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2989 .ips
= addresses_B_1
,
2990 .apply_expected
= false
2994 .type
= WREPL_TYPE_GROUP
,
2995 .state
= WREPL_STATE_TOMBSTONE
,
2996 .node
= WREPL_NODE_B
,
2998 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2999 .ips
= addresses_A_1
,
3000 .apply_expected
= true
3005 * sgroup,tombstone vs. group,active
3006 * => should NOT be replaced
3009 .line
= __location__
,
3010 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3013 .type
= WREPL_TYPE_SGROUP
,
3014 .state
= WREPL_STATE_TOMBSTONE
,
3015 .node
= WREPL_NODE_B
,
3017 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3018 .ips
= addresses_A_1
,
3019 .apply_expected
= true
3023 .type
= WREPL_TYPE_GROUP
,
3024 .state
= WREPL_STATE_ACTIVE
,
3025 .node
= WREPL_NODE_B
,
3027 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3028 .ips
= addresses_B_1
,
3029 .apply_expected
= true
3034 * sgroup,tombstone vs. group,tombstone
3035 * => should NOT be replaced
3038 .line
= __location__
,
3039 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3042 .type
= WREPL_TYPE_SGROUP
,
3043 .state
= WREPL_STATE_TOMBSTONE
,
3044 .node
= WREPL_NODE_B
,
3046 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3047 .ips
= addresses_B_1
,
3048 .apply_expected
= true
3052 .type
= WREPL_TYPE_GROUP
,
3053 .state
= WREPL_STATE_TOMBSTONE
,
3054 .node
= WREPL_NODE_B
,
3056 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3057 .ips
= addresses_A_1
,
3058 .apply_expected
= true
3063 * special groups (not active) vs special group section,
3066 * sgroup,released vs. sgroup,active
3067 * => should be replaced
3070 .line
= __location__
,
3071 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3074 .type
= WREPL_TYPE_SGROUP
,
3075 .state
= WREPL_STATE_RELEASED
,
3076 .node
= WREPL_NODE_B
,
3078 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3079 .ips
= addresses_A_1
,
3080 .apply_expected
= false
3084 .type
= WREPL_TYPE_SGROUP
,
3085 .state
= WREPL_STATE_ACTIVE
,
3086 .node
= WREPL_NODE_B
,
3088 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3089 .ips
= addresses_B_1
,
3090 .apply_expected
= true
3095 * sgroup,released vs. sgroup,tombstone
3096 * => should be replaced
3099 .line
= __location__
,
3100 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3103 .type
= WREPL_TYPE_SGROUP
,
3104 .state
= WREPL_STATE_RELEASED
,
3105 .node
= WREPL_NODE_B
,
3107 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3108 .ips
= addresses_B_1
,
3109 .apply_expected
= false
3113 .type
= WREPL_TYPE_SGROUP
,
3114 .state
= WREPL_STATE_TOMBSTONE
,
3115 .node
= WREPL_NODE_B
,
3117 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3118 .ips
= addresses_A_1
,
3119 .apply_expected
= true
3124 * sgroup,tombstone vs. sgroup,active
3125 * => should NOT be replaced
3128 .line
= __location__
,
3129 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3132 .type
= WREPL_TYPE_SGROUP
,
3133 .state
= WREPL_STATE_TOMBSTONE
,
3134 .node
= WREPL_NODE_B
,
3136 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3137 .ips
= addresses_A_1
,
3138 .apply_expected
= true
3142 .type
= WREPL_TYPE_SGROUP
,
3143 .state
= WREPL_STATE_ACTIVE
,
3144 .node
= WREPL_NODE_B
,
3146 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3147 .ips
= addresses_B_1
,
3148 .apply_expected
= true
3153 * sgroup,tombstone vs. sgroup,tombstone
3154 * => should NOT be replaced
3157 .line
= __location__
,
3158 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3161 .type
= WREPL_TYPE_SGROUP
,
3162 .state
= WREPL_STATE_TOMBSTONE
,
3163 .node
= WREPL_NODE_B
,
3165 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3166 .ips
= addresses_B_1
,
3167 .apply_expected
= true
3171 .type
= WREPL_TYPE_SGROUP
,
3172 .state
= WREPL_STATE_TOMBSTONE
,
3173 .node
= WREPL_NODE_B
,
3175 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3176 .ips
= addresses_A_1
,
3177 .apply_expected
= true
3182 * special groups vs multi homed section,
3185 * sgroup,active vs. mhomed,active
3186 * => should NOT be replaced
3189 .line
= __location__
,
3190 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3193 .type
= WREPL_TYPE_SGROUP
,
3194 .state
= WREPL_STATE_ACTIVE
,
3195 .node
= WREPL_NODE_B
,
3197 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3198 .ips
= addresses_A_1
,
3199 .apply_expected
= true
3203 .type
= WREPL_TYPE_MHOMED
,
3204 .state
= WREPL_STATE_ACTIVE
,
3205 .node
= WREPL_NODE_B
,
3207 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3208 .ips
= addresses_A_1
,
3209 .apply_expected
= false
3214 * sgroup,active vs. mhomed,tombstone
3215 * => should NOT be replaced
3218 .line
= __location__
,
3219 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3222 .type
= WREPL_TYPE_SGROUP
,
3223 .state
= WREPL_STATE_ACTIVE
,
3224 .node
= WREPL_NODE_B
,
3226 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3227 .ips
= addresses_A_1
,
3228 .apply_expected
= true
3232 .type
= WREPL_TYPE_MHOMED
,
3233 .state
= WREPL_STATE_TOMBSTONE
,
3234 .node
= WREPL_NODE_B
,
3236 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3237 .ips
= addresses_A_1
,
3238 .apply_expected
= false
3243 * sgroup,released vs. mhomed,active
3244 * => should be replaced
3247 .line
= __location__
,
3248 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3251 .type
= WREPL_TYPE_SGROUP
,
3252 .state
= WREPL_STATE_RELEASED
,
3253 .node
= WREPL_NODE_B
,
3255 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3256 .ips
= addresses_A_1
,
3257 .apply_expected
= false
3261 .type
= WREPL_TYPE_MHOMED
,
3262 .state
= WREPL_STATE_ACTIVE
,
3263 .node
= WREPL_NODE_B
,
3265 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3266 .ips
= addresses_B_1
,
3267 .apply_expected
= true
3272 * sgroup,released vs. mhomed,tombstone
3273 * => should be replaced
3276 .line
= __location__
,
3277 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3280 .type
= WREPL_TYPE_SGROUP
,
3281 .state
= WREPL_STATE_RELEASED
,
3282 .node
= WREPL_NODE_B
,
3284 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3285 .ips
= addresses_B_1
,
3286 .apply_expected
= false
3290 .type
= WREPL_TYPE_MHOMED
,
3291 .state
= WREPL_STATE_TOMBSTONE
,
3292 .node
= WREPL_NODE_B
,
3294 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3295 .ips
= addresses_A_1
,
3296 .apply_expected
= true
3301 * sgroup,tombstone vs. mhomed,active
3302 * => should be replaced
3305 .line
= __location__
,
3306 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3309 .type
= WREPL_TYPE_SGROUP
,
3310 .state
= WREPL_STATE_TOMBSTONE
,
3311 .node
= WREPL_NODE_B
,
3313 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3314 .ips
= addresses_A_1
,
3315 .apply_expected
= true
3319 .type
= WREPL_TYPE_MHOMED
,
3320 .state
= WREPL_STATE_ACTIVE
,
3321 .node
= WREPL_NODE_B
,
3323 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3324 .ips
= addresses_B_1
,
3325 .apply_expected
= true
3330 * sgroup,tombstone vs. mhomed,tombstone
3331 * => should be replaced
3334 .line
= __location__
,
3335 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3338 .type
= WREPL_TYPE_SGROUP
,
3339 .state
= WREPL_STATE_TOMBSTONE
,
3340 .node
= WREPL_NODE_B
,
3342 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3343 .ips
= addresses_B_1
,
3344 .apply_expected
= true
3348 .type
= WREPL_TYPE_MHOMED
,
3349 .state
= WREPL_STATE_TOMBSTONE
,
3350 .node
= WREPL_NODE_B
,
3352 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3353 .ips
= addresses_A_1
,
3354 .apply_expected
= true
3359 * multi homed vs. unique section,
3362 * mhomed,active vs. unique,active
3363 * => should be replaced
3366 .line
= __location__
,
3367 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3370 .type
= WREPL_TYPE_MHOMED
,
3371 .state
= WREPL_STATE_ACTIVE
,
3372 .node
= WREPL_NODE_B
,
3374 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
3375 .ips
= addresses_A_3_4
,
3376 .apply_expected
= true
3380 .type
= WREPL_TYPE_UNIQUE
,
3381 .state
= WREPL_STATE_ACTIVE
,
3382 .node
= WREPL_NODE_B
,
3384 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3385 .ips
= addresses_B_1
,
3386 .apply_expected
= true
3391 * mhomed,active vs. unique,tombstone
3392 * => should NOT be replaced
3395 .line
= __location__
,
3396 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3399 .type
= WREPL_TYPE_MHOMED
,
3400 .state
= WREPL_STATE_ACTIVE
,
3401 .node
= WREPL_NODE_B
,
3403 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3404 .ips
= addresses_B_1
,
3405 .apply_expected
= true
3409 .type
= WREPL_TYPE_UNIQUE
,
3410 .state
= WREPL_STATE_TOMBSTONE
,
3411 .node
= WREPL_NODE_B
,
3413 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3414 .ips
= addresses_B_1
,
3415 .apply_expected
= false
3420 * mhomed,released vs. unique,active
3421 * => should be replaced
3424 .line
= __location__
,
3425 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3428 .type
= WREPL_TYPE_MHOMED
,
3429 .state
= WREPL_STATE_RELEASED
,
3430 .node
= WREPL_NODE_B
,
3432 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3433 .ips
= addresses_A_1
,
3434 .apply_expected
= false
3438 .type
= WREPL_TYPE_UNIQUE
,
3439 .state
= WREPL_STATE_ACTIVE
,
3440 .node
= WREPL_NODE_B
,
3442 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3443 .ips
= addresses_B_1
,
3444 .apply_expected
= true
3449 * mhomed,released vs. uinique,tombstone
3450 * => should be replaced
3453 .line
= __location__
,
3454 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3457 .type
= WREPL_TYPE_MHOMED
,
3458 .state
= WREPL_STATE_RELEASED
,
3459 .node
= WREPL_NODE_B
,
3461 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3462 .ips
= addresses_B_1
,
3463 .apply_expected
= false
3467 .type
= WREPL_TYPE_UNIQUE
,
3468 .state
= WREPL_STATE_TOMBSTONE
,
3469 .node
= WREPL_NODE_B
,
3471 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3472 .ips
= addresses_A_1
,
3473 .apply_expected
= true
3478 * mhomed,tombstone vs. unique,active
3479 * => should be replaced
3482 .line
= __location__
,
3483 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3486 .type
= WREPL_TYPE_MHOMED
,
3487 .state
= WREPL_STATE_TOMBSTONE
,
3488 .node
= WREPL_NODE_B
,
3490 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3491 .ips
= addresses_A_1
,
3492 .apply_expected
= true
3496 .type
= WREPL_TYPE_UNIQUE
,
3497 .state
= WREPL_STATE_ACTIVE
,
3498 .node
= WREPL_NODE_B
,
3500 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3501 .ips
= addresses_B_1
,
3502 .apply_expected
= true
3507 * mhomed,tombstone vs. uinique,tombstone
3508 * => should be replaced
3511 .line
= __location__
,
3512 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3515 .type
= WREPL_TYPE_MHOMED
,
3516 .state
= WREPL_STATE_TOMBSTONE
,
3517 .node
= WREPL_NODE_B
,
3519 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3520 .ips
= addresses_B_1
,
3521 .apply_expected
= true
3525 .type
= WREPL_TYPE_UNIQUE
,
3526 .state
= WREPL_STATE_TOMBSTONE
,
3527 .node
= WREPL_NODE_B
,
3529 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3530 .ips
= addresses_A_1
,
3531 .apply_expected
= true
3536 * multi homed vs. normal group section,
3539 * mhomed,active vs. group,active
3540 * => should be replaced
3543 .line
= __location__
,
3544 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3547 .type
= WREPL_TYPE_MHOMED
,
3548 .state
= WREPL_STATE_ACTIVE
,
3549 .node
= WREPL_NODE_B
,
3551 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3552 .ips
= addresses_A_1
,
3553 .apply_expected
= true
3557 .type
= WREPL_TYPE_GROUP
,
3558 .state
= WREPL_STATE_ACTIVE
,
3559 .node
= WREPL_NODE_B
,
3561 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3562 .ips
= addresses_B_1
,
3563 .apply_expected
= true
3568 * mhomed,active vs. group,tombstone
3569 * => should NOT be replaced
3572 .line
= __location__
,
3573 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3576 .type
= WREPL_TYPE_MHOMED
,
3577 .state
= WREPL_STATE_ACTIVE
,
3578 .node
= WREPL_NODE_B
,
3580 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3581 .ips
= addresses_B_1
,
3582 .apply_expected
= true
3586 .type
= WREPL_TYPE_GROUP
,
3587 .state
= WREPL_STATE_TOMBSTONE
,
3588 .node
= WREPL_NODE_B
,
3590 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3591 .ips
= addresses_B_1
,
3592 .apply_expected
= false
3597 * mhomed,released vs. group,active
3598 * => should be replaced
3601 .line
= __location__
,
3602 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3605 .type
= WREPL_TYPE_MHOMED
,
3606 .state
= WREPL_STATE_RELEASED
,
3607 .node
= WREPL_NODE_B
,
3609 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3610 .ips
= addresses_B_1
,
3611 .apply_expected
= false
3615 .type
= WREPL_TYPE_GROUP
,
3616 .state
= WREPL_STATE_ACTIVE
,
3617 .node
= WREPL_NODE_B
,
3619 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3620 .ips
= addresses_A_1
,
3621 .apply_expected
= true
3626 * mhomed,released vs. group,tombstone
3627 * => should be replaced
3630 .line
= __location__
,
3631 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3634 .type
= WREPL_TYPE_MHOMED
,
3635 .state
= WREPL_STATE_RELEASED
,
3636 .node
= WREPL_NODE_B
,
3638 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3639 .ips
= addresses_A_1
,
3640 .apply_expected
= false
3644 .type
= WREPL_TYPE_GROUP
,
3645 .state
= WREPL_STATE_TOMBSTONE
,
3646 .node
= WREPL_NODE_B
,
3648 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3649 .ips
= addresses_B_1
,
3650 .apply_expected
= true
3655 * mhomed,tombstone vs. group,active
3656 * => should be replaced
3659 .line
= __location__
,
3660 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3663 .type
= WREPL_TYPE_MHOMED
,
3664 .state
= WREPL_STATE_TOMBSTONE
,
3665 .node
= WREPL_NODE_B
,
3667 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3668 .ips
= addresses_B_1
,
3669 .apply_expected
= true
3673 .type
= WREPL_TYPE_GROUP
,
3674 .state
= WREPL_STATE_ACTIVE
,
3675 .node
= WREPL_NODE_B
,
3677 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3678 .ips
= addresses_A_1
,
3679 .apply_expected
= true
3684 * mhomed,tombstone vs. group,tombstone
3685 * => should be replaced
3688 .line
= __location__
,
3689 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3692 .type
= WREPL_TYPE_MHOMED
,
3693 .state
= WREPL_STATE_TOMBSTONE
,
3694 .node
= WREPL_NODE_B
,
3696 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3697 .ips
= addresses_A_1
,
3698 .apply_expected
= true
3702 .type
= WREPL_TYPE_GROUP
,
3703 .state
= WREPL_STATE_TOMBSTONE
,
3704 .node
= WREPL_NODE_B
,
3706 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3707 .ips
= addresses_B_1
,
3708 .apply_expected
= true
3713 * multi homed vs. special group section,
3716 * mhomed,active vs. sgroup,active
3717 * => should NOT be replaced
3720 .line
= __location__
,
3721 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3724 .type
= WREPL_TYPE_MHOMED
,
3725 .state
= WREPL_STATE_ACTIVE
,
3726 .node
= WREPL_NODE_B
,
3728 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3729 .ips
= addresses_A_1
,
3730 .apply_expected
= true
3734 .type
= WREPL_TYPE_SGROUP
,
3735 .state
= WREPL_STATE_ACTIVE
,
3736 .node
= WREPL_NODE_B
,
3738 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3739 .ips
= addresses_A_1
,
3740 .apply_expected
= false
3745 * mhomed,active vs. sgroup,tombstone
3746 * => should NOT be replaced
3749 .line
= __location__
,
3750 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3753 .type
= WREPL_TYPE_MHOMED
,
3754 .state
= WREPL_STATE_ACTIVE
,
3755 .node
= WREPL_NODE_B
,
3757 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3758 .ips
= addresses_A_1
,
3759 .apply_expected
= true
3763 .type
= WREPL_TYPE_SGROUP
,
3764 .state
= WREPL_STATE_TOMBSTONE
,
3765 .node
= WREPL_NODE_B
,
3767 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3768 .ips
= addresses_A_1
,
3769 .apply_expected
= false
3774 * mhomed,released vs. sgroup,active
3775 * => should be replaced
3778 .line
= __location__
,
3779 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3782 .type
= WREPL_TYPE_MHOMED
,
3783 .state
= WREPL_STATE_RELEASED
,
3784 .node
= WREPL_NODE_B
,
3786 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3787 .ips
= addresses_A_1
,
3788 .apply_expected
= false
3792 .type
= WREPL_TYPE_SGROUP
,
3793 .state
= WREPL_STATE_ACTIVE
,
3794 .node
= WREPL_NODE_B
,
3796 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3797 .ips
= addresses_B_1
,
3798 .apply_expected
= true
3803 * mhomed,released vs. sgroup,tombstone
3804 * => should be replaced
3807 .line
= __location__
,
3808 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3811 .type
= WREPL_TYPE_MHOMED
,
3812 .state
= WREPL_STATE_RELEASED
,
3813 .node
= WREPL_NODE_B
,
3815 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3816 .ips
= addresses_B_1
,
3817 .apply_expected
= false
3821 .type
= WREPL_TYPE_SGROUP
,
3822 .state
= WREPL_STATE_TOMBSTONE
,
3823 .node
= WREPL_NODE_B
,
3825 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3826 .ips
= addresses_A_1
,
3827 .apply_expected
= true
3832 * mhomed,tombstone vs. sgroup,active
3833 * => should be replaced
3836 .line
= __location__
,
3837 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3840 .type
= WREPL_TYPE_MHOMED
,
3841 .state
= WREPL_STATE_TOMBSTONE
,
3842 .node
= WREPL_NODE_B
,
3844 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3845 .ips
= addresses_A_1
,
3846 .apply_expected
= true
3850 .type
= WREPL_TYPE_SGROUP
,
3851 .state
= WREPL_STATE_ACTIVE
,
3852 .node
= WREPL_NODE_B
,
3854 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3855 .ips
= addresses_B_1
,
3856 .apply_expected
= true
3861 * mhomed,tombstone vs. sgroup,tombstone
3862 * => should be replaced
3865 .line
= __location__
,
3866 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3869 .type
= WREPL_TYPE_MHOMED
,
3870 .state
= WREPL_STATE_TOMBSTONE
,
3871 .node
= WREPL_NODE_B
,
3873 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3874 .ips
= addresses_B_1
,
3875 .apply_expected
= true
3879 .type
= WREPL_TYPE_SGROUP
,
3880 .state
= WREPL_STATE_TOMBSTONE
,
3881 .node
= WREPL_NODE_B
,
3883 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3884 .ips
= addresses_A_1
,
3885 .apply_expected
= true
3890 * multi homed vs. mlti homed section,
3893 * mhomed,active vs. mhomed,active
3894 * => should be replaced
3897 .line
= __location__
,
3898 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3901 .type
= WREPL_TYPE_MHOMED
,
3902 .state
= WREPL_STATE_ACTIVE
,
3903 .node
= WREPL_NODE_B
,
3905 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
3906 .ips
= addresses_A_3_4
,
3907 .apply_expected
= true
3911 .type
= WREPL_TYPE_MHOMED
,
3912 .state
= WREPL_STATE_ACTIVE
,
3913 .node
= WREPL_NODE_B
,
3915 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3916 .ips
= addresses_B_3_4
,
3917 .apply_expected
= true
3922 * mhomed,active vs. mhomed,tombstone
3923 * => should NOT be replaced
3926 .line
= __location__
,
3927 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3930 .type
= WREPL_TYPE_MHOMED
,
3931 .state
= WREPL_STATE_ACTIVE
,
3932 .node
= WREPL_NODE_B
,
3934 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3935 .ips
= addresses_B_3_4
,
3936 .apply_expected
= true
3940 .type
= WREPL_TYPE_MHOMED
,
3941 .state
= WREPL_STATE_TOMBSTONE
,
3942 .node
= WREPL_NODE_B
,
3944 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3945 .ips
= addresses_B_3_4
,
3946 .apply_expected
= false
3951 * mhomed,released vs. mhomed,active
3952 * => should be replaced
3955 .line
= __location__
,
3956 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3959 .type
= WREPL_TYPE_MHOMED
,
3960 .state
= WREPL_STATE_RELEASED
,
3961 .node
= WREPL_NODE_B
,
3963 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3964 .ips
= addresses_B_3_4
,
3965 .apply_expected
= false
3969 .type
= WREPL_TYPE_MHOMED
,
3970 .state
= WREPL_STATE_ACTIVE
,
3971 .node
= WREPL_NODE_B
,
3973 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
3974 .ips
= addresses_A_3_4
,
3975 .apply_expected
= true
3980 * mhomed,released vs. mhomed,tombstone
3981 * => should be replaced
3984 .line
= __location__
,
3985 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3988 .type
= WREPL_TYPE_MHOMED
,
3989 .state
= WREPL_STATE_RELEASED
,
3990 .node
= WREPL_NODE_B
,
3992 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
3993 .ips
= addresses_A_3_4
,
3994 .apply_expected
= false
3998 .type
= WREPL_TYPE_MHOMED
,
3999 .state
= WREPL_STATE_TOMBSTONE
,
4000 .node
= WREPL_NODE_B
,
4002 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4003 .ips
= addresses_B_3_4
,
4004 .apply_expected
= true
4009 * mhomed,tombstone vs. mhomed,active
4010 * => should be replaced
4013 .line
= __location__
,
4014 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4017 .type
= WREPL_TYPE_MHOMED
,
4018 .state
= WREPL_STATE_TOMBSTONE
,
4019 .node
= WREPL_NODE_B
,
4021 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4022 .ips
= addresses_B_3_4
,
4023 .apply_expected
= true
4027 .type
= WREPL_TYPE_MHOMED
,
4028 .state
= WREPL_STATE_ACTIVE
,
4029 .node
= WREPL_NODE_B
,
4031 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4032 .ips
= addresses_A_3_4
,
4033 .apply_expected
= true
4038 * mhomed,tombstone vs. mhomed,tombstone
4039 * => should be replaced
4042 .line
= __location__
,
4043 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4046 .type
= WREPL_TYPE_MHOMED
,
4047 .state
= WREPL_STATE_TOMBSTONE
,
4048 .node
= WREPL_NODE_B
,
4050 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4051 .ips
= addresses_A_3_4
,
4052 .apply_expected
= true
4056 .type
= WREPL_TYPE_MHOMED
,
4057 .state
= WREPL_STATE_TOMBSTONE
,
4058 .node
= WREPL_NODE_B
,
4060 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4061 .ips
= addresses_B_3_4
,
4062 .apply_expected
= true
4066 .line
= __location__
,
4067 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4071 .type
= WREPL_TYPE_UNIQUE
,
4072 .state
= WREPL_STATE_TOMBSTONE
,
4073 .node
= WREPL_NODE_B
,
4075 .num_ips
= ARRAY_SIZE(addresses_B_1
),
4076 .ips
= addresses_B_1
,
4077 .apply_expected
= true,
4081 .type
= WREPL_TYPE_UNIQUE
,
4082 .state
= WREPL_STATE_TOMBSTONE
,
4083 .node
= WREPL_NODE_B
,
4085 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4086 .ips
= addresses_A_1
,
4087 .apply_expected
= true,
4091 * special group vs special group section,
4094 * sgroup,active vs. sgroup,active same addresses
4095 * => should be NOT replaced
4098 .line
= __location__
,
4099 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4100 .comment
= "A:A_3_4 vs. B:A_3_4",
4104 .type
= WREPL_TYPE_SGROUP
,
4105 .state
= WREPL_STATE_ACTIVE
,
4106 .node
= WREPL_NODE_B
,
4108 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4109 .ips
= addresses_A_3_4
,
4110 .apply_expected
= true
4114 .type
= WREPL_TYPE_SGROUP
,
4115 .state
= WREPL_STATE_ACTIVE
,
4116 .node
= WREPL_NODE_B
,
4118 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4119 .ips
= addresses_A_3_4
,
4120 .apply_expected
= false,
4121 .sgroup_cleanup
= true
4125 * sgroup,active vs. sgroup,active same addresses
4126 * => should be NOT replaced
4129 .line
= __location__
,
4130 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4131 .comment
= "A:A_3_4 vs. B:NULL",
4135 .type
= WREPL_TYPE_SGROUP
,
4136 .state
= WREPL_STATE_ACTIVE
,
4137 .node
= WREPL_NODE_B
,
4139 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4140 .ips
= addresses_A_3_4
,
4141 .apply_expected
= true
4145 .type
= WREPL_TYPE_SGROUP
,
4146 .state
= WREPL_STATE_ACTIVE
,
4147 .node
= WREPL_NODE_B
,
4151 .apply_expected
= false,
4152 .sgroup_cleanup
= true
4156 * sgroup,active vs. sgroup,active subset addresses, special case...
4157 * => should NOT be replaced
4160 .line
= __location__
,
4161 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4162 .comment
= "A:A_3_4_X_3_4 vs. B:A_3_4",
4166 .type
= WREPL_TYPE_SGROUP
,
4167 .state
= WREPL_STATE_ACTIVE
,
4168 .node
= WREPL_NODE_B
,
4170 .num_ips
= ARRAY_SIZE(addresses_A_3_4_X_3_4
),
4171 .ips
= addresses_A_3_4_X_3_4
,
4172 .apply_expected
= true,
4176 .type
= WREPL_TYPE_SGROUP
,
4177 .state
= WREPL_STATE_ACTIVE
,
4178 .node
= WREPL_NODE_B
,
4180 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4181 .ips
= addresses_A_3_4
,
4182 .apply_expected
= false,
4186 .line
= __location__
,
4187 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4191 .type
= WREPL_TYPE_SGROUP
,
4192 .state
= WREPL_STATE_ACTIVE
,
4193 .node
= WREPL_NODE_B
,
4197 .apply_expected
= false,
4201 .type
= WREPL_TYPE_SGROUP
,
4202 .state
= WREPL_STATE_ACTIVE
,
4203 .node
= WREPL_NODE_B
,
4207 .apply_expected
= false,
4211 * sgroup,active vs. sgroup,active different addresses, but owner changed
4212 * => should be replaced
4215 .line
= __location__
,
4216 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4217 .comment
= "A:B_3_4 vs. B:A_3_4",
4221 .type
= WREPL_TYPE_SGROUP
,
4222 .state
= WREPL_STATE_ACTIVE
,
4223 .node
= WREPL_NODE_B
,
4225 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4226 .ips
= addresses_B_3_4
,
4227 .apply_expected
= true,
4231 .type
= WREPL_TYPE_SGROUP
,
4232 .state
= WREPL_STATE_ACTIVE
,
4233 .node
= WREPL_NODE_B
,
4235 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4236 .ips
= addresses_A_3_4
,
4237 .apply_expected
= true,
4238 .sgroup_cleanup
= true
4242 * sgroup,active vs. sgroup,active different addresses, but owner changed
4243 * => should be replaced
4246 .line
= __location__
,
4247 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4248 .comment
= "A:A_3_4 vs. B:A_3_4_OWNER_B",
4252 .type
= WREPL_TYPE_SGROUP
,
4253 .state
= WREPL_STATE_ACTIVE
,
4254 .node
= WREPL_NODE_B
,
4256 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4257 .ips
= addresses_A_3_4
,
4258 .apply_expected
= true,
4262 .type
= WREPL_TYPE_SGROUP
,
4263 .state
= WREPL_STATE_ACTIVE
,
4264 .node
= WREPL_NODE_B
,
4266 .num_ips
= ARRAY_SIZE(addresses_A_3_4_OWNER_B
),
4267 .ips
= addresses_A_3_4_OWNER_B
,
4268 .apply_expected
= true,
4269 .sgroup_cleanup
= true
4273 * sgroup,active vs. sgroup,active different addresses, but owner changed
4274 * => should be replaced
4277 .line
= __location__
,
4278 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4279 .comment
= "A:A_3_4_OWNER_B vs. B:A_3_4",
4283 .type
= WREPL_TYPE_SGROUP
,
4284 .state
= WREPL_STATE_ACTIVE
,
4285 .node
= WREPL_NODE_B
,
4287 .num_ips
= ARRAY_SIZE(addresses_A_3_4_OWNER_B
),
4288 .ips
= addresses_A_3_4_OWNER_B
,
4289 .apply_expected
= true,
4293 .type
= WREPL_TYPE_SGROUP
,
4294 .state
= WREPL_STATE_ACTIVE
,
4295 .node
= WREPL_NODE_B
,
4297 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4298 .ips
= addresses_A_3_4
,
4299 .apply_expected
= true,
4300 .sgroup_cleanup
= true
4304 * sgroup,active vs. sgroup,active different addresses
4305 * => should be merged
4308 .line
= __location__
,
4309 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4310 .comment
= "A:A_3_4 vs. B:B_3_4 => C:A_3_4_B_3_4",
4314 .type
= WREPL_TYPE_SGROUP
,
4315 .state
= WREPL_STATE_ACTIVE
,
4316 .node
= WREPL_NODE_B
,
4318 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4319 .ips
= addresses_A_3_4
,
4320 .apply_expected
= true,
4324 .type
= WREPL_TYPE_SGROUP
,
4325 .state
= WREPL_STATE_ACTIVE
,
4326 .node
= WREPL_NODE_B
,
4328 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4329 .ips
= addresses_B_3_4
,
4330 .sgroup_merge
= true,
4331 .sgroup_cleanup
= true,
4335 * sgroup,active vs. sgroup,active different addresses, special case...
4336 * => should be merged
4339 .line
= __location__
,
4340 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4341 .comment
= "A:B_3_4_X_3_4 vs. B:A_3_4 => B:A_3_4_X_3_4",
4345 .type
= WREPL_TYPE_SGROUP
,
4346 .state
= WREPL_STATE_ACTIVE
,
4347 .node
= WREPL_NODE_B
,
4349 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4350 .ips
= addresses_B_3_4_X_3_4
,
4351 .apply_expected
= true,
4355 .type
= WREPL_TYPE_SGROUP
,
4356 .state
= WREPL_STATE_ACTIVE
,
4357 .node
= WREPL_NODE_B
,
4359 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4360 .ips
= addresses_A_3_4
,
4361 .sgroup_merge
= true,
4362 .merge_owner
= &ctx
->b
,
4363 .sgroup_cleanup
= false
4367 .line
= __location__
,
4368 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4372 .type
= WREPL_TYPE_SGROUP
,
4373 .state
= WREPL_STATE_ACTIVE
,
4374 .node
= WREPL_NODE_B
,
4376 .num_ips
= ARRAY_SIZE(addresses_A_3_4_X_3_4_OWNER_B
),
4377 .ips
= addresses_A_3_4_X_3_4_OWNER_B
,
4378 .apply_expected
= true,
4382 .type
= WREPL_TYPE_SGROUP
,
4383 .state
= WREPL_STATE_ACTIVE
,
4384 .node
= WREPL_NODE_B
,
4388 .apply_expected
= false,
4392 * sgroup,active vs. sgroup,active different addresses, special case...
4393 * => should be merged
4396 .line
= __location__
,
4397 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4398 .comment
= "A:X_3_4 vs. B:A_3_4 => C:A_3_4_X_3_4",
4402 .type
= WREPL_TYPE_SGROUP
,
4403 .state
= WREPL_STATE_ACTIVE
,
4404 .node
= WREPL_NODE_B
,
4406 .num_ips
= ARRAY_SIZE(addresses_X_3_4
),
4407 .ips
= addresses_X_3_4
,
4408 .apply_expected
= true,
4412 .type
= WREPL_TYPE_SGROUP
,
4413 .state
= WREPL_STATE_ACTIVE
,
4414 .node
= WREPL_NODE_B
,
4416 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4417 .ips
= addresses_A_3_4
,
4418 .sgroup_merge
= true,
4419 .sgroup_cleanup
= false
4423 .line
= __location__
,
4424 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4428 .type
= WREPL_TYPE_SGROUP
,
4429 .state
= WREPL_STATE_ACTIVE
,
4430 .node
= WREPL_NODE_B
,
4434 .apply_expected
= false,
4438 .type
= WREPL_TYPE_SGROUP
,
4439 .state
= WREPL_STATE_ACTIVE
,
4440 .node
= WREPL_NODE_B
,
4444 .apply_expected
= false,
4448 * sgroup,active vs. sgroup,active different addresses, special case...
4449 * => should be merged
4452 .line
= __location__
,
4453 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4454 .comment
= "A:A_3_4_X_3_4 vs. B:A_3_4_OWNER_B => B:A_3_4_OWNER_B_X_3_4",
4458 .type
= WREPL_TYPE_SGROUP
,
4459 .state
= WREPL_STATE_ACTIVE
,
4460 .node
= WREPL_NODE_B
,
4462 .num_ips
= ARRAY_SIZE(addresses_A_3_4_X_3_4
),
4463 .ips
= addresses_A_3_4_X_3_4
,
4464 .apply_expected
= true,
4468 .type
= WREPL_TYPE_SGROUP
,
4469 .state
= WREPL_STATE_ACTIVE
,
4470 .node
= WREPL_NODE_B
,
4472 .num_ips
= ARRAY_SIZE(addresses_A_3_4_OWNER_B
),
4473 .ips
= addresses_A_3_4_OWNER_B
,
4474 .sgroup_merge
= true,
4475 .merge_owner
= &ctx
->b
,
4479 .line
= __location__
,
4480 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4484 .type
= WREPL_TYPE_SGROUP
,
4485 .state
= WREPL_STATE_ACTIVE
,
4486 .node
= WREPL_NODE_B
,
4490 .apply_expected
= false,
4494 .type
= WREPL_TYPE_SGROUP
,
4495 .state
= WREPL_STATE_ACTIVE
,
4496 .node
= WREPL_NODE_B
,
4500 .apply_expected
= false,
4504 * sgroup,active vs. sgroup,active partly different addresses, special case...
4505 * => should be merged
4508 .line
= __location__
,
4509 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4510 .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",
4514 .type
= WREPL_TYPE_SGROUP
,
4515 .state
= WREPL_STATE_ACTIVE
,
4516 .node
= WREPL_NODE_B
,
4518 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4519 .ips
= addresses_B_3_4_X_3_4
,
4520 .apply_expected
= true,
4524 .type
= WREPL_TYPE_SGROUP
,
4525 .state
= WREPL_STATE_ACTIVE
,
4526 .node
= WREPL_NODE_B
,
4528 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_1_2
),
4529 .ips
= addresses_B_3_4_X_1_2
,
4530 .sgroup_merge
= true,
4531 .sgroup_cleanup
= false
4535 .line
= __location__
,
4536 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4540 .type
= WREPL_TYPE_SGROUP
,
4541 .state
= WREPL_STATE_ACTIVE
,
4542 .node
= WREPL_NODE_B
,
4546 .apply_expected
= false,
4550 .type
= WREPL_TYPE_SGROUP
,
4551 .state
= WREPL_STATE_ACTIVE
,
4552 .node
= WREPL_NODE_B
,
4556 .apply_expected
= false,
4560 * sgroup,active vs. sgroup,active different addresses, special case...
4561 * => should be merged
4564 .line
= __location__
,
4565 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4566 .comment
= "A:A_3_4_B_3_4 vs. B:NULL => B:A_3_4",
4570 .type
= WREPL_TYPE_SGROUP
,
4571 .state
= WREPL_STATE_ACTIVE
,
4572 .node
= WREPL_NODE_B
,
4574 .num_ips
= ARRAY_SIZE(addresses_A_3_4_B_3_4
),
4575 .ips
= addresses_A_3_4_B_3_4
,
4576 .apply_expected
= true,
4580 .type
= WREPL_TYPE_SGROUP
,
4581 .state
= WREPL_STATE_ACTIVE
,
4582 .node
= WREPL_NODE_B
,
4586 .sgroup_merge
= true,
4587 .merge_owner
= &ctx
->b
,
4588 .sgroup_cleanup
= true
4592 .line
= __location__
,
4593 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4597 .type
= WREPL_TYPE_SGROUP
,
4598 .state
= WREPL_STATE_ACTIVE
,
4599 .node
= WREPL_NODE_B
,
4603 .apply_expected
= false,
4607 .type
= WREPL_TYPE_UNIQUE
,
4608 .state
= WREPL_STATE_TOMBSTONE
,
4609 .node
= WREPL_NODE_B
,
4611 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4612 .ips
= addresses_A_1
,
4613 .apply_expected
= true,
4617 * sgroup,active vs. sgroup,active different addresses, special case...
4618 * => should be merged
4621 .line
= __location__
,
4622 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4623 .comment
= "A:B_3_4_X_3_4 vs. B:NULL => B:X_3_4",
4627 .type
= WREPL_TYPE_SGROUP
,
4628 .state
= WREPL_STATE_ACTIVE
,
4629 .node
= WREPL_NODE_B
,
4631 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4632 .ips
= addresses_B_3_4_X_3_4
,
4633 .apply_expected
= true,
4637 .type
= WREPL_TYPE_SGROUP
,
4638 .state
= WREPL_STATE_ACTIVE
,
4639 .node
= WREPL_NODE_B
,
4643 .sgroup_merge
= true,
4644 .merge_owner
= &ctx
->b
,
4645 .sgroup_cleanup
= true
4649 .line
= __location__
,
4650 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4654 .type
= WREPL_TYPE_SGROUP
,
4655 .state
= WREPL_STATE_ACTIVE
,
4656 .node
= WREPL_NODE_B
,
4660 .apply_expected
= false,
4664 .type
= WREPL_TYPE_UNIQUE
,
4665 .state
= WREPL_STATE_TOMBSTONE
,
4666 .node
= WREPL_NODE_B
,
4668 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4669 .ips
= addresses_A_1
,
4670 .apply_expected
= true,
4675 * sgroup,active vs. sgroup,tombstone different no addresses, special
4676 * => should be replaced
4679 .line
= __location__
,
4680 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4681 .comment
= "A:B_3_4_X_3_4 vs. B:NULL => B:NULL",
4685 .type
= WREPL_TYPE_SGROUP
,
4686 .state
= WREPL_STATE_ACTIVE
,
4687 .node
= WREPL_NODE_B
,
4689 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4690 .ips
= addresses_B_3_4_X_3_4
,
4691 .apply_expected
= true,
4695 .type
= WREPL_TYPE_SGROUP
,
4696 .state
= WREPL_STATE_TOMBSTONE
,
4697 .node
= WREPL_NODE_B
,
4701 .apply_expected
= true,
4705 * sgroup,active vs. sgroup,tombstone different addresses
4706 * => should be replaced
4709 .line
= __location__
,
4710 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4711 .comment
= "A:B_3_4_X_3_4 vs. B:A_3_4 => B:A_3_4",
4715 .type
= WREPL_TYPE_SGROUP
,
4716 .state
= WREPL_STATE_ACTIVE
,
4717 .node
= WREPL_NODE_B
,
4719 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4720 .ips
= addresses_B_3_4_X_3_4
,
4721 .apply_expected
= true,
4725 .type
= WREPL_TYPE_SGROUP
,
4726 .state
= WREPL_STATE_TOMBSTONE
,
4727 .node
= WREPL_NODE_B
,
4729 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4730 .ips
= addresses_A_3_4
,
4731 .apply_expected
= true,
4735 * sgroup,active vs. sgroup,tombstone subset addresses
4736 * => should be replaced
4739 .line
= __location__
,
4740 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4741 .comment
= "A:B_3_4_X_3_4 vs. B:B_3_4 => B:B_3_4",
4745 .type
= WREPL_TYPE_SGROUP
,
4746 .state
= WREPL_STATE_ACTIVE
,
4747 .node
= WREPL_NODE_B
,
4749 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4750 .ips
= addresses_B_3_4_X_3_4
,
4751 .apply_expected
= true,
4755 .type
= WREPL_TYPE_SGROUP
,
4756 .state
= WREPL_STATE_TOMBSTONE
,
4757 .node
= WREPL_NODE_B
,
4759 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4760 .ips
= addresses_B_3_4
,
4761 .apply_expected
= true,
4765 * sgroup,active vs. sgroup,active same addresses
4766 * => should be replaced
4769 .line
= __location__
,
4770 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4771 .comment
= "A:B_3_4_X_3_4 vs. B:B_3_4_X_3_4 => B:B_3_4_X_3_4",
4775 .type
= WREPL_TYPE_SGROUP
,
4776 .state
= WREPL_STATE_ACTIVE
,
4777 .node
= WREPL_NODE_B
,
4779 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4780 .ips
= addresses_B_3_4_X_3_4
,
4781 .apply_expected
= true,
4785 .type
= WREPL_TYPE_SGROUP
,
4786 .state
= WREPL_STATE_TOMBSTONE
,
4787 .node
= WREPL_NODE_B
,
4789 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4790 .ips
= addresses_B_3_4_X_3_4
,
4791 .apply_expected
= true,
4796 * This should be the last record in this array,
4797 * we need to make sure the we leave a tombstoned unique entry
4801 .line
= __location__
,
4802 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4806 .type
= WREPL_TYPE_UNIQUE
,
4807 .state
= WREPL_STATE_TOMBSTONE
,
4808 .node
= WREPL_NODE_B
,
4810 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4811 .ips
= addresses_A_1
,
4812 .apply_expected
= true
4816 .type
= WREPL_TYPE_UNIQUE
,
4817 .state
= WREPL_STATE_TOMBSTONE
,
4818 .node
= WREPL_NODE_B
,
4820 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4821 .ips
= addresses_A_1
,
4822 .apply_expected
= true
4824 }}; /* do not add entries here, this should be the last record! */
4826 wins_name_r1
= &wins_name1
;
4827 wins_name_r2
= &wins_name2
;
4829 torture_comment(tctx
, "Test Replica Conflicts with different owners\n");
4831 for(i
=0; ret
&& i
< ARRAY_SIZE(records
); i
++) {
4833 if (!records
[i
].extra
&& !records
[i
].cleanup
) {
4834 /* we should test the worst cases */
4835 if (records
[i
].r2
.apply_expected
&& records
[i
].r1
.ips
==records
[i
].r2
.ips
) {
4836 torture_comment(tctx
, "(%s) Programmer error, invalid record[%u]: %s\n",
4837 __location__
, i
, records
[i
].line
);
4839 } else if (!records
[i
].r2
.apply_expected
&& records
[i
].r1
.ips
!=records
[i
].r2
.ips
) {
4840 torture_comment(tctx
, "(%s) Programmer error, invalid record[%u]: %s\n",
4841 __location__
, i
, records
[i
].line
);
4846 if (!records
[i
].cleanup
) {
4847 const char *expected
;
4850 if (records
[i
].r2
.sgroup_merge
) {
4851 expected
= "SGROUP_MERGE";
4852 } else if (records
[i
].r2
.apply_expected
) {
4853 expected
= "REPLACE";
4855 expected
= "NOT REPLACE";
4858 if (!records
[i
].r1
.ips
&& !records
[i
].r2
.ips
) {
4859 ips
= "with no ip(s)";
4860 } else if (records
[i
].r1
.ips
==records
[i
].r2
.ips
) {
4861 ips
= "with same ip(s)";
4863 ips
= "with different ip(s)";
4866 torture_comment(tctx
, "%s,%s%s vs. %s,%s%s %s => %s\n",
4867 wrepl_name_type_string(records
[i
].r1
.type
),
4868 wrepl_name_state_string(records
[i
].r1
.state
),
4869 (records
[i
].r1
.is_static
?",static":""),
4870 wrepl_name_type_string(records
[i
].r2
.type
),
4871 wrepl_name_state_string(records
[i
].r2
.state
),
4872 (records
[i
].r2
.is_static
?",static":""),
4873 (records
[i
].comment
?records
[i
].comment
:ips
),
4880 wins_name_r1
->name
= &records
[i
].name
;
4881 wins_name_r1
->flags
= WREPL_NAME_FLAGS(records
[i
].r1
.type
,
4882 records
[i
].r1
.state
,
4884 records
[i
].r1
.is_static
);
4885 wins_name_r1
->id
= ++records
[i
].r1
.owner
->max_version
;
4886 if (wins_name_r1
->flags
& 2) {
4887 wins_name_r1
->addresses
.addresses
.num_ips
= records
[i
].r1
.num_ips
;
4888 wins_name_r1
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
4891 wins_name_r1
->addresses
.ip
= records
[i
].r1
.ips
[0].ip
;
4893 wins_name_r1
->unknown
= "255.255.255.255";
4896 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r1
.owner
, wins_name_r1
);
4897 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r1
.owner
,
4898 wins_name_r1
, records
[i
].r1
.apply_expected
);
4903 wins_name_r2
->name
= &records
[i
].name
;
4904 wins_name_r2
->flags
= WREPL_NAME_FLAGS(records
[i
].r2
.type
,
4905 records
[i
].r2
.state
,
4907 records
[i
].r2
.is_static
);
4908 wins_name_r2
->id
= ++records
[i
].r2
.owner
->max_version
;
4909 if (wins_name_r2
->flags
& 2) {
4910 wins_name_r2
->addresses
.addresses
.num_ips
= records
[i
].r2
.num_ips
;
4911 wins_name_r2
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
4914 wins_name_r2
->addresses
.ip
= records
[i
].r2
.ips
[0].ip
;
4916 wins_name_r2
->unknown
= "255.255.255.255";
4919 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
);
4920 if (records
[i
].r1
.state
== WREPL_STATE_RELEASED
) {
4921 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r1
.owner
,
4922 wins_name_r1
, false);
4923 } else if (records
[i
].r2
.sgroup_merge
) {
4924 ret
&= test_wrepl_sgroup_merged(tctx
, ctx
, records
[i
].r2
.merge_owner
,
4925 records
[i
].r1
.owner
,
4926 records
[i
].r1
.num_ips
, records
[i
].r1
.ips
,
4927 records
[i
].r2
.owner
,
4928 records
[i
].r2
.num_ips
, records
[i
].r2
.ips
,
4930 } else if (records
[i
].r1
.owner
!= records
[i
].r2
.owner
) {
4932 _expected
= (records
[i
].r1
.apply_expected
&& !records
[i
].r2
.apply_expected
);
4933 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r1
.owner
,
4934 wins_name_r1
, _expected
);
4936 if (records
[i
].r2
.state
== WREPL_STATE_RELEASED
) {
4937 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r2
.owner
,
4938 wins_name_r2
, false);
4939 } else if (!records
[i
].r2
.sgroup_merge
) {
4940 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r2
.owner
,
4941 wins_name_r2
, records
[i
].r2
.apply_expected
);
4944 if (records
[i
].r2
.sgroup_cleanup
) {
4946 torture_comment(tctx
, "failed before sgroup_cleanup record[%u]: %s\n", i
, records
[i
].line
);
4950 /* clean up the SGROUP record */
4951 wins_name_r1
->name
= &records
[i
].name
;
4952 wins_name_r1
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
4954 WREPL_NODE_B
, false);
4955 wins_name_r1
->id
= ++records
[i
].r1
.owner
->max_version
;
4956 wins_name_r1
->addresses
.addresses
.num_ips
= 0;
4957 wins_name_r1
->addresses
.addresses
.ips
= NULL
;
4958 wins_name_r1
->unknown
= "255.255.255.255";
4959 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r1
.owner
, wins_name_r1
);
4961 /* here we test how names from an owner are deleted */
4962 if (records
[i
].r2
.sgroup_merge
&& records
[i
].r2
.num_ips
) {
4963 ret
&= test_wrepl_sgroup_merged(tctx
, ctx
, NULL
,
4964 records
[i
].r2
.owner
,
4965 records
[i
].r2
.num_ips
, records
[i
].r2
.ips
,
4966 records
[i
].r1
.owner
,
4971 /* clean up the SGROUP record */
4972 wins_name_r2
->name
= &records
[i
].name
;
4973 wins_name_r2
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
4975 WREPL_NODE_B
, false);
4976 wins_name_r2
->id
= ++records
[i
].r2
.owner
->max_version
;
4977 wins_name_r2
->addresses
.addresses
.num_ips
= 0;
4978 wins_name_r2
->addresses
.addresses
.ips
= NULL
;
4979 wins_name_r2
->unknown
= "255.255.255.255";
4980 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
);
4982 /* take ownership of the SGROUP record */
4983 wins_name_r2
->name
= &records
[i
].name
;
4984 wins_name_r2
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
4986 WREPL_NODE_B
, false);
4987 wins_name_r2
->id
= ++records
[i
].r2
.owner
->max_version
;
4988 wins_name_r2
->addresses
.addresses
.num_ips
= ARRAY_SIZE(addresses_B_1
);
4989 wins_name_r2
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
4991 wins_name_r2
->unknown
= "255.255.255.255";
4992 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
);
4993 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
, true);
4995 /* overwrite the SGROUP record with unique,tombstone */
4996 wins_name_r2
->name
= &records
[i
].name
;
4997 wins_name_r2
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
4998 WREPL_STATE_TOMBSTONE
,
4999 WREPL_NODE_B
, false);
5000 wins_name_r2
->id
= ++records
[i
].r2
.owner
->max_version
;
5001 wins_name_r2
->addresses
.addresses
.num_ips
= ARRAY_SIZE(addresses_B_1
);
5002 wins_name_r2
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
5004 wins_name_r2
->unknown
= "255.255.255.255";
5005 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
);
5006 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
, true);
5009 torture_comment(tctx
, "failed in sgroup_cleanup record[%u]: %s\n", i
, records
[i
].line
);
5014 /* the first one is a cleanup run */
5015 if (!ret
&& i
== 0) ret
= true;
5018 torture_comment(tctx
, "conflict handled wrong or record[%u]: %s\n", i
, records
[i
].line
);
5026 static bool test_conflict_owned_released_vs_replica(struct torture_context
*tctx
,
5027 struct test_wrepl_conflict_conn
*ctx
)
5031 struct wrepl_wins_name wins_name_
;
5032 struct wrepl_wins_name
*wins_name
= &wins_name_
;
5033 struct nbt_name_register name_register_
;
5034 struct nbt_name_register
*name_register
= &name_register_
;
5035 struct nbt_name_release release_
;
5036 struct nbt_name_release
*release
= &release_
;
5039 const char *line
; /* just better debugging */
5040 struct nbt_name name
;
5045 const struct wrepl_ip
*ips
;
5046 bool apply_expected
;
5049 enum wrepl_name_type type
;
5050 enum wrepl_name_state state
;
5051 enum wrepl_name_node node
;
5054 const struct wrepl_ip
*ips
;
5055 bool apply_expected
;
5059 * unique vs. unique section
5062 * unique,released vs. unique,active with same ip(s)
5065 .line
= __location__
,
5066 .name
= _NBT_NAME("_UR_UA_SI", 0x00, NULL
),
5070 .num_ips
= ctx
->addresses_best_num
,
5071 .ips
= ctx
->addresses_best
,
5072 .apply_expected
= true
5075 .type
= WREPL_TYPE_UNIQUE
,
5076 .state
= WREPL_STATE_ACTIVE
,
5077 .node
= WREPL_NODE_B
,
5079 .num_ips
= ctx
->addresses_best_num
,
5080 .ips
= ctx
->addresses_best
,
5081 .apply_expected
= true
5085 * unique,released vs. unique,active with different ip(s)
5088 .line
= __location__
,
5089 .name
= _NBT_NAME("_UR_UA_DI", 0x00, NULL
),
5093 .num_ips
= ctx
->addresses_best_num
,
5094 .ips
= ctx
->addresses_best
,
5095 .apply_expected
= true
5098 .type
= WREPL_TYPE_UNIQUE
,
5099 .state
= WREPL_STATE_ACTIVE
,
5100 .node
= WREPL_NODE_B
,
5102 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5103 .ips
= addresses_B_1
,
5104 .apply_expected
= true
5108 * unique,released vs. unique,tombstone with same ip(s)
5111 .line
= __location__
,
5112 .name
= _NBT_NAME("_UR_UT_SI", 0x00, NULL
),
5116 .num_ips
= ctx
->addresses_best_num
,
5117 .ips
= ctx
->addresses_best
,
5118 .apply_expected
= true
5121 .type
= WREPL_TYPE_UNIQUE
,
5122 .state
= WREPL_STATE_TOMBSTONE
,
5123 .node
= WREPL_NODE_B
,
5125 .num_ips
= ctx
->addresses_best_num
,
5126 .ips
= ctx
->addresses_best
,
5127 .apply_expected
= true
5131 * unique,released vs. unique,tombstone with different ip(s)
5134 .line
= __location__
,
5135 .name
= _NBT_NAME("_UR_UT_DI", 0x00, NULL
),
5139 .num_ips
= ctx
->addresses_best_num
,
5140 .ips
= ctx
->addresses_best
,
5141 .apply_expected
= true
5144 .type
= WREPL_TYPE_UNIQUE
,
5145 .state
= WREPL_STATE_TOMBSTONE
,
5146 .node
= WREPL_NODE_B
,
5148 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5149 .ips
= addresses_B_1
,
5150 .apply_expected
= true
5154 * unique vs. group section
5157 * unique,released vs. group,active with same ip(s)
5160 .line
= __location__
,
5161 .name
= _NBT_NAME("_UR_GA_SI", 0x00, NULL
),
5165 .num_ips
= ctx
->addresses_best_num
,
5166 .ips
= ctx
->addresses_best
,
5167 .apply_expected
= true
5170 .type
= WREPL_TYPE_GROUP
,
5171 .state
= WREPL_STATE_ACTIVE
,
5172 .node
= WREPL_NODE_B
,
5174 .num_ips
= ctx
->addresses_best_num
,
5175 .ips
= ctx
->addresses_best
,
5176 .apply_expected
= true
5180 * unique,released vs. group,active with different ip(s)
5183 .line
= __location__
,
5184 .name
= _NBT_NAME("_UR_GA_DI", 0x00, NULL
),
5188 .num_ips
= ctx
->addresses_best_num
,
5189 .ips
= ctx
->addresses_best
,
5190 .apply_expected
= true
5193 .type
= WREPL_TYPE_GROUP
,
5194 .state
= WREPL_STATE_ACTIVE
,
5195 .node
= WREPL_NODE_B
,
5197 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5198 .ips
= addresses_B_1
,
5199 .apply_expected
= true
5203 * unique,released vs. group,tombstone with same ip(s)
5206 .line
= __location__
,
5207 .name
= _NBT_NAME("_UR_GT_SI", 0x00, NULL
),
5211 .num_ips
= ctx
->addresses_best_num
,
5212 .ips
= ctx
->addresses_best
,
5213 .apply_expected
= true
5216 .type
= WREPL_TYPE_GROUP
,
5217 .state
= WREPL_STATE_TOMBSTONE
,
5218 .node
= WREPL_NODE_B
,
5220 .num_ips
= ctx
->addresses_best_num
,
5221 .ips
= ctx
->addresses_best
,
5222 .apply_expected
= true
5226 * unique,released vs. group,tombstone with different ip(s)
5229 .line
= __location__
,
5230 .name
= _NBT_NAME("_UR_GT_DI", 0x00, NULL
),
5234 .num_ips
= ctx
->addresses_best_num
,
5235 .ips
= ctx
->addresses_best
,
5236 .apply_expected
= true
5239 .type
= WREPL_TYPE_GROUP
,
5240 .state
= WREPL_STATE_TOMBSTONE
,
5241 .node
= WREPL_NODE_B
,
5243 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5244 .ips
= addresses_B_1
,
5245 .apply_expected
= true
5249 * unique vs. special group section
5252 * unique,released vs. sgroup,active with same ip(s)
5255 .line
= __location__
,
5256 .name
= _NBT_NAME("_UR_SA_SI", 0x00, NULL
),
5260 .num_ips
= ctx
->addresses_best_num
,
5261 .ips
= ctx
->addresses_best
,
5262 .apply_expected
= true
5265 .type
= WREPL_TYPE_SGROUP
,
5266 .state
= WREPL_STATE_ACTIVE
,
5267 .node
= WREPL_NODE_B
,
5269 .num_ips
= ctx
->addresses_best_num
,
5270 .ips
= ctx
->addresses_best
,
5271 .apply_expected
= true
5275 * unique,released vs. sgroup,active with different ip(s)
5278 .line
= __location__
,
5279 .name
= _NBT_NAME("_UR_SA_DI", 0x00, NULL
),
5283 .num_ips
= ctx
->addresses_best_num
,
5284 .ips
= ctx
->addresses_best
,
5285 .apply_expected
= true
5288 .type
= WREPL_TYPE_SGROUP
,
5289 .state
= WREPL_STATE_ACTIVE
,
5290 .node
= WREPL_NODE_B
,
5292 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5293 .ips
= addresses_B_1
,
5294 .apply_expected
= true
5298 * unique,released vs. sgroup,tombstone with same ip(s)
5301 .line
= __location__
,
5302 .name
= _NBT_NAME("_UR_ST_SI", 0x00, NULL
),
5306 .num_ips
= ctx
->addresses_best_num
,
5307 .ips
= ctx
->addresses_best
,
5308 .apply_expected
= true
5311 .type
= WREPL_TYPE_SGROUP
,
5312 .state
= WREPL_STATE_TOMBSTONE
,
5313 .node
= WREPL_NODE_B
,
5315 .num_ips
= ctx
->addresses_best_num
,
5316 .ips
= ctx
->addresses_best
,
5317 .apply_expected
= true
5321 * unique,released vs. sgroup,tombstone with different ip(s)
5324 .line
= __location__
,
5325 .name
= _NBT_NAME("_UR_ST_DI", 0x00, NULL
),
5329 .num_ips
= ctx
->addresses_best_num
,
5330 .ips
= ctx
->addresses_best
,
5331 .apply_expected
= true
5334 .type
= WREPL_TYPE_SGROUP
,
5335 .state
= WREPL_STATE_TOMBSTONE
,
5336 .node
= WREPL_NODE_B
,
5338 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5339 .ips
= addresses_B_1
,
5340 .apply_expected
= true
5344 * unique vs. multi homed section
5347 * unique,released vs. mhomed,active with same ip(s)
5350 .line
= __location__
,
5351 .name
= _NBT_NAME("_UR_MA_SI", 0x00, NULL
),
5355 .num_ips
= ctx
->addresses_best_num
,
5356 .ips
= ctx
->addresses_best
,
5357 .apply_expected
= true
5360 .type
= WREPL_TYPE_MHOMED
,
5361 .state
= WREPL_STATE_ACTIVE
,
5362 .node
= WREPL_NODE_B
,
5364 .num_ips
= ctx
->addresses_best_num
,
5365 .ips
= ctx
->addresses_best
,
5366 .apply_expected
= true
5370 * unique,released vs. mhomed,active with different ip(s)
5373 .line
= __location__
,
5374 .name
= _NBT_NAME("_UR_MA_DI", 0x00, NULL
),
5378 .num_ips
= ctx
->addresses_best_num
,
5379 .ips
= ctx
->addresses_best
,
5380 .apply_expected
= true
5383 .type
= WREPL_TYPE_MHOMED
,
5384 .state
= WREPL_STATE_ACTIVE
,
5385 .node
= WREPL_NODE_B
,
5387 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5388 .ips
= addresses_B_1
,
5389 .apply_expected
= true
5393 * unique,released vs. mhomed,tombstone with same ip(s)
5396 .line
= __location__
,
5397 .name
= _NBT_NAME("_UR_MT_SI", 0x00, NULL
),
5401 .num_ips
= ctx
->addresses_best_num
,
5402 .ips
= ctx
->addresses_best
,
5403 .apply_expected
= true
5406 .type
= WREPL_TYPE_MHOMED
,
5407 .state
= WREPL_STATE_TOMBSTONE
,
5408 .node
= WREPL_NODE_B
,
5410 .num_ips
= ctx
->addresses_best_num
,
5411 .ips
= ctx
->addresses_best
,
5412 .apply_expected
= true
5416 * unique,released vs. mhomed,tombstone with different ip(s)
5419 .line
= __location__
,
5420 .name
= _NBT_NAME("_UR_MT_DI", 0x00, NULL
),
5424 .num_ips
= ctx
->addresses_best_num
,
5425 .ips
= ctx
->addresses_best
,
5426 .apply_expected
= true
5429 .type
= WREPL_TYPE_MHOMED
,
5430 .state
= WREPL_STATE_TOMBSTONE
,
5431 .node
= WREPL_NODE_B
,
5433 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5434 .ips
= addresses_B_1
,
5435 .apply_expected
= true
5439 * group vs. unique section
5442 * group,released vs. unique,active with same ip(s)
5445 .line
= __location__
,
5446 .name
= _NBT_NAME("_GR_UA_SI", 0x00, NULL
),
5448 .nb_flags
= NBT_NM_GROUP
,
5450 .num_ips
= ctx
->addresses_best_num
,
5451 .ips
= ctx
->addresses_best
,
5452 .apply_expected
= true
5455 .type
= WREPL_TYPE_UNIQUE
,
5456 .state
= WREPL_STATE_ACTIVE
,
5457 .node
= WREPL_NODE_B
,
5459 .num_ips
= ctx
->addresses_best_num
,
5460 .ips
= ctx
->addresses_best
,
5461 .apply_expected
= false
5465 * group,released vs. unique,active with different ip(s)
5468 .line
= __location__
,
5469 .name
= _NBT_NAME("_GR_UA_DI", 0x00, NULL
),
5471 .nb_flags
= NBT_NM_GROUP
,
5473 .num_ips
= ctx
->addresses_best_num
,
5474 .ips
= ctx
->addresses_best
,
5475 .apply_expected
= true
5478 .type
= WREPL_TYPE_UNIQUE
,
5479 .state
= WREPL_STATE_ACTIVE
,
5480 .node
= WREPL_NODE_B
,
5482 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5483 .ips
= addresses_B_1
,
5484 .apply_expected
= false
5488 * group,released vs. unique,tombstone with same ip(s)
5491 .line
= __location__
,
5492 .name
= _NBT_NAME("_GR_UT_SI", 0x00, NULL
),
5494 .nb_flags
= NBT_NM_GROUP
,
5496 .num_ips
= ctx
->addresses_best_num
,
5497 .ips
= ctx
->addresses_best
,
5498 .apply_expected
= true
5501 .type
= WREPL_TYPE_UNIQUE
,
5502 .state
= WREPL_STATE_TOMBSTONE
,
5503 .node
= WREPL_NODE_B
,
5505 .num_ips
= ctx
->addresses_best_num
,
5506 .ips
= ctx
->addresses_best
,
5507 .apply_expected
= false
5511 * group,released vs. unique,tombstone with different ip(s)
5514 .line
= __location__
,
5515 .name
= _NBT_NAME("_GR_UT_DI", 0x00, NULL
),
5517 .nb_flags
= NBT_NM_GROUP
,
5519 .num_ips
= ctx
->addresses_best_num
,
5520 .ips
= ctx
->addresses_best
,
5521 .apply_expected
= true
5524 .type
= WREPL_TYPE_UNIQUE
,
5525 .state
= WREPL_STATE_TOMBSTONE
,
5526 .node
= WREPL_NODE_B
,
5528 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5529 .ips
= addresses_B_1
,
5530 .apply_expected
= false
5534 * group vs. group section
5537 * group,released vs. group,active with same ip(s)
5540 .line
= __location__
,
5541 .name
= _NBT_NAME("_GR_GA_SI", 0x00, NULL
),
5543 .nb_flags
= NBT_NM_GROUP
,
5545 .num_ips
= ctx
->addresses_best_num
,
5546 .ips
= ctx
->addresses_best
,
5547 .apply_expected
= true
5550 .type
= WREPL_TYPE_GROUP
,
5551 .state
= WREPL_STATE_ACTIVE
,
5552 .node
= WREPL_NODE_B
,
5554 .num_ips
= ctx
->addresses_best_num
,
5555 .ips
= ctx
->addresses_best
,
5556 .apply_expected
= true
5560 * group,released vs. group,active with different ip(s)
5563 .line
= __location__
,
5564 .name
= _NBT_NAME("_GR_GA_DI", 0x00, NULL
),
5566 .nb_flags
= NBT_NM_GROUP
,
5568 .num_ips
= ctx
->addresses_best_num
,
5569 .ips
= ctx
->addresses_best
,
5570 .apply_expected
= true
5573 .type
= WREPL_TYPE_GROUP
,
5574 .state
= WREPL_STATE_ACTIVE
,
5575 .node
= WREPL_NODE_B
,
5577 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5578 .ips
= addresses_B_1
,
5579 .apply_expected
= true
5583 * group,released vs. group,tombstone with same ip(s)
5586 .line
= __location__
,
5587 .name
= _NBT_NAME("_GR_GT_SI", 0x00, NULL
),
5589 .nb_flags
= NBT_NM_GROUP
,
5591 .num_ips
= ctx
->addresses_best_num
,
5592 .ips
= ctx
->addresses_best
,
5593 .apply_expected
= true
5596 .type
= WREPL_TYPE_GROUP
,
5597 .state
= WREPL_STATE_TOMBSTONE
,
5598 .node
= WREPL_NODE_B
,
5600 .num_ips
= ctx
->addresses_best_num
,
5601 .ips
= ctx
->addresses_best
,
5602 .apply_expected
= true
5606 * group,released vs. group,tombstone with different ip(s)
5609 .line
= __location__
,
5610 .name
= _NBT_NAME("_GR_GT_DI", 0x00, NULL
),
5612 .nb_flags
= NBT_NM_GROUP
,
5614 .num_ips
= ctx
->addresses_best_num
,
5615 .ips
= ctx
->addresses_best
,
5616 .apply_expected
= true
5619 .type
= WREPL_TYPE_GROUP
,
5620 .state
= WREPL_STATE_TOMBSTONE
,
5621 .node
= WREPL_NODE_B
,
5623 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5624 .ips
= addresses_B_1
,
5625 .apply_expected
= true
5629 * group vs. special group section
5632 * group,released vs. sgroup,active with same ip(s)
5635 .line
= __location__
,
5636 .name
= _NBT_NAME("_GR_SA_SI", 0x00, NULL
),
5638 .nb_flags
= NBT_NM_GROUP
,
5640 .num_ips
= ctx
->addresses_best_num
,
5641 .ips
= ctx
->addresses_best
,
5642 .apply_expected
= true
5645 .type
= WREPL_TYPE_SGROUP
,
5646 .state
= WREPL_STATE_ACTIVE
,
5647 .node
= WREPL_NODE_B
,
5649 .num_ips
= ctx
->addresses_best_num
,
5650 .ips
= ctx
->addresses_best
,
5651 .apply_expected
= false
5655 * group,released vs. sgroup,active with different ip(s)
5658 .line
= __location__
,
5659 .name
= _NBT_NAME("_GR_SA_DI", 0x00, NULL
),
5661 .nb_flags
= NBT_NM_GROUP
,
5663 .num_ips
= ctx
->addresses_best_num
,
5664 .ips
= ctx
->addresses_best
,
5665 .apply_expected
= true
5668 .type
= WREPL_TYPE_SGROUP
,
5669 .state
= WREPL_STATE_ACTIVE
,
5670 .node
= WREPL_NODE_B
,
5672 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5673 .ips
= addresses_B_1
,
5674 .apply_expected
= false
5678 * group,released vs. sgroup,tombstone with same ip(s)
5681 .line
= __location__
,
5682 .name
= _NBT_NAME("_GR_ST_SI", 0x00, NULL
),
5684 .nb_flags
= NBT_NM_GROUP
,
5686 .num_ips
= ctx
->addresses_best_num
,
5687 .ips
= ctx
->addresses_best
,
5688 .apply_expected
= true
5691 .type
= WREPL_TYPE_SGROUP
,
5692 .state
= WREPL_STATE_TOMBSTONE
,
5693 .node
= WREPL_NODE_B
,
5695 .num_ips
= ctx
->addresses_best_num
,
5696 .ips
= ctx
->addresses_best
,
5697 .apply_expected
= false
5701 * group,released vs. sgroup,tombstone with different ip(s)
5704 .line
= __location__
,
5705 .name
= _NBT_NAME("_GR_ST_DI", 0x00, NULL
),
5707 .nb_flags
= NBT_NM_GROUP
,
5709 .num_ips
= ctx
->addresses_best_num
,
5710 .ips
= ctx
->addresses_best
,
5711 .apply_expected
= true
5714 .type
= WREPL_TYPE_SGROUP
,
5715 .state
= WREPL_STATE_TOMBSTONE
,
5716 .node
= WREPL_NODE_B
,
5718 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5719 .ips
= addresses_B_1
,
5720 .apply_expected
= false
5724 * group vs. multi homed section
5727 * group,released vs. mhomed,active with same ip(s)
5730 .line
= __location__
,
5731 .name
= _NBT_NAME("_GR_MA_SI", 0x00, NULL
),
5733 .nb_flags
= NBT_NM_GROUP
,
5735 .num_ips
= ctx
->addresses_best_num
,
5736 .ips
= ctx
->addresses_best
,
5737 .apply_expected
= true
5740 .type
= WREPL_TYPE_MHOMED
,
5741 .state
= WREPL_STATE_ACTIVE
,
5742 .node
= WREPL_NODE_B
,
5744 .num_ips
= ctx
->addresses_best_num
,
5745 .ips
= ctx
->addresses_best
,
5746 .apply_expected
= false
5750 * group,released vs. mhomed,active with different ip(s)
5753 .line
= __location__
,
5754 .name
= _NBT_NAME("_GR_MA_DI", 0x00, NULL
),
5756 .nb_flags
= NBT_NM_GROUP
,
5758 .num_ips
= ctx
->addresses_best_num
,
5759 .ips
= ctx
->addresses_best
,
5760 .apply_expected
= true
5763 .type
= WREPL_TYPE_MHOMED
,
5764 .state
= WREPL_STATE_ACTIVE
,
5765 .node
= WREPL_NODE_B
,
5767 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5768 .ips
= addresses_B_1
,
5769 .apply_expected
= false
5773 * group,released vs. mhomed,tombstone with same ip(s)
5776 .line
= __location__
,
5777 .name
= _NBT_NAME("_GR_MT_SI", 0x00, NULL
),
5779 .nb_flags
= NBT_NM_GROUP
,
5781 .num_ips
= ctx
->addresses_best_num
,
5782 .ips
= ctx
->addresses_best
,
5783 .apply_expected
= true
5786 .type
= WREPL_TYPE_MHOMED
,
5787 .state
= WREPL_STATE_TOMBSTONE
,
5788 .node
= WREPL_NODE_B
,
5790 .num_ips
= ctx
->addresses_best_num
,
5791 .ips
= ctx
->addresses_best
,
5792 .apply_expected
= false
5796 * group,released vs. mhomed,tombstone with different ip(s)
5799 .line
= __location__
,
5800 .name
= _NBT_NAME("_GR_MT_DI", 0x00, NULL
),
5802 .nb_flags
= NBT_NM_GROUP
,
5804 .num_ips
= ctx
->addresses_best_num
,
5805 .ips
= ctx
->addresses_best
,
5806 .apply_expected
= true
5809 .type
= WREPL_TYPE_MHOMED
,
5810 .state
= WREPL_STATE_TOMBSTONE
,
5811 .node
= WREPL_NODE_B
,
5813 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5814 .ips
= addresses_B_1
,
5815 .apply_expected
= false
5819 * special group vs. unique section
5822 * sgroup,released vs. unique,active with same ip(s)
5825 .line
= __location__
,
5826 .name
= _NBT_NAME("_SR_UA_SI", 0x1C, NULL
),
5828 .nb_flags
= NBT_NM_GROUP
,
5830 .num_ips
= ctx
->addresses_best_num
,
5831 .ips
= ctx
->addresses_best
,
5832 .apply_expected
= true
5835 .type
= WREPL_TYPE_UNIQUE
,
5836 .state
= WREPL_STATE_ACTIVE
,
5837 .node
= WREPL_NODE_B
,
5839 .num_ips
= ctx
->addresses_best_num
,
5840 .ips
= ctx
->addresses_best
,
5841 .apply_expected
= true
5845 * sgroup,released vs. unique,active with different ip(s)
5848 .line
= __location__
,
5849 .name
= _NBT_NAME("_SR_UA_DI", 0x1C, NULL
),
5851 .nb_flags
= NBT_NM_GROUP
,
5853 .num_ips
= ctx
->addresses_best_num
,
5854 .ips
= ctx
->addresses_best
,
5855 .apply_expected
= true
5858 .type
= WREPL_TYPE_UNIQUE
,
5859 .state
= WREPL_STATE_ACTIVE
,
5860 .node
= WREPL_NODE_B
,
5862 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5863 .ips
= addresses_B_1
,
5864 .apply_expected
= true
5868 * sgroup,released vs. unique,tombstone with same ip(s)
5871 .line
= __location__
,
5872 .name
= _NBT_NAME("_SR_UT_SI", 0x1C, NULL
),
5874 .nb_flags
= NBT_NM_GROUP
,
5876 .num_ips
= ctx
->addresses_best_num
,
5877 .ips
= ctx
->addresses_best
,
5878 .apply_expected
= true
5881 .type
= WREPL_TYPE_UNIQUE
,
5882 .state
= WREPL_STATE_TOMBSTONE
,
5883 .node
= WREPL_NODE_B
,
5885 .num_ips
= ctx
->addresses_best_num
,
5886 .ips
= ctx
->addresses_best
,
5887 .apply_expected
= true
5891 * sgroup,released vs. unique,tombstone with different ip(s)
5894 .line
= __location__
,
5895 .name
= _NBT_NAME("_SR_UT_DI", 0x1C, NULL
),
5897 .nb_flags
= NBT_NM_GROUP
,
5899 .num_ips
= ctx
->addresses_best_num
,
5900 .ips
= ctx
->addresses_best
,
5901 .apply_expected
= true
5904 .type
= WREPL_TYPE_UNIQUE
,
5905 .state
= WREPL_STATE_TOMBSTONE
,
5906 .node
= WREPL_NODE_B
,
5908 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5909 .ips
= addresses_B_1
,
5910 .apply_expected
= true
5914 * special group vs. group section
5917 * sgroup,released vs. group,active with same ip(s)
5920 .line
= __location__
,
5921 .name
= _NBT_NAME("_SR_GA_SI", 0x1C, NULL
),
5923 .nb_flags
= NBT_NM_GROUP
,
5925 .num_ips
= ctx
->addresses_best_num
,
5926 .ips
= ctx
->addresses_best
,
5927 .apply_expected
= true
5930 .type
= WREPL_TYPE_GROUP
,
5931 .state
= WREPL_STATE_ACTIVE
,
5932 .node
= WREPL_NODE_B
,
5934 .num_ips
= ctx
->addresses_best_num
,
5935 .ips
= ctx
->addresses_best
,
5936 .apply_expected
= true
5940 * sgroup,released vs. group,active with different ip(s)
5943 .line
= __location__
,
5944 .name
= _NBT_NAME("_SR_GA_DI", 0x1C, NULL
),
5946 .nb_flags
= NBT_NM_GROUP
,
5948 .num_ips
= ctx
->addresses_best_num
,
5949 .ips
= ctx
->addresses_best
,
5950 .apply_expected
= true
5953 .type
= WREPL_TYPE_GROUP
,
5954 .state
= WREPL_STATE_ACTIVE
,
5955 .node
= WREPL_NODE_B
,
5957 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5958 .ips
= addresses_B_1
,
5959 .apply_expected
= true
5963 * sgroup,released vs. group,tombstone with same ip(s)
5966 .line
= __location__
,
5967 .name
= _NBT_NAME("_SR_GT_SI", 0x1C, NULL
),
5969 .nb_flags
= NBT_NM_GROUP
,
5971 .num_ips
= ctx
->addresses_best_num
,
5972 .ips
= ctx
->addresses_best
,
5973 .apply_expected
= true
5976 .type
= WREPL_TYPE_GROUP
,
5977 .state
= WREPL_STATE_TOMBSTONE
,
5978 .node
= WREPL_NODE_B
,
5980 .num_ips
= ctx
->addresses_best_num
,
5981 .ips
= ctx
->addresses_best
,
5982 .apply_expected
= true
5986 * sgroup,released vs. group,tombstone with different ip(s)
5989 .line
= __location__
,
5990 .name
= _NBT_NAME("_SR_GT_DI", 0x1C, NULL
),
5992 .nb_flags
= NBT_NM_GROUP
,
5994 .num_ips
= ctx
->addresses_best_num
,
5995 .ips
= ctx
->addresses_best
,
5996 .apply_expected
= true
5999 .type
= WREPL_TYPE_GROUP
,
6000 .state
= WREPL_STATE_TOMBSTONE
,
6001 .node
= WREPL_NODE_B
,
6003 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6004 .ips
= addresses_B_1
,
6005 .apply_expected
= true
6009 * special group vs. special group section
6012 * sgroup,released vs. sgroup,active with same ip(s)
6015 .line
= __location__
,
6016 .name
= _NBT_NAME("_SR_SA_SI", 0x1C, NULL
),
6018 .nb_flags
= NBT_NM_GROUP
,
6020 .num_ips
= ctx
->addresses_best_num
,
6021 .ips
= ctx
->addresses_best
,
6022 .apply_expected
= true
6025 .type
= WREPL_TYPE_SGROUP
,
6026 .state
= WREPL_STATE_ACTIVE
,
6027 .node
= WREPL_NODE_B
,
6029 .num_ips
= ctx
->addresses_best_num
,
6030 .ips
= ctx
->addresses_best
,
6031 .apply_expected
= true
6035 * sgroup,released vs. sgroup,active with different ip(s)
6038 .line
= __location__
,
6039 .name
= _NBT_NAME("_SR_SA_DI", 0x1C, NULL
),
6041 .nb_flags
= NBT_NM_GROUP
,
6043 .num_ips
= ctx
->addresses_best_num
,
6044 .ips
= ctx
->addresses_best
,
6045 .apply_expected
= true
6048 .type
= WREPL_TYPE_SGROUP
,
6049 .state
= WREPL_STATE_ACTIVE
,
6050 .node
= WREPL_NODE_B
,
6052 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6053 .ips
= addresses_B_1
,
6054 .apply_expected
= true
6058 * sgroup,released vs. sgroup,tombstone with same ip(s)
6061 .line
= __location__
,
6062 .name
= _NBT_NAME("_SR_ST_SI", 0x1C, NULL
),
6064 .nb_flags
= NBT_NM_GROUP
,
6066 .num_ips
= ctx
->addresses_best_num
,
6067 .ips
= ctx
->addresses_best
,
6068 .apply_expected
= true
6071 .type
= WREPL_TYPE_SGROUP
,
6072 .state
= WREPL_STATE_TOMBSTONE
,
6073 .node
= WREPL_NODE_B
,
6075 .num_ips
= ctx
->addresses_best_num
,
6076 .ips
= ctx
->addresses_best
,
6077 .apply_expected
= true
6081 * sgroup,released vs. sgroup,tombstone with different ip(s)
6084 .line
= __location__
,
6085 .name
= _NBT_NAME("_SR_ST_DI", 0x1C, NULL
),
6087 .nb_flags
= NBT_NM_GROUP
,
6089 .num_ips
= ctx
->addresses_best_num
,
6090 .ips
= ctx
->addresses_best
,
6091 .apply_expected
= true
6094 .type
= WREPL_TYPE_SGROUP
,
6095 .state
= WREPL_STATE_TOMBSTONE
,
6096 .node
= WREPL_NODE_B
,
6098 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6099 .ips
= addresses_B_1
,
6100 .apply_expected
= true
6104 * special group vs. multi homed section
6107 * sgroup,released vs. mhomed,active with same ip(s)
6110 .line
= __location__
,
6111 .name
= _NBT_NAME("_SR_MA_SI", 0x1C, NULL
),
6113 .nb_flags
= NBT_NM_GROUP
,
6115 .num_ips
= ctx
->addresses_best_num
,
6116 .ips
= ctx
->addresses_best
,
6117 .apply_expected
= true
6120 .type
= WREPL_TYPE_MHOMED
,
6121 .state
= WREPL_STATE_ACTIVE
,
6122 .node
= WREPL_NODE_B
,
6124 .num_ips
= ctx
->addresses_best_num
,
6125 .ips
= ctx
->addresses_best
,
6126 .apply_expected
= true
6130 * sgroup,released vs. mhomed,active with different ip(s)
6133 .line
= __location__
,
6134 .name
= _NBT_NAME("_SR_MA_DI", 0x1C, NULL
),
6136 .nb_flags
= NBT_NM_GROUP
,
6138 .num_ips
= ctx
->addresses_best_num
,
6139 .ips
= ctx
->addresses_best
,
6140 .apply_expected
= true
6143 .type
= WREPL_TYPE_MHOMED
,
6144 .state
= WREPL_STATE_ACTIVE
,
6145 .node
= WREPL_NODE_B
,
6147 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6148 .ips
= addresses_B_1
,
6149 .apply_expected
= true
6153 * sgroup,released vs. mhomed,tombstone with same ip(s)
6156 .line
= __location__
,
6157 .name
= _NBT_NAME("_SR_MT_SI", 0x1C, NULL
),
6159 .nb_flags
= NBT_NM_GROUP
,
6161 .num_ips
= ctx
->addresses_best_num
,
6162 .ips
= ctx
->addresses_best
,
6163 .apply_expected
= true
6166 .type
= WREPL_TYPE_MHOMED
,
6167 .state
= WREPL_STATE_TOMBSTONE
,
6168 .node
= WREPL_NODE_B
,
6170 .num_ips
= ctx
->addresses_best_num
,
6171 .ips
= ctx
->addresses_best
,
6172 .apply_expected
= true
6176 * sgroup,released vs. mhomed,tombstone with different ip(s)
6179 .line
= __location__
,
6180 .name
= _NBT_NAME("_SR_MT_DI", 0x1C, NULL
),
6182 .nb_flags
= NBT_NM_GROUP
,
6184 .num_ips
= ctx
->addresses_best_num
,
6185 .ips
= ctx
->addresses_best
,
6186 .apply_expected
= true
6189 .type
= WREPL_TYPE_MHOMED
,
6190 .state
= WREPL_STATE_TOMBSTONE
,
6191 .node
= WREPL_NODE_B
,
6193 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6194 .ips
= addresses_B_1
,
6195 .apply_expected
= true
6199 * multi homed vs. unique section
6202 * mhomed,released vs. unique,active with same ip(s)
6205 .line
= __location__
,
6206 .name
= _NBT_NAME("_MR_UA_SI", 0x00, NULL
),
6210 .num_ips
= ctx
->addresses_best_num
,
6211 .ips
= ctx
->addresses_best
,
6212 .apply_expected
= true
6215 .type
= WREPL_TYPE_UNIQUE
,
6216 .state
= WREPL_STATE_ACTIVE
,
6217 .node
= WREPL_NODE_B
,
6219 .num_ips
= ctx
->addresses_best_num
,
6220 .ips
= ctx
->addresses_best
,
6221 .apply_expected
= true
6225 * mhomed,released vs. unique,active with different ip(s)
6228 .line
= __location__
,
6229 .name
= _NBT_NAME("_MR_UA_DI", 0x00, NULL
),
6233 .num_ips
= ctx
->addresses_best_num
,
6234 .ips
= ctx
->addresses_best
,
6235 .apply_expected
= true
6238 .type
= WREPL_TYPE_UNIQUE
,
6239 .state
= WREPL_STATE_ACTIVE
,
6240 .node
= WREPL_NODE_B
,
6242 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6243 .ips
= addresses_B_1
,
6244 .apply_expected
= true
6248 * mhomed,released vs. unique,tombstone with same ip(s)
6251 .line
= __location__
,
6252 .name
= _NBT_NAME("_MR_UT_SI", 0x00, NULL
),
6256 .num_ips
= ctx
->addresses_best_num
,
6257 .ips
= ctx
->addresses_best
,
6258 .apply_expected
= true
6261 .type
= WREPL_TYPE_UNIQUE
,
6262 .state
= WREPL_STATE_TOMBSTONE
,
6263 .node
= WREPL_NODE_B
,
6265 .num_ips
= ctx
->addresses_best_num
,
6266 .ips
= ctx
->addresses_best
,
6267 .apply_expected
= true
6271 * mhomed,released vs. unique,tombstone with different ip(s)
6274 .line
= __location__
,
6275 .name
= _NBT_NAME("_MR_UT_DI", 0x00, NULL
),
6279 .num_ips
= ctx
->addresses_best_num
,
6280 .ips
= ctx
->addresses_best
,
6281 .apply_expected
= true
6284 .type
= WREPL_TYPE_UNIQUE
,
6285 .state
= WREPL_STATE_TOMBSTONE
,
6286 .node
= WREPL_NODE_B
,
6288 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6289 .ips
= addresses_B_1
,
6290 .apply_expected
= true
6294 * multi homed vs. group section
6297 * mhomed,released vs. group,active with same ip(s)
6300 .line
= __location__
,
6301 .name
= _NBT_NAME("_MR_GA_SI", 0x00, NULL
),
6305 .num_ips
= ctx
->addresses_best_num
,
6306 .ips
= ctx
->addresses_best
,
6307 .apply_expected
= true
6310 .type
= WREPL_TYPE_GROUP
,
6311 .state
= WREPL_STATE_ACTIVE
,
6312 .node
= WREPL_NODE_B
,
6314 .num_ips
= ctx
->addresses_best_num
,
6315 .ips
= ctx
->addresses_best
,
6316 .apply_expected
= true
6320 * mhomed,released vs. group,active with different ip(s)
6323 .line
= __location__
,
6324 .name
= _NBT_NAME("_MR_GA_DI", 0x00, NULL
),
6328 .num_ips
= ctx
->addresses_best_num
,
6329 .ips
= ctx
->addresses_best
,
6330 .apply_expected
= true
6333 .type
= WREPL_TYPE_GROUP
,
6334 .state
= WREPL_STATE_ACTIVE
,
6335 .node
= WREPL_NODE_B
,
6337 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6338 .ips
= addresses_B_1
,
6339 .apply_expected
= true
6343 * mhomed,released vs. group,tombstone with same ip(s)
6346 .line
= __location__
,
6347 .name
= _NBT_NAME("_MR_GT_SI", 0x00, NULL
),
6351 .num_ips
= ctx
->addresses_best_num
,
6352 .ips
= ctx
->addresses_best
,
6353 .apply_expected
= true
6356 .type
= WREPL_TYPE_GROUP
,
6357 .state
= WREPL_STATE_TOMBSTONE
,
6358 .node
= WREPL_NODE_B
,
6360 .num_ips
= ctx
->addresses_best_num
,
6361 .ips
= ctx
->addresses_best
,
6362 .apply_expected
= true
6366 * mhomed,released vs. group,tombstone with different ip(s)
6369 .line
= __location__
,
6370 .name
= _NBT_NAME("_MR_GT_DI", 0x00, NULL
),
6374 .num_ips
= ctx
->addresses_best_num
,
6375 .ips
= ctx
->addresses_best
,
6376 .apply_expected
= true
6379 .type
= WREPL_TYPE_GROUP
,
6380 .state
= WREPL_STATE_TOMBSTONE
,
6381 .node
= WREPL_NODE_B
,
6383 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6384 .ips
= addresses_B_1
,
6385 .apply_expected
= true
6389 * multi homed vs. special group section
6392 * mhomed,released vs. sgroup,active with same ip(s)
6395 .line
= __location__
,
6396 .name
= _NBT_NAME("_MR_SA_SI", 0x00, NULL
),
6400 .num_ips
= ctx
->addresses_best_num
,
6401 .ips
= ctx
->addresses_best
,
6402 .apply_expected
= true
6405 .type
= WREPL_TYPE_SGROUP
,
6406 .state
= WREPL_STATE_ACTIVE
,
6407 .node
= WREPL_NODE_B
,
6409 .num_ips
= ctx
->addresses_best_num
,
6410 .ips
= ctx
->addresses_best
,
6411 .apply_expected
= true
6415 * mhomed,released vs. sgroup,active with different ip(s)
6418 .line
= __location__
,
6419 .name
= _NBT_NAME("_MR_SA_DI", 0x00, NULL
),
6423 .num_ips
= ctx
->addresses_best_num
,
6424 .ips
= ctx
->addresses_best
,
6425 .apply_expected
= true
6428 .type
= WREPL_TYPE_SGROUP
,
6429 .state
= WREPL_STATE_ACTIVE
,
6430 .node
= WREPL_NODE_B
,
6432 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6433 .ips
= addresses_B_1
,
6434 .apply_expected
= true
6438 * mhomed,released vs. sgroup,tombstone with same ip(s)
6441 .line
= __location__
,
6442 .name
= _NBT_NAME("_MR_ST_SI", 0x00, NULL
),
6446 .num_ips
= ctx
->addresses_best_num
,
6447 .ips
= ctx
->addresses_best
,
6448 .apply_expected
= true
6451 .type
= WREPL_TYPE_SGROUP
,
6452 .state
= WREPL_STATE_TOMBSTONE
,
6453 .node
= WREPL_NODE_B
,
6455 .num_ips
= ctx
->addresses_best_num
,
6456 .ips
= ctx
->addresses_best
,
6457 .apply_expected
= true
6461 * mhomed,released vs. sgroup,tombstone with different ip(s)
6464 .line
= __location__
,
6465 .name
= _NBT_NAME("_MR_ST_DI", 0x00, NULL
),
6469 .num_ips
= ctx
->addresses_best_num
,
6470 .ips
= ctx
->addresses_best
,
6471 .apply_expected
= true
6474 .type
= WREPL_TYPE_SGROUP
,
6475 .state
= WREPL_STATE_TOMBSTONE
,
6476 .node
= WREPL_NODE_B
,
6478 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6479 .ips
= addresses_B_1
,
6480 .apply_expected
= true
6484 * multi homed vs. multi homed section
6487 * mhomed,released vs. mhomed,active with same ip(s)
6490 .line
= __location__
,
6491 .name
= _NBT_NAME("_MR_MA_SI", 0x00, NULL
),
6495 .num_ips
= ctx
->addresses_best_num
,
6496 .ips
= ctx
->addresses_best
,
6497 .apply_expected
= true
6500 .type
= WREPL_TYPE_MHOMED
,
6501 .state
= WREPL_STATE_ACTIVE
,
6502 .node
= WREPL_NODE_B
,
6504 .num_ips
= ctx
->addresses_best_num
,
6505 .ips
= ctx
->addresses_best
,
6506 .apply_expected
= true
6510 * mhomed,released vs. mhomed,active with different ip(s)
6513 .line
= __location__
,
6514 .name
= _NBT_NAME("_MR_MA_DI", 0x00, NULL
),
6518 .num_ips
= ctx
->addresses_best_num
,
6519 .ips
= ctx
->addresses_best
,
6520 .apply_expected
= true
6523 .type
= WREPL_TYPE_MHOMED
,
6524 .state
= WREPL_STATE_ACTIVE
,
6525 .node
= WREPL_NODE_B
,
6527 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6528 .ips
= addresses_B_1
,
6529 .apply_expected
= true
6533 * mhomed,released vs. mhomed,tombstone with same ip(s)
6536 .line
= __location__
,
6537 .name
= _NBT_NAME("_MR_MT_SI", 0x00, NULL
),
6541 .num_ips
= ctx
->addresses_best_num
,
6542 .ips
= ctx
->addresses_best
,
6543 .apply_expected
= true
6546 .type
= WREPL_TYPE_MHOMED
,
6547 .state
= WREPL_STATE_TOMBSTONE
,
6548 .node
= WREPL_NODE_B
,
6550 .num_ips
= ctx
->addresses_best_num
,
6551 .ips
= ctx
->addresses_best
,
6552 .apply_expected
= true
6556 * mhomed,released vs. mhomed,tombstone with different ip(s)
6559 .line
= __location__
,
6560 .name
= _NBT_NAME("_MR_MT_DI", 0x00, NULL
),
6564 .num_ips
= ctx
->addresses_best_num
,
6565 .ips
= ctx
->addresses_best
,
6566 .apply_expected
= true
6569 .type
= WREPL_TYPE_MHOMED
,
6570 .state
= WREPL_STATE_TOMBSTONE
,
6571 .node
= WREPL_NODE_B
,
6573 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6574 .ips
= addresses_B_1
,
6575 .apply_expected
= true
6580 torture_comment(tctx
, "Test Replica records vs. owned released records\n");
6582 for(i
=0; ret
&& i
< ARRAY_SIZE(records
); i
++) {
6583 torture_comment(tctx
, "%s => %s\n", nbt_name_string(ctx
, &records
[i
].name
),
6584 (records
[i
].replica
.apply_expected
?"REPLACE":"NOT REPLACE"));
6589 name_register
->in
.name
= records
[i
].name
;
6590 name_register
->in
.dest_addr
= ctx
->address
;
6591 name_register
->in
.dest_port
= lpcfg_nbt_port(tctx
->lp_ctx
);
6592 name_register
->in
.address
= records
[i
].wins
.ips
[0].ip
;
6593 name_register
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
6594 name_register
->in
.register_demand
= false;
6595 name_register
->in
.broadcast
= false;
6596 name_register
->in
.multi_homed
= records
[i
].wins
.mhomed
;
6597 name_register
->in
.ttl
= 300000;
6598 name_register
->in
.timeout
= 70;
6599 name_register
->in
.retries
= 0;
6601 status
= nbt_name_register(ctx
->nbtsock
, ctx
, name_register
);
6602 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
6603 torture_comment(tctx
, "No response from %s for name register\n", ctx
->address
);
6606 if (!NT_STATUS_IS_OK(status
)) {
6607 torture_comment(tctx
, "Bad response from %s for name register - %s\n",
6608 ctx
->address
, nt_errstr(status
));
6611 CHECK_VALUE(tctx
, name_register
->out
.rcode
, 0);
6612 CHECK_VALUE_STRING(tctx
, name_register
->out
.reply_from
, ctx
->address
);
6613 CHECK_VALUE(tctx
, name_register
->out
.name
.type
, records
[i
].name
.type
);
6614 CHECK_VALUE_STRING(tctx
, name_register
->out
.name
.name
, records
[i
].name
.name
);
6615 CHECK_VALUE_STRING(tctx
, name_register
->out
.name
.scope
, records
[i
].name
.scope
);
6616 CHECK_VALUE_STRING(tctx
, name_register
->out
.reply_addr
, records
[i
].wins
.ips
[0].ip
);
6618 /* release the record */
6619 release
->in
.name
= records
[i
].name
;
6620 release
->in
.dest_port
= lpcfg_nbt_port(tctx
->lp_ctx
);
6621 release
->in
.dest_addr
= ctx
->address
;
6622 release
->in
.address
= records
[i
].wins
.ips
[0].ip
;
6623 release
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
6624 release
->in
.broadcast
= false;
6625 release
->in
.timeout
= 30;
6626 release
->in
.retries
= 0;
6628 status
= nbt_name_release(ctx
->nbtsock
, ctx
, release
);
6629 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
6630 torture_comment(tctx
, "No response from %s for name release\n", ctx
->address
);
6633 if (!NT_STATUS_IS_OK(status
)) {
6634 torture_comment(tctx
, "Bad response from %s for name query - %s\n",
6635 ctx
->address
, nt_errstr(status
));
6638 CHECK_VALUE(tctx
, release
->out
.rcode
, 0);
6643 wins_name
->name
= &records
[i
].name
;
6644 wins_name
->flags
= WREPL_NAME_FLAGS(records
[i
].replica
.type
,
6645 records
[i
].replica
.state
,
6646 records
[i
].replica
.node
,
6647 records
[i
].replica
.is_static
);
6648 wins_name
->id
= ++ctx
->b
.max_version
;
6649 if (wins_name
->flags
& 2) {
6650 wins_name
->addresses
.addresses
.num_ips
= records
[i
].replica
.num_ips
;
6651 wins_name
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
6652 records
[i
].replica
.ips
);
6654 wins_name
->addresses
.ip
= records
[i
].replica
.ips
[0].ip
;
6656 wins_name
->unknown
= "255.255.255.255";
6658 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
6659 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
,
6660 records
[i
].replica
.apply_expected
);
6662 if (records
[i
].replica
.apply_expected
) {
6663 wins_name
->name
= &records
[i
].name
;
6664 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE
,
6665 WREPL_STATE_TOMBSTONE
,
6666 WREPL_NODE_B
, false);
6667 wins_name
->id
= ++ctx
->b
.max_version
;
6668 wins_name
->addresses
.ip
= addresses_B_1
[0].ip
;
6669 wins_name
->unknown
= "255.255.255.255";
6671 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
6672 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
, true);
6674 release
->in
.name
= records
[i
].name
;
6675 release
->in
.dest_addr
= ctx
->address
;
6676 release
->in
.dest_port
= lpcfg_nbt_port(tctx
->lp_ctx
);
6677 release
->in
.address
= records
[i
].wins
.ips
[0].ip
;
6678 release
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
6679 release
->in
.broadcast
= false;
6680 release
->in
.timeout
= 30;
6681 release
->in
.retries
= 0;
6683 status
= nbt_name_release(ctx
->nbtsock
, ctx
, release
);
6684 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
6685 torture_comment(tctx
, "No response from %s for name release\n", ctx
->address
);
6688 if (!NT_STATUS_IS_OK(status
)) {
6689 torture_comment(tctx
, "Bad response from %s for name query - %s\n",
6690 ctx
->address
, nt_errstr(status
));
6693 CHECK_VALUE(tctx
, release
->out
.rcode
, 0);
6696 torture_comment(tctx
, "conflict handled wrong or record[%u]: %s\n", i
, records
[i
].line
);
6704 struct test_conflict_owned_active_vs_replica_struct
{
6705 struct torture_context
*tctx
;
6706 const char *line
; /* just better debugging */
6707 const char *section
; /* just better debugging */
6708 struct nbt_name name
;
6709 const char *comment
;
6715 const struct wrepl_ip
*ips
;
6716 bool apply_expected
;
6721 bool expect_release
;
6724 /* when num_ips == 0, then .wins.ips are used */
6726 const struct wrepl_ip
*ips
;
6729 enum wrepl_name_type type
;
6730 enum wrepl_name_state state
;
6731 enum wrepl_name_node node
;
6734 const struct wrepl_ip
*ips
;
6735 bool apply_expected
;
6741 static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket
*nbtsock
,
6742 struct nbt_name_packet
*req_packet
,
6743 struct socket_address
*src
);
6745 static bool test_conflict_owned_active_vs_replica(struct torture_context
*tctx
,
6746 struct test_wrepl_conflict_conn
*ctx
)
6750 struct wrepl_wins_name wins_name_
;
6751 struct wrepl_wins_name
*wins_name
= &wins_name_
;
6752 struct nbt_name_register name_register_
;
6753 struct nbt_name_register
*name_register
= &name_register_
;
6754 struct nbt_name_release release_
;
6755 struct nbt_name_release
*release
= &release_
;
6757 struct test_conflict_owned_active_vs_replica_struct records
[] = {
6759 * unique vs. unique section
6762 * unique,active vs. unique,active with same ip(s), unchecked
6766 .line
= __location__
,
6767 .name
= _NBT_NAME("_UA_UA_SI_U", 0x00, NULL
),
6771 .num_ips
= ctx
->addresses_best_num
,
6772 .ips
= ctx
->addresses_best
,
6773 .apply_expected
= true
6779 .type
= WREPL_TYPE_UNIQUE
,
6780 .state
= WREPL_STATE_ACTIVE
,
6781 .node
= WREPL_NODE_B
,
6783 .num_ips
= ctx
->addresses_best_num
,
6784 .ips
= ctx
->addresses_best
,
6785 .apply_expected
= true
6789 * unique,active vs. unique,active with different ip(s), positive response
6793 .line
= __location__
,
6794 .name
= _NBT_NAME("_UA_UA_DI_P", 0x00, NULL
),
6798 .num_ips
= ctx
->addresses_best_num
,
6799 .ips
= ctx
->addresses_best
,
6800 .apply_expected
= true
6807 .type
= WREPL_TYPE_UNIQUE
,
6808 .state
= WREPL_STATE_ACTIVE
,
6809 .node
= WREPL_NODE_B
,
6811 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6812 .ips
= addresses_B_1
,
6813 .apply_expected
= false
6817 * unique,active vs. unique,active with different ip(s), positive response other ips
6821 .line
= __location__
,
6822 .name
= _NBT_NAME("_UA_UA_DI_O", 0x00, NULL
),
6826 .num_ips
= ctx
->addresses_best_num
,
6827 .ips
= ctx
->addresses_best
,
6828 .apply_expected
= true
6833 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
6834 .ips
= addresses_A_3_4
,
6837 .type
= WREPL_TYPE_UNIQUE
,
6838 .state
= WREPL_STATE_ACTIVE
,
6839 .node
= WREPL_NODE_B
,
6841 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6842 .ips
= addresses_B_1
,
6843 .apply_expected
= false
6847 * unique,active vs. unique,active with different ip(s), negative response
6851 .line
= __location__
,
6852 .name
= _NBT_NAME("_UA_UA_DI_N", 0x00, NULL
),
6856 .num_ips
= ctx
->addresses_best_num
,
6857 .ips
= ctx
->addresses_best
,
6858 .apply_expected
= true
6865 .type
= WREPL_TYPE_UNIQUE
,
6866 .state
= WREPL_STATE_ACTIVE
,
6867 .node
= WREPL_NODE_B
,
6869 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6870 .ips
= addresses_B_1
,
6871 .apply_expected
= true
6875 * unique,active vs. unique,tombstone with same ip(s), unchecked
6879 .line
= __location__
,
6880 .name
= _NBT_NAME("_UA_UT_SI_U", 0x00, NULL
),
6884 .num_ips
= ctx
->addresses_best_num
,
6885 .ips
= ctx
->addresses_best
,
6886 .apply_expected
= true
6892 .type
= WREPL_TYPE_UNIQUE
,
6893 .state
= WREPL_STATE_TOMBSTONE
,
6894 .node
= WREPL_NODE_B
,
6896 .num_ips
= ctx
->addresses_best_num
,
6897 .ips
= ctx
->addresses_best
,
6898 .apply_expected
= false
6902 * unique,active vs. unique,tombstone with different ip(s), unchecked
6906 .line
= __location__
,
6907 .name
= _NBT_NAME("_UA_UT_DI_U", 0x00, NULL
),
6911 .num_ips
= ctx
->addresses_best_num
,
6912 .ips
= ctx
->addresses_best
,
6913 .apply_expected
= true
6919 .type
= WREPL_TYPE_UNIQUE
,
6920 .state
= WREPL_STATE_TOMBSTONE
,
6921 .node
= WREPL_NODE_B
,
6923 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6924 .ips
= addresses_B_1
,
6925 .apply_expected
= false
6929 * unique vs. group section
6932 * unique,active vs. group,active with same ip(s), release expected
6936 .line
= __location__
,
6937 .name
= _NBT_NAME("_UA_GA_SI_R", 0x00, NULL
),
6941 .num_ips
= ctx
->addresses_best_num
,
6942 .ips
= ctx
->addresses_best
,
6943 .apply_expected
= true
6947 .expect_release
= true,
6950 .type
= WREPL_TYPE_GROUP
,
6951 .state
= WREPL_STATE_ACTIVE
,
6952 .node
= WREPL_NODE_B
,
6954 .num_ips
= ctx
->addresses_best_num
,
6955 .ips
= ctx
->addresses_best
,
6956 .apply_expected
= true
6960 * unique,active vs. group,active with different ip(s), release expected
6964 .line
= __location__
,
6965 .name
= _NBT_NAME("_UA_GA_DI_R", 0x00, NULL
),
6969 .num_ips
= ctx
->addresses_best_num
,
6970 .ips
= ctx
->addresses_best
,
6971 .apply_expected
= true
6975 .expect_release
= true,
6978 .type
= WREPL_TYPE_GROUP
,
6979 .state
= WREPL_STATE_ACTIVE
,
6980 .node
= WREPL_NODE_B
,
6982 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6983 .ips
= addresses_B_1
,
6984 .apply_expected
= true
6988 * unique,active vs. group,tombstone with same ip(s), unchecked
6992 .line
= __location__
,
6993 .name
= _NBT_NAME("_UA_GT_SI_U", 0x00, NULL
),
6997 .num_ips
= ctx
->addresses_best_num
,
6998 .ips
= ctx
->addresses_best
,
6999 .apply_expected
= true
7005 .type
= WREPL_TYPE_GROUP
,
7006 .state
= WREPL_STATE_TOMBSTONE
,
7007 .node
= WREPL_NODE_B
,
7009 .num_ips
= ctx
->addresses_best_num
,
7010 .ips
= ctx
->addresses_best
,
7011 .apply_expected
= false
7015 * unique,active vs. group,tombstone with different ip(s), unchecked
7019 .line
= __location__
,
7020 .name
= _NBT_NAME("_UA_GT_DI_U", 0x00, NULL
),
7024 .num_ips
= ctx
->addresses_best_num
,
7025 .ips
= ctx
->addresses_best
,
7026 .apply_expected
= true
7032 .type
= WREPL_TYPE_GROUP
,
7033 .state
= WREPL_STATE_TOMBSTONE
,
7034 .node
= WREPL_NODE_B
,
7036 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7037 .ips
= addresses_B_1
,
7038 .apply_expected
= false
7042 * unique vs. special group section
7045 * unique,active vs. sgroup,active with same ip(s), release expected
7049 .line
= __location__
,
7050 .name
= _NBT_NAME("_UA_SA_SI_R", 0x00, NULL
),
7054 .num_ips
= ctx
->addresses_best_num
,
7055 .ips
= ctx
->addresses_best
,
7056 .apply_expected
= true
7060 .expect_release
= true,
7063 .type
= WREPL_TYPE_SGROUP
,
7064 .state
= WREPL_STATE_ACTIVE
,
7065 .node
= WREPL_NODE_B
,
7067 .num_ips
= ctx
->addresses_best_num
,
7068 .ips
= ctx
->addresses_best
,
7069 .apply_expected
= true
7073 * unique,active vs. group,active with different ip(s), release expected
7077 .line
= __location__
,
7078 .name
= _NBT_NAME("_UA_SA_DI_R", 0x00, NULL
),
7082 .num_ips
= ctx
->addresses_best_num
,
7083 .ips
= ctx
->addresses_best
,
7084 .apply_expected
= true
7088 .expect_release
= true,
7091 .type
= WREPL_TYPE_SGROUP
,
7092 .state
= WREPL_STATE_ACTIVE
,
7093 .node
= WREPL_NODE_B
,
7095 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7096 .ips
= addresses_B_1
,
7097 .apply_expected
= true
7101 * unique,active vs. sgroup,tombstone with same ip(s), unchecked
7105 .line
= __location__
,
7106 .name
= _NBT_NAME("_UA_ST_SI_U", 0x00, NULL
),
7110 .num_ips
= ctx
->addresses_best_num
,
7111 .ips
= ctx
->addresses_best
,
7112 .apply_expected
= true
7118 .type
= WREPL_TYPE_SGROUP
,
7119 .state
= WREPL_STATE_TOMBSTONE
,
7120 .node
= WREPL_NODE_B
,
7122 .num_ips
= ctx
->addresses_best_num
,
7123 .ips
= ctx
->addresses_best
,
7124 .apply_expected
= false
7128 * unique,active vs. sgroup,tombstone with different ip(s), unchecked
7132 .line
= __location__
,
7133 .name
= _NBT_NAME("_UA_ST_DI_U", 0x00, NULL
),
7137 .num_ips
= ctx
->addresses_best_num
,
7138 .ips
= ctx
->addresses_best
,
7139 .apply_expected
= true
7145 .type
= WREPL_TYPE_SGROUP
,
7146 .state
= WREPL_STATE_TOMBSTONE
,
7147 .node
= WREPL_NODE_B
,
7149 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7150 .ips
= addresses_B_1
,
7151 .apply_expected
= false
7155 * unique vs. multi homed section
7158 * unique,active vs. mhomed,active with same ip(s), unchecked
7162 .line
= __location__
,
7163 .name
= _NBT_NAME("_UA_MA_SI_U", 0x00, NULL
),
7167 .num_ips
= ctx
->addresses_best_num
,
7168 .ips
= ctx
->addresses_best
,
7169 .apply_expected
= true
7175 .type
= WREPL_TYPE_MHOMED
,
7176 .state
= WREPL_STATE_ACTIVE
,
7177 .node
= WREPL_NODE_B
,
7179 .num_ips
= ctx
->addresses_best_num
,
7180 .ips
= ctx
->addresses_best
,
7181 .apply_expected
= true
7185 * unique,active vs. mhomed,active with superset ip(s), unchecked
7189 .line
= __location__
,
7190 .name
= _NBT_NAME("_UA_MA_SP_U", 0x00, NULL
),
7194 .num_ips
= ctx
->addresses_best_num
,
7195 .ips
= ctx
->addresses_best
,
7196 .apply_expected
= true
7202 .type
= WREPL_TYPE_MHOMED
,
7203 .state
= WREPL_STATE_ACTIVE
,
7204 .node
= WREPL_NODE_B
,
7206 .num_ips
= ctx
->addresses_all_num
,
7207 .ips
= ctx
->addresses_all
,
7208 .apply_expected
= true
7212 * unique,active vs. mhomed,active with different ip(s), positive response
7216 .line
= __location__
,
7217 .name
= _NBT_NAME("_UA_MA_DI_P", 0x00, NULL
),
7221 .num_ips
= ctx
->addresses_best_num
,
7222 .ips
= ctx
->addresses_best
,
7223 .apply_expected
= true
7230 .type
= WREPL_TYPE_MHOMED
,
7231 .state
= WREPL_STATE_ACTIVE
,
7232 .node
= WREPL_NODE_B
,
7234 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7235 .ips
= addresses_B_3_4
,
7236 .apply_expected
= false
7240 * unique,active vs. mhomed,active with different ip(s), positive response other ips
7244 .line
= __location__
,
7245 .name
= _NBT_NAME("_UA_MA_DI_O", 0x00, NULL
),
7249 .num_ips
= ctx
->addresses_best_num
,
7250 .ips
= ctx
->addresses_best
,
7251 .apply_expected
= true
7256 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
7257 .ips
= addresses_A_3_4
,
7260 .type
= WREPL_TYPE_MHOMED
,
7261 .state
= WREPL_STATE_ACTIVE
,
7262 .node
= WREPL_NODE_B
,
7264 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7265 .ips
= addresses_B_3_4
,
7266 .apply_expected
= false
7270 * unique,active vs. mhomed,active with different ip(s), negative response
7274 .line
= __location__
,
7275 .name
= _NBT_NAME("_UA_MA_DI_N", 0x00, NULL
),
7279 .num_ips
= ctx
->addresses_best_num
,
7280 .ips
= ctx
->addresses_best
,
7281 .apply_expected
= true
7288 .type
= WREPL_TYPE_MHOMED
,
7289 .state
= WREPL_STATE_ACTIVE
,
7290 .node
= WREPL_NODE_B
,
7292 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7293 .ips
= addresses_B_3_4
,
7294 .apply_expected
= true
7298 * unique,active vs. mhomed,tombstone with same ip(s), unchecked
7302 .line
= __location__
,
7303 .name
= _NBT_NAME("_UA_MT_SI_U", 0x00, NULL
),
7307 .num_ips
= ctx
->addresses_best_num
,
7308 .ips
= ctx
->addresses_best
,
7309 .apply_expected
= true
7315 .type
= WREPL_TYPE_MHOMED
,
7316 .state
= WREPL_STATE_TOMBSTONE
,
7317 .node
= WREPL_NODE_B
,
7319 .num_ips
= ctx
->addresses_best_num
,
7320 .ips
= ctx
->addresses_best
,
7321 .apply_expected
= false
7325 * unique,active vs. mhomed,tombstone with different ip(s), unchecked
7329 .line
= __location__
,
7330 .name
= _NBT_NAME("_UA_MT_DI_U", 0x00, NULL
),
7334 .num_ips
= ctx
->addresses_best_num
,
7335 .ips
= ctx
->addresses_best
,
7336 .apply_expected
= true
7342 .type
= WREPL_TYPE_MHOMED
,
7343 .state
= WREPL_STATE_TOMBSTONE
,
7344 .node
= WREPL_NODE_B
,
7346 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7347 .ips
= addresses_B_3_4
,
7348 .apply_expected
= false
7352 * normal group vs. unique section
7355 * group,active vs. unique,active with same ip(s), unchecked
7359 .line
= __location__
,
7360 .name
= _NBT_NAME("_GA_UA_SI_U", 0x00, NULL
),
7362 .nb_flags
= NBT_NM_GROUP
,
7364 .num_ips
= ctx
->addresses_best_num
,
7365 .ips
= ctx
->addresses_best
,
7366 .apply_expected
= true
7372 .type
= WREPL_TYPE_UNIQUE
,
7373 .state
= WREPL_STATE_ACTIVE
,
7374 .node
= WREPL_NODE_B
,
7376 .num_ips
= ctx
->addresses_best_num
,
7377 .ips
= ctx
->addresses_best
,
7378 .apply_expected
= false
7382 * group,active vs. unique,active with different ip(s), unchecked
7386 .line
= __location__
,
7387 .name
= _NBT_NAME("_GA_UA_DI_U", 0x00, NULL
),
7389 .nb_flags
= NBT_NM_GROUP
,
7391 .num_ips
= ctx
->addresses_best_num
,
7392 .ips
= ctx
->addresses_best
,
7393 .apply_expected
= true
7399 .type
= WREPL_TYPE_UNIQUE
,
7400 .state
= WREPL_STATE_ACTIVE
,
7401 .node
= WREPL_NODE_B
,
7403 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7404 .ips
= addresses_B_1
,
7405 .apply_expected
= false
7409 * group,active vs. unique,tombstone with same ip(s), unchecked
7413 .line
= __location__
,
7414 .name
= _NBT_NAME("_GA_UT_SI_U", 0x00, NULL
),
7416 .nb_flags
= NBT_NM_GROUP
,
7418 .num_ips
= ctx
->addresses_best_num
,
7419 .ips
= ctx
->addresses_best
,
7420 .apply_expected
= true
7426 .type
= WREPL_TYPE_UNIQUE
,
7427 .state
= WREPL_STATE_TOMBSTONE
,
7428 .node
= WREPL_NODE_B
,
7430 .num_ips
= ctx
->addresses_best_num
,
7431 .ips
= ctx
->addresses_best
,
7432 .apply_expected
= false
7436 * group,active vs. unique,tombstone with different ip(s), unchecked
7440 .line
= __location__
,
7441 .name
= _NBT_NAME("_GA_UT_DI_U", 0x00, NULL
),
7443 .nb_flags
= NBT_NM_GROUP
,
7445 .num_ips
= ctx
->addresses_best_num
,
7446 .ips
= ctx
->addresses_best
,
7447 .apply_expected
= true
7453 .type
= WREPL_TYPE_UNIQUE
,
7454 .state
= WREPL_STATE_TOMBSTONE
,
7455 .node
= WREPL_NODE_B
,
7457 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7458 .ips
= addresses_B_1
,
7459 .apply_expected
= false
7463 * normal group vs. normal group section
7466 * group,active vs. group,active with same ip(s), unchecked
7470 .line
= __location__
,
7471 .name
= _NBT_NAME("_GA_GA_SI_U", 0x00, NULL
),
7473 .nb_flags
= NBT_NM_GROUP
,
7475 .num_ips
= ctx
->addresses_best_num
,
7476 .ips
= ctx
->addresses_best
,
7477 .apply_expected
= true
7483 .type
= WREPL_TYPE_GROUP
,
7484 .state
= WREPL_STATE_ACTIVE
,
7485 .node
= WREPL_NODE_B
,
7487 .num_ips
= ctx
->addresses_best_num
,
7488 .ips
= ctx
->addresses_best
,
7489 .apply_expected
= true
7493 * group,active vs. group,active with different ip(s), unchecked
7497 .line
= __location__
,
7498 .name
= _NBT_NAME("_GA_GA_DI_U", 0x00, NULL
),
7500 .nb_flags
= NBT_NM_GROUP
,
7502 .num_ips
= ctx
->addresses_best_num
,
7503 .ips
= ctx
->addresses_best
,
7504 .apply_expected
= true
7510 .type
= WREPL_TYPE_GROUP
,
7511 .state
= WREPL_STATE_ACTIVE
,
7512 .node
= WREPL_NODE_B
,
7514 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7515 .ips
= addresses_B_1
,
7516 .apply_expected
= true
7520 * group,active vs. group,tombstone with same ip(s), unchecked
7524 .line
= __location__
,
7525 .name
= _NBT_NAME("_GA_GT_SI_U", 0x00, NULL
),
7527 .nb_flags
= NBT_NM_GROUP
,
7529 .num_ips
= ctx
->addresses_best_num
,
7530 .ips
= ctx
->addresses_best
,
7531 .apply_expected
= true
7537 .type
= WREPL_TYPE_GROUP
,
7538 .state
= WREPL_STATE_TOMBSTONE
,
7539 .node
= WREPL_NODE_B
,
7541 .num_ips
= ctx
->addresses_best_num
,
7542 .ips
= ctx
->addresses_best
,
7543 .apply_expected
= false
7547 * group,active vs. group,tombstone with different ip(s), unchecked
7551 .line
= __location__
,
7552 .name
= _NBT_NAME("_GA_GT_DI_U", 0x00, NULL
),
7554 .nb_flags
= NBT_NM_GROUP
,
7556 .num_ips
= ctx
->addresses_best_num
,
7557 .ips
= ctx
->addresses_best
,
7558 .apply_expected
= true
7564 .type
= WREPL_TYPE_GROUP
,
7565 .state
= WREPL_STATE_TOMBSTONE
,
7566 .node
= WREPL_NODE_B
,
7568 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7569 .ips
= addresses_B_1
,
7570 .apply_expected
= false
7574 * normal group vs. special group section
7577 * group,active vs. sgroup,active with same ip(s), unchecked
7581 .line
= __location__
,
7582 .name
= _NBT_NAME("_GA_SA_SI_U", 0x00, NULL
),
7584 .nb_flags
= NBT_NM_GROUP
,
7586 .num_ips
= ctx
->addresses_best_num
,
7587 .ips
= ctx
->addresses_best
,
7588 .apply_expected
= true
7594 .type
= WREPL_TYPE_SGROUP
,
7595 .state
= WREPL_STATE_ACTIVE
,
7596 .node
= WREPL_NODE_B
,
7598 .num_ips
= ctx
->addresses_best_num
,
7599 .ips
= ctx
->addresses_best
,
7600 .apply_expected
= false
7604 * group,active vs. sgroup,active with different ip(s), unchecked
7608 .line
= __location__
,
7609 .name
= _NBT_NAME("_GA_SA_DI_U", 0x00, NULL
),
7611 .nb_flags
= NBT_NM_GROUP
,
7613 .num_ips
= ctx
->addresses_best_num
,
7614 .ips
= ctx
->addresses_best
,
7615 .apply_expected
= true
7621 .type
= WREPL_TYPE_SGROUP
,
7622 .state
= WREPL_STATE_ACTIVE
,
7623 .node
= WREPL_NODE_B
,
7625 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7626 .ips
= addresses_B_3_4
,
7627 .apply_expected
= false
7631 * group,active vs. sgroup,tombstone with same ip(s), unchecked
7635 .line
= __location__
,
7636 .name
= _NBT_NAME("_GA_ST_SI_U", 0x00, NULL
),
7638 .nb_flags
= NBT_NM_GROUP
,
7640 .num_ips
= ctx
->addresses_best_num
,
7641 .ips
= ctx
->addresses_best
,
7642 .apply_expected
= true
7648 .type
= WREPL_TYPE_SGROUP
,
7649 .state
= WREPL_STATE_TOMBSTONE
,
7650 .node
= WREPL_NODE_B
,
7652 .num_ips
= ctx
->addresses_best_num
,
7653 .ips
= ctx
->addresses_best
,
7654 .apply_expected
= false
7658 * group,active vs. sgroup,tombstone with different ip(s), unchecked
7662 .line
= __location__
,
7663 .name
= _NBT_NAME("_GA_ST_DI_U", 0x00, NULL
),
7665 .nb_flags
= NBT_NM_GROUP
,
7667 .num_ips
= ctx
->addresses_best_num
,
7668 .ips
= ctx
->addresses_best
,
7669 .apply_expected
= true
7675 .type
= WREPL_TYPE_SGROUP
,
7676 .state
= WREPL_STATE_TOMBSTONE
,
7677 .node
= WREPL_NODE_B
,
7679 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7680 .ips
= addresses_B_3_4
,
7681 .apply_expected
= false
7685 * normal group vs. multi homed section
7688 * group,active vs. mhomed,active with same ip(s), unchecked
7692 .line
= __location__
,
7693 .name
= _NBT_NAME("_GA_MA_SI_U", 0x00, NULL
),
7695 .nb_flags
= NBT_NM_GROUP
,
7697 .num_ips
= ctx
->addresses_best_num
,
7698 .ips
= ctx
->addresses_best
,
7699 .apply_expected
= true
7705 .type
= WREPL_TYPE_MHOMED
,
7706 .state
= WREPL_STATE_ACTIVE
,
7707 .node
= WREPL_NODE_B
,
7709 .num_ips
= ctx
->addresses_best_num
,
7710 .ips
= ctx
->addresses_best
,
7711 .apply_expected
= false
7715 * group,active vs. mhomed,active with different ip(s), unchecked
7719 .line
= __location__
,
7720 .name
= _NBT_NAME("_GA_MA_DI_U", 0x00, NULL
),
7722 .nb_flags
= NBT_NM_GROUP
,
7724 .num_ips
= ctx
->addresses_best_num
,
7725 .ips
= ctx
->addresses_best
,
7726 .apply_expected
= true
7732 .type
= WREPL_TYPE_MHOMED
,
7733 .state
= WREPL_STATE_ACTIVE
,
7734 .node
= WREPL_NODE_B
,
7736 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7737 .ips
= addresses_B_3_4
,
7738 .apply_expected
= false
7742 * group,active vs. mhomed,tombstone with same ip(s), unchecked
7746 .line
= __location__
,
7747 .name
= _NBT_NAME("_GA_MT_SI_U", 0x00, NULL
),
7749 .nb_flags
= NBT_NM_GROUP
,
7751 .num_ips
= ctx
->addresses_best_num
,
7752 .ips
= ctx
->addresses_best
,
7753 .apply_expected
= true
7759 .type
= WREPL_TYPE_MHOMED
,
7760 .state
= WREPL_STATE_TOMBSTONE
,
7761 .node
= WREPL_NODE_B
,
7763 .num_ips
= ctx
->addresses_best_num
,
7764 .ips
= ctx
->addresses_best
,
7765 .apply_expected
= false
7769 * group,active vs. mhomed,tombstone with different ip(s), unchecked
7773 .line
= __location__
,
7774 .name
= _NBT_NAME("_GA_MT_DI_U", 0x00, NULL
),
7776 .nb_flags
= NBT_NM_GROUP
,
7778 .num_ips
= ctx
->addresses_best_num
,
7779 .ips
= ctx
->addresses_best
,
7780 .apply_expected
= true
7786 .type
= WREPL_TYPE_MHOMED
,
7787 .state
= WREPL_STATE_TOMBSTONE
,
7788 .node
= WREPL_NODE_B
,
7790 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7791 .ips
= addresses_B_3_4
,
7792 .apply_expected
= false
7796 * special group vs. unique section
7799 * sgroup,active vs. unique,active with same ip(s), unchecked
7803 .line
= __location__
,
7804 .name
= _NBT_NAME("_SA_UA_SI_U", 0x1C, NULL
),
7806 .nb_flags
= NBT_NM_GROUP
,
7808 .num_ips
= ctx
->addresses_best_num
,
7809 .ips
= ctx
->addresses_best
,
7810 .apply_expected
= true
7816 .type
= WREPL_TYPE_UNIQUE
,
7817 .state
= WREPL_STATE_ACTIVE
,
7818 .node
= WREPL_NODE_B
,
7820 .num_ips
= ctx
->addresses_best_num
,
7821 .ips
= ctx
->addresses_best
,
7822 .apply_expected
= false
7826 * sgroup,active vs. unique,active with different ip(s), unchecked
7830 .line
= __location__
,
7831 .name
= _NBT_NAME("_SA_UA_DI_U", 0x1C, NULL
),
7833 .nb_flags
= NBT_NM_GROUP
,
7835 .num_ips
= ctx
->addresses_best_num
,
7836 .ips
= ctx
->addresses_best
,
7837 .apply_expected
= true
7843 .type
= WREPL_TYPE_UNIQUE
,
7844 .state
= WREPL_STATE_ACTIVE
,
7845 .node
= WREPL_NODE_B
,
7847 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7848 .ips
= addresses_B_1
,
7849 .apply_expected
= false
7853 * sgroup,active vs. unique,tombstone with same ip(s), unchecked
7857 .line
= __location__
,
7858 .name
= _NBT_NAME("_SA_UT_SI_U", 0x1C, NULL
),
7860 .nb_flags
= NBT_NM_GROUP
,
7862 .num_ips
= ctx
->addresses_best_num
,
7863 .ips
= ctx
->addresses_best
,
7864 .apply_expected
= true
7870 .type
= WREPL_TYPE_UNIQUE
,
7871 .state
= WREPL_STATE_TOMBSTONE
,
7872 .node
= WREPL_NODE_B
,
7874 .num_ips
= ctx
->addresses_best_num
,
7875 .ips
= ctx
->addresses_best
,
7876 .apply_expected
= false
7880 * sgroup,active vs. unique,tombstone with different ip(s), unchecked
7884 .line
= __location__
,
7885 .name
= _NBT_NAME("_SA_UT_DI_U", 0x1C, NULL
),
7887 .nb_flags
= NBT_NM_GROUP
,
7889 .num_ips
= ctx
->addresses_best_num
,
7890 .ips
= ctx
->addresses_best
,
7891 .apply_expected
= true
7897 .type
= WREPL_TYPE_UNIQUE
,
7898 .state
= WREPL_STATE_TOMBSTONE
,
7899 .node
= WREPL_NODE_B
,
7901 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7902 .ips
= addresses_B_1
,
7903 .apply_expected
= false
7907 * special group vs. normal group section
7910 * sgroup,active vs. group,active with same ip(s), unchecked
7914 .line
= __location__
,
7915 .name
= _NBT_NAME("_SA_GA_SI_U", 0x1C, NULL
),
7917 .nb_flags
= NBT_NM_GROUP
,
7919 .num_ips
= ctx
->addresses_best_num
,
7920 .ips
= ctx
->addresses_best
,
7921 .apply_expected
= true
7927 .type
= WREPL_TYPE_GROUP
,
7928 .state
= WREPL_STATE_ACTIVE
,
7929 .node
= WREPL_NODE_B
,
7931 .num_ips
= ctx
->addresses_best_num
,
7932 .ips
= ctx
->addresses_best
,
7933 .apply_expected
= false
7937 * sgroup,active vs. group,active with different ip(s), unchecked
7941 .line
= __location__
,
7942 .name
= _NBT_NAME("_SA_GA_DI_U", 0x1C, NULL
),
7944 .nb_flags
= NBT_NM_GROUP
,
7946 .num_ips
= ctx
->addresses_best_num
,
7947 .ips
= ctx
->addresses_best
,
7948 .apply_expected
= true
7954 .type
= WREPL_TYPE_GROUP
,
7955 .state
= WREPL_STATE_ACTIVE
,
7956 .node
= WREPL_NODE_B
,
7958 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7959 .ips
= addresses_B_1
,
7960 .apply_expected
= false
7964 * sgroup,active vs. group,tombstone with same ip(s), unchecked
7968 .line
= __location__
,
7969 .name
= _NBT_NAME("_SA_GT_SI_U", 0x1C, NULL
),
7971 .nb_flags
= NBT_NM_GROUP
,
7973 .num_ips
= ctx
->addresses_best_num
,
7974 .ips
= ctx
->addresses_best
,
7975 .apply_expected
= true
7981 .type
= WREPL_TYPE_GROUP
,
7982 .state
= WREPL_STATE_TOMBSTONE
,
7983 .node
= WREPL_NODE_B
,
7985 .num_ips
= ctx
->addresses_best_num
,
7986 .ips
= ctx
->addresses_best
,
7987 .apply_expected
= false
7991 * sgroup,active vs. group,tombstone with different ip(s), unchecked
7995 .line
= __location__
,
7996 .name
= _NBT_NAME("_SA_GT_DI_U", 0x1C, NULL
),
7998 .nb_flags
= NBT_NM_GROUP
,
8000 .num_ips
= ctx
->addresses_best_num
,
8001 .ips
= ctx
->addresses_best
,
8002 .apply_expected
= true
8008 .type
= WREPL_TYPE_GROUP
,
8009 .state
= WREPL_STATE_TOMBSTONE
,
8010 .node
= WREPL_NODE_B
,
8012 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8013 .ips
= addresses_B_1
,
8014 .apply_expected
= false
8018 * special group vs. multi homed section
8021 * sgroup,active vs. mhomed,active with same ip(s), unchecked
8025 .line
= __location__
,
8026 .name
= _NBT_NAME("_SA_MA_SI_U", 0x1C, NULL
),
8028 .nb_flags
= NBT_NM_GROUP
,
8030 .num_ips
= ctx
->addresses_best_num
,
8031 .ips
= ctx
->addresses_best
,
8032 .apply_expected
= true
8038 .type
= WREPL_TYPE_MHOMED
,
8039 .state
= WREPL_STATE_ACTIVE
,
8040 .node
= WREPL_NODE_B
,
8042 .num_ips
= ctx
->addresses_best_num
,
8043 .ips
= ctx
->addresses_best
,
8044 .apply_expected
= false
8048 * sgroup,active vs. mhomed,active with different ip(s), unchecked
8052 .line
= __location__
,
8053 .name
= _NBT_NAME("_SA_MA_DI_U", 0x1C, NULL
),
8055 .nb_flags
= NBT_NM_GROUP
,
8057 .num_ips
= ctx
->addresses_best_num
,
8058 .ips
= ctx
->addresses_best
,
8059 .apply_expected
= true
8065 .type
= WREPL_TYPE_MHOMED
,
8066 .state
= WREPL_STATE_ACTIVE
,
8067 .node
= WREPL_NODE_B
,
8069 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8070 .ips
= addresses_B_1
,
8071 .apply_expected
= false
8075 * sgroup,active vs. mhomed,tombstone with same ip(s), unchecked
8079 .line
= __location__
,
8080 .name
= _NBT_NAME("_SA_MT_SI_U", 0x1C, NULL
),
8082 .nb_flags
= NBT_NM_GROUP
,
8084 .num_ips
= ctx
->addresses_best_num
,
8085 .ips
= ctx
->addresses_best
,
8086 .apply_expected
= true
8092 .type
= WREPL_TYPE_MHOMED
,
8093 .state
= WREPL_STATE_TOMBSTONE
,
8094 .node
= WREPL_NODE_B
,
8096 .num_ips
= ctx
->addresses_best_num
,
8097 .ips
= ctx
->addresses_best
,
8098 .apply_expected
= false
8102 * sgroup,active vs. mhomed,tombstone with different ip(s), unchecked
8106 .line
= __location__
,
8107 .name
= _NBT_NAME("_SA_MT_DI_U", 0x1C, NULL
),
8109 .nb_flags
= NBT_NM_GROUP
,
8111 .num_ips
= ctx
->addresses_best_num
,
8112 .ips
= ctx
->addresses_best
,
8113 .apply_expected
= true
8119 .type
= WREPL_TYPE_MHOMED
,
8120 .state
= WREPL_STATE_TOMBSTONE
,
8121 .node
= WREPL_NODE_B
,
8123 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8124 .ips
= addresses_B_1
,
8125 .apply_expected
= false
8129 * multi homed vs. unique section
8132 * mhomed,active vs. unique,active with same ip(s), unchecked
8136 .line
= __location__
,
8137 .name
= _NBT_NAME("_MA_UA_SI_U", 0x00, NULL
),
8141 .num_ips
= ctx
->addresses_best_num
,
8142 .ips
= ctx
->addresses_best
,
8143 .apply_expected
= true
8149 .type
= WREPL_TYPE_UNIQUE
,
8150 .state
= WREPL_STATE_ACTIVE
,
8151 .node
= WREPL_NODE_B
,
8153 .num_ips
= ctx
->addresses_best_num
,
8154 .ips
= ctx
->addresses_best
,
8155 .apply_expected
= true
8159 * mhomed,active vs. unique,active with different ip(s), positive response
8163 .line
= __location__
,
8164 .name
= _NBT_NAME("_MA_UA_DI_P", 0x00, NULL
),
8168 .num_ips
= ctx
->addresses_best_num
,
8169 .ips
= ctx
->addresses_best
,
8170 .apply_expected
= true
8177 .type
= WREPL_TYPE_UNIQUE
,
8178 .state
= WREPL_STATE_ACTIVE
,
8179 .node
= WREPL_NODE_B
,
8181 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8182 .ips
= addresses_B_1
,
8183 .apply_expected
= false
8187 * mhomed,active vs. unique,active with different ip(s), positive response other ips
8191 .line
= __location__
,
8192 .name
= _NBT_NAME("_MA_UA_DI_O", 0x00, NULL
),
8196 .num_ips
= ctx
->addresses_best_num
,
8197 .ips
= ctx
->addresses_best
,
8198 .apply_expected
= true
8203 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
8204 .ips
= addresses_A_3_4
,
8207 .type
= WREPL_TYPE_UNIQUE
,
8208 .state
= WREPL_STATE_ACTIVE
,
8209 .node
= WREPL_NODE_B
,
8211 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8212 .ips
= addresses_B_1
,
8213 .apply_expected
= false
8217 * mhomed,active vs. unique,active with different ip(s), negative response
8221 .line
= __location__
,
8222 .name
= _NBT_NAME("_MA_UA_DI_N", 0x00, NULL
),
8226 .num_ips
= ctx
->addresses_best_num
,
8227 .ips
= ctx
->addresses_best
,
8228 .apply_expected
= true
8235 .type
= WREPL_TYPE_UNIQUE
,
8236 .state
= WREPL_STATE_ACTIVE
,
8237 .node
= WREPL_NODE_B
,
8239 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8240 .ips
= addresses_B_1
,
8241 .apply_expected
= true
8245 * mhomed,active vs. unique,tombstone with same ip(s), unchecked
8249 .line
= __location__
,
8250 .name
= _NBT_NAME("_MA_UT_SI_U", 0x00, NULL
),
8254 .num_ips
= ctx
->addresses_best_num
,
8255 .ips
= ctx
->addresses_best
,
8256 .apply_expected
= true
8262 .type
= WREPL_TYPE_UNIQUE
,
8263 .state
= WREPL_STATE_TOMBSTONE
,
8264 .node
= WREPL_NODE_B
,
8266 .num_ips
= ctx
->addresses_best_num
,
8267 .ips
= ctx
->addresses_best
,
8268 .apply_expected
= false
8272 * mhomed,active vs. unique,tombstone with different ip(s), unchecked
8276 .line
= __location__
,
8277 .name
= _NBT_NAME("_MA_UT_DI_U", 0x00, NULL
),
8281 .num_ips
= ctx
->addresses_best_num
,
8282 .ips
= ctx
->addresses_best
,
8283 .apply_expected
= true
8289 .type
= WREPL_TYPE_UNIQUE
,
8290 .state
= WREPL_STATE_TOMBSTONE
,
8291 .node
= WREPL_NODE_B
,
8293 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8294 .ips
= addresses_B_1
,
8295 .apply_expected
= false
8299 * multi homed vs. normal group section
8302 * mhomed,active vs. group,active with same ip(s), release expected
8306 .line
= __location__
,
8307 .name
= _NBT_NAME("_MA_GA_SI_R", 0x00, NULL
),
8311 .num_ips
= ctx
->addresses_best_num
,
8312 .ips
= ctx
->addresses_best
,
8313 .apply_expected
= true
8317 .expect_release
= true,
8320 .type
= WREPL_TYPE_GROUP
,
8321 .state
= WREPL_STATE_ACTIVE
,
8322 .node
= WREPL_NODE_B
,
8324 .num_ips
= ctx
->addresses_best_num
,
8325 .ips
= ctx
->addresses_best
,
8326 .apply_expected
= true
8330 * mhomed,active vs. group,active with different ip(s), release expected
8334 .line
= __location__
,
8335 .name
= _NBT_NAME("_MA_GA_DI_R", 0x00, NULL
),
8339 .num_ips
= ctx
->addresses_best_num
,
8340 .ips
= ctx
->addresses_best
,
8341 .apply_expected
= true
8345 .expect_release
= true,
8348 .type
= WREPL_TYPE_GROUP
,
8349 .state
= WREPL_STATE_ACTIVE
,
8350 .node
= WREPL_NODE_B
,
8352 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8353 .ips
= addresses_B_1
,
8354 .apply_expected
= true
8358 * mhomed,active vs. group,tombstone with same ip(s), unchecked
8362 .line
= __location__
,
8363 .name
= _NBT_NAME("_MA_GT_SI_U", 0x00, NULL
),
8367 .num_ips
= ctx
->addresses_best_num
,
8368 .ips
= ctx
->addresses_best
,
8369 .apply_expected
= true
8375 .type
= WREPL_TYPE_GROUP
,
8376 .state
= WREPL_STATE_TOMBSTONE
,
8377 .node
= WREPL_NODE_B
,
8379 .num_ips
= ctx
->addresses_best_num
,
8380 .ips
= ctx
->addresses_best
,
8381 .apply_expected
= false
8385 * mhomed,active vs. group,tombstone with different ip(s), unchecked
8389 .line
= __location__
,
8390 .name
= _NBT_NAME("_MA_GT_DI_U", 0x00, NULL
),
8394 .num_ips
= ctx
->addresses_best_num
,
8395 .ips
= ctx
->addresses_best
,
8396 .apply_expected
= true
8402 .type
= WREPL_TYPE_GROUP
,
8403 .state
= WREPL_STATE_TOMBSTONE
,
8404 .node
= WREPL_NODE_B
,
8406 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8407 .ips
= addresses_B_1
,
8408 .apply_expected
= false
8412 * multi homed vs. special group section
8415 * mhomed,active vs. sgroup,active with same ip(s), release expected
8419 .line
= __location__
,
8420 .name
= _NBT_NAME("_MA_SA_SI_R", 0x00, NULL
),
8424 .num_ips
= ctx
->addresses_best_num
,
8425 .ips
= ctx
->addresses_best
,
8426 .apply_expected
= true
8430 .expect_release
= true,
8433 .type
= WREPL_TYPE_SGROUP
,
8434 .state
= WREPL_STATE_ACTIVE
,
8435 .node
= WREPL_NODE_B
,
8437 .num_ips
= ctx
->addresses_best_num
,
8438 .ips
= ctx
->addresses_best
,
8439 .apply_expected
= true
8443 * mhomed,active vs. group,active with different ip(s), release expected
8447 .line
= __location__
,
8448 .name
= _NBT_NAME("_MA_SA_DI_R", 0x00, NULL
),
8452 .num_ips
= ctx
->addresses_best_num
,
8453 .ips
= ctx
->addresses_best
,
8454 .apply_expected
= true
8458 .expect_release
= true,
8461 .type
= WREPL_TYPE_SGROUP
,
8462 .state
= WREPL_STATE_ACTIVE
,
8463 .node
= WREPL_NODE_B
,
8465 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8466 .ips
= addresses_B_1
,
8467 .apply_expected
= true
8471 * mhomed,active vs. sgroup,tombstone with same ip(s), unchecked
8475 .line
= __location__
,
8476 .name
= _NBT_NAME("_MA_ST_SI_U", 0x00, NULL
),
8480 .num_ips
= ctx
->addresses_best_num
,
8481 .ips
= ctx
->addresses_best
,
8482 .apply_expected
= true
8488 .type
= WREPL_TYPE_SGROUP
,
8489 .state
= WREPL_STATE_TOMBSTONE
,
8490 .node
= WREPL_NODE_B
,
8492 .num_ips
= ctx
->addresses_best_num
,
8493 .ips
= ctx
->addresses_best
,
8494 .apply_expected
= false
8498 * mhomed,active vs. sgroup,tombstone with different ip(s), unchecked
8502 .line
= __location__
,
8503 .name
= _NBT_NAME("_MA_ST_DI_U", 0x00, NULL
),
8507 .num_ips
= ctx
->addresses_best_num
,
8508 .ips
= ctx
->addresses_best
,
8509 .apply_expected
= true
8515 .type
= WREPL_TYPE_SGROUP
,
8516 .state
= WREPL_STATE_TOMBSTONE
,
8517 .node
= WREPL_NODE_B
,
8519 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8520 .ips
= addresses_B_1
,
8521 .apply_expected
= false
8525 * multi homed vs. multi homed section
8528 * mhomed,active vs. mhomed,active with same ip(s), unchecked
8532 .line
= __location__
,
8533 .name
= _NBT_NAME("_MA_MA_SI_U", 0x00, NULL
),
8537 .num_ips
= ctx
->addresses_best_num
,
8538 .ips
= ctx
->addresses_best
,
8539 .apply_expected
= true
8545 .type
= WREPL_TYPE_MHOMED
,
8546 .state
= WREPL_STATE_ACTIVE
,
8547 .node
= WREPL_NODE_B
,
8549 .num_ips
= ctx
->addresses_best_num
,
8550 .ips
= ctx
->addresses_best
,
8551 .apply_expected
= true
8555 * mhomed,active vs. mhomed,active with superset ip(s), unchecked
8559 .line
= __location__
,
8560 .name
= _NBT_NAME("_MA_MA_SP_U", 0x00, NULL
),
8564 .num_ips
= ctx
->addresses_best_num
,
8565 .ips
= ctx
->addresses_best
,
8566 .apply_expected
= true
8572 .type
= WREPL_TYPE_MHOMED
,
8573 .state
= WREPL_STATE_ACTIVE
,
8574 .node
= WREPL_NODE_B
,
8576 .num_ips
= ctx
->addresses_all_num
,
8577 .ips
= ctx
->addresses_all
,
8578 .apply_expected
= true
8582 * mhomed,active vs. mhomed,active with different ip(s), positive response
8586 .line
= __location__
,
8587 .name
= _NBT_NAME("_MA_MA_DI_P", 0x00, NULL
),
8591 .num_ips
= ctx
->addresses_best_num
,
8592 .ips
= ctx
->addresses_best
,
8593 .apply_expected
= true
8600 .type
= WREPL_TYPE_MHOMED
,
8601 .state
= WREPL_STATE_ACTIVE
,
8602 .node
= WREPL_NODE_B
,
8604 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8605 .ips
= addresses_B_3_4
,
8606 .apply_expected
= false
8610 * mhomed,active vs. mhomed,active with different ip(s), positive response other ips
8614 .line
= __location__
,
8615 .name
= _NBT_NAME("_MA_MA_DI_O", 0x00, NULL
),
8619 .num_ips
= ctx
->addresses_best_num
,
8620 .ips
= ctx
->addresses_best
,
8621 .apply_expected
= true
8626 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
8627 .ips
= addresses_A_3_4
,
8630 .type
= WREPL_TYPE_MHOMED
,
8631 .state
= WREPL_STATE_ACTIVE
,
8632 .node
= WREPL_NODE_B
,
8634 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8635 .ips
= addresses_B_3_4
,
8636 .apply_expected
= false
8640 * mhomed,active vs. mhomed,active with different ip(s), negative response
8644 .line
= __location__
,
8645 .name
= _NBT_NAME("_MA_MA_DI_N", 0x00, NULL
),
8649 .num_ips
= ctx
->addresses_best_num
,
8650 .ips
= ctx
->addresses_best
,
8651 .apply_expected
= true
8658 .type
= WREPL_TYPE_MHOMED
,
8659 .state
= WREPL_STATE_ACTIVE
,
8660 .node
= WREPL_NODE_B
,
8662 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8663 .ips
= addresses_B_3_4
,
8664 .apply_expected
= true
8668 * mhomed,active vs. mhomed,tombstone with same ip(s), unchecked
8672 .line
= __location__
,
8673 .name
= _NBT_NAME("_MA_MT_SI_U", 0x00, NULL
),
8677 .num_ips
= ctx
->addresses_best_num
,
8678 .ips
= ctx
->addresses_best
,
8679 .apply_expected
= true
8685 .type
= WREPL_TYPE_MHOMED
,
8686 .state
= WREPL_STATE_TOMBSTONE
,
8687 .node
= WREPL_NODE_B
,
8689 .num_ips
= ctx
->addresses_best_num
,
8690 .ips
= ctx
->addresses_best
,
8691 .apply_expected
= false
8695 * mhomed,active vs. mhomed,tombstone with different ip(s), unchecked
8699 .line
= __location__
,
8700 .name
= _NBT_NAME("_MA_MT_DI_U", 0x00, NULL
),
8704 .num_ips
= ctx
->addresses_best_num
,
8705 .ips
= ctx
->addresses_best
,
8706 .apply_expected
= true
8712 .type
= WREPL_TYPE_MHOMED
,
8713 .state
= WREPL_STATE_TOMBSTONE
,
8714 .node
= WREPL_NODE_B
,
8716 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8717 .ips
= addresses_B_3_4
,
8718 .apply_expected
= false
8722 * some more multi homed test, including merging
8725 * mhomed,active vs. mhomed,active with superset ip(s), unchecked
8729 .line
= __location__
,
8730 .section
= "Test Replica vs. owned active: some more MHOMED combinations",
8731 .name
= _NBT_NAME("_MA_MA_SP_U", 0x00, NULL
),
8732 .comment
= "C:MHOMED vs. B:ALL => B:ALL",
8733 .skip
= (ctx
->addresses_all_num
< 3),
8737 .num_ips
= ctx
->addresses_mhomed_num
,
8738 .ips
= ctx
->addresses_mhomed
,
8739 .apply_expected
= true
8745 .type
= WREPL_TYPE_MHOMED
,
8746 .state
= WREPL_STATE_ACTIVE
,
8747 .node
= WREPL_NODE_B
,
8749 .num_ips
= ctx
->addresses_all_num
,
8750 .ips
= ctx
->addresses_all
,
8751 .apply_expected
= true
8755 * mhomed,active vs. mhomed,active with same ips, unchecked
8759 .line
= __location__
,
8760 .name
= _NBT_NAME("_MA_MA_SM_U", 0x00, NULL
),
8761 .comment
= "C:MHOMED vs. B:MHOMED => B:MHOMED",
8762 .skip
= (ctx
->addresses_mhomed_num
< 2),
8766 .num_ips
= ctx
->addresses_mhomed_num
,
8767 .ips
= ctx
->addresses_mhomed
,
8768 .apply_expected
= true
8774 .type
= WREPL_TYPE_MHOMED
,
8775 .state
= WREPL_STATE_ACTIVE
,
8776 .node
= WREPL_NODE_B
,
8778 .num_ips
= ctx
->addresses_mhomed_num
,
8779 .ips
= ctx
->addresses_mhomed
,
8780 .apply_expected
= true
8784 * mhomed,active vs. mhomed,active with subset ip(s), positive response
8788 .line
= __location__
,
8789 .name
= _NBT_NAME("_MA_MA_SB_P", 0x00, NULL
),
8790 .comment
= "C:MHOMED vs. B:BEST (C:MHOMED) => B:MHOMED",
8791 .skip
= (ctx
->addresses_mhomed_num
< 2),
8795 .num_ips
= ctx
->addresses_mhomed_num
,
8796 .ips
= ctx
->addresses_mhomed
,
8797 .apply_expected
= true
8804 .type
= WREPL_TYPE_MHOMED
,
8805 .state
= WREPL_STATE_ACTIVE
,
8806 .node
= WREPL_NODE_B
,
8808 .num_ips
= ctx
->addresses_best_num
,
8809 .ips
= ctx
->addresses_best
,
8810 .mhomed_merge
= true
8814 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with all addresses
8818 .line
= __location__
,
8819 .name
= _NBT_NAME("_MA_MA_SB_A", 0x00, NULL
),
8820 .comment
= "C:MHOMED vs. B:BEST (C:ALL) => B:MHOMED",
8821 .skip
= (ctx
->addresses_all_num
< 3),
8825 .num_ips
= ctx
->addresses_mhomed_num
,
8826 .ips
= ctx
->addresses_mhomed
,
8827 .apply_expected
= true
8832 .num_ips
= ctx
->addresses_all_num
,
8833 .ips
= ctx
->addresses_all
,
8836 .type
= WREPL_TYPE_MHOMED
,
8837 .state
= WREPL_STATE_ACTIVE
,
8838 .node
= WREPL_NODE_B
,
8840 .num_ips
= ctx
->addresses_best_num
,
8841 .ips
= ctx
->addresses_best
,
8842 .mhomed_merge
= true
8846 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with replicas addresses
8847 * TODO: check why the server sends a name release demand for one address?
8848 * the release demand has no effect to the database record...
8852 .line
= __location__
,
8853 .name
= _NBT_NAME("_MA_MA_SB_PRA", 0x00, NULL
),
8854 .comment
= "C:MHOMED vs. B:BEST (C:BEST) => C:MHOMED",
8855 .skip
= (ctx
->addresses_all_num
< 2),
8859 .num_ips
= ctx
->addresses_mhomed_num
,
8860 .ips
= ctx
->addresses_mhomed
,
8861 .apply_expected
= true
8866 .num_ips
= ctx
->addresses_best_num
,
8867 .ips
= ctx
->addresses_best
,
8868 .late_release
= true
8871 .type
= WREPL_TYPE_MHOMED
,
8872 .state
= WREPL_STATE_ACTIVE
,
8873 .node
= WREPL_NODE_B
,
8875 .num_ips
= ctx
->addresses_best_num
,
8876 .ips
= ctx
->addresses_best
,
8877 .apply_expected
= false
8881 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with other addresses
8885 .line
= __location__
,
8886 .name
= _NBT_NAME("_MA_MA_SB_O", 0x00, NULL
),
8887 .comment
= "C:MHOMED vs. B:BEST (B:B_3_4) =>C:MHOMED",
8888 .skip
= (ctx
->addresses_all_num
< 2),
8892 .num_ips
= ctx
->addresses_mhomed_num
,
8893 .ips
= ctx
->addresses_mhomed
,
8894 .apply_expected
= true
8899 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8900 .ips
= addresses_B_3_4
,
8903 .type
= WREPL_TYPE_MHOMED
,
8904 .state
= WREPL_STATE_ACTIVE
,
8905 .node
= WREPL_NODE_B
,
8907 .num_ips
= ctx
->addresses_best_num
,
8908 .ips
= ctx
->addresses_best
,
8909 .apply_expected
= false
8913 * mhomed,active vs. mhomed,active with subset ip(s), negative response
8917 .line
= __location__
,
8918 .name
= _NBT_NAME("_MA_MA_SB_N", 0x00, NULL
),
8919 .comment
= "C:MHOMED vs. B:BEST (NEGATIVE) => B:BEST",
8920 .skip
= (ctx
->addresses_mhomed_num
< 2),
8924 .num_ips
= ctx
->addresses_mhomed_num
,
8925 .ips
= ctx
->addresses_mhomed
,
8926 .apply_expected
= true
8933 .type
= WREPL_TYPE_MHOMED
,
8934 .state
= WREPL_STATE_ACTIVE
,
8935 .node
= WREPL_NODE_B
,
8937 .num_ips
= ctx
->addresses_best_num
,
8938 .ips
= ctx
->addresses_best
,
8939 .apply_expected
= true
8943 * some more multi homed and unique test, including merging
8946 * mhomed,active vs. unique,active with subset ip(s), positive response
8950 .line
= __location__
,
8951 .section
= "Test Replica vs. owned active: some more UNIQUE,MHOMED combinations",
8952 .name
= _NBT_NAME("_MA_UA_SB_P", 0x00, NULL
),
8953 .comment
= "C:MHOMED vs. B:UNIQUE,BEST (C:MHOMED) => B:MHOMED",
8954 .skip
= (ctx
->addresses_all_num
< 2),
8958 .num_ips
= ctx
->addresses_mhomed_num
,
8959 .ips
= ctx
->addresses_mhomed
,
8960 .apply_expected
= true
8967 .type
= WREPL_TYPE_UNIQUE
,
8968 .state
= WREPL_STATE_ACTIVE
,
8969 .node
= WREPL_NODE_B
,
8971 .num_ips
= ctx
->addresses_best_num
,
8972 .ips
= ctx
->addresses_best
,
8973 .mhomed_merge
= true
8977 * unique,active vs. unique,active with different ip(s), positive response, with replicas address
8978 * TODO: check why the server sends a name release demand for one address?
8979 * the release demand has no effect to the database record...
8983 .line
= __location__
,
8984 .name
= _NBT_NAME("_UA_UA_DI_PRA", 0x00, NULL
),
8985 .comment
= "C:BEST vs. B:BEST2 (C:BEST2,LR:BEST2) => C:BEST",
8986 .skip
= (ctx
->addresses_all_num
< 2),
8990 .num_ips
= ctx
->addresses_best_num
,
8991 .ips
= ctx
->addresses_best
,
8992 .apply_expected
= true
8997 .num_ips
= ctx
->addresses_best2_num
,
8998 .ips
= ctx
->addresses_best2
,
8999 .late_release
= true
9002 .type
= WREPL_TYPE_UNIQUE
,
9003 .state
= WREPL_STATE_ACTIVE
,
9004 .node
= WREPL_NODE_B
,
9006 .num_ips
= ctx
->addresses_best2_num
,
9007 .ips
= ctx
->addresses_best2
,
9008 .apply_expected
= false,
9012 * unique,active vs. unique,active with different ip(s), positive response, with all addresses
9016 .line
= __location__
,
9017 .name
= _NBT_NAME("_UA_UA_DI_A", 0x00, NULL
),
9018 .comment
= "C:BEST vs. B:BEST2 (C:ALL) => B:MHOMED",
9019 .skip
= (ctx
->addresses_all_num
< 3),
9023 .num_ips
= ctx
->addresses_best_num
,
9024 .ips
= ctx
->addresses_best
,
9025 .apply_expected
= true
9030 .num_ips
= ctx
->addresses_all_num
,
9031 .ips
= ctx
->addresses_all
,
9034 .type
= WREPL_TYPE_UNIQUE
,
9035 .state
= WREPL_STATE_ACTIVE
,
9036 .node
= WREPL_NODE_B
,
9038 .num_ips
= ctx
->addresses_best2_num
,
9039 .ips
= ctx
->addresses_best2
,
9040 .mhomed_merge
= true,
9044 * unique,active vs. mhomed,active with different ip(s), positive response, with all addresses
9048 .line
= __location__
,
9049 .name
= _NBT_NAME("_UA_MA_DI_A", 0x00, NULL
),
9050 .comment
= "C:BEST vs. B:BEST2 (C:ALL) => B:MHOMED",
9051 .skip
= (ctx
->addresses_all_num
< 3),
9055 .num_ips
= ctx
->addresses_best_num
,
9056 .ips
= ctx
->addresses_best
,
9057 .apply_expected
= true
9062 .num_ips
= ctx
->addresses_all_num
,
9063 .ips
= ctx
->addresses_all
,
9066 .type
= WREPL_TYPE_MHOMED
,
9067 .state
= WREPL_STATE_ACTIVE
,
9068 .node
= WREPL_NODE_B
,
9070 .num_ips
= ctx
->addresses_best2_num
,
9071 .ips
= ctx
->addresses_best2
,
9072 .mhomed_merge
= true,
9076 * special group vs. special group merging section
9079 * sgroup,active vs. sgroup,active with different ip(s)
9083 .line
= __location__
,
9084 .section
= "Test Replica vs. owned active: SGROUP vs. SGROUP tests",
9085 .name
= _NBT_NAME("_SA_SA_DI_U", 0x1C, NULL
),
9086 .skip
= (ctx
->addresses_all_num
< 3),
9088 .nb_flags
= NBT_NM_GROUP
,
9090 .num_ips
= ctx
->addresses_mhomed_num
,
9091 .ips
= ctx
->addresses_mhomed
,
9092 .apply_expected
= true
9098 .type
= WREPL_TYPE_SGROUP
,
9099 .state
= WREPL_STATE_ACTIVE
,
9100 .node
= WREPL_NODE_B
,
9102 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
9103 .ips
= addresses_B_3_4
,
9104 .sgroup_merge
= true
9108 * sgroup,active vs. sgroup,active with same ip(s)
9112 .line
= __location__
,
9113 .name
= _NBT_NAME("_SA_SA_SI_U", 0x1C, NULL
),
9114 .skip
= (ctx
->addresses_all_num
< 3),
9116 .nb_flags
= NBT_NM_GROUP
,
9118 .num_ips
= ctx
->addresses_mhomed_num
,
9119 .ips
= ctx
->addresses_mhomed
,
9120 .apply_expected
= true
9126 .type
= WREPL_TYPE_SGROUP
,
9127 .state
= WREPL_STATE_ACTIVE
,
9128 .node
= WREPL_NODE_B
,
9130 .num_ips
= ctx
->addresses_mhomed_num
,
9131 .ips
= ctx
->addresses_mhomed
,
9132 .sgroup_merge
= true
9136 * sgroup,active vs. sgroup,active with superset ip(s)
9140 .line
= __location__
,
9141 .name
= _NBT_NAME("_SA_SA_SP_U", 0x1C, NULL
),
9142 .skip
= (ctx
->addresses_all_num
< 3),
9144 .nb_flags
= NBT_NM_GROUP
,
9146 .num_ips
= ctx
->addresses_mhomed_num
,
9147 .ips
= ctx
->addresses_mhomed
,
9148 .apply_expected
= true
9154 .type
= WREPL_TYPE_SGROUP
,
9155 .state
= WREPL_STATE_ACTIVE
,
9156 .node
= WREPL_NODE_B
,
9158 .num_ips
= ctx
->addresses_all_num
,
9159 .ips
= ctx
->addresses_all
,
9160 .sgroup_merge
= true
9164 * sgroup,active vs. sgroup,active with subset ip(s)
9168 .line
= __location__
,
9169 .name
= _NBT_NAME("_SA_SA_SB_U", 0x1C, NULL
),
9170 .skip
= (ctx
->addresses_all_num
< 3),
9172 .nb_flags
= NBT_NM_GROUP
,
9174 .num_ips
= ctx
->addresses_mhomed_num
,
9175 .ips
= ctx
->addresses_mhomed
,
9176 .apply_expected
= true
9182 .type
= WREPL_TYPE_SGROUP
,
9183 .state
= WREPL_STATE_ACTIVE
,
9184 .node
= WREPL_NODE_B
,
9186 .num_ips
= ctx
->addresses_best_num
,
9187 .ips
= ctx
->addresses_best
,
9188 .sgroup_merge
= true
9192 * sgroup,active vs. sgroup,tombstone with different ip(s)
9196 .line
= __location__
,
9197 .name
= _NBT_NAME("_SA_ST_DI_U", 0x1C, NULL
),
9198 .skip
= (ctx
->addresses_all_num
< 3),
9200 .nb_flags
= NBT_NM_GROUP
,
9202 .num_ips
= ctx
->addresses_mhomed_num
,
9203 .ips
= ctx
->addresses_mhomed
,
9204 .apply_expected
= true
9210 .type
= WREPL_TYPE_SGROUP
,
9211 .state
= WREPL_STATE_TOMBSTONE
,
9212 .node
= WREPL_NODE_B
,
9214 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
9215 .ips
= addresses_B_3_4
,
9216 .apply_expected
= false
9220 * sgroup,active vs. sgroup,tombstone with same ip(s)
9224 .line
= __location__
,
9225 .name
= _NBT_NAME("_SA_ST_SI_U", 0x1C, NULL
),
9226 .skip
= (ctx
->addresses_all_num
< 3),
9228 .nb_flags
= NBT_NM_GROUP
,
9230 .num_ips
= ctx
->addresses_mhomed_num
,
9231 .ips
= ctx
->addresses_mhomed
,
9232 .apply_expected
= true
9238 .type
= WREPL_TYPE_SGROUP
,
9239 .state
= WREPL_STATE_TOMBSTONE
,
9240 .node
= WREPL_NODE_B
,
9242 .num_ips
= ctx
->addresses_mhomed_num
,
9243 .ips
= ctx
->addresses_mhomed
,
9244 .apply_expected
= false
9248 * sgroup,active vs. sgroup,tombstone with superset ip(s)
9252 .line
= __location__
,
9253 .name
= _NBT_NAME("_SA_ST_SP_U", 0x1C, NULL
),
9254 .skip
= (ctx
->addresses_all_num
< 3),
9256 .nb_flags
= NBT_NM_GROUP
,
9258 .num_ips
= ctx
->addresses_mhomed_num
,
9259 .ips
= ctx
->addresses_mhomed
,
9260 .apply_expected
= true
9266 .type
= WREPL_TYPE_SGROUP
,
9267 .state
= WREPL_STATE_TOMBSTONE
,
9268 .node
= WREPL_NODE_B
,
9270 .num_ips
= ctx
->addresses_all_num
,
9271 .ips
= ctx
->addresses_all
,
9272 .apply_expected
= false
9276 * sgroup,active vs. sgroup,tombstone with subset ip(s)
9280 .line
= __location__
,
9281 .name
= _NBT_NAME("_SA_ST_SB_U", 0x1C, NULL
),
9282 .skip
= (ctx
->addresses_all_num
< 3),
9284 .nb_flags
= NBT_NM_GROUP
,
9286 .num_ips
= ctx
->addresses_mhomed_num
,
9287 .ips
= ctx
->addresses_mhomed
,
9288 .apply_expected
= true
9294 .type
= WREPL_TYPE_SGROUP
,
9295 .state
= WREPL_STATE_TOMBSTONE
,
9296 .node
= WREPL_NODE_B
,
9298 .num_ips
= ctx
->addresses_best_num
,
9299 .ips
= ctx
->addresses_best
,
9300 .apply_expected
= false
9305 if (!ctx
->nbtsock_srv
) {
9306 torture_comment(tctx
, "SKIP: Test Replica records vs. owned active records: not bound to port[%d]\n",
9307 lpcfg_nbt_port(tctx
->lp_ctx
));
9311 torture_comment(tctx
, "Test Replica records vs. owned active records\n");
9313 for(i
=0; ret
&& i
< ARRAY_SIZE(records
); i
++) {
9315 struct test_conflict_owned_active_vs_replica_struct record
= records
[i
];
9316 uint32_t j
, count
= 1;
9319 if (records
[i
].wins
.mhomed
|| records
[i
].name
.type
== 0x1C) {
9320 count
= records
[i
].wins
.num_ips
;
9323 if (records
[i
].section
) {
9324 torture_comment(tctx
, "%s\n", records
[i
].section
);
9327 if (records
[i
].skip
) {
9328 torture_comment(tctx
, "%s => SKIPPED\n", nbt_name_string(ctx
, &records
[i
].name
));
9332 if (records
[i
].replica
.mhomed_merge
) {
9333 action
= "MHOMED_MERGE";
9334 } else if (records
[i
].replica
.sgroup_merge
) {
9335 action
= "SGROUP_MERGE";
9336 } else if (records
[i
].replica
.apply_expected
) {
9339 action
= "NOT REPLACE";
9342 torture_comment(tctx
, "%s%s%s => %s\n",
9343 nbt_name_string(ctx
, &records
[i
].name
),
9344 (records
[i
].comment
?": ":""),
9345 (records
[i
].comment
?records
[i
].comment
:""),
9348 /* Prepare for multi homed registration */
9349 ZERO_STRUCT(records
[i
].defend
);
9350 records
[i
].defend
.timeout
= 10;
9351 records
[i
].defend
.positive
= true;
9352 nbt_set_incoming_handler(ctx
->nbtsock_srv
,
9353 test_conflict_owned_active_vs_replica_handler
,
9355 if (ctx
->nbtsock_srv2
) {
9356 nbt_set_incoming_handler(ctx
->nbtsock_srv2
,
9357 test_conflict_owned_active_vs_replica_handler
,
9364 for (j
=0; j
< count
; j
++) {
9365 struct nbt_name_request
*req
;
9367 name_register
->in
.name
= records
[i
].name
;
9368 name_register
->in
.dest_addr
= ctx
->address
;
9369 name_register
->in
.dest_port
= lpcfg_nbt_port(tctx
->lp_ctx
);
9370 name_register
->in
.address
= records
[i
].wins
.ips
[j
].ip
;
9371 name_register
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
9372 name_register
->in
.register_demand
= false;
9373 name_register
->in
.broadcast
= false;
9374 name_register
->in
.multi_homed
= records
[i
].wins
.mhomed
;
9375 name_register
->in
.ttl
= 300000;
9376 name_register
->in
.timeout
= 70;
9377 name_register
->in
.retries
= 0;
9379 req
= nbt_name_register_send(ctx
->nbtsock
, name_register
);
9381 /* push the request on the wire */
9382 tevent_loop_once(ctx
->nbtsock
->event_ctx
);
9385 * if we register multiple addresses,
9386 * the server will do name queries to see if the old addresses
9389 if (records
[i
].wins
.mhomed
&& j
> 0) {
9390 end
= timeval_current_ofs(records
[i
].defend
.timeout
,0);
9391 records
[i
].defend
.ret
= true;
9392 while (records
[i
].defend
.timeout
> 0) {
9393 tevent_loop_once(ctx
->nbtsock_srv
->event_ctx
);
9394 if (timeval_expired(&end
)) break;
9396 ret
&= records
[i
].defend
.ret
;
9399 status
= nbt_name_register_recv(req
, ctx
, name_register
);
9400 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
9401 torture_comment(tctx
, "No response from %s for name register\n", ctx
->address
);
9404 if (!NT_STATUS_IS_OK(status
)) {
9405 torture_comment(tctx
, "Bad response from %s for name register - %s\n",
9406 ctx
->address
, nt_errstr(status
));
9409 CHECK_VALUE(tctx
, name_register
->out
.rcode
, 0);
9410 CHECK_VALUE_STRING(tctx
, name_register
->out
.reply_from
, ctx
->address
);
9411 CHECK_VALUE(tctx
, name_register
->out
.name
.type
, records
[i
].name
.type
);
9412 CHECK_VALUE_STRING(tctx
, name_register
->out
.name
.name
, records
[i
].name
.name
);
9413 CHECK_VALUE_STRING(tctx
, name_register
->out
.name
.scope
, records
[i
].name
.scope
);
9414 CHECK_VALUE_STRING(tctx
, name_register
->out
.reply_addr
, records
[i
].wins
.ips
[j
].ip
);
9417 /* Prepare for the current test */
9418 records
[i
].defend
= record
.defend
;
9419 nbt_set_incoming_handler(ctx
->nbtsock_srv
,
9420 test_conflict_owned_active_vs_replica_handler
,
9422 if (ctx
->nbtsock_srv2
) {
9423 nbt_set_incoming_handler(ctx
->nbtsock_srv2
,
9424 test_conflict_owned_active_vs_replica_handler
,
9431 wins_name
->name
= &records
[i
].name
;
9432 wins_name
->flags
= WREPL_NAME_FLAGS(records
[i
].replica
.type
,
9433 records
[i
].replica
.state
,
9434 records
[i
].replica
.node
,
9435 records
[i
].replica
.is_static
);
9436 wins_name
->id
= ++ctx
->b
.max_version
;
9437 if (wins_name
->flags
& 2) {
9438 wins_name
->addresses
.addresses
.num_ips
= records
[i
].replica
.num_ips
;
9439 wins_name
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
9440 records
[i
].replica
.ips
);
9442 wins_name
->addresses
.ip
= records
[i
].replica
.ips
[0].ip
;
9444 wins_name
->unknown
= "255.255.255.255";
9446 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9449 * wait for the name query, which is handled in
9450 * test_conflict_owned_active_vs_replica_handler()
9452 end
= timeval_current_ofs(records
[i
].defend
.timeout
,0);
9453 records
[i
].defend
.ret
= true;
9454 while (records
[i
].defend
.timeout
> 0) {
9455 tevent_loop_once(ctx
->nbtsock_srv
->event_ctx
);
9456 if (timeval_expired(&end
)) break;
9458 ret
&= records
[i
].defend
.ret
;
9460 if (records
[i
].defend
.late_release
) {
9461 records
[i
].defend
= record
.defend
;
9462 records
[i
].defend
.expect_release
= true;
9464 * wait for the name release demand, which is handled in
9465 * test_conflict_owned_active_vs_replica_handler()
9467 end
= timeval_current_ofs(records
[i
].defend
.timeout
,0);
9468 records
[i
].defend
.ret
= true;
9469 while (records
[i
].defend
.timeout
> 0) {
9470 tevent_loop_once(ctx
->nbtsock_srv
->event_ctx
);
9471 if (timeval_expired(&end
)) break;
9473 ret
&= records
[i
].defend
.ret
;
9476 if (records
[i
].replica
.mhomed_merge
) {
9477 ret
&= test_wrepl_mhomed_merged(tctx
, ctx
, &ctx
->c
,
9478 records
[i
].wins
.num_ips
, records
[i
].wins
.ips
,
9480 records
[i
].replica
.num_ips
, records
[i
].replica
.ips
,
9482 } else if (records
[i
].replica
.sgroup_merge
) {
9483 ret
&= test_wrepl_sgroup_merged(tctx
, ctx
, NULL
,
9485 records
[i
].wins
.num_ips
, records
[i
].wins
.ips
,
9487 records
[i
].replica
.num_ips
, records
[i
].replica
.ips
,
9490 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
,
9491 records
[i
].replica
.apply_expected
);
9494 if (records
[i
].replica
.apply_expected
||
9495 records
[i
].replica
.mhomed_merge
) {
9496 wins_name
->name
= &records
[i
].name
;
9497 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE
,
9498 WREPL_STATE_TOMBSTONE
,
9499 WREPL_NODE_B
, false);
9500 wins_name
->id
= ++ctx
->b
.max_version
;
9501 wins_name
->addresses
.ip
= addresses_B_1
[0].ip
;
9502 wins_name
->unknown
= "255.255.255.255";
9504 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9505 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
, true);
9507 for (j
=0; j
< count
; j
++) {
9508 struct nbt_name_socket
*nbtsock
= ctx
->nbtsock
;
9510 if (ctx
->myaddr2
&& strcmp(records
[i
].wins
.ips
[j
].ip
, ctx
->myaddr2
->addr
) == 0) {
9511 nbtsock
= ctx
->nbtsock2
;
9514 release
->in
.name
= records
[i
].name
;
9515 release
->in
.dest_addr
= ctx
->address
;
9516 release
->in
.dest_port
= lpcfg_nbt_port(tctx
->lp_ctx
);
9517 release
->in
.address
= records
[i
].wins
.ips
[j
].ip
;
9518 release
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
9519 release
->in
.broadcast
= false;
9520 release
->in
.timeout
= 30;
9521 release
->in
.retries
= 0;
9523 status
= nbt_name_release(nbtsock
, ctx
, release
);
9524 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
9525 torture_comment(tctx
, "No response from %s for name release\n", ctx
->address
);
9528 if (!NT_STATUS_IS_OK(status
)) {
9529 torture_comment(tctx
, "Bad response from %s for name query - %s\n",
9530 ctx
->address
, nt_errstr(status
));
9533 CHECK_VALUE(tctx
, release
->out
.rcode
, 0);
9536 if (records
[i
].replica
.sgroup_merge
) {
9537 /* clean up the SGROUP record */
9538 wins_name
->name
= &records
[i
].name
;
9539 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
9541 WREPL_NODE_B
, false);
9542 wins_name
->id
= ++ctx
->b
.max_version
;
9543 wins_name
->addresses
.addresses
.num_ips
= 0;
9544 wins_name
->addresses
.addresses
.ips
= NULL
;
9545 wins_name
->unknown
= "255.255.255.255";
9546 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9548 /* take ownership of the SGROUP record */
9549 wins_name
->name
= &records
[i
].name
;
9550 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
9552 WREPL_NODE_B
, false);
9553 wins_name
->id
= ++ctx
->b
.max_version
;
9554 wins_name
->addresses
.addresses
.num_ips
= ARRAY_SIZE(addresses_B_1
);
9555 wins_name
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
9557 wins_name
->unknown
= "255.255.255.255";
9558 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9559 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
, true);
9561 /* overwrite the SGROUP record with unique,tombstone */
9562 wins_name
->name
= &records
[i
].name
;
9563 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE
,
9564 WREPL_STATE_TOMBSTONE
,
9565 WREPL_NODE_B
, false);
9566 wins_name
->id
= ++ctx
->b
.max_version
;
9567 wins_name
->addresses
.ip
= addresses_A_1
[0].ip
;
9568 wins_name
->unknown
= "255.255.255.255";
9569 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9570 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
, true);
9575 torture_comment(tctx
, "conflict handled wrong or record[%u]: %s\n", i
, records
[i
].line
);
9583 #define __NBT_LABEL_CAT1__(a,b) a##b
9584 #define __NBT_LABEL_CAT2__(a,b) __NBT_LABEL_CAT1__(a,b)
9585 #define _NBT_LABEL __NBT_LABEL_CAT2__(_label_, __LINE__)
9587 #define _NBT_ASSERT(v, correct) do { \
9589 torture_assert_int_equal_goto(rec->tctx, v, correct, \
9590 _ret, _NBT_LABEL, "Invalid int value"); \
9597 #define _NBT_ASSERT_STRING(v, correct) do { \
9599 torture_assert_str_equal_goto(rec->tctx, v, correct, \
9600 _ret, _NBT_LABEL, "Invalid string value"); \
9607 static void test_conflict_owned_active_vs_replica_handler_query(struct nbt_name_socket
*nbtsock
,
9608 struct nbt_name_packet
*req_packet
,
9609 struct socket_address
*src
)
9611 struct nbt_name
*name
;
9612 struct nbt_name_packet
*rep_packet
;
9613 struct test_conflict_owned_active_vs_replica_struct
*rec
=
9614 (struct test_conflict_owned_active_vs_replica_struct
*)nbtsock
->incoming
.private_data
;
9616 _NBT_ASSERT(req_packet
->qdcount
, 1);
9617 _NBT_ASSERT(req_packet
->questions
[0].question_type
, NBT_QTYPE_NETBIOS
);
9618 _NBT_ASSERT(req_packet
->questions
[0].question_class
, NBT_QCLASS_IP
);
9620 name
= &req_packet
->questions
[0].name
;
9622 _NBT_ASSERT_STRING(name
->name
, rec
->name
.name
);
9623 _NBT_ASSERT(name
->type
, rec
->name
.type
);
9624 _NBT_ASSERT_STRING(name
->scope
, rec
->name
.scope
);
9626 _NBT_ASSERT(rec
->defend
.expect_release
, false);
9628 rep_packet
= talloc_zero(nbtsock
, struct nbt_name_packet
);
9629 if (rep_packet
== NULL
) return;
9631 rep_packet
->name_trn_id
= req_packet
->name_trn_id
;
9632 rep_packet
->ancount
= 1;
9634 rep_packet
->answers
= talloc_array(rep_packet
, struct nbt_res_rec
, 1);
9635 if (rep_packet
->answers
== NULL
) return;
9637 rep_packet
->answers
[0].name
= *name
;
9638 rep_packet
->answers
[0].rr_class
= NBT_QCLASS_IP
;
9639 rep_packet
->answers
[0].ttl
= 0;
9641 if (rec
->defend
.positive
) {
9642 uint32_t i
, num_ips
;
9643 const struct wrepl_ip
*ips
;
9645 if (rec
->defend
.num_ips
> 0) {
9646 num_ips
= rec
->defend
.num_ips
;
9647 ips
= rec
->defend
.ips
;
9649 num_ips
= rec
->wins
.num_ips
;
9650 ips
= rec
->wins
.ips
;
9653 /* send a positive reply */
9654 rep_packet
->operation
=
9657 NBT_FLAG_AUTHORITATIVE
|
9658 NBT_FLAG_RECURSION_DESIRED
|
9659 NBT_FLAG_RECURSION_AVAIL
;
9661 rep_packet
->answers
[0].rr_type
= NBT_QTYPE_NETBIOS
;
9663 rep_packet
->answers
[0].rdata
.netbios
.length
= num_ips
*6;
9664 rep_packet
->answers
[0].rdata
.netbios
.addresses
=
9665 talloc_array(rep_packet
->answers
, struct nbt_rdata_address
, num_ips
);
9666 if (rep_packet
->answers
[0].rdata
.netbios
.addresses
== NULL
) return;
9668 for (i
=0; i
< num_ips
; i
++) {
9669 struct nbt_rdata_address
*addr
=
9670 &rep_packet
->answers
[0].rdata
.netbios
.addresses
[i
];
9671 addr
->nb_flags
= rec
->wins
.nb_flags
;
9672 addr
->ipaddr
= ips
[i
].ip
;
9674 DEBUG(2,("Sending positive name query reply for %s to %s:%d\n",
9675 nbt_name_string(rep_packet
, name
), src
->addr
, src
->port
));
9677 /* send a negative reply */
9678 rep_packet
->operation
=
9681 NBT_FLAG_AUTHORITATIVE
|
9684 rep_packet
->answers
[0].rr_type
= NBT_QTYPE_NULL
;
9686 ZERO_STRUCT(rep_packet
->answers
[0].rdata
);
9688 DEBUG(2,("Sending negative name query reply for %s to %s:%d\n",
9689 nbt_name_string(rep_packet
, name
), src
->addr
, src
->port
));
9692 nbt_name_reply_send(nbtsock
, src
, rep_packet
);
9693 talloc_free(rep_packet
);
9695 /* make sure we push the reply to the wire */
9696 while (nbtsock
->send_queue
) {
9697 tevent_loop_once(nbtsock
->event_ctx
);
9701 rec
->defend
.timeout
= 0;
9702 rec
->defend
.ret
= true;
9705 static void test_conflict_owned_active_vs_replica_handler_release(
9706 struct nbt_name_socket
*nbtsock
,
9707 struct nbt_name_packet
*req_packet
,
9708 struct socket_address
*src
)
9710 struct nbt_name
*name
;
9711 struct nbt_name_packet
*rep_packet
;
9712 struct test_conflict_owned_active_vs_replica_struct
*rec
=
9713 (struct test_conflict_owned_active_vs_replica_struct
*)nbtsock
->incoming
.private_data
;
9715 _NBT_ASSERT(req_packet
->qdcount
, 1);
9716 _NBT_ASSERT(req_packet
->questions
[0].question_type
, NBT_QTYPE_NETBIOS
);
9717 _NBT_ASSERT(req_packet
->questions
[0].question_class
, NBT_QCLASS_IP
);
9719 name
= &req_packet
->questions
[0].name
;
9721 _NBT_ASSERT_STRING(name
->name
, rec
->name
.name
);
9722 _NBT_ASSERT(name
->type
, rec
->name
.type
);
9723 _NBT_ASSERT_STRING(name
->scope
, rec
->name
.scope
);
9725 _NBT_ASSERT(rec
->defend
.expect_release
, true);
9727 rep_packet
= talloc_zero(nbtsock
, struct nbt_name_packet
);
9728 if (rep_packet
== NULL
) return;
9730 rep_packet
->name_trn_id
= req_packet
->name_trn_id
;
9731 rep_packet
->ancount
= 1;
9732 rep_packet
->operation
=
9734 NBT_OPCODE_RELEASE
|
9735 NBT_FLAG_AUTHORITATIVE
;
9737 rep_packet
->answers
= talloc_array(rep_packet
, struct nbt_res_rec
, 1);
9738 if (rep_packet
->answers
== NULL
) return;
9740 rep_packet
->answers
[0].name
= *name
;
9741 rep_packet
->answers
[0].rr_type
= NBT_QTYPE_NETBIOS
;
9742 rep_packet
->answers
[0].rr_class
= NBT_QCLASS_IP
;
9743 rep_packet
->answers
[0].ttl
= req_packet
->additional
[0].ttl
;
9744 rep_packet
->answers
[0].rdata
= req_packet
->additional
[0].rdata
;
9746 DEBUG(2,("Sending name release reply for %s to %s:%d\n",
9747 nbt_name_string(rep_packet
, name
), src
->addr
, src
->port
));
9749 nbt_name_reply_send(nbtsock
, src
, rep_packet
);
9750 talloc_free(rep_packet
);
9752 /* make sure we push the reply to the wire */
9753 while (nbtsock
->send_queue
) {
9754 tevent_loop_once(nbtsock
->event_ctx
);
9758 rec
->defend
.timeout
= 0;
9759 rec
->defend
.ret
= true;
9762 static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket
*nbtsock
,
9763 struct nbt_name_packet
*req_packet
,
9764 struct socket_address
*src
)
9766 struct test_conflict_owned_active_vs_replica_struct
*rec
=
9767 (struct test_conflict_owned_active_vs_replica_struct
*)nbtsock
->incoming
.private_data
;
9768 struct nbt_name
*name
= &req_packet
->questions
[0].name
;
9770 if (req_packet
->operation
& NBT_FLAG_BROADCAST
) {
9771 torture_comment(rec
->tctx
,
9772 "%s: incoming packet name[%s] flags[0x%08X] from[%s]\n",
9774 nbt_name_string(rec
->tctx
, name
),
9775 req_packet
->operation
,
9780 rec
->defend
.ret
= false;
9782 switch (req_packet
->operation
& NBT_OPCODE
) {
9783 case NBT_OPCODE_QUERY
:
9784 test_conflict_owned_active_vs_replica_handler_query(nbtsock
, req_packet
, src
);
9786 case NBT_OPCODE_RELEASE
:
9787 test_conflict_owned_active_vs_replica_handler_release(nbtsock
, req_packet
, src
);
9790 torture_comment(rec
->tctx
,
9791 "%s: unexpected packet name[%s] flags[0x%08X] from[%s]\n",
9793 nbt_name_string(rec
->tctx
, name
),
9794 req_packet
->operation
,
9796 _NBT_ASSERT((req_packet
->operation
& NBT_OPCODE
), NBT_OPCODE_QUERY
);
9802 test WINS replication replica conflicts operations
9804 static bool torture_nbt_winsreplication_replica(struct torture_context
*tctx
)
9807 struct test_wrepl_conflict_conn
*ctx
;
9809 const char *address
;
9810 struct nbt_name name
;
9812 if (!torture_nbt_get_name(tctx
, &name
, &address
))
9815 ctx
= test_create_conflict_ctx(tctx
, address
);
9816 if (!ctx
) return false;
9818 ret
&= test_conflict_same_owner(tctx
, ctx
);
9819 ret
&= test_conflict_different_owner(tctx
, ctx
);
9825 test WINS replication owned conflicts operations
9827 static bool torture_nbt_winsreplication_owned(struct torture_context
*tctx
)
9829 const char *address
;
9830 struct nbt_name name
;
9832 struct test_wrepl_conflict_conn
*ctx
;
9834 if (torture_setting_bool(tctx
, "quick", false))
9836 "skip NBT-WINSREPLICATION-OWNED test in quick test mode\n");
9838 if (!torture_nbt_get_name(tctx
, &name
, &address
))
9841 ctx
= test_create_conflict_ctx(tctx
, address
);
9842 torture_assert(tctx
, ctx
!= NULL
, "Creating context failed");
9844 ret
&= test_conflict_owned_released_vs_replica(tctx
, ctx
);
9845 ret
&= test_conflict_owned_active_vs_replica(tctx
, ctx
);
9851 test simple WINS replication operations
9853 struct torture_suite
*torture_nbt_winsreplication(TALLOC_CTX
*mem_ctx
)
9855 struct torture_suite
*suite
= torture_suite_create(
9856 mem_ctx
, "winsreplication");
9857 struct torture_tcase
*tcase
;
9859 tcase
= torture_suite_add_simple_test(suite
, "assoc_ctx1",
9861 tcase
->tests
->dangerous
= true;
9863 torture_suite_add_simple_test(suite
, "assoc_ctx2", test_assoc_ctx2
);
9865 torture_suite_add_simple_test(suite
, "wins_replication",
9866 test_wins_replication
);
9868 torture_suite_add_simple_test(suite
, "replica",
9869 torture_nbt_winsreplication_replica
);
9871 torture_suite_add_simple_test(suite
, "owned",
9872 torture_nbt_winsreplication_owned
);