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 "torture/torture.h"
31 #include "torture/nbt/proto.h"
32 #include "param/param.h"
34 #define CHECK_STATUS(tctx, status, correct) \
35 torture_assert_ntstatus_equal(tctx, status, correct, \
38 #define CHECK_VALUE(tctx, v, correct) \
39 torture_assert(tctx, (v) == (correct), \
40 talloc_asprintf(tctx, "Incorrect value %s=%d - should be %d\n", \
43 #define CHECK_VALUE_UINT64(tctx, v, correct) \
44 torture_assert(tctx, (v) == (correct), \
45 talloc_asprintf(tctx, "Incorrect value %s=%llu - should be %llu\n", \
46 #v, (long long)v, (long long)correct))
48 #define CHECK_VALUE_STRING(tctx, v, correct) \
49 torture_assert_str_equal(tctx, v, correct, "Invalid value")
51 #define _NBT_NAME(n,t,s) {\
57 static const char *wrepl_name_type_string(enum wrepl_name_type type
)
60 case WREPL_TYPE_UNIQUE
: return "UNIQUE";
61 case WREPL_TYPE_GROUP
: return "GROUP";
62 case WREPL_TYPE_SGROUP
: return "SGROUP";
63 case WREPL_TYPE_MHOMED
: return "MHOMED";
65 return "UNKNOWN_TYPE";
68 static const char *wrepl_name_state_string(enum wrepl_name_state state
)
71 case WREPL_STATE_ACTIVE
: return "ACTIVE";
72 case WREPL_STATE_RELEASED
: return "RELEASED";
73 case WREPL_STATE_TOMBSTONE
: return "TOMBSTONE";
74 case WREPL_STATE_RESERVED
: return "RESERVED";
76 return "UNKNOWN_STATE";
80 test how assoc_ctx's are only usable on the connection
83 static bool test_assoc_ctx1(struct torture_context
*tctx
)
86 struct tevent_req
*subreq
;
87 struct wrepl_socket
*wrepl_socket1
;
88 struct wrepl_associate associate1
;
89 struct wrepl_socket
*wrepl_socket2
;
90 struct wrepl_associate associate2
;
91 struct wrepl_packet packet
;
92 struct wrepl_send_ctrl ctrl
;
93 struct wrepl_packet
*rep_packet
;
94 struct wrepl_associate_stop assoc_stop
;
100 if (!torture_nbt_get_name(tctx
, &name
, &address
))
103 torture_comment(tctx
, "Test if assoc_ctx is only valid on the conection it was created on\n");
105 wrepl_socket1
= wrepl_socket_init(tctx
, tctx
->ev
);
106 wrepl_socket2
= wrepl_socket_init(tctx
, tctx
->ev
);
108 torture_comment(tctx
, "Setup 2 wrepl connections\n");
109 status
= wrepl_connect(wrepl_socket1
, wrepl_best_ip(tctx
->lp_ctx
, address
), address
);
110 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
112 status
= wrepl_connect(wrepl_socket2
, wrepl_best_ip(tctx
->lp_ctx
, address
), address
);
113 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
115 torture_comment(tctx
, "Send a start association request (conn1)\n");
116 status
= wrepl_associate(wrepl_socket1
, &associate1
);
117 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
119 torture_comment(tctx
, "association context (conn1): 0x%x\n", associate1
.out
.assoc_ctx
);
121 torture_comment(tctx
, "Send a start association request (conn2)\n");
122 status
= wrepl_associate(wrepl_socket2
, &associate2
);
123 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
125 torture_comment(tctx
, "association context (conn2): 0x%x\n", associate2
.out
.assoc_ctx
);
127 torture_comment(tctx
, "Send a replication table query, with assoc 1 (conn2), the anwser should be on conn1\n");
129 packet
.opcode
= WREPL_OPCODE_BITS
;
130 packet
.assoc_ctx
= associate1
.out
.assoc_ctx
;
131 packet
.mess_type
= WREPL_REPLICATION
;
132 packet
.message
.replication
.command
= WREPL_REPL_TABLE_QUERY
;
134 ctrl
.send_only
= true;
135 subreq
= wrepl_request_send(tctx
, tctx
->ev
, wrepl_socket2
, &packet
, &ctrl
);
136 ok
= tevent_req_poll(subreq
, tctx
->ev
);
138 CHECK_STATUS(tctx
, NT_STATUS_INTERNAL_ERROR
, NT_STATUS_OK
);
140 status
= wrepl_request_recv(subreq
, tctx
, &rep_packet
);
142 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
144 torture_comment(tctx
, "Send a association request (conn2), to make sure the last request was ignored\n");
145 status
= wrepl_associate(wrepl_socket2
, &associate2
);
146 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
148 torture_comment(tctx
, "Send a replication table query, with invalid assoc (conn1), receive answer from conn2\n");
150 packet
.opcode
= WREPL_OPCODE_BITS
;
151 packet
.assoc_ctx
= 0;
152 packet
.mess_type
= WREPL_REPLICATION
;
153 packet
.message
.replication
.command
= WREPL_REPL_TABLE_QUERY
;
154 status
= wrepl_request(wrepl_socket1
, tctx
, &packet
, &rep_packet
);
155 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
157 torture_comment(tctx
, "Send a association request (conn1), to make sure the last request was handled correct\n");
158 status
= wrepl_associate(wrepl_socket1
, &associate2
);
159 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
161 assoc_stop
.in
.assoc_ctx
= associate1
.out
.assoc_ctx
;
162 assoc_stop
.in
.reason
= 4;
163 torture_comment(tctx
, "Send a association stop request (conn1), reson: %u\n", assoc_stop
.in
.reason
);
164 status
= wrepl_associate_stop(wrepl_socket1
, &assoc_stop
);
165 CHECK_STATUS(tctx
, status
, NT_STATUS_END_OF_FILE
);
167 assoc_stop
.in
.assoc_ctx
= associate2
.out
.assoc_ctx
;
168 assoc_stop
.in
.reason
= 0;
169 torture_comment(tctx
, "Send a association stop request (conn2), reson: %u\n", assoc_stop
.in
.reason
);
170 status
= wrepl_associate_stop(wrepl_socket2
, &assoc_stop
);
171 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
173 torture_comment(tctx
, "Close 2 wrepl connections\n");
174 talloc_free(wrepl_socket1
);
175 talloc_free(wrepl_socket2
);
180 test if we always get back the same assoc_ctx
182 static bool test_assoc_ctx2(struct torture_context
*tctx
)
184 struct wrepl_socket
*wrepl_socket
;
185 struct wrepl_associate associate
;
187 struct nbt_name name
;
191 if (!torture_nbt_get_name(tctx
, &name
, &address
))
194 torture_comment(tctx
, "Test if we always get back the same assoc_ctx\n");
196 wrepl_socket
= wrepl_socket_init(tctx
, tctx
->ev
);
198 torture_comment(tctx
, "Setup wrepl connections\n");
199 status
= wrepl_connect(wrepl_socket
, wrepl_best_ip(tctx
->lp_ctx
, address
), address
);
200 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
202 torture_comment(tctx
, "Send 1st start association request\n");
203 status
= wrepl_associate(wrepl_socket
, &associate
);
204 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
205 assoc_ctx1
= associate
.out
.assoc_ctx
;
206 torture_comment(tctx
, "1st association context: 0x%x\n", associate
.out
.assoc_ctx
);
208 torture_comment(tctx
, "Send 2nd start association request\n");
209 status
= wrepl_associate(wrepl_socket
, &associate
);
210 torture_assert_ntstatus_ok(tctx
, status
, "2nd start association failed");
211 torture_assert(tctx
, associate
.out
.assoc_ctx
== assoc_ctx1
,
212 "Different context returned");
213 torture_comment(tctx
, "2nd association context: 0x%x\n", associate
.out
.assoc_ctx
);
215 torture_comment(tctx
, "Send 3rd start association request\n");
216 status
= wrepl_associate(wrepl_socket
, &associate
);
217 torture_assert(tctx
, associate
.out
.assoc_ctx
== assoc_ctx1
,
218 "Different context returned");
219 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
220 torture_comment(tctx
, "3rd association context: 0x%x\n", associate
.out
.assoc_ctx
);
222 torture_comment(tctx
, "Close wrepl connections\n");
223 talloc_free(wrepl_socket
);
229 display a replication entry
231 static void display_entry(struct torture_context
*tctx
, struct wrepl_name
*name
)
235 torture_comment(tctx
, "%s\n", nbt_name_string(tctx
, &name
->name
));
236 torture_comment(tctx
, "\tTYPE:%u STATE:%u NODE:%u STATIC:%u VERSION_ID: %llu\n",
237 name
->type
, name
->state
, name
->node
, name
->is_static
, (long long)name
->version_id
);
238 torture_comment(tctx
, "\tRAW_FLAGS: 0x%08X OWNER: %-15s\n",
239 name
->raw_flags
, name
->owner
);
240 for (i
=0;i
<name
->num_addresses
;i
++) {
241 torture_comment(tctx
, "\tADDR: %-15s OWNER: %-15s\n",
242 name
->addresses
[i
].address
, name
->addresses
[i
].owner
);
247 test a full replication dump from a WINS server
249 static bool test_wins_replication(struct torture_context
*tctx
)
251 struct wrepl_socket
*wrepl_socket
;
254 struct wrepl_associate associate
;
255 struct wrepl_pull_table pull_table
;
256 struct wrepl_pull_names pull_names
;
257 struct nbt_name name
;
260 if (!torture_nbt_get_name(tctx
, &name
, &address
))
263 torture_comment(tctx
, "Test one pull replication cycle\n");
265 wrepl_socket
= wrepl_socket_init(tctx
, tctx
->ev
);
267 torture_comment(tctx
, "Setup wrepl connections\n");
268 status
= wrepl_connect(wrepl_socket
, wrepl_best_ip(tctx
->lp_ctx
, address
), address
);
269 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
271 torture_comment(tctx
, "Send a start association request\n");
273 status
= wrepl_associate(wrepl_socket
, &associate
);
274 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
276 torture_comment(tctx
, "association context: 0x%x\n", associate
.out
.assoc_ctx
);
278 torture_comment(tctx
, "Send a replication table query\n");
279 pull_table
.in
.assoc_ctx
= associate
.out
.assoc_ctx
;
281 status
= wrepl_pull_table(wrepl_socket
, tctx
, &pull_table
);
282 if (NT_STATUS_EQUAL(NT_STATUS_NETWORK_ACCESS_DENIED
,status
)) {
283 struct wrepl_associate_stop assoc_stop
;
285 assoc_stop
.in
.assoc_ctx
= associate
.out
.assoc_ctx
;
286 assoc_stop
.in
.reason
= 0;
288 wrepl_associate_stop(wrepl_socket
, &assoc_stop
);
290 torture_fail(tctx
, "We are not a valid pull partner for the server");
292 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
294 torture_comment(tctx
, "Found %d replication partners\n", pull_table
.out
.num_partners
);
296 for (i
=0;i
<pull_table
.out
.num_partners
;i
++) {
297 struct wrepl_wins_owner
*partner
= &pull_table
.out
.partners
[i
];
298 torture_comment(tctx
, "%s max_version=%6llu min_version=%6llu type=%d\n",
300 (long long)partner
->max_version
,
301 (long long)partner
->min_version
,
304 pull_names
.in
.assoc_ctx
= associate
.out
.assoc_ctx
;
305 pull_names
.in
.partner
= *partner
;
307 status
= wrepl_pull_names(wrepl_socket
, tctx
, &pull_names
);
308 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
310 torture_comment(tctx
, "Received %d names\n", pull_names
.out
.num_names
);
312 for (j
=0;j
<pull_names
.out
.num_names
;j
++) {
313 display_entry(tctx
, &pull_names
.out
.names
[j
]);
317 torture_comment(tctx
, "Close wrepl connections\n");
318 talloc_free(wrepl_socket
);
322 struct test_wrepl_conflict_conn
{
324 struct wrepl_socket
*pull
;
327 #define TEST_OWNER_A_ADDRESS "127.65.65.1"
328 #define TEST_ADDRESS_A_PREFIX "127.0.65"
329 #define TEST_OWNER_B_ADDRESS "127.66.66.1"
330 #define TEST_ADDRESS_B_PREFIX "127.0.66"
331 #define TEST_OWNER_X_ADDRESS "127.88.88.1"
332 #define TEST_ADDRESS_X_PREFIX "127.0.88"
334 struct wrepl_wins_owner a
, b
, c
, x
;
336 struct socket_address
*myaddr
;
337 struct socket_address
*myaddr2
;
338 struct nbt_name_socket
*nbtsock
;
339 struct nbt_name_socket
*nbtsock2
;
341 struct nbt_name_socket
*nbtsock_srv
;
342 struct nbt_name_socket
*nbtsock_srv2
;
344 uint32_t addresses_best_num
;
345 struct wrepl_ip
*addresses_best
;
347 uint32_t addresses_best2_num
;
348 struct wrepl_ip
*addresses_best2
;
350 uint32_t addresses_all_num
;
351 struct wrepl_ip
*addresses_all
;
353 uint32_t addresses_mhomed_num
;
354 struct wrepl_ip
*addresses_mhomed
;
357 static const struct wrepl_ip addresses_A_1
[] = {
359 .owner
= TEST_OWNER_A_ADDRESS
,
360 .ip
= TEST_ADDRESS_A_PREFIX
".1"
363 static const struct wrepl_ip addresses_A_2
[] = {
365 .owner
= TEST_OWNER_A_ADDRESS
,
366 .ip
= TEST_ADDRESS_A_PREFIX
".2"
369 static const struct wrepl_ip addresses_A_3_4
[] = {
371 .owner
= TEST_OWNER_A_ADDRESS
,
372 .ip
= TEST_ADDRESS_A_PREFIX
".3"
375 .owner
= TEST_OWNER_A_ADDRESS
,
376 .ip
= TEST_ADDRESS_A_PREFIX
".4"
379 static const struct wrepl_ip addresses_A_3_4_X_3_4
[] = {
381 .owner
= TEST_OWNER_A_ADDRESS
,
382 .ip
= TEST_ADDRESS_A_PREFIX
".3"
385 .owner
= TEST_OWNER_A_ADDRESS
,
386 .ip
= TEST_ADDRESS_A_PREFIX
".4"
389 .owner
= TEST_OWNER_X_ADDRESS
,
390 .ip
= TEST_ADDRESS_X_PREFIX
".3"
393 .owner
= TEST_OWNER_X_ADDRESS
,
394 .ip
= TEST_ADDRESS_X_PREFIX
".4"
397 static const struct wrepl_ip addresses_A_3_4_B_3_4
[] = {
399 .owner
= TEST_OWNER_A_ADDRESS
,
400 .ip
= TEST_ADDRESS_A_PREFIX
".3"
403 .owner
= TEST_OWNER_A_ADDRESS
,
404 .ip
= TEST_ADDRESS_A_PREFIX
".4"
407 .owner
= TEST_OWNER_B_ADDRESS
,
408 .ip
= TEST_ADDRESS_B_PREFIX
".3"
411 .owner
= TEST_OWNER_B_ADDRESS
,
412 .ip
= TEST_ADDRESS_B_PREFIX
".4"
415 static const struct wrepl_ip addresses_A_3_4_OWNER_B
[] = {
417 .owner
= TEST_OWNER_B_ADDRESS
,
418 .ip
= TEST_ADDRESS_A_PREFIX
".3"
421 .owner
= TEST_OWNER_B_ADDRESS
,
422 .ip
= TEST_ADDRESS_A_PREFIX
".4"
425 static const struct wrepl_ip addresses_A_3_4_X_3_4_OWNER_B
[] = {
427 .owner
= TEST_OWNER_B_ADDRESS
,
428 .ip
= TEST_ADDRESS_A_PREFIX
".3"
431 .owner
= TEST_OWNER_B_ADDRESS
,
432 .ip
= TEST_ADDRESS_A_PREFIX
".4"
435 .owner
= TEST_OWNER_B_ADDRESS
,
436 .ip
= TEST_ADDRESS_X_PREFIX
".3"
439 .owner
= TEST_OWNER_B_ADDRESS
,
440 .ip
= TEST_ADDRESS_X_PREFIX
".4"
444 static const struct wrepl_ip addresses_A_3_4_X_1_2
[] = {
446 .owner
= TEST_OWNER_A_ADDRESS
,
447 .ip
= TEST_ADDRESS_A_PREFIX
".3"
450 .owner
= TEST_OWNER_A_ADDRESS
,
451 .ip
= TEST_ADDRESS_A_PREFIX
".4"
454 .owner
= TEST_OWNER_X_ADDRESS
,
455 .ip
= TEST_ADDRESS_X_PREFIX
".1"
458 .owner
= TEST_OWNER_X_ADDRESS
,
459 .ip
= TEST_ADDRESS_X_PREFIX
".2"
463 static const struct wrepl_ip addresses_B_1
[] = {
465 .owner
= TEST_OWNER_B_ADDRESS
,
466 .ip
= TEST_ADDRESS_B_PREFIX
".1"
469 static const struct wrepl_ip addresses_B_2
[] = {
471 .owner
= TEST_OWNER_B_ADDRESS
,
472 .ip
= TEST_ADDRESS_B_PREFIX
".2"
475 static const struct wrepl_ip addresses_B_3_4
[] = {
477 .owner
= TEST_OWNER_B_ADDRESS
,
478 .ip
= TEST_ADDRESS_B_PREFIX
".3"
481 .owner
= TEST_OWNER_B_ADDRESS
,
482 .ip
= TEST_ADDRESS_B_PREFIX
".4"
485 static const struct wrepl_ip addresses_B_3_4_X_3_4
[] = {
487 .owner
= TEST_OWNER_B_ADDRESS
,
488 .ip
= TEST_ADDRESS_B_PREFIX
".3"
491 .owner
= TEST_OWNER_B_ADDRESS
,
492 .ip
= TEST_ADDRESS_B_PREFIX
".4"
495 .owner
= TEST_OWNER_X_ADDRESS
,
496 .ip
= TEST_ADDRESS_X_PREFIX
".3"
499 .owner
= TEST_OWNER_X_ADDRESS
,
500 .ip
= TEST_ADDRESS_X_PREFIX
".4"
503 static const struct wrepl_ip addresses_B_3_4_X_1_2
[] = {
505 .owner
= TEST_OWNER_B_ADDRESS
,
506 .ip
= TEST_ADDRESS_B_PREFIX
".3"
509 .owner
= TEST_OWNER_B_ADDRESS
,
510 .ip
= TEST_ADDRESS_B_PREFIX
".4"
513 .owner
= TEST_OWNER_X_ADDRESS
,
514 .ip
= TEST_ADDRESS_X_PREFIX
".1"
517 .owner
= TEST_OWNER_X_ADDRESS
,
518 .ip
= TEST_ADDRESS_X_PREFIX
".2"
522 static const struct wrepl_ip addresses_X_1_2
[] = {
524 .owner
= TEST_OWNER_X_ADDRESS
,
525 .ip
= TEST_ADDRESS_X_PREFIX
".1"
528 .owner
= TEST_OWNER_X_ADDRESS
,
529 .ip
= TEST_ADDRESS_X_PREFIX
".2"
532 static const struct wrepl_ip addresses_X_3_4
[] = {
534 .owner
= TEST_OWNER_X_ADDRESS
,
535 .ip
= TEST_ADDRESS_X_PREFIX
".3"
538 .owner
= TEST_OWNER_X_ADDRESS
,
539 .ip
= TEST_ADDRESS_X_PREFIX
".4"
543 static struct test_wrepl_conflict_conn
*test_create_conflict_ctx(
544 struct torture_context
*tctx
, const char *address
)
546 struct test_wrepl_conflict_conn
*ctx
;
547 struct wrepl_associate associate
;
548 struct wrepl_pull_table pull_table
;
549 struct socket_address
*nbt_srv_addr
;
552 struct interface
*ifaces
;
554 ctx
= talloc_zero(tctx
, struct test_wrepl_conflict_conn
);
555 if (!ctx
) return NULL
;
557 ctx
->address
= address
;
558 ctx
->pull
= wrepl_socket_init(ctx
, tctx
->ev
);
559 if (!ctx
->pull
) return NULL
;
561 torture_comment(tctx
, "Setup wrepl conflict pull connection\n");
562 status
= wrepl_connect(ctx
->pull
, wrepl_best_ip(tctx
->lp_ctx
, ctx
->address
), ctx
->address
);
563 if (!NT_STATUS_IS_OK(status
)) return NULL
;
565 status
= wrepl_associate(ctx
->pull
, &associate
);
566 if (!NT_STATUS_IS_OK(status
)) return NULL
;
568 ctx
->pull_assoc
= associate
.out
.assoc_ctx
;
570 ctx
->a
.address
= TEST_OWNER_A_ADDRESS
;
571 ctx
->a
.max_version
= 0;
572 ctx
->a
.min_version
= 0;
575 ctx
->b
.address
= TEST_OWNER_B_ADDRESS
;
576 ctx
->b
.max_version
= 0;
577 ctx
->b
.min_version
= 0;
580 ctx
->x
.address
= TEST_OWNER_X_ADDRESS
;
581 ctx
->x
.max_version
= 0;
582 ctx
->x
.min_version
= 0;
585 ctx
->c
.address
= address
;
586 ctx
->c
.max_version
= 0;
587 ctx
->c
.min_version
= 0;
590 pull_table
.in
.assoc_ctx
= ctx
->pull_assoc
;
591 status
= wrepl_pull_table(ctx
->pull
, ctx
->pull
, &pull_table
);
592 if (!NT_STATUS_IS_OK(status
)) return NULL
;
594 for (i
=0; i
< pull_table
.out
.num_partners
; i
++) {
595 if (strcmp(TEST_OWNER_A_ADDRESS
,pull_table
.out
.partners
[i
].address
)==0) {
596 ctx
->a
.max_version
= pull_table
.out
.partners
[i
].max_version
;
597 ctx
->a
.min_version
= pull_table
.out
.partners
[i
].min_version
;
599 if (strcmp(TEST_OWNER_B_ADDRESS
,pull_table
.out
.partners
[i
].address
)==0) {
600 ctx
->b
.max_version
= pull_table
.out
.partners
[i
].max_version
;
601 ctx
->b
.min_version
= pull_table
.out
.partners
[i
].min_version
;
603 if (strcmp(TEST_OWNER_X_ADDRESS
,pull_table
.out
.partners
[i
].address
)==0) {
604 ctx
->x
.max_version
= pull_table
.out
.partners
[i
].max_version
;
605 ctx
->x
.min_version
= pull_table
.out
.partners
[i
].min_version
;
607 if (strcmp(address
,pull_table
.out
.partners
[i
].address
)==0) {
608 ctx
->c
.max_version
= pull_table
.out
.partners
[i
].max_version
;
609 ctx
->c
.min_version
= pull_table
.out
.partners
[i
].min_version
;
613 talloc_free(pull_table
.out
.partners
);
615 ctx
->nbtsock
= nbt_name_socket_init(ctx
, tctx
->ev
);
616 if (!ctx
->nbtsock
) return NULL
;
618 load_interfaces(tctx
, lpcfg_interfaces(tctx
->lp_ctx
), &ifaces
);
620 ctx
->myaddr
= socket_address_from_strings(tctx
, ctx
->nbtsock
->sock
->backend_name
, iface_best_ip(ifaces
, address
), 0);
621 if (!ctx
->myaddr
) return NULL
;
623 for (i
= 0; i
< iface_count(ifaces
); i
++) {
624 if (strcmp(ctx
->myaddr
->addr
, iface_n_ip(ifaces
, i
)) == 0) continue;
625 ctx
->myaddr2
= socket_address_from_strings(tctx
, ctx
->nbtsock
->sock
->backend_name
, iface_n_ip(ifaces
, i
), 0);
626 if (!ctx
->myaddr2
) return NULL
;
630 status
= socket_listen(ctx
->nbtsock
->sock
, ctx
->myaddr
, 0, 0);
631 if (!NT_STATUS_IS_OK(status
)) return NULL
;
633 ctx
->nbtsock_srv
= nbt_name_socket_init(ctx
, tctx
->ev
);
634 if (!ctx
->nbtsock_srv
) return NULL
;
636 /* Make a port 137 version of ctx->myaddr */
637 nbt_srv_addr
= socket_address_from_strings(tctx
, ctx
->nbtsock_srv
->sock
->backend_name
, ctx
->myaddr
->addr
, lpcfg_nbt_port(tctx
->lp_ctx
));
638 if (!nbt_srv_addr
) return NULL
;
640 /* And if possible, bind to it. This won't work unless we are root or in sockewrapper */
641 status
= socket_listen(ctx
->nbtsock_srv
->sock
, nbt_srv_addr
, 0, 0);
642 talloc_free(nbt_srv_addr
);
643 if (!NT_STATUS_IS_OK(status
)) {
644 /* this isn't fatal */
645 talloc_free(ctx
->nbtsock_srv
);
646 ctx
->nbtsock_srv
= NULL
;
649 if (ctx
->myaddr2
&& ctx
->nbtsock_srv
) {
650 ctx
->nbtsock2
= nbt_name_socket_init(ctx
, tctx
->ev
);
651 if (!ctx
->nbtsock2
) return NULL
;
653 status
= socket_listen(ctx
->nbtsock2
->sock
, ctx
->myaddr2
, 0, 0);
654 if (!NT_STATUS_IS_OK(status
)) return NULL
;
656 ctx
->nbtsock_srv2
= nbt_name_socket_init(ctx
, ctx
->nbtsock_srv
->event_ctx
);
657 if (!ctx
->nbtsock_srv2
) return NULL
;
659 /* Make a port 137 version of ctx->myaddr2 */
660 nbt_srv_addr
= socket_address_from_strings(tctx
,
661 ctx
->nbtsock_srv
->sock
->backend_name
,
663 lpcfg_nbt_port(tctx
->lp_ctx
));
664 if (!nbt_srv_addr
) return NULL
;
666 /* And if possible, bind to it. This won't work unless we are root or in sockewrapper */
667 status
= socket_listen(ctx
->nbtsock_srv2
->sock
, ctx
->myaddr2
, 0, 0);
668 talloc_free(nbt_srv_addr
);
669 if (!NT_STATUS_IS_OK(status
)) {
670 /* this isn't fatal */
671 talloc_free(ctx
->nbtsock_srv2
);
672 ctx
->nbtsock_srv2
= NULL
;
676 ctx
->addresses_best_num
= 1;
677 ctx
->addresses_best
= talloc_array(ctx
, struct wrepl_ip
, ctx
->addresses_best_num
);
678 if (!ctx
->addresses_best
) return NULL
;
679 ctx
->addresses_best
[0].owner
= ctx
->b
.address
;
680 ctx
->addresses_best
[0].ip
= ctx
->myaddr
->addr
;
682 ctx
->addresses_all_num
= iface_count(ifaces
);
683 ctx
->addresses_all
= talloc_array(ctx
, struct wrepl_ip
, ctx
->addresses_all_num
);
684 if (!ctx
->addresses_all
) return NULL
;
685 for (i
=0; i
< ctx
->addresses_all_num
; i
++) {
686 ctx
->addresses_all
[i
].owner
= ctx
->b
.address
;
687 ctx
->addresses_all
[i
].ip
= talloc_strdup(ctx
->addresses_all
, iface_n_ip(ifaces
, i
));
688 if (!ctx
->addresses_all
[i
].ip
) return NULL
;
691 if (ctx
->nbtsock_srv2
) {
692 ctx
->addresses_best2_num
= 1;
693 ctx
->addresses_best2
= talloc_array(ctx
, struct wrepl_ip
, ctx
->addresses_best2_num
);
694 if (!ctx
->addresses_best2
) return NULL
;
695 ctx
->addresses_best2
[0].owner
= ctx
->b
.address
;
696 ctx
->addresses_best2
[0].ip
= ctx
->myaddr2
->addr
;
698 ctx
->addresses_mhomed_num
= 2;
699 ctx
->addresses_mhomed
= talloc_array(ctx
, struct wrepl_ip
, ctx
->addresses_mhomed_num
);
700 if (!ctx
->addresses_mhomed
) return NULL
;
701 ctx
->addresses_mhomed
[0].owner
= ctx
->b
.address
;
702 ctx
->addresses_mhomed
[0].ip
= ctx
->myaddr
->addr
;
703 ctx
->addresses_mhomed
[1].owner
= ctx
->b
.address
;
704 ctx
->addresses_mhomed
[1].ip
= ctx
->myaddr2
->addr
;
710 static bool test_wrepl_update_one(struct torture_context
*tctx
,
711 struct test_wrepl_conflict_conn
*ctx
,
712 const struct wrepl_wins_owner
*owner
,
713 const struct wrepl_wins_name
*name
)
715 struct wrepl_socket
*wrepl_socket
;
716 struct wrepl_associate associate
;
717 struct wrepl_packet update_packet
, repl_send
;
718 struct wrepl_table
*update
;
719 struct wrepl_wins_owner wrepl_wins_owners
[1];
720 struct wrepl_packet
*repl_recv
;
721 struct wrepl_wins_owner
*send_request
;
722 struct wrepl_send_reply
*send_reply
;
723 struct wrepl_wins_name wrepl_wins_names
[1];
727 wrepl_socket
= wrepl_socket_init(ctx
, tctx
->ev
);
729 status
= wrepl_connect(wrepl_socket
, wrepl_best_ip(tctx
->lp_ctx
, ctx
->address
), ctx
->address
);
730 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
732 status
= wrepl_associate(wrepl_socket
, &associate
);
733 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
734 assoc_ctx
= associate
.out
.assoc_ctx
;
736 /* now send a WREPL_REPL_UPDATE message */
737 ZERO_STRUCT(update_packet
);
738 update_packet
.opcode
= WREPL_OPCODE_BITS
;
739 update_packet
.assoc_ctx
= assoc_ctx
;
740 update_packet
.mess_type
= WREPL_REPLICATION
;
741 update_packet
.message
.replication
.command
= WREPL_REPL_UPDATE
;
742 update
= &update_packet
.message
.replication
.info
.table
;
744 update
->partner_count
= ARRAY_SIZE(wrepl_wins_owners
);
745 update
->partners
= wrepl_wins_owners
;
746 update
->initiator
= "0.0.0.0";
748 wrepl_wins_owners
[0] = *owner
;
750 status
= wrepl_request(wrepl_socket
, wrepl_socket
,
751 &update_packet
, &repl_recv
);
752 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
753 CHECK_VALUE(tctx
, repl_recv
->mess_type
, WREPL_REPLICATION
);
754 CHECK_VALUE(tctx
, repl_recv
->message
.replication
.command
, WREPL_REPL_SEND_REQUEST
);
755 send_request
= &repl_recv
->message
.replication
.info
.owner
;
757 ZERO_STRUCT(repl_send
);
758 repl_send
.opcode
= WREPL_OPCODE_BITS
;
759 repl_send
.assoc_ctx
= assoc_ctx
;
760 repl_send
.mess_type
= WREPL_REPLICATION
;
761 repl_send
.message
.replication
.command
= WREPL_REPL_SEND_REPLY
;
762 send_reply
= &repl_send
.message
.replication
.info
.reply
;
764 send_reply
->num_names
= ARRAY_SIZE(wrepl_wins_names
);
765 send_reply
->names
= wrepl_wins_names
;
767 wrepl_wins_names
[0] = *name
;
769 status
= wrepl_request(wrepl_socket
, wrepl_socket
,
770 &repl_send
, &repl_recv
);
771 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
772 CHECK_VALUE(tctx
, repl_recv
->mess_type
, WREPL_STOP_ASSOCIATION
);
773 CHECK_VALUE(tctx
, repl_recv
->message
.stop
.reason
, 0);
775 talloc_free(wrepl_socket
);
779 static bool test_wrepl_is_applied(struct torture_context
*tctx
,
780 struct test_wrepl_conflict_conn
*ctx
,
781 const struct wrepl_wins_owner
*owner
,
782 const struct wrepl_wins_name
*name
,
786 struct wrepl_pull_names pull_names
;
787 struct wrepl_name
*names
;
789 pull_names
.in
.assoc_ctx
= ctx
->pull_assoc
;
790 pull_names
.in
.partner
= *owner
;
791 pull_names
.in
.partner
.min_version
= pull_names
.in
.partner
.max_version
;
793 status
= wrepl_pull_names(ctx
->pull
, ctx
->pull
, &pull_names
);
794 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
795 torture_assert(tctx
, pull_names
.out
.num_names
== (expected
?1:0),
796 talloc_asprintf(tctx
, "Invalid number of records returned - expected %d got %d", expected
, pull_names
.out
.num_names
));
798 names
= pull_names
.out
.names
;
801 uint32_t flags
= WREPL_NAME_FLAGS(names
[0].type
,
805 char *expected_scope
= NULL
;
806 CHECK_VALUE(tctx
, names
[0].name
.type
, name
->name
->type
);
807 CHECK_VALUE_STRING(tctx
, names
[0].name
.name
, name
->name
->name
);
809 if (names
[0].name
.scope
) {
810 expected_scope
= talloc_strndup(tctx
,
814 CHECK_VALUE_STRING(tctx
, names
[0].name
.scope
, expected_scope
);
815 CHECK_VALUE(tctx
, flags
, name
->flags
);
816 CHECK_VALUE_UINT64(tctx
, names
[0].version_id
, name
->id
);
819 CHECK_VALUE(tctx
, names
[0].num_addresses
,
820 name
->addresses
.addresses
.num_ips
);
822 CHECK_VALUE(tctx
, names
[0].num_addresses
, 1);
823 CHECK_VALUE_STRING(tctx
, names
[0].addresses
[0].address
,
827 talloc_free(pull_names
.out
.names
);
831 static bool test_wrepl_mhomed_merged(struct torture_context
*tctx
,
832 struct test_wrepl_conflict_conn
*ctx
,
833 const struct wrepl_wins_owner
*owner1
,
834 uint32_t num_ips1
, const struct wrepl_ip
*ips1
,
835 const struct wrepl_wins_owner
*owner2
,
836 uint32_t num_ips2
, const struct wrepl_ip
*ips2
,
837 const struct wrepl_wins_name
*name2
)
840 struct wrepl_pull_names pull_names
;
841 struct wrepl_name
*names
;
844 uint32_t num_ips
= num_ips1
+ num_ips2
;
846 for (i
= 0; i
< num_ips2
; i
++) {
847 for (j
= 0; j
< num_ips1
; j
++) {
848 if (strcmp(ips2
[i
].ip
,ips1
[j
].ip
) == 0) {
855 pull_names
.in
.assoc_ctx
= ctx
->pull_assoc
;
856 pull_names
.in
.partner
= *owner2
;
857 pull_names
.in
.partner
.min_version
= pull_names
.in
.partner
.max_version
;
859 status
= wrepl_pull_names(ctx
->pull
, ctx
->pull
, &pull_names
);
860 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
861 CHECK_VALUE(tctx
, pull_names
.out
.num_names
, 1);
863 names
= pull_names
.out
.names
;
865 flags
= WREPL_NAME_FLAGS(names
[0].type
,
869 CHECK_VALUE(tctx
, names
[0].name
.type
, name2
->name
->type
);
870 CHECK_VALUE_STRING(tctx
, names
[0].name
.name
, name2
->name
->name
);
871 CHECK_VALUE_STRING(tctx
, names
[0].name
.scope
, name2
->name
->scope
);
872 CHECK_VALUE(tctx
, flags
, name2
->flags
| WREPL_TYPE_MHOMED
);
873 CHECK_VALUE_UINT64(tctx
, names
[0].version_id
, name2
->id
);
875 CHECK_VALUE(tctx
, names
[0].num_addresses
, num_ips
);
877 for (i
= 0; i
< names
[0].num_addresses
; i
++) {
878 const char *addr
= names
[0].addresses
[i
].address
;
879 const char *owner
= names
[0].addresses
[i
].owner
;
882 for (j
= 0; j
< num_ips2
; j
++) {
883 if (strcmp(addr
, ips2
[j
].ip
) == 0) {
885 CHECK_VALUE_STRING(tctx
, owner
, owner2
->address
);
892 for (j
= 0; j
< num_ips1
; j
++) {
893 if (strcmp(addr
, ips1
[j
].ip
) == 0) {
895 CHECK_VALUE_STRING(tctx
, owner
, owner1
->address
);
902 CHECK_VALUE_STRING(tctx
, addr
, "not found in address list");
904 talloc_free(pull_names
.out
.names
);
908 static bool test_wrepl_sgroup_merged(struct torture_context
*tctx
,
909 struct test_wrepl_conflict_conn
*ctx
,
910 struct wrepl_wins_owner
*merge_owner
,
911 struct wrepl_wins_owner
*owner1
,
912 uint32_t num_ips1
, const struct wrepl_ip
*ips1
,
913 struct wrepl_wins_owner
*owner2
,
914 uint32_t num_ips2
, const struct wrepl_ip
*ips2
,
915 const struct wrepl_wins_name
*name2
)
918 struct wrepl_pull_names pull_names
;
919 struct wrepl_name
*names
;
920 struct wrepl_name
*name
= NULL
;
923 uint32_t num_ips
= num_ips1
+ num_ips2
;
926 merge_owner
= &ctx
->c
;
929 for (i
= 0; i
< num_ips1
; i
++) {
930 if (owner1
!= &ctx
->c
&& strcmp(ips1
[i
].owner
,owner2
->address
) == 0) {
934 for (j
= 0; j
< num_ips2
; j
++) {
935 if (strcmp(ips1
[i
].ip
,ips2
[j
].ip
) == 0) {
943 pull_names
.in
.assoc_ctx
= ctx
->pull_assoc
;
944 pull_names
.in
.partner
= *merge_owner
;
945 pull_names
.in
.partner
.min_version
= pull_names
.in
.partner
.max_version
;
946 pull_names
.in
.partner
.max_version
= 0;
948 status
= wrepl_pull_names(ctx
->pull
, ctx
->pull
, &pull_names
);
949 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
951 names
= pull_names
.out
.names
;
953 for (i
= 0; i
< pull_names
.out
.num_names
; i
++) {
954 if (names
[i
].name
.type
!= name2
->name
->type
) continue;
955 if (!names
[i
].name
.name
) continue;
956 if (strcmp(names
[i
].name
.name
, name2
->name
->name
) != 0) continue;
957 if (names
[i
].name
.scope
) continue;
962 if (pull_names
.out
.num_names
> 0) {
963 merge_owner
->max_version
= names
[pull_names
.out
.num_names
-1].version_id
;
967 torture_comment(tctx
, "%s: Name '%s' not found\n", __location__
, nbt_name_string(ctx
, name2
->name
));
971 flags
= WREPL_NAME_FLAGS(name
->type
,
975 CHECK_VALUE(tctx
, name
->name
.type
, name2
->name
->type
);
976 CHECK_VALUE_STRING(tctx
, name
->name
.name
, name2
->name
->name
);
977 CHECK_VALUE_STRING(tctx
, name
->name
.scope
, name2
->name
->scope
);
978 CHECK_VALUE(tctx
, flags
, name2
->flags
);
980 CHECK_VALUE(tctx
, name
->num_addresses
, num_ips
);
982 for (i
= 0; i
< name
->num_addresses
; i
++) {
983 const char *addr
= name
->addresses
[i
].address
;
984 const char *owner
= name
->addresses
[i
].owner
;
987 for (j
= 0; j
< num_ips2
; j
++) {
988 if (strcmp(addr
, ips2
[j
].ip
) == 0) {
990 CHECK_VALUE_STRING(tctx
, owner
, ips2
[j
].owner
);
997 for (j
= 0; j
< num_ips1
; j
++) {
998 if (strcmp(addr
, ips1
[j
].ip
) == 0) {
1000 if (owner1
== &ctx
->c
) {
1001 CHECK_VALUE_STRING(tctx
, owner
, owner1
->address
);
1003 CHECK_VALUE_STRING(tctx
, owner
, ips1
[j
].owner
);
1009 if (found
) continue;
1011 CHECK_VALUE_STRING(tctx
, addr
, "not found in address list");
1013 talloc_free(pull_names
.out
.names
);
1017 static char *test_nbt_winsrepl_scope_string(TALLOC_CTX
*mem_ctx
, uint8_t count
)
1022 res
= talloc_array(mem_ctx
, char, count
+1);
1027 for (i
=0; i
< count
; i
++) {
1028 res
[i
] = '0' + (i
%10);
1033 talloc_set_name_const(res
, res
);
1038 static bool test_conflict_same_owner(struct torture_context
*tctx
,
1039 struct test_wrepl_conflict_conn
*ctx
)
1042 struct wrepl_wins_name wins_name1
;
1043 struct wrepl_wins_name wins_name2
;
1044 struct wrepl_wins_name
*wins_name_tmp
;
1045 struct wrepl_wins_name
*wins_name_last
;
1046 struct wrepl_wins_name
*wins_name_cur
;
1048 struct nbt_name names
[] = {
1049 _NBT_NAME("_SAME_OWNER_A", 0x00, NULL
),
1050 _NBT_NAME("_SAME_OWNER_A", 0x00,
1051 test_nbt_winsrepl_scope_string(tctx
, 1)),
1052 _NBT_NAME("_SAME_OWNER_A", 0x00,
1053 test_nbt_winsrepl_scope_string(tctx
, 2)),
1054 _NBT_NAME("_SAME_OWNER_A", 0x00,
1055 test_nbt_winsrepl_scope_string(tctx
, 3)),
1056 _NBT_NAME("_SAME_OWNER_A", 0x00,
1057 test_nbt_winsrepl_scope_string(tctx
, 4)),
1058 _NBT_NAME("_SAME_OWNER_A", 0x00,
1059 test_nbt_winsrepl_scope_string(tctx
, 5)),
1060 _NBT_NAME("_SAME_OWNER_A", 0x00,
1061 test_nbt_winsrepl_scope_string(tctx
, 6)),
1062 _NBT_NAME("_SAME_OWNER_A", 0x00,
1063 test_nbt_winsrepl_scope_string(tctx
, 7)),
1064 _NBT_NAME("_SAME_OWNER_A", 0x00,
1065 test_nbt_winsrepl_scope_string(tctx
, 8)),
1066 _NBT_NAME("_SAME_OWNER_A", 0x00,
1067 test_nbt_winsrepl_scope_string(tctx
, 9)),
1068 _NBT_NAME("_SAME_OWNER_A", 0x00,
1069 test_nbt_winsrepl_scope_string(tctx
, 237)),
1070 _NBT_NAME("_SAME_OWNER_A", 0x00,
1071 test_nbt_winsrepl_scope_string(tctx
, 238)),
1072 _NBT_NAME("_SAME_OWNER_A", 0x1C, NULL
),
1075 enum wrepl_name_type type
;
1076 enum wrepl_name_state state
;
1077 enum wrepl_name_node node
;
1080 const struct wrepl_ip
*ips
;
1083 .type
= WREPL_TYPE_GROUP
,
1084 .state
= WREPL_STATE_ACTIVE
,
1085 .node
= WREPL_NODE_B
,
1087 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1088 .ips
= addresses_A_1
,
1090 .type
= WREPL_TYPE_UNIQUE
,
1091 .state
= WREPL_STATE_ACTIVE
,
1092 .node
= WREPL_NODE_B
,
1094 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1095 .ips
= addresses_A_1
,
1097 .type
= WREPL_TYPE_UNIQUE
,
1098 .state
= WREPL_STATE_ACTIVE
,
1099 .node
= WREPL_NODE_B
,
1101 .num_ips
= ARRAY_SIZE(addresses_A_2
),
1102 .ips
= addresses_A_2
,
1104 .type
= WREPL_TYPE_UNIQUE
,
1105 .state
= WREPL_STATE_ACTIVE
,
1106 .node
= WREPL_NODE_B
,
1108 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1109 .ips
= addresses_A_1
,
1111 .type
= WREPL_TYPE_UNIQUE
,
1112 .state
= WREPL_STATE_ACTIVE
,
1113 .node
= WREPL_NODE_B
,
1115 .num_ips
= ARRAY_SIZE(addresses_A_2
),
1116 .ips
= addresses_A_2
,
1118 .type
= WREPL_TYPE_SGROUP
,
1119 .state
= WREPL_STATE_TOMBSTONE
,
1120 .node
= WREPL_NODE_B
,
1122 .num_ips
= ARRAY_SIZE(addresses_A_2
),
1123 .ips
= addresses_A_2
,
1125 .type
= WREPL_TYPE_MHOMED
,
1126 .state
= WREPL_STATE_TOMBSTONE
,
1127 .node
= WREPL_NODE_B
,
1129 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1130 .ips
= addresses_A_1
,
1132 .type
= WREPL_TYPE_MHOMED
,
1133 .state
= WREPL_STATE_RELEASED
,
1134 .node
= WREPL_NODE_B
,
1136 .num_ips
= ARRAY_SIZE(addresses_A_2
),
1137 .ips
= addresses_A_2
,
1139 .type
= WREPL_TYPE_SGROUP
,
1140 .state
= WREPL_STATE_ACTIVE
,
1141 .node
= WREPL_NODE_B
,
1143 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1144 .ips
= addresses_A_1
,
1146 .type
= WREPL_TYPE_SGROUP
,
1147 .state
= WREPL_STATE_ACTIVE
,
1148 .node
= WREPL_NODE_B
,
1150 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1151 .ips
= addresses_A_3_4
,
1153 .type
= WREPL_TYPE_SGROUP
,
1154 .state
= WREPL_STATE_TOMBSTONE
,
1155 .node
= WREPL_NODE_B
,
1157 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1158 .ips
= addresses_B_3_4
,
1160 /* the last one should always be a unique,tomstone record! */
1161 .type
= WREPL_TYPE_UNIQUE
,
1162 .state
= WREPL_STATE_TOMBSTONE
,
1163 .node
= WREPL_NODE_B
,
1165 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1166 .ips
= addresses_A_1
,
1170 wins_name_tmp
= NULL
;
1171 wins_name_last
= &wins_name2
;
1172 wins_name_cur
= &wins_name1
;
1174 for (j
=0; ret
&& j
< ARRAY_SIZE(names
); j
++) {
1175 torture_comment(tctx
, "Test Replica Conflicts with same owner[%s] for %s\n",
1176 nbt_name_string(ctx
, &names
[j
]), ctx
->a
.address
);
1178 for(i
=0; ret
&& i
< ARRAY_SIZE(records
); i
++) {
1179 wins_name_tmp
= wins_name_last
;
1180 wins_name_last
= wins_name_cur
;
1181 wins_name_cur
= wins_name_tmp
;
1184 torture_comment(tctx
, "%s,%s%s vs. %s,%s%s with %s ip(s) => %s\n",
1185 wrepl_name_type_string(records
[i
-1].type
),
1186 wrepl_name_state_string(records
[i
-1].state
),
1187 (records
[i
-1].is_static
?",static":""),
1188 wrepl_name_type_string(records
[i
].type
),
1189 wrepl_name_state_string(records
[i
].state
),
1190 (records
[i
].is_static
?",static":""),
1191 (records
[i
-1].ips
==records
[i
].ips
?"same":"different"),
1195 wins_name_cur
->name
= &names
[j
];
1196 wins_name_cur
->flags
= WREPL_NAME_FLAGS(records
[i
].type
,
1199 records
[i
].is_static
);
1200 wins_name_cur
->id
= ++ctx
->a
.max_version
;
1201 if (wins_name_cur
->flags
& 2) {
1202 wins_name_cur
->addresses
.addresses
.num_ips
= records
[i
].num_ips
;
1203 wins_name_cur
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
1206 wins_name_cur
->addresses
.ip
= records
[i
].ips
[0].ip
;
1208 wins_name_cur
->unknown
= "255.255.255.255";
1210 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->a
,wins_name_cur
);
1211 if (records
[i
].state
== WREPL_STATE_RELEASED
) {
1212 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->a
, wins_name_last
, false);
1213 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->a
, wins_name_cur
, false);
1215 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->a
, wins_name_cur
, true);
1218 /* the first one is a cleanup run */
1219 if (!ret
&& i
== 0) ret
= true;
1222 torture_comment(tctx
, "conflict handled wrong or record[%u]: %s\n", i
, __location__
);
1230 static bool test_conflict_different_owner(struct torture_context
*tctx
,
1231 struct test_wrepl_conflict_conn
*ctx
)
1234 struct wrepl_wins_name wins_name1
;
1235 struct wrepl_wins_name wins_name2
;
1236 struct wrepl_wins_name
*wins_name_r1
;
1237 struct wrepl_wins_name
*wins_name_r2
;
1240 const char *line
; /* just better debugging */
1241 struct nbt_name name
;
1242 const char *comment
;
1243 bool extra
; /* not the worst case, this is an extra test */
1246 struct wrepl_wins_owner
*owner
;
1247 enum wrepl_name_type type
;
1248 enum wrepl_name_state state
;
1249 enum wrepl_name_node node
;
1252 const struct wrepl_ip
*ips
;
1253 bool apply_expected
;
1255 struct wrepl_wins_owner
*merge_owner
;
1256 bool sgroup_cleanup
;
1260 * NOTE: the first record and the last applied one
1261 * needs to be from the same owner,
1262 * to not conflict in the next smbtorture run!!!
1265 .line
= __location__
,
1266 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1270 .type
= WREPL_TYPE_UNIQUE
,
1271 .state
= WREPL_STATE_TOMBSTONE
,
1272 .node
= WREPL_NODE_B
,
1274 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1275 .ips
= addresses_B_1
,
1276 .apply_expected
= true /* ignored */
1280 .type
= WREPL_TYPE_UNIQUE
,
1281 .state
= WREPL_STATE_TOMBSTONE
,
1282 .node
= WREPL_NODE_B
,
1284 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1285 .ips
= addresses_A_1
,
1286 .apply_expected
= true /* ignored */
1291 * unique vs unique section
1294 * unique,active vs. unique,active
1295 * => should be replaced
1298 .line
= __location__
,
1299 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1302 .type
= WREPL_TYPE_UNIQUE
,
1303 .state
= WREPL_STATE_ACTIVE
,
1304 .node
= WREPL_NODE_B
,
1306 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1307 .ips
= addresses_A_1
,
1308 .apply_expected
= true
1312 .type
= WREPL_TYPE_UNIQUE
,
1313 .state
= WREPL_STATE_ACTIVE
,
1314 .node
= WREPL_NODE_B
,
1316 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1317 .ips
= addresses_B_1
,
1318 .apply_expected
= true
1323 * unique,active vs. unique,tombstone
1324 * => should NOT be replaced
1327 .line
= __location__
,
1328 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1331 .type
= WREPL_TYPE_UNIQUE
,
1332 .state
= WREPL_STATE_ACTIVE
,
1333 .node
= WREPL_NODE_B
,
1335 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1336 .ips
= addresses_B_1
,
1337 .apply_expected
= true
1341 .type
= WREPL_TYPE_UNIQUE
,
1342 .state
= WREPL_STATE_TOMBSTONE
,
1343 .node
= WREPL_NODE_B
,
1345 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1346 .ips
= addresses_B_1
,
1347 .apply_expected
= false
1352 * unique,released vs. unique,active
1353 * => should be replaced
1356 .line
= __location__
,
1357 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1360 .type
= WREPL_TYPE_UNIQUE
,
1361 .state
= WREPL_STATE_RELEASED
,
1362 .node
= WREPL_NODE_B
,
1364 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1365 .ips
= addresses_B_1
,
1366 .apply_expected
= false
1370 .type
= WREPL_TYPE_UNIQUE
,
1371 .state
= WREPL_STATE_ACTIVE
,
1372 .node
= WREPL_NODE_B
,
1374 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1375 .ips
= addresses_A_1
,
1376 .apply_expected
= true
1381 * unique,released vs. unique,tombstone
1382 * => should be replaced
1385 .line
= __location__
,
1386 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1389 .type
= WREPL_TYPE_UNIQUE
,
1390 .state
= WREPL_STATE_RELEASED
,
1391 .node
= WREPL_NODE_B
,
1393 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1394 .ips
= addresses_A_1
,
1395 .apply_expected
= false
1399 .type
= WREPL_TYPE_UNIQUE
,
1400 .state
= WREPL_STATE_TOMBSTONE
,
1401 .node
= WREPL_NODE_B
,
1403 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1404 .ips
= addresses_B_1
,
1405 .apply_expected
= true
1410 * unique,tombstone vs. unique,active
1411 * => should be replaced
1414 .line
= __location__
,
1415 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1418 .type
= WREPL_TYPE_UNIQUE
,
1419 .state
= WREPL_STATE_TOMBSTONE
,
1420 .node
= WREPL_NODE_B
,
1422 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1423 .ips
= addresses_B_1
,
1424 .apply_expected
= true
1428 .type
= WREPL_TYPE_UNIQUE
,
1429 .state
= WREPL_STATE_ACTIVE
,
1430 .node
= WREPL_NODE_B
,
1432 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1433 .ips
= addresses_A_1
,
1434 .apply_expected
= true
1439 * unique,tombstone vs. unique,tombstone
1440 * => should be replaced
1443 .line
= __location__
,
1444 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1447 .type
= WREPL_TYPE_UNIQUE
,
1448 .state
= WREPL_STATE_TOMBSTONE
,
1449 .node
= WREPL_NODE_B
,
1451 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1452 .ips
= addresses_A_1
,
1453 .apply_expected
= true
1457 .type
= WREPL_TYPE_UNIQUE
,
1458 .state
= WREPL_STATE_TOMBSTONE
,
1459 .node
= WREPL_NODE_B
,
1461 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1462 .ips
= addresses_B_1
,
1463 .apply_expected
= true
1469 * unique vs normal groups section,
1472 * unique,active vs. group,active
1473 * => should be replaced
1476 .line
= __location__
,
1477 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1480 .type
= WREPL_TYPE_UNIQUE
,
1481 .state
= WREPL_STATE_ACTIVE
,
1482 .node
= WREPL_NODE_B
,
1484 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1485 .ips
= addresses_B_1
,
1486 .apply_expected
= true
1490 .type
= WREPL_TYPE_GROUP
,
1491 .state
= WREPL_STATE_ACTIVE
,
1492 .node
= WREPL_NODE_B
,
1494 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1495 .ips
= addresses_A_1
,
1496 .apply_expected
= true
1501 * unique,active vs. group,tombstone
1502 * => should NOT be replaced
1505 .line
= __location__
,
1506 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1509 .type
= WREPL_TYPE_UNIQUE
,
1510 .state
= WREPL_STATE_ACTIVE
,
1511 .node
= WREPL_NODE_B
,
1513 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1514 .ips
= addresses_A_1
,
1515 .apply_expected
= true
1519 .type
= WREPL_TYPE_GROUP
,
1520 .state
= WREPL_STATE_TOMBSTONE
,
1521 .node
= WREPL_NODE_B
,
1523 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1524 .ips
= addresses_A_1
,
1525 .apply_expected
= false
1530 * unique,released vs. group,active
1531 * => should be replaced
1534 .line
= __location__
,
1535 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1538 .type
= WREPL_TYPE_UNIQUE
,
1539 .state
= WREPL_STATE_RELEASED
,
1540 .node
= WREPL_NODE_B
,
1542 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1543 .ips
= addresses_A_1
,
1544 .apply_expected
= false
1548 .type
= WREPL_TYPE_GROUP
,
1549 .state
= WREPL_STATE_ACTIVE
,
1550 .node
= WREPL_NODE_B
,
1552 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1553 .ips
= addresses_B_1
,
1554 .apply_expected
= true
1559 * unique,released vs. group,tombstone
1560 * => should be replaced
1563 .line
= __location__
,
1564 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1567 .type
= WREPL_TYPE_UNIQUE
,
1568 .state
= WREPL_STATE_RELEASED
,
1569 .node
= WREPL_NODE_B
,
1571 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1572 .ips
= addresses_B_1
,
1573 .apply_expected
= false
1577 .type
= WREPL_TYPE_GROUP
,
1578 .state
= WREPL_STATE_TOMBSTONE
,
1579 .node
= WREPL_NODE_B
,
1581 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1582 .ips
= addresses_A_1
,
1583 .apply_expected
= true
1588 * unique,tombstone vs. group,active
1589 * => should be replaced
1592 .line
= __location__
,
1593 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1596 .type
= WREPL_TYPE_UNIQUE
,
1597 .state
= WREPL_STATE_TOMBSTONE
,
1598 .node
= WREPL_NODE_B
,
1600 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1601 .ips
= addresses_A_1
,
1602 .apply_expected
= true
1606 .type
= WREPL_TYPE_GROUP
,
1607 .state
= WREPL_STATE_ACTIVE
,
1608 .node
= WREPL_NODE_B
,
1610 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1611 .ips
= addresses_B_1
,
1612 .apply_expected
= true
1617 * unique,tombstone vs. group,tombstone
1618 * => should be replaced
1621 .line
= __location__
,
1622 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1625 .type
= WREPL_TYPE_UNIQUE
,
1626 .state
= WREPL_STATE_TOMBSTONE
,
1627 .node
= WREPL_NODE_B
,
1629 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1630 .ips
= addresses_B_1
,
1631 .apply_expected
= true
1635 .type
= WREPL_TYPE_GROUP
,
1636 .state
= WREPL_STATE_TOMBSTONE
,
1637 .node
= WREPL_NODE_B
,
1639 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1640 .ips
= addresses_A_1
,
1641 .apply_expected
= true
1646 * unique vs special groups section,
1649 * unique,active vs. sgroup,active
1650 * => should NOT be replaced
1653 .line
= __location__
,
1654 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1657 .type
= WREPL_TYPE_UNIQUE
,
1658 .state
= WREPL_STATE_ACTIVE
,
1659 .node
= WREPL_NODE_B
,
1661 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1662 .ips
= addresses_A_1
,
1663 .apply_expected
= true
1667 .type
= WREPL_TYPE_SGROUP
,
1668 .state
= WREPL_STATE_ACTIVE
,
1669 .node
= WREPL_NODE_B
,
1671 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1672 .ips
= addresses_A_1
,
1673 .apply_expected
= false
1678 * unique,active vs. sgroup,tombstone
1679 * => should NOT be replaced
1682 .line
= __location__
,
1683 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1686 .type
= WREPL_TYPE_UNIQUE
,
1687 .state
= WREPL_STATE_ACTIVE
,
1688 .node
= WREPL_NODE_B
,
1690 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1691 .ips
= addresses_A_1
,
1692 .apply_expected
= true
1696 .type
= WREPL_TYPE_SGROUP
,
1697 .state
= WREPL_STATE_TOMBSTONE
,
1698 .node
= WREPL_NODE_B
,
1700 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1701 .ips
= addresses_A_1
,
1702 .apply_expected
= false
1707 * unique,released vs. sgroup,active
1708 * => should be replaced
1711 .line
= __location__
,
1712 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1715 .type
= WREPL_TYPE_UNIQUE
,
1716 .state
= WREPL_STATE_RELEASED
,
1717 .node
= WREPL_NODE_B
,
1719 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1720 .ips
= addresses_A_1
,
1721 .apply_expected
= false
1725 .type
= WREPL_TYPE_SGROUP
,
1726 .state
= WREPL_STATE_ACTIVE
,
1727 .node
= WREPL_NODE_B
,
1729 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1730 .ips
= addresses_B_3_4
,
1731 .apply_expected
= true
1736 * unique,released vs. sgroup,tombstone
1737 * => should be replaced
1740 .line
= __location__
,
1741 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1744 .type
= WREPL_TYPE_UNIQUE
,
1745 .state
= WREPL_STATE_RELEASED
,
1746 .node
= WREPL_NODE_B
,
1748 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1749 .ips
= addresses_B_1
,
1750 .apply_expected
= false
1754 .type
= WREPL_TYPE_SGROUP
,
1755 .state
= WREPL_STATE_TOMBSTONE
,
1756 .node
= WREPL_NODE_B
,
1758 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1759 .ips
= addresses_A_3_4
,
1760 .apply_expected
= true
1765 * unique,tombstone vs. sgroup,active
1766 * => should be replaced
1769 .line
= __location__
,
1770 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1773 .type
= WREPL_TYPE_UNIQUE
,
1774 .state
= WREPL_STATE_TOMBSTONE
,
1775 .node
= WREPL_NODE_B
,
1777 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1778 .ips
= addresses_A_1
,
1779 .apply_expected
= true
1783 .type
= WREPL_TYPE_SGROUP
,
1784 .state
= WREPL_STATE_ACTIVE
,
1785 .node
= WREPL_NODE_B
,
1787 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1788 .ips
= addresses_B_3_4
,
1789 .apply_expected
= true
1794 * unique,tombstone vs. sgroup,tombstone
1795 * => should be replaced
1798 .line
= __location__
,
1799 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1802 .type
= WREPL_TYPE_UNIQUE
,
1803 .state
= WREPL_STATE_TOMBSTONE
,
1804 .node
= WREPL_NODE_B
,
1806 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1807 .ips
= addresses_B_1
,
1808 .apply_expected
= true
1812 .type
= WREPL_TYPE_SGROUP
,
1813 .state
= WREPL_STATE_TOMBSTONE
,
1814 .node
= WREPL_NODE_B
,
1816 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1817 .ips
= addresses_A_3_4
,
1818 .apply_expected
= true
1823 * unique vs multi homed section,
1826 * unique,active vs. mhomed,active
1827 * => should be replaced
1830 .line
= __location__
,
1831 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1834 .type
= WREPL_TYPE_UNIQUE
,
1835 .state
= WREPL_STATE_ACTIVE
,
1836 .node
= WREPL_NODE_B
,
1838 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1839 .ips
= addresses_A_1
,
1840 .apply_expected
= true
1844 .type
= WREPL_TYPE_MHOMED
,
1845 .state
= WREPL_STATE_ACTIVE
,
1846 .node
= WREPL_NODE_B
,
1848 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1849 .ips
= addresses_B_3_4
,
1850 .apply_expected
= true
1855 * unique,active vs. mhomed,tombstone
1856 * => should NOT be replaced
1859 .line
= __location__
,
1860 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1863 .type
= WREPL_TYPE_UNIQUE
,
1864 .state
= WREPL_STATE_ACTIVE
,
1865 .node
= WREPL_NODE_B
,
1867 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1868 .ips
= addresses_B_3_4
,
1869 .apply_expected
= true
1873 .type
= WREPL_TYPE_MHOMED
,
1874 .state
= WREPL_STATE_TOMBSTONE
,
1875 .node
= WREPL_NODE_B
,
1877 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1878 .ips
= addresses_B_3_4
,
1879 .apply_expected
= false
1884 * unique,released vs. mhomed,active
1885 * => should be replaced
1888 .line
= __location__
,
1889 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1892 .type
= WREPL_TYPE_UNIQUE
,
1893 .state
= WREPL_STATE_RELEASED
,
1894 .node
= WREPL_NODE_B
,
1896 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1897 .ips
= addresses_B_1
,
1898 .apply_expected
= false
1902 .type
= WREPL_TYPE_MHOMED
,
1903 .state
= WREPL_STATE_ACTIVE
,
1904 .node
= WREPL_NODE_B
,
1906 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1907 .ips
= addresses_A_3_4
,
1908 .apply_expected
= true
1913 * unique,released vs. mhomed,tombstone
1914 * => should be replaced
1917 .line
= __location__
,
1918 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1921 .type
= WREPL_TYPE_UNIQUE
,
1922 .state
= WREPL_STATE_RELEASED
,
1923 .node
= WREPL_NODE_B
,
1925 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1926 .ips
= addresses_A_1
,
1927 .apply_expected
= false
1931 .type
= WREPL_TYPE_MHOMED
,
1932 .state
= WREPL_STATE_TOMBSTONE
,
1933 .node
= WREPL_NODE_B
,
1935 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1936 .ips
= addresses_B_3_4
,
1937 .apply_expected
= true
1942 * unique,tombstone vs. mhomed,active
1943 * => should be replaced
1946 .line
= __location__
,
1947 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1950 .type
= WREPL_TYPE_UNIQUE
,
1951 .state
= WREPL_STATE_TOMBSTONE
,
1952 .node
= WREPL_NODE_B
,
1954 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1955 .ips
= addresses_B_1
,
1956 .apply_expected
= true
1960 .type
= WREPL_TYPE_MHOMED
,
1961 .state
= WREPL_STATE_ACTIVE
,
1962 .node
= WREPL_NODE_B
,
1964 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1965 .ips
= addresses_A_3_4
,
1966 .apply_expected
= true
1971 * unique,tombstone vs. mhomed,tombstone
1972 * => should be replaced
1975 .line
= __location__
,
1976 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1979 .type
= WREPL_TYPE_UNIQUE
,
1980 .state
= WREPL_STATE_TOMBSTONE
,
1981 .node
= WREPL_NODE_B
,
1983 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1984 .ips
= addresses_A_1
,
1985 .apply_expected
= true
1989 .type
= WREPL_TYPE_MHOMED
,
1990 .state
= WREPL_STATE_TOMBSTONE
,
1991 .node
= WREPL_NODE_B
,
1993 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1994 .ips
= addresses_B_3_4
,
1995 .apply_expected
= true
2000 * normal groups vs unique section,
2003 * group,active vs. unique,active
2004 * => should NOT be replaced
2007 .line
= __location__
,
2008 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2011 .type
= WREPL_TYPE_GROUP
,
2012 .state
= WREPL_STATE_ACTIVE
,
2013 .node
= WREPL_NODE_B
,
2015 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2016 .ips
= addresses_A_1
,
2017 .apply_expected
= true
2021 .type
= WREPL_TYPE_UNIQUE
,
2022 .state
= WREPL_STATE_ACTIVE
,
2023 .node
= WREPL_NODE_B
,
2025 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2026 .ips
= addresses_A_1
,
2027 .apply_expected
= false
2032 * group,active vs. unique,tombstone
2033 * => should NOT be replaced
2036 .line
= __location__
,
2037 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2040 .type
= WREPL_TYPE_GROUP
,
2041 .state
= WREPL_STATE_ACTIVE
,
2042 .node
= WREPL_NODE_B
,
2044 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2045 .ips
= addresses_A_1
,
2046 .apply_expected
= true
2050 .type
= WREPL_TYPE_UNIQUE
,
2051 .state
= WREPL_STATE_TOMBSTONE
,
2052 .node
= WREPL_NODE_B
,
2054 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2055 .ips
= addresses_A_1
,
2056 .apply_expected
= false
2061 * group,released vs. unique,active
2062 * => should NOT be replaced
2065 .line
= __location__
,
2066 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2069 .type
= WREPL_TYPE_GROUP
,
2070 .state
= WREPL_STATE_RELEASED
,
2071 .node
= WREPL_NODE_B
,
2073 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2074 .ips
= addresses_A_1
,
2075 .apply_expected
= false
2079 .type
= WREPL_TYPE_UNIQUE
,
2080 .state
= WREPL_STATE_ACTIVE
,
2081 .node
= WREPL_NODE_B
,
2083 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2084 .ips
= addresses_A_1
,
2085 .apply_expected
= false
2090 * group,released vs. unique,tombstone
2091 * => should NOT be replaced
2094 .line
= __location__
,
2095 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2098 .type
= WREPL_TYPE_GROUP
,
2099 .state
= WREPL_STATE_RELEASED
,
2100 .node
= WREPL_NODE_B
,
2102 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2103 .ips
= addresses_A_1
,
2104 .apply_expected
= false
2108 .type
= WREPL_TYPE_UNIQUE
,
2109 .state
= WREPL_STATE_TOMBSTONE
,
2110 .node
= WREPL_NODE_B
,
2112 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2113 .ips
= addresses_A_1
,
2114 .apply_expected
= false
2119 * group,tombstone vs. unique,active
2120 * => should NOT be replaced
2123 .line
= __location__
,
2124 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2127 .type
= WREPL_TYPE_GROUP
,
2128 .state
= WREPL_STATE_TOMBSTONE
,
2129 .node
= WREPL_NODE_B
,
2131 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2132 .ips
= addresses_A_1
,
2133 .apply_expected
= true
2137 .type
= WREPL_TYPE_UNIQUE
,
2138 .state
= WREPL_STATE_ACTIVE
,
2139 .node
= WREPL_NODE_B
,
2141 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2142 .ips
= addresses_A_1
,
2143 .apply_expected
= false
2148 * group,tombstone vs. unique,tombstone
2149 * => should NOT be replaced
2152 .line
= __location__
,
2153 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2156 .type
= WREPL_TYPE_GROUP
,
2157 .state
= WREPL_STATE_TOMBSTONE
,
2158 .node
= WREPL_NODE_B
,
2160 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2161 .ips
= addresses_A_1
,
2162 .apply_expected
= true
2166 .type
= WREPL_TYPE_UNIQUE
,
2167 .state
= WREPL_STATE_TOMBSTONE
,
2168 .node
= WREPL_NODE_B
,
2170 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2171 .ips
= addresses_A_1
,
2172 .apply_expected
= false
2177 * normal groups vs normal groups section,
2180 * group,active vs. group,active
2181 * => should NOT be replaced
2184 .line
= __location__
,
2185 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2188 .type
= WREPL_TYPE_GROUP
,
2189 .state
= WREPL_STATE_ACTIVE
,
2190 .node
= WREPL_NODE_B
,
2192 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2193 .ips
= addresses_A_1
,
2194 .apply_expected
= true
2198 .type
= WREPL_TYPE_GROUP
,
2199 .state
= WREPL_STATE_ACTIVE
,
2200 .node
= WREPL_NODE_B
,
2202 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2203 .ips
= addresses_A_1
,
2204 .apply_expected
= false
2209 * group,active vs. group,tombstone
2210 * => should NOT be replaced
2213 .line
= __location__
,
2214 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2217 .type
= WREPL_TYPE_GROUP
,
2218 .state
= WREPL_STATE_ACTIVE
,
2219 .node
= WREPL_NODE_B
,
2221 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2222 .ips
= addresses_A_1
,
2223 .apply_expected
= true
2227 .type
= WREPL_TYPE_GROUP
,
2228 .state
= WREPL_STATE_TOMBSTONE
,
2229 .node
= WREPL_NODE_B
,
2231 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2232 .ips
= addresses_A_1
,
2233 .apply_expected
= false
2238 * group,released vs. group,active
2239 * => should be replaced
2242 .line
= __location__
,
2243 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2246 .type
= WREPL_TYPE_GROUP
,
2247 .state
= WREPL_STATE_RELEASED
,
2248 .node
= WREPL_NODE_B
,
2250 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2251 .ips
= addresses_A_1
,
2252 .apply_expected
= false
2256 .type
= WREPL_TYPE_GROUP
,
2257 .state
= WREPL_STATE_ACTIVE
,
2258 .node
= WREPL_NODE_B
,
2260 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2261 .ips
= addresses_B_1
,
2262 .apply_expected
= true
2267 * group,released vs. group,tombstone
2268 * => should be replaced
2271 .line
= __location__
,
2272 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2275 .type
= WREPL_TYPE_GROUP
,
2276 .state
= WREPL_STATE_RELEASED
,
2277 .node
= WREPL_NODE_B
,
2279 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2280 .ips
= addresses_A_1
,
2281 .apply_expected
= false
2285 .type
= WREPL_TYPE_GROUP
,
2286 .state
= WREPL_STATE_TOMBSTONE
,
2287 .node
= WREPL_NODE_B
,
2289 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2290 .ips
= addresses_B_1
,
2291 .apply_expected
= true
2296 * group,tombstone vs. group,active
2297 * => should be replaced
2300 .line
= __location__
,
2301 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2304 .type
= WREPL_TYPE_GROUP
,
2305 .state
= WREPL_STATE_TOMBSTONE
,
2306 .node
= WREPL_NODE_B
,
2308 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2309 .ips
= addresses_B_1
,
2310 .apply_expected
= true
2314 .type
= WREPL_TYPE_GROUP
,
2315 .state
= WREPL_STATE_ACTIVE
,
2316 .node
= WREPL_NODE_B
,
2318 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2319 .ips
= addresses_A_1
,
2320 .apply_expected
= true
2325 * group,tombstone vs. group,tombstone
2326 * => should be replaced
2329 .line
= __location__
,
2330 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2333 .type
= WREPL_TYPE_GROUP
,
2334 .state
= WREPL_STATE_TOMBSTONE
,
2335 .node
= WREPL_NODE_B
,
2337 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2338 .ips
= addresses_A_1
,
2339 .apply_expected
= true
2343 .type
= WREPL_TYPE_GROUP
,
2344 .state
= WREPL_STATE_TOMBSTONE
,
2345 .node
= WREPL_NODE_B
,
2347 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2348 .ips
= addresses_B_1
,
2349 .apply_expected
= true
2354 * normal groups vs special groups section,
2357 * group,active vs. sgroup,active
2358 * => should NOT be replaced
2361 .line
= __location__
,
2362 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2365 .type
= WREPL_TYPE_GROUP
,
2366 .state
= WREPL_STATE_ACTIVE
,
2367 .node
= WREPL_NODE_B
,
2369 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2370 .ips
= addresses_B_1
,
2371 .apply_expected
= true
2375 .type
= WREPL_TYPE_SGROUP
,
2376 .state
= WREPL_STATE_ACTIVE
,
2377 .node
= WREPL_NODE_B
,
2379 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2380 .ips
= addresses_B_1
,
2381 .apply_expected
= false
2386 * group,active vs. sgroup,tombstone
2387 * => should NOT be replaced
2390 .line
= __location__
,
2391 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2394 .type
= WREPL_TYPE_GROUP
,
2395 .state
= WREPL_STATE_ACTIVE
,
2396 .node
= WREPL_NODE_B
,
2398 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2399 .ips
= addresses_B_1
,
2400 .apply_expected
= true
2404 .type
= WREPL_TYPE_SGROUP
,
2405 .state
= WREPL_STATE_TOMBSTONE
,
2406 .node
= WREPL_NODE_B
,
2408 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2409 .ips
= addresses_B_1
,
2410 .apply_expected
= false
2415 * group,released vs. sgroup,active
2416 * => should be replaced
2419 .line
= __location__
,
2420 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2423 .type
= WREPL_TYPE_GROUP
,
2424 .state
= WREPL_STATE_RELEASED
,
2425 .node
= WREPL_NODE_B
,
2427 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2428 .ips
= addresses_A_1
,
2429 .apply_expected
= false
2433 .type
= WREPL_TYPE_SGROUP
,
2434 .state
= WREPL_STATE_ACTIVE
,
2435 .node
= WREPL_NODE_B
,
2437 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2438 .ips
= addresses_B_1
,
2439 .apply_expected
= true
2444 * group,released vs. sgroup,tombstone
2445 * => should NOT be replaced
2448 .line
= __location__
,
2449 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2452 .type
= WREPL_TYPE_GROUP
,
2453 .state
= WREPL_STATE_RELEASED
,
2454 .node
= WREPL_NODE_B
,
2456 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2457 .ips
= addresses_B_1
,
2458 .apply_expected
= false
2462 .type
= WREPL_TYPE_SGROUP
,
2463 .state
= WREPL_STATE_TOMBSTONE
,
2464 .node
= WREPL_NODE_B
,
2466 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2467 .ips
= addresses_B_1
,
2468 .apply_expected
= false
2473 * group,tombstone vs. sgroup,active
2474 * => should be replaced
2477 .line
= __location__
,
2478 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2481 .type
= WREPL_TYPE_GROUP
,
2482 .state
= WREPL_STATE_TOMBSTONE
,
2483 .node
= WREPL_NODE_B
,
2485 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2486 .ips
= addresses_B_1
,
2487 .apply_expected
= true
2491 .type
= WREPL_TYPE_SGROUP
,
2492 .state
= WREPL_STATE_ACTIVE
,
2493 .node
= WREPL_NODE_B
,
2495 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2496 .ips
= addresses_A_1
,
2497 .apply_expected
= true
2502 * group,tombstone vs. sgroup,tombstone
2503 * => should be replaced
2506 .line
= __location__
,
2507 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2510 .type
= WREPL_TYPE_GROUP
,
2511 .state
= WREPL_STATE_TOMBSTONE
,
2512 .node
= WREPL_NODE_B
,
2514 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2515 .ips
= addresses_A_1
,
2516 .apply_expected
= true
2520 .type
= WREPL_TYPE_SGROUP
,
2521 .state
= WREPL_STATE_TOMBSTONE
,
2522 .node
= WREPL_NODE_B
,
2524 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2525 .ips
= addresses_B_1
,
2526 .apply_expected
= true
2531 * normal groups vs multi homed section,
2534 * group,active vs. mhomed,active
2535 * => should NOT be replaced
2538 .line
= __location__
,
2539 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2542 .type
= WREPL_TYPE_GROUP
,
2543 .state
= WREPL_STATE_ACTIVE
,
2544 .node
= WREPL_NODE_B
,
2546 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2547 .ips
= addresses_B_1
,
2548 .apply_expected
= true
2552 .type
= WREPL_TYPE_MHOMED
,
2553 .state
= WREPL_STATE_ACTIVE
,
2554 .node
= WREPL_NODE_B
,
2556 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2557 .ips
= addresses_B_1
,
2558 .apply_expected
= false
2563 * group,active vs. mhomed,tombstone
2564 * => should NOT be replaced
2567 .line
= __location__
,
2568 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2571 .type
= WREPL_TYPE_GROUP
,
2572 .state
= WREPL_STATE_ACTIVE
,
2573 .node
= WREPL_NODE_B
,
2575 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2576 .ips
= addresses_B_1
,
2577 .apply_expected
= true
2581 .type
= WREPL_TYPE_MHOMED
,
2582 .state
= WREPL_STATE_TOMBSTONE
,
2583 .node
= WREPL_NODE_B
,
2585 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2586 .ips
= addresses_B_1
,
2587 .apply_expected
= false
2592 * group,released vs. mhomed,active
2593 * => should NOT be replaced
2596 .line
= __location__
,
2597 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2600 .type
= WREPL_TYPE_GROUP
,
2601 .state
= WREPL_STATE_RELEASED
,
2602 .node
= WREPL_NODE_B
,
2604 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2605 .ips
= addresses_B_1
,
2606 .apply_expected
= false
2610 .type
= WREPL_TYPE_MHOMED
,
2611 .state
= WREPL_STATE_ACTIVE
,
2612 .node
= WREPL_NODE_B
,
2614 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2615 .ips
= addresses_B_1
,
2616 .apply_expected
= false
2621 * group,released vs. mhomed,tombstone
2622 * => should NOT be replaced
2625 .line
= __location__
,
2626 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2629 .type
= WREPL_TYPE_GROUP
,
2630 .state
= WREPL_STATE_RELEASED
,
2631 .node
= WREPL_NODE_B
,
2633 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2634 .ips
= addresses_B_1
,
2635 .apply_expected
= false
2639 .type
= WREPL_TYPE_MHOMED
,
2640 .state
= WREPL_STATE_TOMBSTONE
,
2641 .node
= WREPL_NODE_B
,
2643 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2644 .ips
= addresses_B_1
,
2645 .apply_expected
= false
2650 * group,tombstone vs. mhomed,active
2651 * => should be replaced
2654 .line
= __location__
,
2655 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2658 .type
= WREPL_TYPE_GROUP
,
2659 .state
= WREPL_STATE_TOMBSTONE
,
2660 .node
= WREPL_NODE_B
,
2662 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2663 .ips
= addresses_B_1
,
2664 .apply_expected
= true
2668 .type
= WREPL_TYPE_MHOMED
,
2669 .state
= WREPL_STATE_ACTIVE
,
2670 .node
= WREPL_NODE_B
,
2672 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2673 .ips
= addresses_A_1
,
2674 .apply_expected
= true
2679 * group,tombstone vs. mhomed,tombstone
2680 * => should be replaced
2683 .line
= __location__
,
2684 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2687 .type
= WREPL_TYPE_GROUP
,
2688 .state
= WREPL_STATE_TOMBSTONE
,
2689 .node
= WREPL_NODE_B
,
2691 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2692 .ips
= addresses_A_1
,
2693 .apply_expected
= true
2697 .type
= WREPL_TYPE_MHOMED
,
2698 .state
= WREPL_STATE_TOMBSTONE
,
2699 .node
= WREPL_NODE_B
,
2701 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2702 .ips
= addresses_B_1
,
2703 .apply_expected
= true
2708 * special groups vs unique section,
2711 * sgroup,active vs. unique,active
2712 * => should NOT be replaced
2715 .line
= __location__
,
2716 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2719 .type
= WREPL_TYPE_SGROUP
,
2720 .state
= WREPL_STATE_ACTIVE
,
2721 .node
= WREPL_NODE_B
,
2723 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2724 .ips
= addresses_B_1
,
2725 .apply_expected
= true
2729 .type
= WREPL_TYPE_UNIQUE
,
2730 .state
= WREPL_STATE_ACTIVE
,
2731 .node
= WREPL_NODE_B
,
2733 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2734 .ips
= addresses_B_1
,
2735 .apply_expected
= false
2740 * sgroup,active vs. unique,tombstone
2741 * => should NOT be replaced
2744 .line
= __location__
,
2745 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2748 .type
= WREPL_TYPE_SGROUP
,
2749 .state
= WREPL_STATE_ACTIVE
,
2750 .node
= WREPL_NODE_B
,
2752 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2753 .ips
= addresses_B_1
,
2754 .apply_expected
= true
2758 .type
= WREPL_TYPE_UNIQUE
,
2759 .state
= WREPL_STATE_TOMBSTONE
,
2760 .node
= WREPL_NODE_B
,
2762 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2763 .ips
= addresses_B_1
,
2764 .apply_expected
= false
2769 * sgroup,released vs. unique,active
2770 * => should be replaced
2773 .line
= __location__
,
2774 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2777 .type
= WREPL_TYPE_SGROUP
,
2778 .state
= WREPL_STATE_RELEASED
,
2779 .node
= WREPL_NODE_B
,
2781 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2782 .ips
= addresses_B_1
,
2783 .apply_expected
= false
2787 .type
= WREPL_TYPE_UNIQUE
,
2788 .state
= WREPL_STATE_ACTIVE
,
2789 .node
= WREPL_NODE_B
,
2791 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2792 .ips
= addresses_A_1
,
2793 .apply_expected
= true
2798 * sgroup,released vs. unique,tombstone
2799 * => should be replaced
2802 .line
= __location__
,
2803 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2806 .type
= WREPL_TYPE_SGROUP
,
2807 .state
= WREPL_STATE_RELEASED
,
2808 .node
= WREPL_NODE_B
,
2810 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2811 .ips
= addresses_A_1
,
2812 .apply_expected
= false
2816 .type
= WREPL_TYPE_UNIQUE
,
2817 .state
= WREPL_STATE_TOMBSTONE
,
2818 .node
= WREPL_NODE_B
,
2820 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2821 .ips
= addresses_B_1
,
2822 .apply_expected
= true
2827 * sgroup,tombstone vs. unique,active
2828 * => should be replaced
2831 .line
= __location__
,
2832 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2835 .type
= WREPL_TYPE_SGROUP
,
2836 .state
= WREPL_STATE_TOMBSTONE
,
2837 .node
= WREPL_NODE_B
,
2839 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2840 .ips
= addresses_A_1
,
2841 .apply_expected
= true
2845 .type
= WREPL_TYPE_UNIQUE
,
2846 .state
= WREPL_STATE_ACTIVE
,
2847 .node
= WREPL_NODE_B
,
2849 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2850 .ips
= addresses_B_1
,
2851 .apply_expected
= true
2856 * sgroup,tombstone vs. unique,tombstone
2857 * => should be replaced
2860 .line
= __location__
,
2861 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2864 .type
= WREPL_TYPE_SGROUP
,
2865 .state
= WREPL_STATE_TOMBSTONE
,
2866 .node
= WREPL_NODE_B
,
2868 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2869 .ips
= addresses_B_1
,
2870 .apply_expected
= true
2874 .type
= WREPL_TYPE_UNIQUE
,
2875 .state
= WREPL_STATE_TOMBSTONE
,
2876 .node
= WREPL_NODE_B
,
2878 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2879 .ips
= addresses_A_1
,
2880 .apply_expected
= true
2885 * special groups vs normal group section,
2888 * sgroup,active vs. group,active
2889 * => should NOT be replaced
2892 .line
= __location__
,
2893 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2896 .type
= WREPL_TYPE_SGROUP
,
2897 .state
= WREPL_STATE_ACTIVE
,
2898 .node
= WREPL_NODE_B
,
2900 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2901 .ips
= addresses_A_1
,
2902 .apply_expected
= true
2906 .type
= WREPL_TYPE_GROUP
,
2907 .state
= WREPL_STATE_ACTIVE
,
2908 .node
= WREPL_NODE_B
,
2910 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2911 .ips
= addresses_A_1
,
2912 .apply_expected
= false
2917 * sgroup,active vs. group,tombstone
2918 * => should NOT be replaced
2921 .line
= __location__
,
2922 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2925 .type
= WREPL_TYPE_SGROUP
,
2926 .state
= WREPL_STATE_ACTIVE
,
2927 .node
= WREPL_NODE_B
,
2929 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2930 .ips
= addresses_A_1
,
2931 .apply_expected
= true
2935 .type
= WREPL_TYPE_GROUP
,
2936 .state
= WREPL_STATE_TOMBSTONE
,
2937 .node
= WREPL_NODE_B
,
2939 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2940 .ips
= addresses_A_1
,
2941 .apply_expected
= false
2946 * sgroup,released vs. group,active
2947 * => should be replaced
2950 .line
= __location__
,
2951 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2954 .type
= WREPL_TYPE_SGROUP
,
2955 .state
= WREPL_STATE_RELEASED
,
2956 .node
= WREPL_NODE_B
,
2958 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2959 .ips
= addresses_A_1
,
2960 .apply_expected
= false
2964 .type
= WREPL_TYPE_GROUP
,
2965 .state
= WREPL_STATE_ACTIVE
,
2966 .node
= WREPL_NODE_B
,
2968 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2969 .ips
= addresses_B_1
,
2970 .apply_expected
= true
2975 * sgroup,released vs. group,tombstone
2976 * => should be replaced
2979 .line
= __location__
,
2980 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2983 .type
= WREPL_TYPE_SGROUP
,
2984 .state
= WREPL_STATE_RELEASED
,
2985 .node
= WREPL_NODE_B
,
2987 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2988 .ips
= addresses_B_1
,
2989 .apply_expected
= false
2993 .type
= WREPL_TYPE_GROUP
,
2994 .state
= WREPL_STATE_TOMBSTONE
,
2995 .node
= WREPL_NODE_B
,
2997 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2998 .ips
= addresses_A_1
,
2999 .apply_expected
= true
3004 * sgroup,tombstone vs. group,active
3005 * => should NOT be replaced
3008 .line
= __location__
,
3009 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3012 .type
= WREPL_TYPE_SGROUP
,
3013 .state
= WREPL_STATE_TOMBSTONE
,
3014 .node
= WREPL_NODE_B
,
3016 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3017 .ips
= addresses_A_1
,
3018 .apply_expected
= true
3022 .type
= WREPL_TYPE_GROUP
,
3023 .state
= WREPL_STATE_ACTIVE
,
3024 .node
= WREPL_NODE_B
,
3026 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3027 .ips
= addresses_B_1
,
3028 .apply_expected
= true
3033 * sgroup,tombstone vs. group,tombstone
3034 * => should NOT be replaced
3037 .line
= __location__
,
3038 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3041 .type
= WREPL_TYPE_SGROUP
,
3042 .state
= WREPL_STATE_TOMBSTONE
,
3043 .node
= WREPL_NODE_B
,
3045 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3046 .ips
= addresses_B_1
,
3047 .apply_expected
= true
3051 .type
= WREPL_TYPE_GROUP
,
3052 .state
= WREPL_STATE_TOMBSTONE
,
3053 .node
= WREPL_NODE_B
,
3055 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3056 .ips
= addresses_A_1
,
3057 .apply_expected
= true
3062 * special groups (not active) vs special group section,
3065 * sgroup,released vs. sgroup,active
3066 * => should be replaced
3069 .line
= __location__
,
3070 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3073 .type
= WREPL_TYPE_SGROUP
,
3074 .state
= WREPL_STATE_RELEASED
,
3075 .node
= WREPL_NODE_B
,
3077 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3078 .ips
= addresses_A_1
,
3079 .apply_expected
= false
3083 .type
= WREPL_TYPE_SGROUP
,
3084 .state
= WREPL_STATE_ACTIVE
,
3085 .node
= WREPL_NODE_B
,
3087 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3088 .ips
= addresses_B_1
,
3089 .apply_expected
= true
3094 * sgroup,released vs. sgroup,tombstone
3095 * => should be replaced
3098 .line
= __location__
,
3099 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3102 .type
= WREPL_TYPE_SGROUP
,
3103 .state
= WREPL_STATE_RELEASED
,
3104 .node
= WREPL_NODE_B
,
3106 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3107 .ips
= addresses_B_1
,
3108 .apply_expected
= false
3112 .type
= WREPL_TYPE_SGROUP
,
3113 .state
= WREPL_STATE_TOMBSTONE
,
3114 .node
= WREPL_NODE_B
,
3116 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3117 .ips
= addresses_A_1
,
3118 .apply_expected
= true
3123 * sgroup,tombstone vs. sgroup,active
3124 * => should NOT be replaced
3127 .line
= __location__
,
3128 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3131 .type
= WREPL_TYPE_SGROUP
,
3132 .state
= WREPL_STATE_TOMBSTONE
,
3133 .node
= WREPL_NODE_B
,
3135 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3136 .ips
= addresses_A_1
,
3137 .apply_expected
= true
3141 .type
= WREPL_TYPE_SGROUP
,
3142 .state
= WREPL_STATE_ACTIVE
,
3143 .node
= WREPL_NODE_B
,
3145 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3146 .ips
= addresses_B_1
,
3147 .apply_expected
= true
3152 * sgroup,tombstone vs. sgroup,tombstone
3153 * => should NOT be replaced
3156 .line
= __location__
,
3157 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3160 .type
= WREPL_TYPE_SGROUP
,
3161 .state
= WREPL_STATE_TOMBSTONE
,
3162 .node
= WREPL_NODE_B
,
3164 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3165 .ips
= addresses_B_1
,
3166 .apply_expected
= true
3170 .type
= WREPL_TYPE_SGROUP
,
3171 .state
= WREPL_STATE_TOMBSTONE
,
3172 .node
= WREPL_NODE_B
,
3174 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3175 .ips
= addresses_A_1
,
3176 .apply_expected
= true
3181 * special groups vs multi homed section,
3184 * sgroup,active vs. mhomed,active
3185 * => should NOT be replaced
3188 .line
= __location__
,
3189 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3192 .type
= WREPL_TYPE_SGROUP
,
3193 .state
= WREPL_STATE_ACTIVE
,
3194 .node
= WREPL_NODE_B
,
3196 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3197 .ips
= addresses_A_1
,
3198 .apply_expected
= true
3202 .type
= WREPL_TYPE_MHOMED
,
3203 .state
= WREPL_STATE_ACTIVE
,
3204 .node
= WREPL_NODE_B
,
3206 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3207 .ips
= addresses_A_1
,
3208 .apply_expected
= false
3213 * sgroup,active vs. mhomed,tombstone
3214 * => should NOT be replaced
3217 .line
= __location__
,
3218 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3221 .type
= WREPL_TYPE_SGROUP
,
3222 .state
= WREPL_STATE_ACTIVE
,
3223 .node
= WREPL_NODE_B
,
3225 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3226 .ips
= addresses_A_1
,
3227 .apply_expected
= true
3231 .type
= WREPL_TYPE_MHOMED
,
3232 .state
= WREPL_STATE_TOMBSTONE
,
3233 .node
= WREPL_NODE_B
,
3235 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3236 .ips
= addresses_A_1
,
3237 .apply_expected
= false
3242 * sgroup,released vs. mhomed,active
3243 * => should be replaced
3246 .line
= __location__
,
3247 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3250 .type
= WREPL_TYPE_SGROUP
,
3251 .state
= WREPL_STATE_RELEASED
,
3252 .node
= WREPL_NODE_B
,
3254 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3255 .ips
= addresses_A_1
,
3256 .apply_expected
= false
3260 .type
= WREPL_TYPE_MHOMED
,
3261 .state
= WREPL_STATE_ACTIVE
,
3262 .node
= WREPL_NODE_B
,
3264 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3265 .ips
= addresses_B_1
,
3266 .apply_expected
= true
3271 * sgroup,released vs. mhomed,tombstone
3272 * => should be replaced
3275 .line
= __location__
,
3276 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3279 .type
= WREPL_TYPE_SGROUP
,
3280 .state
= WREPL_STATE_RELEASED
,
3281 .node
= WREPL_NODE_B
,
3283 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3284 .ips
= addresses_B_1
,
3285 .apply_expected
= false
3289 .type
= WREPL_TYPE_MHOMED
,
3290 .state
= WREPL_STATE_TOMBSTONE
,
3291 .node
= WREPL_NODE_B
,
3293 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3294 .ips
= addresses_A_1
,
3295 .apply_expected
= true
3300 * sgroup,tombstone vs. mhomed,active
3301 * => should be replaced
3304 .line
= __location__
,
3305 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3308 .type
= WREPL_TYPE_SGROUP
,
3309 .state
= WREPL_STATE_TOMBSTONE
,
3310 .node
= WREPL_NODE_B
,
3312 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3313 .ips
= addresses_A_1
,
3314 .apply_expected
= true
3318 .type
= WREPL_TYPE_MHOMED
,
3319 .state
= WREPL_STATE_ACTIVE
,
3320 .node
= WREPL_NODE_B
,
3322 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3323 .ips
= addresses_B_1
,
3324 .apply_expected
= true
3329 * sgroup,tombstone vs. mhomed,tombstone
3330 * => should be replaced
3333 .line
= __location__
,
3334 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3337 .type
= WREPL_TYPE_SGROUP
,
3338 .state
= WREPL_STATE_TOMBSTONE
,
3339 .node
= WREPL_NODE_B
,
3341 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3342 .ips
= addresses_B_1
,
3343 .apply_expected
= true
3347 .type
= WREPL_TYPE_MHOMED
,
3348 .state
= WREPL_STATE_TOMBSTONE
,
3349 .node
= WREPL_NODE_B
,
3351 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3352 .ips
= addresses_A_1
,
3353 .apply_expected
= true
3358 * multi homed vs. unique section,
3361 * mhomed,active vs. unique,active
3362 * => should be replaced
3365 .line
= __location__
,
3366 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3369 .type
= WREPL_TYPE_MHOMED
,
3370 .state
= WREPL_STATE_ACTIVE
,
3371 .node
= WREPL_NODE_B
,
3373 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
3374 .ips
= addresses_A_3_4
,
3375 .apply_expected
= true
3379 .type
= WREPL_TYPE_UNIQUE
,
3380 .state
= WREPL_STATE_ACTIVE
,
3381 .node
= WREPL_NODE_B
,
3383 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3384 .ips
= addresses_B_1
,
3385 .apply_expected
= true
3390 * mhomed,active vs. unique,tombstone
3391 * => should NOT be replaced
3394 .line
= __location__
,
3395 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3398 .type
= WREPL_TYPE_MHOMED
,
3399 .state
= WREPL_STATE_ACTIVE
,
3400 .node
= WREPL_NODE_B
,
3402 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3403 .ips
= addresses_B_1
,
3404 .apply_expected
= true
3408 .type
= WREPL_TYPE_UNIQUE
,
3409 .state
= WREPL_STATE_TOMBSTONE
,
3410 .node
= WREPL_NODE_B
,
3412 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3413 .ips
= addresses_B_1
,
3414 .apply_expected
= false
3419 * mhomed,released vs. unique,active
3420 * => should be replaced
3423 .line
= __location__
,
3424 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3427 .type
= WREPL_TYPE_MHOMED
,
3428 .state
= WREPL_STATE_RELEASED
,
3429 .node
= WREPL_NODE_B
,
3431 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3432 .ips
= addresses_A_1
,
3433 .apply_expected
= false
3437 .type
= WREPL_TYPE_UNIQUE
,
3438 .state
= WREPL_STATE_ACTIVE
,
3439 .node
= WREPL_NODE_B
,
3441 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3442 .ips
= addresses_B_1
,
3443 .apply_expected
= true
3448 * mhomed,released vs. uinique,tombstone
3449 * => should be replaced
3452 .line
= __location__
,
3453 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3456 .type
= WREPL_TYPE_MHOMED
,
3457 .state
= WREPL_STATE_RELEASED
,
3458 .node
= WREPL_NODE_B
,
3460 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3461 .ips
= addresses_B_1
,
3462 .apply_expected
= false
3466 .type
= WREPL_TYPE_UNIQUE
,
3467 .state
= WREPL_STATE_TOMBSTONE
,
3468 .node
= WREPL_NODE_B
,
3470 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3471 .ips
= addresses_A_1
,
3472 .apply_expected
= true
3477 * mhomed,tombstone vs. unique,active
3478 * => should be replaced
3481 .line
= __location__
,
3482 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3485 .type
= WREPL_TYPE_MHOMED
,
3486 .state
= WREPL_STATE_TOMBSTONE
,
3487 .node
= WREPL_NODE_B
,
3489 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3490 .ips
= addresses_A_1
,
3491 .apply_expected
= true
3495 .type
= WREPL_TYPE_UNIQUE
,
3496 .state
= WREPL_STATE_ACTIVE
,
3497 .node
= WREPL_NODE_B
,
3499 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3500 .ips
= addresses_B_1
,
3501 .apply_expected
= true
3506 * mhomed,tombstone vs. uinique,tombstone
3507 * => should be replaced
3510 .line
= __location__
,
3511 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3514 .type
= WREPL_TYPE_MHOMED
,
3515 .state
= WREPL_STATE_TOMBSTONE
,
3516 .node
= WREPL_NODE_B
,
3518 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3519 .ips
= addresses_B_1
,
3520 .apply_expected
= true
3524 .type
= WREPL_TYPE_UNIQUE
,
3525 .state
= WREPL_STATE_TOMBSTONE
,
3526 .node
= WREPL_NODE_B
,
3528 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3529 .ips
= addresses_A_1
,
3530 .apply_expected
= true
3535 * multi homed vs. normal group section,
3538 * mhomed,active vs. group,active
3539 * => should be replaced
3542 .line
= __location__
,
3543 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3546 .type
= WREPL_TYPE_MHOMED
,
3547 .state
= WREPL_STATE_ACTIVE
,
3548 .node
= WREPL_NODE_B
,
3550 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3551 .ips
= addresses_A_1
,
3552 .apply_expected
= true
3556 .type
= WREPL_TYPE_GROUP
,
3557 .state
= WREPL_STATE_ACTIVE
,
3558 .node
= WREPL_NODE_B
,
3560 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3561 .ips
= addresses_B_1
,
3562 .apply_expected
= true
3567 * mhomed,active vs. group,tombstone
3568 * => should NOT be replaced
3571 .line
= __location__
,
3572 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3575 .type
= WREPL_TYPE_MHOMED
,
3576 .state
= WREPL_STATE_ACTIVE
,
3577 .node
= WREPL_NODE_B
,
3579 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3580 .ips
= addresses_B_1
,
3581 .apply_expected
= true
3585 .type
= WREPL_TYPE_GROUP
,
3586 .state
= WREPL_STATE_TOMBSTONE
,
3587 .node
= WREPL_NODE_B
,
3589 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3590 .ips
= addresses_B_1
,
3591 .apply_expected
= false
3596 * mhomed,released vs. group,active
3597 * => should be replaced
3600 .line
= __location__
,
3601 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3604 .type
= WREPL_TYPE_MHOMED
,
3605 .state
= WREPL_STATE_RELEASED
,
3606 .node
= WREPL_NODE_B
,
3608 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3609 .ips
= addresses_B_1
,
3610 .apply_expected
= false
3614 .type
= WREPL_TYPE_GROUP
,
3615 .state
= WREPL_STATE_ACTIVE
,
3616 .node
= WREPL_NODE_B
,
3618 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3619 .ips
= addresses_A_1
,
3620 .apply_expected
= true
3625 * mhomed,released vs. group,tombstone
3626 * => should be replaced
3629 .line
= __location__
,
3630 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3633 .type
= WREPL_TYPE_MHOMED
,
3634 .state
= WREPL_STATE_RELEASED
,
3635 .node
= WREPL_NODE_B
,
3637 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3638 .ips
= addresses_A_1
,
3639 .apply_expected
= false
3643 .type
= WREPL_TYPE_GROUP
,
3644 .state
= WREPL_STATE_TOMBSTONE
,
3645 .node
= WREPL_NODE_B
,
3647 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3648 .ips
= addresses_B_1
,
3649 .apply_expected
= true
3654 * mhomed,tombstone vs. group,active
3655 * => should be replaced
3658 .line
= __location__
,
3659 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3662 .type
= WREPL_TYPE_MHOMED
,
3663 .state
= WREPL_STATE_TOMBSTONE
,
3664 .node
= WREPL_NODE_B
,
3666 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3667 .ips
= addresses_B_1
,
3668 .apply_expected
= true
3672 .type
= WREPL_TYPE_GROUP
,
3673 .state
= WREPL_STATE_ACTIVE
,
3674 .node
= WREPL_NODE_B
,
3676 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3677 .ips
= addresses_A_1
,
3678 .apply_expected
= true
3683 * mhomed,tombstone vs. group,tombstone
3684 * => should be replaced
3687 .line
= __location__
,
3688 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3691 .type
= WREPL_TYPE_MHOMED
,
3692 .state
= WREPL_STATE_TOMBSTONE
,
3693 .node
= WREPL_NODE_B
,
3695 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3696 .ips
= addresses_A_1
,
3697 .apply_expected
= true
3701 .type
= WREPL_TYPE_GROUP
,
3702 .state
= WREPL_STATE_TOMBSTONE
,
3703 .node
= WREPL_NODE_B
,
3705 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3706 .ips
= addresses_B_1
,
3707 .apply_expected
= true
3712 * multi homed vs. special group section,
3715 * mhomed,active vs. sgroup,active
3716 * => should NOT be replaced
3719 .line
= __location__
,
3720 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3723 .type
= WREPL_TYPE_MHOMED
,
3724 .state
= WREPL_STATE_ACTIVE
,
3725 .node
= WREPL_NODE_B
,
3727 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3728 .ips
= addresses_A_1
,
3729 .apply_expected
= true
3733 .type
= WREPL_TYPE_SGROUP
,
3734 .state
= WREPL_STATE_ACTIVE
,
3735 .node
= WREPL_NODE_B
,
3737 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3738 .ips
= addresses_A_1
,
3739 .apply_expected
= false
3744 * mhomed,active vs. sgroup,tombstone
3745 * => should NOT be replaced
3748 .line
= __location__
,
3749 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3752 .type
= WREPL_TYPE_MHOMED
,
3753 .state
= WREPL_STATE_ACTIVE
,
3754 .node
= WREPL_NODE_B
,
3756 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3757 .ips
= addresses_A_1
,
3758 .apply_expected
= true
3762 .type
= WREPL_TYPE_SGROUP
,
3763 .state
= WREPL_STATE_TOMBSTONE
,
3764 .node
= WREPL_NODE_B
,
3766 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3767 .ips
= addresses_A_1
,
3768 .apply_expected
= false
3773 * mhomed,released vs. sgroup,active
3774 * => should be replaced
3777 .line
= __location__
,
3778 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3781 .type
= WREPL_TYPE_MHOMED
,
3782 .state
= WREPL_STATE_RELEASED
,
3783 .node
= WREPL_NODE_B
,
3785 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3786 .ips
= addresses_A_1
,
3787 .apply_expected
= false
3791 .type
= WREPL_TYPE_SGROUP
,
3792 .state
= WREPL_STATE_ACTIVE
,
3793 .node
= WREPL_NODE_B
,
3795 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3796 .ips
= addresses_B_1
,
3797 .apply_expected
= true
3802 * mhomed,released vs. sgroup,tombstone
3803 * => should be replaced
3806 .line
= __location__
,
3807 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3810 .type
= WREPL_TYPE_MHOMED
,
3811 .state
= WREPL_STATE_RELEASED
,
3812 .node
= WREPL_NODE_B
,
3814 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3815 .ips
= addresses_B_1
,
3816 .apply_expected
= false
3820 .type
= WREPL_TYPE_SGROUP
,
3821 .state
= WREPL_STATE_TOMBSTONE
,
3822 .node
= WREPL_NODE_B
,
3824 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3825 .ips
= addresses_A_1
,
3826 .apply_expected
= true
3831 * mhomed,tombstone vs. sgroup,active
3832 * => should be replaced
3835 .line
= __location__
,
3836 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3839 .type
= WREPL_TYPE_MHOMED
,
3840 .state
= WREPL_STATE_TOMBSTONE
,
3841 .node
= WREPL_NODE_B
,
3843 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3844 .ips
= addresses_A_1
,
3845 .apply_expected
= true
3849 .type
= WREPL_TYPE_SGROUP
,
3850 .state
= WREPL_STATE_ACTIVE
,
3851 .node
= WREPL_NODE_B
,
3853 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3854 .ips
= addresses_B_1
,
3855 .apply_expected
= true
3860 * mhomed,tombstone vs. sgroup,tombstone
3861 * => should be replaced
3864 .line
= __location__
,
3865 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3868 .type
= WREPL_TYPE_MHOMED
,
3869 .state
= WREPL_STATE_TOMBSTONE
,
3870 .node
= WREPL_NODE_B
,
3872 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3873 .ips
= addresses_B_1
,
3874 .apply_expected
= true
3878 .type
= WREPL_TYPE_SGROUP
,
3879 .state
= WREPL_STATE_TOMBSTONE
,
3880 .node
= WREPL_NODE_B
,
3882 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3883 .ips
= addresses_A_1
,
3884 .apply_expected
= true
3889 * multi homed vs. mlti homed section,
3892 * mhomed,active vs. mhomed,active
3893 * => should be replaced
3896 .line
= __location__
,
3897 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3900 .type
= WREPL_TYPE_MHOMED
,
3901 .state
= WREPL_STATE_ACTIVE
,
3902 .node
= WREPL_NODE_B
,
3904 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
3905 .ips
= addresses_A_3_4
,
3906 .apply_expected
= true
3910 .type
= WREPL_TYPE_MHOMED
,
3911 .state
= WREPL_STATE_ACTIVE
,
3912 .node
= WREPL_NODE_B
,
3914 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3915 .ips
= addresses_B_3_4
,
3916 .apply_expected
= true
3921 * mhomed,active vs. mhomed,tombstone
3922 * => should NOT be replaced
3925 .line
= __location__
,
3926 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3929 .type
= WREPL_TYPE_MHOMED
,
3930 .state
= WREPL_STATE_ACTIVE
,
3931 .node
= WREPL_NODE_B
,
3933 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3934 .ips
= addresses_B_3_4
,
3935 .apply_expected
= true
3939 .type
= WREPL_TYPE_MHOMED
,
3940 .state
= WREPL_STATE_TOMBSTONE
,
3941 .node
= WREPL_NODE_B
,
3943 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3944 .ips
= addresses_B_3_4
,
3945 .apply_expected
= false
3950 * mhomed,released vs. mhomed,active
3951 * => should be replaced
3954 .line
= __location__
,
3955 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3958 .type
= WREPL_TYPE_MHOMED
,
3959 .state
= WREPL_STATE_RELEASED
,
3960 .node
= WREPL_NODE_B
,
3962 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3963 .ips
= addresses_B_3_4
,
3964 .apply_expected
= false
3968 .type
= WREPL_TYPE_MHOMED
,
3969 .state
= WREPL_STATE_ACTIVE
,
3970 .node
= WREPL_NODE_B
,
3972 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
3973 .ips
= addresses_A_3_4
,
3974 .apply_expected
= true
3979 * mhomed,released vs. mhomed,tombstone
3980 * => should be replaced
3983 .line
= __location__
,
3984 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3987 .type
= WREPL_TYPE_MHOMED
,
3988 .state
= WREPL_STATE_RELEASED
,
3989 .node
= WREPL_NODE_B
,
3991 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
3992 .ips
= addresses_A_3_4
,
3993 .apply_expected
= false
3997 .type
= WREPL_TYPE_MHOMED
,
3998 .state
= WREPL_STATE_TOMBSTONE
,
3999 .node
= WREPL_NODE_B
,
4001 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4002 .ips
= addresses_B_3_4
,
4003 .apply_expected
= true
4008 * mhomed,tombstone vs. mhomed,active
4009 * => should be replaced
4012 .line
= __location__
,
4013 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4016 .type
= WREPL_TYPE_MHOMED
,
4017 .state
= WREPL_STATE_TOMBSTONE
,
4018 .node
= WREPL_NODE_B
,
4020 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4021 .ips
= addresses_B_3_4
,
4022 .apply_expected
= true
4026 .type
= WREPL_TYPE_MHOMED
,
4027 .state
= WREPL_STATE_ACTIVE
,
4028 .node
= WREPL_NODE_B
,
4030 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4031 .ips
= addresses_A_3_4
,
4032 .apply_expected
= true
4037 * mhomed,tombstone vs. mhomed,tombstone
4038 * => should be replaced
4041 .line
= __location__
,
4042 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4045 .type
= WREPL_TYPE_MHOMED
,
4046 .state
= WREPL_STATE_TOMBSTONE
,
4047 .node
= WREPL_NODE_B
,
4049 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4050 .ips
= addresses_A_3_4
,
4051 .apply_expected
= true
4055 .type
= WREPL_TYPE_MHOMED
,
4056 .state
= WREPL_STATE_TOMBSTONE
,
4057 .node
= WREPL_NODE_B
,
4059 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4060 .ips
= addresses_B_3_4
,
4061 .apply_expected
= true
4065 .line
= __location__
,
4066 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4070 .type
= WREPL_TYPE_UNIQUE
,
4071 .state
= WREPL_STATE_TOMBSTONE
,
4072 .node
= WREPL_NODE_B
,
4074 .num_ips
= ARRAY_SIZE(addresses_B_1
),
4075 .ips
= addresses_B_1
,
4076 .apply_expected
= true,
4080 .type
= WREPL_TYPE_UNIQUE
,
4081 .state
= WREPL_STATE_TOMBSTONE
,
4082 .node
= WREPL_NODE_B
,
4084 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4085 .ips
= addresses_A_1
,
4086 .apply_expected
= true,
4090 * special group vs special group section,
4093 * sgroup,active vs. sgroup,active same addresses
4094 * => should be NOT replaced
4097 .line
= __location__
,
4098 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4099 .comment
= "A:A_3_4 vs. B:A_3_4",
4103 .type
= WREPL_TYPE_SGROUP
,
4104 .state
= WREPL_STATE_ACTIVE
,
4105 .node
= WREPL_NODE_B
,
4107 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4108 .ips
= addresses_A_3_4
,
4109 .apply_expected
= true
4113 .type
= WREPL_TYPE_SGROUP
,
4114 .state
= WREPL_STATE_ACTIVE
,
4115 .node
= WREPL_NODE_B
,
4117 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4118 .ips
= addresses_A_3_4
,
4119 .apply_expected
= false,
4120 .sgroup_cleanup
= true
4124 * sgroup,active vs. sgroup,active same addresses
4125 * => should be NOT replaced
4128 .line
= __location__
,
4129 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4130 .comment
= "A:A_3_4 vs. B:NULL",
4134 .type
= WREPL_TYPE_SGROUP
,
4135 .state
= WREPL_STATE_ACTIVE
,
4136 .node
= WREPL_NODE_B
,
4138 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4139 .ips
= addresses_A_3_4
,
4140 .apply_expected
= true
4144 .type
= WREPL_TYPE_SGROUP
,
4145 .state
= WREPL_STATE_ACTIVE
,
4146 .node
= WREPL_NODE_B
,
4150 .apply_expected
= false,
4151 .sgroup_cleanup
= true
4155 * sgroup,active vs. sgroup,active subset addresses, special case...
4156 * => should NOT be replaced
4159 .line
= __location__
,
4160 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4161 .comment
= "A:A_3_4_X_3_4 vs. B:A_3_4",
4165 .type
= WREPL_TYPE_SGROUP
,
4166 .state
= WREPL_STATE_ACTIVE
,
4167 .node
= WREPL_NODE_B
,
4169 .num_ips
= ARRAY_SIZE(addresses_A_3_4_X_3_4
),
4170 .ips
= addresses_A_3_4_X_3_4
,
4171 .apply_expected
= true,
4175 .type
= WREPL_TYPE_SGROUP
,
4176 .state
= WREPL_STATE_ACTIVE
,
4177 .node
= WREPL_NODE_B
,
4179 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4180 .ips
= addresses_A_3_4
,
4181 .apply_expected
= false,
4185 .line
= __location__
,
4186 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4190 .type
= WREPL_TYPE_SGROUP
,
4191 .state
= WREPL_STATE_ACTIVE
,
4192 .node
= WREPL_NODE_B
,
4196 .apply_expected
= false,
4200 .type
= WREPL_TYPE_SGROUP
,
4201 .state
= WREPL_STATE_ACTIVE
,
4202 .node
= WREPL_NODE_B
,
4206 .apply_expected
= false,
4210 * sgroup,active vs. sgroup,active different addresses, but owner changed
4211 * => should be replaced
4214 .line
= __location__
,
4215 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4216 .comment
= "A:B_3_4 vs. B:A_3_4",
4220 .type
= WREPL_TYPE_SGROUP
,
4221 .state
= WREPL_STATE_ACTIVE
,
4222 .node
= WREPL_NODE_B
,
4224 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4225 .ips
= addresses_B_3_4
,
4226 .apply_expected
= true,
4230 .type
= WREPL_TYPE_SGROUP
,
4231 .state
= WREPL_STATE_ACTIVE
,
4232 .node
= WREPL_NODE_B
,
4234 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4235 .ips
= addresses_A_3_4
,
4236 .apply_expected
= true,
4237 .sgroup_cleanup
= true
4241 * sgroup,active vs. sgroup,active different addresses, but owner changed
4242 * => should be replaced
4245 .line
= __location__
,
4246 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4247 .comment
= "A:A_3_4 vs. B:A_3_4_OWNER_B",
4251 .type
= WREPL_TYPE_SGROUP
,
4252 .state
= WREPL_STATE_ACTIVE
,
4253 .node
= WREPL_NODE_B
,
4255 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4256 .ips
= addresses_A_3_4
,
4257 .apply_expected
= true,
4261 .type
= WREPL_TYPE_SGROUP
,
4262 .state
= WREPL_STATE_ACTIVE
,
4263 .node
= WREPL_NODE_B
,
4265 .num_ips
= ARRAY_SIZE(addresses_A_3_4_OWNER_B
),
4266 .ips
= addresses_A_3_4_OWNER_B
,
4267 .apply_expected
= true,
4268 .sgroup_cleanup
= true
4272 * sgroup,active vs. sgroup,active different addresses, but owner changed
4273 * => should be replaced
4276 .line
= __location__
,
4277 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4278 .comment
= "A:A_3_4_OWNER_B vs. B:A_3_4",
4282 .type
= WREPL_TYPE_SGROUP
,
4283 .state
= WREPL_STATE_ACTIVE
,
4284 .node
= WREPL_NODE_B
,
4286 .num_ips
= ARRAY_SIZE(addresses_A_3_4_OWNER_B
),
4287 .ips
= addresses_A_3_4_OWNER_B
,
4288 .apply_expected
= true,
4292 .type
= WREPL_TYPE_SGROUP
,
4293 .state
= WREPL_STATE_ACTIVE
,
4294 .node
= WREPL_NODE_B
,
4296 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4297 .ips
= addresses_A_3_4
,
4298 .apply_expected
= true,
4299 .sgroup_cleanup
= true
4303 * sgroup,active vs. sgroup,active different addresses
4304 * => should be merged
4307 .line
= __location__
,
4308 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4309 .comment
= "A:A_3_4 vs. B:B_3_4 => C:A_3_4_B_3_4",
4313 .type
= WREPL_TYPE_SGROUP
,
4314 .state
= WREPL_STATE_ACTIVE
,
4315 .node
= WREPL_NODE_B
,
4317 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4318 .ips
= addresses_A_3_4
,
4319 .apply_expected
= true,
4323 .type
= WREPL_TYPE_SGROUP
,
4324 .state
= WREPL_STATE_ACTIVE
,
4325 .node
= WREPL_NODE_B
,
4327 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4328 .ips
= addresses_B_3_4
,
4329 .sgroup_merge
= true,
4330 .sgroup_cleanup
= true,
4334 * sgroup,active vs. sgroup,active different addresses, special case...
4335 * => should be merged
4338 .line
= __location__
,
4339 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4340 .comment
= "A:B_3_4_X_3_4 vs. B:A_3_4 => B:A_3_4_X_3_4",
4344 .type
= WREPL_TYPE_SGROUP
,
4345 .state
= WREPL_STATE_ACTIVE
,
4346 .node
= WREPL_NODE_B
,
4348 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4349 .ips
= addresses_B_3_4_X_3_4
,
4350 .apply_expected
= true,
4354 .type
= WREPL_TYPE_SGROUP
,
4355 .state
= WREPL_STATE_ACTIVE
,
4356 .node
= WREPL_NODE_B
,
4358 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4359 .ips
= addresses_A_3_4
,
4360 .sgroup_merge
= true,
4361 .merge_owner
= &ctx
->b
,
4362 .sgroup_cleanup
= false
4366 .line
= __location__
,
4367 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4371 .type
= WREPL_TYPE_SGROUP
,
4372 .state
= WREPL_STATE_ACTIVE
,
4373 .node
= WREPL_NODE_B
,
4375 .num_ips
= ARRAY_SIZE(addresses_A_3_4_X_3_4_OWNER_B
),
4376 .ips
= addresses_A_3_4_X_3_4_OWNER_B
,
4377 .apply_expected
= true,
4381 .type
= WREPL_TYPE_SGROUP
,
4382 .state
= WREPL_STATE_ACTIVE
,
4383 .node
= WREPL_NODE_B
,
4387 .apply_expected
= false,
4391 * sgroup,active vs. sgroup,active different addresses, special case...
4392 * => should be merged
4395 .line
= __location__
,
4396 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4397 .comment
= "A:X_3_4 vs. B:A_3_4 => C:A_3_4_X_3_4",
4401 .type
= WREPL_TYPE_SGROUP
,
4402 .state
= WREPL_STATE_ACTIVE
,
4403 .node
= WREPL_NODE_B
,
4405 .num_ips
= ARRAY_SIZE(addresses_X_3_4
),
4406 .ips
= addresses_X_3_4
,
4407 .apply_expected
= true,
4411 .type
= WREPL_TYPE_SGROUP
,
4412 .state
= WREPL_STATE_ACTIVE
,
4413 .node
= WREPL_NODE_B
,
4415 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4416 .ips
= addresses_A_3_4
,
4417 .sgroup_merge
= true,
4418 .sgroup_cleanup
= false
4422 .line
= __location__
,
4423 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4427 .type
= WREPL_TYPE_SGROUP
,
4428 .state
= WREPL_STATE_ACTIVE
,
4429 .node
= WREPL_NODE_B
,
4433 .apply_expected
= false,
4437 .type
= WREPL_TYPE_SGROUP
,
4438 .state
= WREPL_STATE_ACTIVE
,
4439 .node
= WREPL_NODE_B
,
4443 .apply_expected
= false,
4447 * sgroup,active vs. sgroup,active different addresses, special case...
4448 * => should be merged
4451 .line
= __location__
,
4452 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4453 .comment
= "A:A_3_4_X_3_4 vs. B:A_3_4_OWNER_B => B:A_3_4_OWNER_B_X_3_4",
4457 .type
= WREPL_TYPE_SGROUP
,
4458 .state
= WREPL_STATE_ACTIVE
,
4459 .node
= WREPL_NODE_B
,
4461 .num_ips
= ARRAY_SIZE(addresses_A_3_4_X_3_4
),
4462 .ips
= addresses_A_3_4_X_3_4
,
4463 .apply_expected
= true,
4467 .type
= WREPL_TYPE_SGROUP
,
4468 .state
= WREPL_STATE_ACTIVE
,
4469 .node
= WREPL_NODE_B
,
4471 .num_ips
= ARRAY_SIZE(addresses_A_3_4_OWNER_B
),
4472 .ips
= addresses_A_3_4_OWNER_B
,
4473 .sgroup_merge
= true,
4474 .merge_owner
= &ctx
->b
,
4478 .line
= __location__
,
4479 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4483 .type
= WREPL_TYPE_SGROUP
,
4484 .state
= WREPL_STATE_ACTIVE
,
4485 .node
= WREPL_NODE_B
,
4489 .apply_expected
= false,
4493 .type
= WREPL_TYPE_SGROUP
,
4494 .state
= WREPL_STATE_ACTIVE
,
4495 .node
= WREPL_NODE_B
,
4499 .apply_expected
= false,
4503 * sgroup,active vs. sgroup,active partly different addresses, special case...
4504 * => should be merged
4507 .line
= __location__
,
4508 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4509 .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",
4513 .type
= WREPL_TYPE_SGROUP
,
4514 .state
= WREPL_STATE_ACTIVE
,
4515 .node
= WREPL_NODE_B
,
4517 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4518 .ips
= addresses_B_3_4_X_3_4
,
4519 .apply_expected
= true,
4523 .type
= WREPL_TYPE_SGROUP
,
4524 .state
= WREPL_STATE_ACTIVE
,
4525 .node
= WREPL_NODE_B
,
4527 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_1_2
),
4528 .ips
= addresses_B_3_4_X_1_2
,
4529 .sgroup_merge
= true,
4530 .sgroup_cleanup
= false
4534 .line
= __location__
,
4535 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4539 .type
= WREPL_TYPE_SGROUP
,
4540 .state
= WREPL_STATE_ACTIVE
,
4541 .node
= WREPL_NODE_B
,
4545 .apply_expected
= false,
4549 .type
= WREPL_TYPE_SGROUP
,
4550 .state
= WREPL_STATE_ACTIVE
,
4551 .node
= WREPL_NODE_B
,
4555 .apply_expected
= false,
4559 * sgroup,active vs. sgroup,active different addresses, special case...
4560 * => should be merged
4563 .line
= __location__
,
4564 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4565 .comment
= "A:A_3_4_B_3_4 vs. B:NULL => B:A_3_4",
4569 .type
= WREPL_TYPE_SGROUP
,
4570 .state
= WREPL_STATE_ACTIVE
,
4571 .node
= WREPL_NODE_B
,
4573 .num_ips
= ARRAY_SIZE(addresses_A_3_4_B_3_4
),
4574 .ips
= addresses_A_3_4_B_3_4
,
4575 .apply_expected
= true,
4579 .type
= WREPL_TYPE_SGROUP
,
4580 .state
= WREPL_STATE_ACTIVE
,
4581 .node
= WREPL_NODE_B
,
4585 .sgroup_merge
= true,
4586 .merge_owner
= &ctx
->b
,
4587 .sgroup_cleanup
= true
4591 .line
= __location__
,
4592 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4596 .type
= WREPL_TYPE_SGROUP
,
4597 .state
= WREPL_STATE_ACTIVE
,
4598 .node
= WREPL_NODE_B
,
4602 .apply_expected
= false,
4606 .type
= WREPL_TYPE_UNIQUE
,
4607 .state
= WREPL_STATE_TOMBSTONE
,
4608 .node
= WREPL_NODE_B
,
4610 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4611 .ips
= addresses_A_1
,
4612 .apply_expected
= true,
4616 * sgroup,active vs. sgroup,active different addresses, special case...
4617 * => should be merged
4620 .line
= __location__
,
4621 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4622 .comment
= "A:B_3_4_X_3_4 vs. B:NULL => B:X_3_4",
4626 .type
= WREPL_TYPE_SGROUP
,
4627 .state
= WREPL_STATE_ACTIVE
,
4628 .node
= WREPL_NODE_B
,
4630 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4631 .ips
= addresses_B_3_4_X_3_4
,
4632 .apply_expected
= true,
4636 .type
= WREPL_TYPE_SGROUP
,
4637 .state
= WREPL_STATE_ACTIVE
,
4638 .node
= WREPL_NODE_B
,
4642 .sgroup_merge
= true,
4643 .merge_owner
= &ctx
->b
,
4644 .sgroup_cleanup
= true
4648 .line
= __location__
,
4649 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4653 .type
= WREPL_TYPE_SGROUP
,
4654 .state
= WREPL_STATE_ACTIVE
,
4655 .node
= WREPL_NODE_B
,
4659 .apply_expected
= false,
4663 .type
= WREPL_TYPE_UNIQUE
,
4664 .state
= WREPL_STATE_TOMBSTONE
,
4665 .node
= WREPL_NODE_B
,
4667 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4668 .ips
= addresses_A_1
,
4669 .apply_expected
= true,
4674 * sgroup,active vs. sgroup,tombstone different no addresses, special
4675 * => should be replaced
4678 .line
= __location__
,
4679 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4680 .comment
= "A:B_3_4_X_3_4 vs. B:NULL => B:NULL",
4684 .type
= WREPL_TYPE_SGROUP
,
4685 .state
= WREPL_STATE_ACTIVE
,
4686 .node
= WREPL_NODE_B
,
4688 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4689 .ips
= addresses_B_3_4_X_3_4
,
4690 .apply_expected
= true,
4694 .type
= WREPL_TYPE_SGROUP
,
4695 .state
= WREPL_STATE_TOMBSTONE
,
4696 .node
= WREPL_NODE_B
,
4700 .apply_expected
= true,
4704 * sgroup,active vs. sgroup,tombstone different addresses
4705 * => should be replaced
4708 .line
= __location__
,
4709 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4710 .comment
= "A:B_3_4_X_3_4 vs. B:A_3_4 => B:A_3_4",
4714 .type
= WREPL_TYPE_SGROUP
,
4715 .state
= WREPL_STATE_ACTIVE
,
4716 .node
= WREPL_NODE_B
,
4718 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4719 .ips
= addresses_B_3_4_X_3_4
,
4720 .apply_expected
= true,
4724 .type
= WREPL_TYPE_SGROUP
,
4725 .state
= WREPL_STATE_TOMBSTONE
,
4726 .node
= WREPL_NODE_B
,
4728 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4729 .ips
= addresses_A_3_4
,
4730 .apply_expected
= true,
4734 * sgroup,active vs. sgroup,tombstone subset addresses
4735 * => should be replaced
4738 .line
= __location__
,
4739 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4740 .comment
= "A:B_3_4_X_3_4 vs. B:B_3_4 => B:B_3_4",
4744 .type
= WREPL_TYPE_SGROUP
,
4745 .state
= WREPL_STATE_ACTIVE
,
4746 .node
= WREPL_NODE_B
,
4748 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4749 .ips
= addresses_B_3_4_X_3_4
,
4750 .apply_expected
= true,
4754 .type
= WREPL_TYPE_SGROUP
,
4755 .state
= WREPL_STATE_TOMBSTONE
,
4756 .node
= WREPL_NODE_B
,
4758 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4759 .ips
= addresses_B_3_4
,
4760 .apply_expected
= true,
4764 * sgroup,active vs. sgroup,active same addresses
4765 * => should be replaced
4768 .line
= __location__
,
4769 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4770 .comment
= "A:B_3_4_X_3_4 vs. B:B_3_4_X_3_4 => B:B_3_4_X_3_4",
4774 .type
= WREPL_TYPE_SGROUP
,
4775 .state
= WREPL_STATE_ACTIVE
,
4776 .node
= WREPL_NODE_B
,
4778 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4779 .ips
= addresses_B_3_4_X_3_4
,
4780 .apply_expected
= true,
4784 .type
= WREPL_TYPE_SGROUP
,
4785 .state
= WREPL_STATE_TOMBSTONE
,
4786 .node
= WREPL_NODE_B
,
4788 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4789 .ips
= addresses_B_3_4_X_3_4
,
4790 .apply_expected
= true,
4795 * This should be the last record in this array,
4796 * we need to make sure the we leave a tombstoned unique entry
4800 .line
= __location__
,
4801 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4805 .type
= WREPL_TYPE_UNIQUE
,
4806 .state
= WREPL_STATE_TOMBSTONE
,
4807 .node
= WREPL_NODE_B
,
4809 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4810 .ips
= addresses_A_1
,
4811 .apply_expected
= true
4815 .type
= WREPL_TYPE_UNIQUE
,
4816 .state
= WREPL_STATE_TOMBSTONE
,
4817 .node
= WREPL_NODE_B
,
4819 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4820 .ips
= addresses_A_1
,
4821 .apply_expected
= true
4823 }}; /* do not add entries here, this should be the last record! */
4825 wins_name_r1
= &wins_name1
;
4826 wins_name_r2
= &wins_name2
;
4828 torture_comment(tctx
, "Test Replica Conflicts with different owners\n");
4830 for(i
=0; ret
&& i
< ARRAY_SIZE(records
); i
++) {
4832 if (!records
[i
].extra
&& !records
[i
].cleanup
) {
4833 /* we should test the worst cases */
4834 if (records
[i
].r2
.apply_expected
&& records
[i
].r1
.ips
==records
[i
].r2
.ips
) {
4835 torture_comment(tctx
, "(%s) Programmer error, invalid record[%u]: %s\n",
4836 __location__
, i
, records
[i
].line
);
4838 } else if (!records
[i
].r2
.apply_expected
&& records
[i
].r1
.ips
!=records
[i
].r2
.ips
) {
4839 torture_comment(tctx
, "(%s) Programmer error, invalid record[%u]: %s\n",
4840 __location__
, i
, records
[i
].line
);
4845 if (!records
[i
].cleanup
) {
4846 const char *expected
;
4849 if (records
[i
].r2
.sgroup_merge
) {
4850 expected
= "SGROUP_MERGE";
4851 } else if (records
[i
].r2
.apply_expected
) {
4852 expected
= "REPLACE";
4854 expected
= "NOT REPLACE";
4857 if (!records
[i
].r1
.ips
&& !records
[i
].r2
.ips
) {
4858 ips
= "with no ip(s)";
4859 } else if (records
[i
].r1
.ips
==records
[i
].r2
.ips
) {
4860 ips
= "with same ip(s)";
4862 ips
= "with different ip(s)";
4865 torture_comment(tctx
, "%s,%s%s vs. %s,%s%s %s => %s\n",
4866 wrepl_name_type_string(records
[i
].r1
.type
),
4867 wrepl_name_state_string(records
[i
].r1
.state
),
4868 (records
[i
].r1
.is_static
?",static":""),
4869 wrepl_name_type_string(records
[i
].r2
.type
),
4870 wrepl_name_state_string(records
[i
].r2
.state
),
4871 (records
[i
].r2
.is_static
?",static":""),
4872 (records
[i
].comment
?records
[i
].comment
:ips
),
4879 wins_name_r1
->name
= &records
[i
].name
;
4880 wins_name_r1
->flags
= WREPL_NAME_FLAGS(records
[i
].r1
.type
,
4881 records
[i
].r1
.state
,
4883 records
[i
].r1
.is_static
);
4884 wins_name_r1
->id
= ++records
[i
].r1
.owner
->max_version
;
4885 if (wins_name_r1
->flags
& 2) {
4886 wins_name_r1
->addresses
.addresses
.num_ips
= records
[i
].r1
.num_ips
;
4887 wins_name_r1
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
4890 wins_name_r1
->addresses
.ip
= records
[i
].r1
.ips
[0].ip
;
4892 wins_name_r1
->unknown
= "255.255.255.255";
4895 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r1
.owner
, wins_name_r1
);
4896 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r1
.owner
,
4897 wins_name_r1
, records
[i
].r1
.apply_expected
);
4902 wins_name_r2
->name
= &records
[i
].name
;
4903 wins_name_r2
->flags
= WREPL_NAME_FLAGS(records
[i
].r2
.type
,
4904 records
[i
].r2
.state
,
4906 records
[i
].r2
.is_static
);
4907 wins_name_r2
->id
= ++records
[i
].r2
.owner
->max_version
;
4908 if (wins_name_r2
->flags
& 2) {
4909 wins_name_r2
->addresses
.addresses
.num_ips
= records
[i
].r2
.num_ips
;
4910 wins_name_r2
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
4913 wins_name_r2
->addresses
.ip
= records
[i
].r2
.ips
[0].ip
;
4915 wins_name_r2
->unknown
= "255.255.255.255";
4918 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
);
4919 if (records
[i
].r1
.state
== WREPL_STATE_RELEASED
) {
4920 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r1
.owner
,
4921 wins_name_r1
, false);
4922 } else if (records
[i
].r2
.sgroup_merge
) {
4923 ret
&= test_wrepl_sgroup_merged(tctx
, ctx
, records
[i
].r2
.merge_owner
,
4924 records
[i
].r1
.owner
,
4925 records
[i
].r1
.num_ips
, records
[i
].r1
.ips
,
4926 records
[i
].r2
.owner
,
4927 records
[i
].r2
.num_ips
, records
[i
].r2
.ips
,
4929 } else if (records
[i
].r1
.owner
!= records
[i
].r2
.owner
) {
4931 _expected
= (records
[i
].r1
.apply_expected
&& !records
[i
].r2
.apply_expected
);
4932 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r1
.owner
,
4933 wins_name_r1
, _expected
);
4935 if (records
[i
].r2
.state
== WREPL_STATE_RELEASED
) {
4936 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r2
.owner
,
4937 wins_name_r2
, false);
4938 } else if (!records
[i
].r2
.sgroup_merge
) {
4939 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r2
.owner
,
4940 wins_name_r2
, records
[i
].r2
.apply_expected
);
4943 if (records
[i
].r2
.sgroup_cleanup
) {
4945 torture_comment(tctx
, "failed before sgroup_cleanup record[%u]: %s\n", i
, records
[i
].line
);
4949 /* clean up the SGROUP record */
4950 wins_name_r1
->name
= &records
[i
].name
;
4951 wins_name_r1
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
4953 WREPL_NODE_B
, false);
4954 wins_name_r1
->id
= ++records
[i
].r1
.owner
->max_version
;
4955 wins_name_r1
->addresses
.addresses
.num_ips
= 0;
4956 wins_name_r1
->addresses
.addresses
.ips
= NULL
;
4957 wins_name_r1
->unknown
= "255.255.255.255";
4958 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r1
.owner
, wins_name_r1
);
4960 /* here we test how names from an owner are deleted */
4961 if (records
[i
].r2
.sgroup_merge
&& records
[i
].r2
.num_ips
) {
4962 ret
&= test_wrepl_sgroup_merged(tctx
, ctx
, NULL
,
4963 records
[i
].r2
.owner
,
4964 records
[i
].r2
.num_ips
, records
[i
].r2
.ips
,
4965 records
[i
].r1
.owner
,
4970 /* clean up the SGROUP record */
4971 wins_name_r2
->name
= &records
[i
].name
;
4972 wins_name_r2
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
4974 WREPL_NODE_B
, false);
4975 wins_name_r2
->id
= ++records
[i
].r2
.owner
->max_version
;
4976 wins_name_r2
->addresses
.addresses
.num_ips
= 0;
4977 wins_name_r2
->addresses
.addresses
.ips
= NULL
;
4978 wins_name_r2
->unknown
= "255.255.255.255";
4979 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
);
4981 /* take ownership of the SGROUP record */
4982 wins_name_r2
->name
= &records
[i
].name
;
4983 wins_name_r2
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
4985 WREPL_NODE_B
, false);
4986 wins_name_r2
->id
= ++records
[i
].r2
.owner
->max_version
;
4987 wins_name_r2
->addresses
.addresses
.num_ips
= ARRAY_SIZE(addresses_B_1
);
4988 wins_name_r2
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
4990 wins_name_r2
->unknown
= "255.255.255.255";
4991 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
);
4992 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
, true);
4994 /* overwrite the SGROUP record with unique,tombstone */
4995 wins_name_r2
->name
= &records
[i
].name
;
4996 wins_name_r2
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
4997 WREPL_STATE_TOMBSTONE
,
4998 WREPL_NODE_B
, false);
4999 wins_name_r2
->id
= ++records
[i
].r2
.owner
->max_version
;
5000 wins_name_r2
->addresses
.addresses
.num_ips
= ARRAY_SIZE(addresses_B_1
);
5001 wins_name_r2
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
5003 wins_name_r2
->unknown
= "255.255.255.255";
5004 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
);
5005 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
, true);
5008 torture_comment(tctx
, "failed in sgroup_cleanup record[%u]: %s\n", i
, records
[i
].line
);
5013 /* the first one is a cleanup run */
5014 if (!ret
&& i
== 0) ret
= true;
5017 torture_comment(tctx
, "conflict handled wrong or record[%u]: %s\n", i
, records
[i
].line
);
5025 static bool test_conflict_owned_released_vs_replica(struct torture_context
*tctx
,
5026 struct test_wrepl_conflict_conn
*ctx
)
5030 struct wrepl_wins_name wins_name_
;
5031 struct wrepl_wins_name
*wins_name
= &wins_name_
;
5032 struct nbt_name_register name_register_
;
5033 struct nbt_name_register
*name_register
= &name_register_
;
5034 struct nbt_name_release release_
;
5035 struct nbt_name_release
*release
= &release_
;
5038 const char *line
; /* just better debugging */
5039 struct nbt_name name
;
5044 const struct wrepl_ip
*ips
;
5045 bool apply_expected
;
5048 enum wrepl_name_type type
;
5049 enum wrepl_name_state state
;
5050 enum wrepl_name_node node
;
5053 const struct wrepl_ip
*ips
;
5054 bool apply_expected
;
5058 * unique vs. unique section
5061 * unique,released vs. unique,active with same ip(s)
5064 .line
= __location__
,
5065 .name
= _NBT_NAME("_UR_UA_SI", 0x00, NULL
),
5069 .num_ips
= ctx
->addresses_best_num
,
5070 .ips
= ctx
->addresses_best
,
5071 .apply_expected
= true
5074 .type
= WREPL_TYPE_UNIQUE
,
5075 .state
= WREPL_STATE_ACTIVE
,
5076 .node
= WREPL_NODE_B
,
5078 .num_ips
= ctx
->addresses_best_num
,
5079 .ips
= ctx
->addresses_best
,
5080 .apply_expected
= true
5084 * unique,released vs. unique,active with different ip(s)
5087 .line
= __location__
,
5088 .name
= _NBT_NAME("_UR_UA_DI", 0x00, NULL
),
5092 .num_ips
= ctx
->addresses_best_num
,
5093 .ips
= ctx
->addresses_best
,
5094 .apply_expected
= true
5097 .type
= WREPL_TYPE_UNIQUE
,
5098 .state
= WREPL_STATE_ACTIVE
,
5099 .node
= WREPL_NODE_B
,
5101 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5102 .ips
= addresses_B_1
,
5103 .apply_expected
= true
5107 * unique,released vs. unique,tombstone with same ip(s)
5110 .line
= __location__
,
5111 .name
= _NBT_NAME("_UR_UT_SI", 0x00, NULL
),
5115 .num_ips
= ctx
->addresses_best_num
,
5116 .ips
= ctx
->addresses_best
,
5117 .apply_expected
= true
5120 .type
= WREPL_TYPE_UNIQUE
,
5121 .state
= WREPL_STATE_TOMBSTONE
,
5122 .node
= WREPL_NODE_B
,
5124 .num_ips
= ctx
->addresses_best_num
,
5125 .ips
= ctx
->addresses_best
,
5126 .apply_expected
= true
5130 * unique,released vs. unique,tombstone with different ip(s)
5133 .line
= __location__
,
5134 .name
= _NBT_NAME("_UR_UT_DI", 0x00, NULL
),
5138 .num_ips
= ctx
->addresses_best_num
,
5139 .ips
= ctx
->addresses_best
,
5140 .apply_expected
= true
5143 .type
= WREPL_TYPE_UNIQUE
,
5144 .state
= WREPL_STATE_TOMBSTONE
,
5145 .node
= WREPL_NODE_B
,
5147 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5148 .ips
= addresses_B_1
,
5149 .apply_expected
= true
5153 * unique vs. group section
5156 * unique,released vs. group,active with same ip(s)
5159 .line
= __location__
,
5160 .name
= _NBT_NAME("_UR_GA_SI", 0x00, NULL
),
5164 .num_ips
= ctx
->addresses_best_num
,
5165 .ips
= ctx
->addresses_best
,
5166 .apply_expected
= true
5169 .type
= WREPL_TYPE_GROUP
,
5170 .state
= WREPL_STATE_ACTIVE
,
5171 .node
= WREPL_NODE_B
,
5173 .num_ips
= ctx
->addresses_best_num
,
5174 .ips
= ctx
->addresses_best
,
5175 .apply_expected
= true
5179 * unique,released vs. group,active with different ip(s)
5182 .line
= __location__
,
5183 .name
= _NBT_NAME("_UR_GA_DI", 0x00, NULL
),
5187 .num_ips
= ctx
->addresses_best_num
,
5188 .ips
= ctx
->addresses_best
,
5189 .apply_expected
= true
5192 .type
= WREPL_TYPE_GROUP
,
5193 .state
= WREPL_STATE_ACTIVE
,
5194 .node
= WREPL_NODE_B
,
5196 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5197 .ips
= addresses_B_1
,
5198 .apply_expected
= true
5202 * unique,released vs. group,tombstone with same ip(s)
5205 .line
= __location__
,
5206 .name
= _NBT_NAME("_UR_GT_SI", 0x00, NULL
),
5210 .num_ips
= ctx
->addresses_best_num
,
5211 .ips
= ctx
->addresses_best
,
5212 .apply_expected
= true
5215 .type
= WREPL_TYPE_GROUP
,
5216 .state
= WREPL_STATE_TOMBSTONE
,
5217 .node
= WREPL_NODE_B
,
5219 .num_ips
= ctx
->addresses_best_num
,
5220 .ips
= ctx
->addresses_best
,
5221 .apply_expected
= true
5225 * unique,released vs. group,tombstone with different ip(s)
5228 .line
= __location__
,
5229 .name
= _NBT_NAME("_UR_GT_DI", 0x00, NULL
),
5233 .num_ips
= ctx
->addresses_best_num
,
5234 .ips
= ctx
->addresses_best
,
5235 .apply_expected
= true
5238 .type
= WREPL_TYPE_GROUP
,
5239 .state
= WREPL_STATE_TOMBSTONE
,
5240 .node
= WREPL_NODE_B
,
5242 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5243 .ips
= addresses_B_1
,
5244 .apply_expected
= true
5248 * unique vs. special group section
5251 * unique,released vs. sgroup,active with same ip(s)
5254 .line
= __location__
,
5255 .name
= _NBT_NAME("_UR_SA_SI", 0x00, NULL
),
5259 .num_ips
= ctx
->addresses_best_num
,
5260 .ips
= ctx
->addresses_best
,
5261 .apply_expected
= true
5264 .type
= WREPL_TYPE_SGROUP
,
5265 .state
= WREPL_STATE_ACTIVE
,
5266 .node
= WREPL_NODE_B
,
5268 .num_ips
= ctx
->addresses_best_num
,
5269 .ips
= ctx
->addresses_best
,
5270 .apply_expected
= true
5274 * unique,released vs. sgroup,active with different ip(s)
5277 .line
= __location__
,
5278 .name
= _NBT_NAME("_UR_SA_DI", 0x00, NULL
),
5282 .num_ips
= ctx
->addresses_best_num
,
5283 .ips
= ctx
->addresses_best
,
5284 .apply_expected
= true
5287 .type
= WREPL_TYPE_SGROUP
,
5288 .state
= WREPL_STATE_ACTIVE
,
5289 .node
= WREPL_NODE_B
,
5291 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5292 .ips
= addresses_B_1
,
5293 .apply_expected
= true
5297 * unique,released vs. sgroup,tombstone with same ip(s)
5300 .line
= __location__
,
5301 .name
= _NBT_NAME("_UR_ST_SI", 0x00, NULL
),
5305 .num_ips
= ctx
->addresses_best_num
,
5306 .ips
= ctx
->addresses_best
,
5307 .apply_expected
= true
5310 .type
= WREPL_TYPE_SGROUP
,
5311 .state
= WREPL_STATE_TOMBSTONE
,
5312 .node
= WREPL_NODE_B
,
5314 .num_ips
= ctx
->addresses_best_num
,
5315 .ips
= ctx
->addresses_best
,
5316 .apply_expected
= true
5320 * unique,released vs. sgroup,tombstone with different ip(s)
5323 .line
= __location__
,
5324 .name
= _NBT_NAME("_UR_ST_DI", 0x00, NULL
),
5328 .num_ips
= ctx
->addresses_best_num
,
5329 .ips
= ctx
->addresses_best
,
5330 .apply_expected
= true
5333 .type
= WREPL_TYPE_SGROUP
,
5334 .state
= WREPL_STATE_TOMBSTONE
,
5335 .node
= WREPL_NODE_B
,
5337 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5338 .ips
= addresses_B_1
,
5339 .apply_expected
= true
5343 * unique vs. multi homed section
5346 * unique,released vs. mhomed,active with same ip(s)
5349 .line
= __location__
,
5350 .name
= _NBT_NAME("_UR_MA_SI", 0x00, NULL
),
5354 .num_ips
= ctx
->addresses_best_num
,
5355 .ips
= ctx
->addresses_best
,
5356 .apply_expected
= true
5359 .type
= WREPL_TYPE_MHOMED
,
5360 .state
= WREPL_STATE_ACTIVE
,
5361 .node
= WREPL_NODE_B
,
5363 .num_ips
= ctx
->addresses_best_num
,
5364 .ips
= ctx
->addresses_best
,
5365 .apply_expected
= true
5369 * unique,released vs. mhomed,active with different ip(s)
5372 .line
= __location__
,
5373 .name
= _NBT_NAME("_UR_MA_DI", 0x00, NULL
),
5377 .num_ips
= ctx
->addresses_best_num
,
5378 .ips
= ctx
->addresses_best
,
5379 .apply_expected
= true
5382 .type
= WREPL_TYPE_MHOMED
,
5383 .state
= WREPL_STATE_ACTIVE
,
5384 .node
= WREPL_NODE_B
,
5386 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5387 .ips
= addresses_B_1
,
5388 .apply_expected
= true
5392 * unique,released vs. mhomed,tombstone with same ip(s)
5395 .line
= __location__
,
5396 .name
= _NBT_NAME("_UR_MT_SI", 0x00, NULL
),
5400 .num_ips
= ctx
->addresses_best_num
,
5401 .ips
= ctx
->addresses_best
,
5402 .apply_expected
= true
5405 .type
= WREPL_TYPE_MHOMED
,
5406 .state
= WREPL_STATE_TOMBSTONE
,
5407 .node
= WREPL_NODE_B
,
5409 .num_ips
= ctx
->addresses_best_num
,
5410 .ips
= ctx
->addresses_best
,
5411 .apply_expected
= true
5415 * unique,released vs. mhomed,tombstone with different ip(s)
5418 .line
= __location__
,
5419 .name
= _NBT_NAME("_UR_MT_DI", 0x00, NULL
),
5423 .num_ips
= ctx
->addresses_best_num
,
5424 .ips
= ctx
->addresses_best
,
5425 .apply_expected
= true
5428 .type
= WREPL_TYPE_MHOMED
,
5429 .state
= WREPL_STATE_TOMBSTONE
,
5430 .node
= WREPL_NODE_B
,
5432 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5433 .ips
= addresses_B_1
,
5434 .apply_expected
= true
5438 * group vs. unique section
5441 * group,released vs. unique,active with same ip(s)
5444 .line
= __location__
,
5445 .name
= _NBT_NAME("_GR_UA_SI", 0x00, NULL
),
5447 .nb_flags
= NBT_NM_GROUP
,
5449 .num_ips
= ctx
->addresses_best_num
,
5450 .ips
= ctx
->addresses_best
,
5451 .apply_expected
= true
5454 .type
= WREPL_TYPE_UNIQUE
,
5455 .state
= WREPL_STATE_ACTIVE
,
5456 .node
= WREPL_NODE_B
,
5458 .num_ips
= ctx
->addresses_best_num
,
5459 .ips
= ctx
->addresses_best
,
5460 .apply_expected
= false
5464 * group,released vs. unique,active with different ip(s)
5467 .line
= __location__
,
5468 .name
= _NBT_NAME("_GR_UA_DI", 0x00, NULL
),
5470 .nb_flags
= NBT_NM_GROUP
,
5472 .num_ips
= ctx
->addresses_best_num
,
5473 .ips
= ctx
->addresses_best
,
5474 .apply_expected
= true
5477 .type
= WREPL_TYPE_UNIQUE
,
5478 .state
= WREPL_STATE_ACTIVE
,
5479 .node
= WREPL_NODE_B
,
5481 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5482 .ips
= addresses_B_1
,
5483 .apply_expected
= false
5487 * group,released vs. unique,tombstone with same ip(s)
5490 .line
= __location__
,
5491 .name
= _NBT_NAME("_GR_UT_SI", 0x00, NULL
),
5493 .nb_flags
= NBT_NM_GROUP
,
5495 .num_ips
= ctx
->addresses_best_num
,
5496 .ips
= ctx
->addresses_best
,
5497 .apply_expected
= true
5500 .type
= WREPL_TYPE_UNIQUE
,
5501 .state
= WREPL_STATE_TOMBSTONE
,
5502 .node
= WREPL_NODE_B
,
5504 .num_ips
= ctx
->addresses_best_num
,
5505 .ips
= ctx
->addresses_best
,
5506 .apply_expected
= false
5510 * group,released vs. unique,tombstone with different ip(s)
5513 .line
= __location__
,
5514 .name
= _NBT_NAME("_GR_UT_DI", 0x00, NULL
),
5516 .nb_flags
= NBT_NM_GROUP
,
5518 .num_ips
= ctx
->addresses_best_num
,
5519 .ips
= ctx
->addresses_best
,
5520 .apply_expected
= true
5523 .type
= WREPL_TYPE_UNIQUE
,
5524 .state
= WREPL_STATE_TOMBSTONE
,
5525 .node
= WREPL_NODE_B
,
5527 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5528 .ips
= addresses_B_1
,
5529 .apply_expected
= false
5533 * group vs. group section
5536 * group,released vs. group,active with same ip(s)
5539 .line
= __location__
,
5540 .name
= _NBT_NAME("_GR_GA_SI", 0x00, NULL
),
5542 .nb_flags
= NBT_NM_GROUP
,
5544 .num_ips
= ctx
->addresses_best_num
,
5545 .ips
= ctx
->addresses_best
,
5546 .apply_expected
= true
5549 .type
= WREPL_TYPE_GROUP
,
5550 .state
= WREPL_STATE_ACTIVE
,
5551 .node
= WREPL_NODE_B
,
5553 .num_ips
= ctx
->addresses_best_num
,
5554 .ips
= ctx
->addresses_best
,
5555 .apply_expected
= true
5559 * group,released vs. group,active with different ip(s)
5562 .line
= __location__
,
5563 .name
= _NBT_NAME("_GR_GA_DI", 0x00, NULL
),
5565 .nb_flags
= NBT_NM_GROUP
,
5567 .num_ips
= ctx
->addresses_best_num
,
5568 .ips
= ctx
->addresses_best
,
5569 .apply_expected
= true
5572 .type
= WREPL_TYPE_GROUP
,
5573 .state
= WREPL_STATE_ACTIVE
,
5574 .node
= WREPL_NODE_B
,
5576 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5577 .ips
= addresses_B_1
,
5578 .apply_expected
= true
5582 * group,released vs. group,tombstone with same ip(s)
5585 .line
= __location__
,
5586 .name
= _NBT_NAME("_GR_GT_SI", 0x00, NULL
),
5588 .nb_flags
= NBT_NM_GROUP
,
5590 .num_ips
= ctx
->addresses_best_num
,
5591 .ips
= ctx
->addresses_best
,
5592 .apply_expected
= true
5595 .type
= WREPL_TYPE_GROUP
,
5596 .state
= WREPL_STATE_TOMBSTONE
,
5597 .node
= WREPL_NODE_B
,
5599 .num_ips
= ctx
->addresses_best_num
,
5600 .ips
= ctx
->addresses_best
,
5601 .apply_expected
= true
5605 * group,released vs. group,tombstone with different ip(s)
5608 .line
= __location__
,
5609 .name
= _NBT_NAME("_GR_GT_DI", 0x00, NULL
),
5611 .nb_flags
= NBT_NM_GROUP
,
5613 .num_ips
= ctx
->addresses_best_num
,
5614 .ips
= ctx
->addresses_best
,
5615 .apply_expected
= true
5618 .type
= WREPL_TYPE_GROUP
,
5619 .state
= WREPL_STATE_TOMBSTONE
,
5620 .node
= WREPL_NODE_B
,
5622 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5623 .ips
= addresses_B_1
,
5624 .apply_expected
= true
5628 * group vs. special group section
5631 * group,released vs. sgroup,active with same ip(s)
5634 .line
= __location__
,
5635 .name
= _NBT_NAME("_GR_SA_SI", 0x00, NULL
),
5637 .nb_flags
= NBT_NM_GROUP
,
5639 .num_ips
= ctx
->addresses_best_num
,
5640 .ips
= ctx
->addresses_best
,
5641 .apply_expected
= true
5644 .type
= WREPL_TYPE_SGROUP
,
5645 .state
= WREPL_STATE_ACTIVE
,
5646 .node
= WREPL_NODE_B
,
5648 .num_ips
= ctx
->addresses_best_num
,
5649 .ips
= ctx
->addresses_best
,
5650 .apply_expected
= false
5654 * group,released vs. sgroup,active with different ip(s)
5657 .line
= __location__
,
5658 .name
= _NBT_NAME("_GR_SA_DI", 0x00, NULL
),
5660 .nb_flags
= NBT_NM_GROUP
,
5662 .num_ips
= ctx
->addresses_best_num
,
5663 .ips
= ctx
->addresses_best
,
5664 .apply_expected
= true
5667 .type
= WREPL_TYPE_SGROUP
,
5668 .state
= WREPL_STATE_ACTIVE
,
5669 .node
= WREPL_NODE_B
,
5671 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5672 .ips
= addresses_B_1
,
5673 .apply_expected
= false
5677 * group,released vs. sgroup,tombstone with same ip(s)
5680 .line
= __location__
,
5681 .name
= _NBT_NAME("_GR_ST_SI", 0x00, NULL
),
5683 .nb_flags
= NBT_NM_GROUP
,
5685 .num_ips
= ctx
->addresses_best_num
,
5686 .ips
= ctx
->addresses_best
,
5687 .apply_expected
= true
5690 .type
= WREPL_TYPE_SGROUP
,
5691 .state
= WREPL_STATE_TOMBSTONE
,
5692 .node
= WREPL_NODE_B
,
5694 .num_ips
= ctx
->addresses_best_num
,
5695 .ips
= ctx
->addresses_best
,
5696 .apply_expected
= false
5700 * group,released vs. sgroup,tombstone with different ip(s)
5703 .line
= __location__
,
5704 .name
= _NBT_NAME("_GR_ST_DI", 0x00, NULL
),
5706 .nb_flags
= NBT_NM_GROUP
,
5708 .num_ips
= ctx
->addresses_best_num
,
5709 .ips
= ctx
->addresses_best
,
5710 .apply_expected
= true
5713 .type
= WREPL_TYPE_SGROUP
,
5714 .state
= WREPL_STATE_TOMBSTONE
,
5715 .node
= WREPL_NODE_B
,
5717 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5718 .ips
= addresses_B_1
,
5719 .apply_expected
= false
5723 * group vs. multi homed section
5726 * group,released vs. mhomed,active with same ip(s)
5729 .line
= __location__
,
5730 .name
= _NBT_NAME("_GR_MA_SI", 0x00, NULL
),
5732 .nb_flags
= NBT_NM_GROUP
,
5734 .num_ips
= ctx
->addresses_best_num
,
5735 .ips
= ctx
->addresses_best
,
5736 .apply_expected
= true
5739 .type
= WREPL_TYPE_MHOMED
,
5740 .state
= WREPL_STATE_ACTIVE
,
5741 .node
= WREPL_NODE_B
,
5743 .num_ips
= ctx
->addresses_best_num
,
5744 .ips
= ctx
->addresses_best
,
5745 .apply_expected
= false
5749 * group,released vs. mhomed,active with different ip(s)
5752 .line
= __location__
,
5753 .name
= _NBT_NAME("_GR_MA_DI", 0x00, NULL
),
5755 .nb_flags
= NBT_NM_GROUP
,
5757 .num_ips
= ctx
->addresses_best_num
,
5758 .ips
= ctx
->addresses_best
,
5759 .apply_expected
= true
5762 .type
= WREPL_TYPE_MHOMED
,
5763 .state
= WREPL_STATE_ACTIVE
,
5764 .node
= WREPL_NODE_B
,
5766 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5767 .ips
= addresses_B_1
,
5768 .apply_expected
= false
5772 * group,released vs. mhomed,tombstone with same ip(s)
5775 .line
= __location__
,
5776 .name
= _NBT_NAME("_GR_MT_SI", 0x00, NULL
),
5778 .nb_flags
= NBT_NM_GROUP
,
5780 .num_ips
= ctx
->addresses_best_num
,
5781 .ips
= ctx
->addresses_best
,
5782 .apply_expected
= true
5785 .type
= WREPL_TYPE_MHOMED
,
5786 .state
= WREPL_STATE_TOMBSTONE
,
5787 .node
= WREPL_NODE_B
,
5789 .num_ips
= ctx
->addresses_best_num
,
5790 .ips
= ctx
->addresses_best
,
5791 .apply_expected
= false
5795 * group,released vs. mhomed,tombstone with different ip(s)
5798 .line
= __location__
,
5799 .name
= _NBT_NAME("_GR_MT_DI", 0x00, NULL
),
5801 .nb_flags
= NBT_NM_GROUP
,
5803 .num_ips
= ctx
->addresses_best_num
,
5804 .ips
= ctx
->addresses_best
,
5805 .apply_expected
= true
5808 .type
= WREPL_TYPE_MHOMED
,
5809 .state
= WREPL_STATE_TOMBSTONE
,
5810 .node
= WREPL_NODE_B
,
5812 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5813 .ips
= addresses_B_1
,
5814 .apply_expected
= false
5818 * special group vs. unique section
5821 * sgroup,released vs. unique,active with same ip(s)
5824 .line
= __location__
,
5825 .name
= _NBT_NAME("_SR_UA_SI", 0x1C, NULL
),
5827 .nb_flags
= NBT_NM_GROUP
,
5829 .num_ips
= ctx
->addresses_best_num
,
5830 .ips
= ctx
->addresses_best
,
5831 .apply_expected
= true
5834 .type
= WREPL_TYPE_UNIQUE
,
5835 .state
= WREPL_STATE_ACTIVE
,
5836 .node
= WREPL_NODE_B
,
5838 .num_ips
= ctx
->addresses_best_num
,
5839 .ips
= ctx
->addresses_best
,
5840 .apply_expected
= true
5844 * sgroup,released vs. unique,active with different ip(s)
5847 .line
= __location__
,
5848 .name
= _NBT_NAME("_SR_UA_DI", 0x1C, NULL
),
5850 .nb_flags
= NBT_NM_GROUP
,
5852 .num_ips
= ctx
->addresses_best_num
,
5853 .ips
= ctx
->addresses_best
,
5854 .apply_expected
= true
5857 .type
= WREPL_TYPE_UNIQUE
,
5858 .state
= WREPL_STATE_ACTIVE
,
5859 .node
= WREPL_NODE_B
,
5861 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5862 .ips
= addresses_B_1
,
5863 .apply_expected
= true
5867 * sgroup,released vs. unique,tombstone with same ip(s)
5870 .line
= __location__
,
5871 .name
= _NBT_NAME("_SR_UT_SI", 0x1C, NULL
),
5873 .nb_flags
= NBT_NM_GROUP
,
5875 .num_ips
= ctx
->addresses_best_num
,
5876 .ips
= ctx
->addresses_best
,
5877 .apply_expected
= true
5880 .type
= WREPL_TYPE_UNIQUE
,
5881 .state
= WREPL_STATE_TOMBSTONE
,
5882 .node
= WREPL_NODE_B
,
5884 .num_ips
= ctx
->addresses_best_num
,
5885 .ips
= ctx
->addresses_best
,
5886 .apply_expected
= true
5890 * sgroup,released vs. unique,tombstone with different ip(s)
5893 .line
= __location__
,
5894 .name
= _NBT_NAME("_SR_UT_DI", 0x1C, NULL
),
5896 .nb_flags
= NBT_NM_GROUP
,
5898 .num_ips
= ctx
->addresses_best_num
,
5899 .ips
= ctx
->addresses_best
,
5900 .apply_expected
= true
5903 .type
= WREPL_TYPE_UNIQUE
,
5904 .state
= WREPL_STATE_TOMBSTONE
,
5905 .node
= WREPL_NODE_B
,
5907 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5908 .ips
= addresses_B_1
,
5909 .apply_expected
= true
5913 * special group vs. group section
5916 * sgroup,released vs. group,active with same ip(s)
5919 .line
= __location__
,
5920 .name
= _NBT_NAME("_SR_GA_SI", 0x1C, NULL
),
5922 .nb_flags
= NBT_NM_GROUP
,
5924 .num_ips
= ctx
->addresses_best_num
,
5925 .ips
= ctx
->addresses_best
,
5926 .apply_expected
= true
5929 .type
= WREPL_TYPE_GROUP
,
5930 .state
= WREPL_STATE_ACTIVE
,
5931 .node
= WREPL_NODE_B
,
5933 .num_ips
= ctx
->addresses_best_num
,
5934 .ips
= ctx
->addresses_best
,
5935 .apply_expected
= true
5939 * sgroup,released vs. group,active with different ip(s)
5942 .line
= __location__
,
5943 .name
= _NBT_NAME("_SR_GA_DI", 0x1C, NULL
),
5945 .nb_flags
= NBT_NM_GROUP
,
5947 .num_ips
= ctx
->addresses_best_num
,
5948 .ips
= ctx
->addresses_best
,
5949 .apply_expected
= true
5952 .type
= WREPL_TYPE_GROUP
,
5953 .state
= WREPL_STATE_ACTIVE
,
5954 .node
= WREPL_NODE_B
,
5956 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5957 .ips
= addresses_B_1
,
5958 .apply_expected
= true
5962 * sgroup,released vs. group,tombstone with same ip(s)
5965 .line
= __location__
,
5966 .name
= _NBT_NAME("_SR_GT_SI", 0x1C, NULL
),
5968 .nb_flags
= NBT_NM_GROUP
,
5970 .num_ips
= ctx
->addresses_best_num
,
5971 .ips
= ctx
->addresses_best
,
5972 .apply_expected
= true
5975 .type
= WREPL_TYPE_GROUP
,
5976 .state
= WREPL_STATE_TOMBSTONE
,
5977 .node
= WREPL_NODE_B
,
5979 .num_ips
= ctx
->addresses_best_num
,
5980 .ips
= ctx
->addresses_best
,
5981 .apply_expected
= true
5985 * sgroup,released vs. group,tombstone with different ip(s)
5988 .line
= __location__
,
5989 .name
= _NBT_NAME("_SR_GT_DI", 0x1C, NULL
),
5991 .nb_flags
= NBT_NM_GROUP
,
5993 .num_ips
= ctx
->addresses_best_num
,
5994 .ips
= ctx
->addresses_best
,
5995 .apply_expected
= true
5998 .type
= WREPL_TYPE_GROUP
,
5999 .state
= WREPL_STATE_TOMBSTONE
,
6000 .node
= WREPL_NODE_B
,
6002 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6003 .ips
= addresses_B_1
,
6004 .apply_expected
= true
6008 * special group vs. special group section
6011 * sgroup,released vs. sgroup,active with same ip(s)
6014 .line
= __location__
,
6015 .name
= _NBT_NAME("_SR_SA_SI", 0x1C, NULL
),
6017 .nb_flags
= NBT_NM_GROUP
,
6019 .num_ips
= ctx
->addresses_best_num
,
6020 .ips
= ctx
->addresses_best
,
6021 .apply_expected
= true
6024 .type
= WREPL_TYPE_SGROUP
,
6025 .state
= WREPL_STATE_ACTIVE
,
6026 .node
= WREPL_NODE_B
,
6028 .num_ips
= ctx
->addresses_best_num
,
6029 .ips
= ctx
->addresses_best
,
6030 .apply_expected
= true
6034 * sgroup,released vs. sgroup,active with different ip(s)
6037 .line
= __location__
,
6038 .name
= _NBT_NAME("_SR_SA_DI", 0x1C, NULL
),
6040 .nb_flags
= NBT_NM_GROUP
,
6042 .num_ips
= ctx
->addresses_best_num
,
6043 .ips
= ctx
->addresses_best
,
6044 .apply_expected
= true
6047 .type
= WREPL_TYPE_SGROUP
,
6048 .state
= WREPL_STATE_ACTIVE
,
6049 .node
= WREPL_NODE_B
,
6051 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6052 .ips
= addresses_B_1
,
6053 .apply_expected
= true
6057 * sgroup,released vs. sgroup,tombstone with same ip(s)
6060 .line
= __location__
,
6061 .name
= _NBT_NAME("_SR_ST_SI", 0x1C, NULL
),
6063 .nb_flags
= NBT_NM_GROUP
,
6065 .num_ips
= ctx
->addresses_best_num
,
6066 .ips
= ctx
->addresses_best
,
6067 .apply_expected
= true
6070 .type
= WREPL_TYPE_SGROUP
,
6071 .state
= WREPL_STATE_TOMBSTONE
,
6072 .node
= WREPL_NODE_B
,
6074 .num_ips
= ctx
->addresses_best_num
,
6075 .ips
= ctx
->addresses_best
,
6076 .apply_expected
= true
6080 * sgroup,released vs. sgroup,tombstone with different ip(s)
6083 .line
= __location__
,
6084 .name
= _NBT_NAME("_SR_ST_DI", 0x1C, NULL
),
6086 .nb_flags
= NBT_NM_GROUP
,
6088 .num_ips
= ctx
->addresses_best_num
,
6089 .ips
= ctx
->addresses_best
,
6090 .apply_expected
= true
6093 .type
= WREPL_TYPE_SGROUP
,
6094 .state
= WREPL_STATE_TOMBSTONE
,
6095 .node
= WREPL_NODE_B
,
6097 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6098 .ips
= addresses_B_1
,
6099 .apply_expected
= true
6103 * special group vs. multi homed section
6106 * sgroup,released vs. mhomed,active with same ip(s)
6109 .line
= __location__
,
6110 .name
= _NBT_NAME("_SR_MA_SI", 0x1C, NULL
),
6112 .nb_flags
= NBT_NM_GROUP
,
6114 .num_ips
= ctx
->addresses_best_num
,
6115 .ips
= ctx
->addresses_best
,
6116 .apply_expected
= true
6119 .type
= WREPL_TYPE_MHOMED
,
6120 .state
= WREPL_STATE_ACTIVE
,
6121 .node
= WREPL_NODE_B
,
6123 .num_ips
= ctx
->addresses_best_num
,
6124 .ips
= ctx
->addresses_best
,
6125 .apply_expected
= true
6129 * sgroup,released vs. mhomed,active with different ip(s)
6132 .line
= __location__
,
6133 .name
= _NBT_NAME("_SR_MA_DI", 0x1C, NULL
),
6135 .nb_flags
= NBT_NM_GROUP
,
6137 .num_ips
= ctx
->addresses_best_num
,
6138 .ips
= ctx
->addresses_best
,
6139 .apply_expected
= true
6142 .type
= WREPL_TYPE_MHOMED
,
6143 .state
= WREPL_STATE_ACTIVE
,
6144 .node
= WREPL_NODE_B
,
6146 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6147 .ips
= addresses_B_1
,
6148 .apply_expected
= true
6152 * sgroup,released vs. mhomed,tombstone with same ip(s)
6155 .line
= __location__
,
6156 .name
= _NBT_NAME("_SR_MT_SI", 0x1C, NULL
),
6158 .nb_flags
= NBT_NM_GROUP
,
6160 .num_ips
= ctx
->addresses_best_num
,
6161 .ips
= ctx
->addresses_best
,
6162 .apply_expected
= true
6165 .type
= WREPL_TYPE_MHOMED
,
6166 .state
= WREPL_STATE_TOMBSTONE
,
6167 .node
= WREPL_NODE_B
,
6169 .num_ips
= ctx
->addresses_best_num
,
6170 .ips
= ctx
->addresses_best
,
6171 .apply_expected
= true
6175 * sgroup,released vs. mhomed,tombstone with different ip(s)
6178 .line
= __location__
,
6179 .name
= _NBT_NAME("_SR_MT_DI", 0x1C, NULL
),
6181 .nb_flags
= NBT_NM_GROUP
,
6183 .num_ips
= ctx
->addresses_best_num
,
6184 .ips
= ctx
->addresses_best
,
6185 .apply_expected
= true
6188 .type
= WREPL_TYPE_MHOMED
,
6189 .state
= WREPL_STATE_TOMBSTONE
,
6190 .node
= WREPL_NODE_B
,
6192 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6193 .ips
= addresses_B_1
,
6194 .apply_expected
= true
6198 * multi homed vs. unique section
6201 * mhomed,released vs. unique,active with same ip(s)
6204 .line
= __location__
,
6205 .name
= _NBT_NAME("_MR_UA_SI", 0x00, NULL
),
6209 .num_ips
= ctx
->addresses_best_num
,
6210 .ips
= ctx
->addresses_best
,
6211 .apply_expected
= true
6214 .type
= WREPL_TYPE_UNIQUE
,
6215 .state
= WREPL_STATE_ACTIVE
,
6216 .node
= WREPL_NODE_B
,
6218 .num_ips
= ctx
->addresses_best_num
,
6219 .ips
= ctx
->addresses_best
,
6220 .apply_expected
= true
6224 * mhomed,released vs. unique,active with different ip(s)
6227 .line
= __location__
,
6228 .name
= _NBT_NAME("_MR_UA_DI", 0x00, NULL
),
6232 .num_ips
= ctx
->addresses_best_num
,
6233 .ips
= ctx
->addresses_best
,
6234 .apply_expected
= true
6237 .type
= WREPL_TYPE_UNIQUE
,
6238 .state
= WREPL_STATE_ACTIVE
,
6239 .node
= WREPL_NODE_B
,
6241 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6242 .ips
= addresses_B_1
,
6243 .apply_expected
= true
6247 * mhomed,released vs. unique,tombstone with same ip(s)
6250 .line
= __location__
,
6251 .name
= _NBT_NAME("_MR_UT_SI", 0x00, NULL
),
6255 .num_ips
= ctx
->addresses_best_num
,
6256 .ips
= ctx
->addresses_best
,
6257 .apply_expected
= true
6260 .type
= WREPL_TYPE_UNIQUE
,
6261 .state
= WREPL_STATE_TOMBSTONE
,
6262 .node
= WREPL_NODE_B
,
6264 .num_ips
= ctx
->addresses_best_num
,
6265 .ips
= ctx
->addresses_best
,
6266 .apply_expected
= true
6270 * mhomed,released vs. unique,tombstone with different ip(s)
6273 .line
= __location__
,
6274 .name
= _NBT_NAME("_MR_UT_DI", 0x00, NULL
),
6278 .num_ips
= ctx
->addresses_best_num
,
6279 .ips
= ctx
->addresses_best
,
6280 .apply_expected
= true
6283 .type
= WREPL_TYPE_UNIQUE
,
6284 .state
= WREPL_STATE_TOMBSTONE
,
6285 .node
= WREPL_NODE_B
,
6287 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6288 .ips
= addresses_B_1
,
6289 .apply_expected
= true
6293 * multi homed vs. group section
6296 * mhomed,released vs. group,active with same ip(s)
6299 .line
= __location__
,
6300 .name
= _NBT_NAME("_MR_GA_SI", 0x00, NULL
),
6304 .num_ips
= ctx
->addresses_best_num
,
6305 .ips
= ctx
->addresses_best
,
6306 .apply_expected
= true
6309 .type
= WREPL_TYPE_GROUP
,
6310 .state
= WREPL_STATE_ACTIVE
,
6311 .node
= WREPL_NODE_B
,
6313 .num_ips
= ctx
->addresses_best_num
,
6314 .ips
= ctx
->addresses_best
,
6315 .apply_expected
= true
6319 * mhomed,released vs. group,active with different ip(s)
6322 .line
= __location__
,
6323 .name
= _NBT_NAME("_MR_GA_DI", 0x00, NULL
),
6327 .num_ips
= ctx
->addresses_best_num
,
6328 .ips
= ctx
->addresses_best
,
6329 .apply_expected
= true
6332 .type
= WREPL_TYPE_GROUP
,
6333 .state
= WREPL_STATE_ACTIVE
,
6334 .node
= WREPL_NODE_B
,
6336 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6337 .ips
= addresses_B_1
,
6338 .apply_expected
= true
6342 * mhomed,released vs. group,tombstone with same ip(s)
6345 .line
= __location__
,
6346 .name
= _NBT_NAME("_MR_GT_SI", 0x00, NULL
),
6350 .num_ips
= ctx
->addresses_best_num
,
6351 .ips
= ctx
->addresses_best
,
6352 .apply_expected
= true
6355 .type
= WREPL_TYPE_GROUP
,
6356 .state
= WREPL_STATE_TOMBSTONE
,
6357 .node
= WREPL_NODE_B
,
6359 .num_ips
= ctx
->addresses_best_num
,
6360 .ips
= ctx
->addresses_best
,
6361 .apply_expected
= true
6365 * mhomed,released vs. group,tombstone with different ip(s)
6368 .line
= __location__
,
6369 .name
= _NBT_NAME("_MR_GT_DI", 0x00, NULL
),
6373 .num_ips
= ctx
->addresses_best_num
,
6374 .ips
= ctx
->addresses_best
,
6375 .apply_expected
= true
6378 .type
= WREPL_TYPE_GROUP
,
6379 .state
= WREPL_STATE_TOMBSTONE
,
6380 .node
= WREPL_NODE_B
,
6382 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6383 .ips
= addresses_B_1
,
6384 .apply_expected
= true
6388 * multi homed vs. special group section
6391 * mhomed,released vs. sgroup,active with same ip(s)
6394 .line
= __location__
,
6395 .name
= _NBT_NAME("_MR_SA_SI", 0x00, NULL
),
6399 .num_ips
= ctx
->addresses_best_num
,
6400 .ips
= ctx
->addresses_best
,
6401 .apply_expected
= true
6404 .type
= WREPL_TYPE_SGROUP
,
6405 .state
= WREPL_STATE_ACTIVE
,
6406 .node
= WREPL_NODE_B
,
6408 .num_ips
= ctx
->addresses_best_num
,
6409 .ips
= ctx
->addresses_best
,
6410 .apply_expected
= true
6414 * mhomed,released vs. sgroup,active with different ip(s)
6417 .line
= __location__
,
6418 .name
= _NBT_NAME("_MR_SA_DI", 0x00, NULL
),
6422 .num_ips
= ctx
->addresses_best_num
,
6423 .ips
= ctx
->addresses_best
,
6424 .apply_expected
= true
6427 .type
= WREPL_TYPE_SGROUP
,
6428 .state
= WREPL_STATE_ACTIVE
,
6429 .node
= WREPL_NODE_B
,
6431 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6432 .ips
= addresses_B_1
,
6433 .apply_expected
= true
6437 * mhomed,released vs. sgroup,tombstone with same ip(s)
6440 .line
= __location__
,
6441 .name
= _NBT_NAME("_MR_ST_SI", 0x00, NULL
),
6445 .num_ips
= ctx
->addresses_best_num
,
6446 .ips
= ctx
->addresses_best
,
6447 .apply_expected
= true
6450 .type
= WREPL_TYPE_SGROUP
,
6451 .state
= WREPL_STATE_TOMBSTONE
,
6452 .node
= WREPL_NODE_B
,
6454 .num_ips
= ctx
->addresses_best_num
,
6455 .ips
= ctx
->addresses_best
,
6456 .apply_expected
= true
6460 * mhomed,released vs. sgroup,tombstone with different ip(s)
6463 .line
= __location__
,
6464 .name
= _NBT_NAME("_MR_ST_DI", 0x00, NULL
),
6468 .num_ips
= ctx
->addresses_best_num
,
6469 .ips
= ctx
->addresses_best
,
6470 .apply_expected
= true
6473 .type
= WREPL_TYPE_SGROUP
,
6474 .state
= WREPL_STATE_TOMBSTONE
,
6475 .node
= WREPL_NODE_B
,
6477 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6478 .ips
= addresses_B_1
,
6479 .apply_expected
= true
6483 * multi homed vs. multi homed section
6486 * mhomed,released vs. mhomed,active with same ip(s)
6489 .line
= __location__
,
6490 .name
= _NBT_NAME("_MR_MA_SI", 0x00, NULL
),
6494 .num_ips
= ctx
->addresses_best_num
,
6495 .ips
= ctx
->addresses_best
,
6496 .apply_expected
= true
6499 .type
= WREPL_TYPE_MHOMED
,
6500 .state
= WREPL_STATE_ACTIVE
,
6501 .node
= WREPL_NODE_B
,
6503 .num_ips
= ctx
->addresses_best_num
,
6504 .ips
= ctx
->addresses_best
,
6505 .apply_expected
= true
6509 * mhomed,released vs. mhomed,active with different ip(s)
6512 .line
= __location__
,
6513 .name
= _NBT_NAME("_MR_MA_DI", 0x00, NULL
),
6517 .num_ips
= ctx
->addresses_best_num
,
6518 .ips
= ctx
->addresses_best
,
6519 .apply_expected
= true
6522 .type
= WREPL_TYPE_MHOMED
,
6523 .state
= WREPL_STATE_ACTIVE
,
6524 .node
= WREPL_NODE_B
,
6526 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6527 .ips
= addresses_B_1
,
6528 .apply_expected
= true
6532 * mhomed,released vs. mhomed,tombstone with same ip(s)
6535 .line
= __location__
,
6536 .name
= _NBT_NAME("_MR_MT_SI", 0x00, NULL
),
6540 .num_ips
= ctx
->addresses_best_num
,
6541 .ips
= ctx
->addresses_best
,
6542 .apply_expected
= true
6545 .type
= WREPL_TYPE_MHOMED
,
6546 .state
= WREPL_STATE_TOMBSTONE
,
6547 .node
= WREPL_NODE_B
,
6549 .num_ips
= ctx
->addresses_best_num
,
6550 .ips
= ctx
->addresses_best
,
6551 .apply_expected
= true
6555 * mhomed,released vs. mhomed,tombstone with different ip(s)
6558 .line
= __location__
,
6559 .name
= _NBT_NAME("_MR_MT_DI", 0x00, NULL
),
6563 .num_ips
= ctx
->addresses_best_num
,
6564 .ips
= ctx
->addresses_best
,
6565 .apply_expected
= true
6568 .type
= WREPL_TYPE_MHOMED
,
6569 .state
= WREPL_STATE_TOMBSTONE
,
6570 .node
= WREPL_NODE_B
,
6572 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6573 .ips
= addresses_B_1
,
6574 .apply_expected
= true
6579 torture_comment(tctx
, "Test Replica records vs. owned released records\n");
6581 for(i
=0; ret
&& i
< ARRAY_SIZE(records
); i
++) {
6582 torture_comment(tctx
, "%s => %s\n", nbt_name_string(ctx
, &records
[i
].name
),
6583 (records
[i
].replica
.apply_expected
?"REPLACE":"NOT REPLACE"));
6588 name_register
->in
.name
= records
[i
].name
;
6589 name_register
->in
.dest_addr
= ctx
->address
;
6590 name_register
->in
.dest_port
= lpcfg_nbt_port(tctx
->lp_ctx
);
6591 name_register
->in
.address
= records
[i
].wins
.ips
[0].ip
;
6592 name_register
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
6593 name_register
->in
.register_demand
= false;
6594 name_register
->in
.broadcast
= false;
6595 name_register
->in
.multi_homed
= records
[i
].wins
.mhomed
;
6596 name_register
->in
.ttl
= 300000;
6597 name_register
->in
.timeout
= 70;
6598 name_register
->in
.retries
= 0;
6600 status
= nbt_name_register(ctx
->nbtsock
, ctx
, name_register
);
6601 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
6602 torture_comment(tctx
, "No response from %s for name register\n", ctx
->address
);
6605 if (!NT_STATUS_IS_OK(status
)) {
6606 torture_comment(tctx
, "Bad response from %s for name register - %s\n",
6607 ctx
->address
, nt_errstr(status
));
6610 CHECK_VALUE(tctx
, name_register
->out
.rcode
, 0);
6611 CHECK_VALUE_STRING(tctx
, name_register
->out
.reply_from
, ctx
->address
);
6612 CHECK_VALUE(tctx
, name_register
->out
.name
.type
, records
[i
].name
.type
);
6613 CHECK_VALUE_STRING(tctx
, name_register
->out
.name
.name
, records
[i
].name
.name
);
6614 CHECK_VALUE_STRING(tctx
, name_register
->out
.name
.scope
, records
[i
].name
.scope
);
6615 CHECK_VALUE_STRING(tctx
, name_register
->out
.reply_addr
, records
[i
].wins
.ips
[0].ip
);
6617 /* release the record */
6618 release
->in
.name
= records
[i
].name
;
6619 release
->in
.dest_port
= lpcfg_nbt_port(tctx
->lp_ctx
);
6620 release
->in
.dest_addr
= ctx
->address
;
6621 release
->in
.address
= records
[i
].wins
.ips
[0].ip
;
6622 release
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
6623 release
->in
.broadcast
= false;
6624 release
->in
.timeout
= 30;
6625 release
->in
.retries
= 0;
6627 status
= nbt_name_release(ctx
->nbtsock
, ctx
, release
);
6628 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
6629 torture_comment(tctx
, "No response from %s for name release\n", ctx
->address
);
6632 if (!NT_STATUS_IS_OK(status
)) {
6633 torture_comment(tctx
, "Bad response from %s for name query - %s\n",
6634 ctx
->address
, nt_errstr(status
));
6637 CHECK_VALUE(tctx
, release
->out
.rcode
, 0);
6642 wins_name
->name
= &records
[i
].name
;
6643 wins_name
->flags
= WREPL_NAME_FLAGS(records
[i
].replica
.type
,
6644 records
[i
].replica
.state
,
6645 records
[i
].replica
.node
,
6646 records
[i
].replica
.is_static
);
6647 wins_name
->id
= ++ctx
->b
.max_version
;
6648 if (wins_name
->flags
& 2) {
6649 wins_name
->addresses
.addresses
.num_ips
= records
[i
].replica
.num_ips
;
6650 wins_name
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
6651 records
[i
].replica
.ips
);
6653 wins_name
->addresses
.ip
= records
[i
].replica
.ips
[0].ip
;
6655 wins_name
->unknown
= "255.255.255.255";
6657 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
6658 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
,
6659 records
[i
].replica
.apply_expected
);
6661 if (records
[i
].replica
.apply_expected
) {
6662 wins_name
->name
= &records
[i
].name
;
6663 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE
,
6664 WREPL_STATE_TOMBSTONE
,
6665 WREPL_NODE_B
, false);
6666 wins_name
->id
= ++ctx
->b
.max_version
;
6667 wins_name
->addresses
.ip
= addresses_B_1
[0].ip
;
6668 wins_name
->unknown
= "255.255.255.255";
6670 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
6671 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
, true);
6673 release
->in
.name
= records
[i
].name
;
6674 release
->in
.dest_addr
= ctx
->address
;
6675 release
->in
.dest_port
= lpcfg_nbt_port(tctx
->lp_ctx
);
6676 release
->in
.address
= records
[i
].wins
.ips
[0].ip
;
6677 release
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
6678 release
->in
.broadcast
= false;
6679 release
->in
.timeout
= 30;
6680 release
->in
.retries
= 0;
6682 status
= nbt_name_release(ctx
->nbtsock
, ctx
, release
);
6683 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
6684 torture_comment(tctx
, "No response from %s for name release\n", ctx
->address
);
6687 if (!NT_STATUS_IS_OK(status
)) {
6688 torture_comment(tctx
, "Bad response from %s for name query - %s\n",
6689 ctx
->address
, nt_errstr(status
));
6692 CHECK_VALUE(tctx
, release
->out
.rcode
, 0);
6695 torture_comment(tctx
, "conflict handled wrong or record[%u]: %s\n", i
, records
[i
].line
);
6703 struct test_conflict_owned_active_vs_replica_struct
{
6704 const char *line
; /* just better debugging */
6705 const char *section
; /* just better debugging */
6706 struct nbt_name name
;
6707 const char *comment
;
6713 const struct wrepl_ip
*ips
;
6714 bool apply_expected
;
6719 bool expect_release
;
6722 /* when num_ips == 0, then .wins.ips are used */
6724 const struct wrepl_ip
*ips
;
6727 enum wrepl_name_type type
;
6728 enum wrepl_name_state state
;
6729 enum wrepl_name_node node
;
6732 const struct wrepl_ip
*ips
;
6733 bool apply_expected
;
6739 static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket
*nbtsock
,
6740 struct nbt_name_packet
*req_packet
,
6741 struct socket_address
*src
);
6743 static bool test_conflict_owned_active_vs_replica(struct torture_context
*tctx
,
6744 struct test_wrepl_conflict_conn
*ctx
)
6748 struct wrepl_wins_name wins_name_
;
6749 struct wrepl_wins_name
*wins_name
= &wins_name_
;
6750 struct nbt_name_register name_register_
;
6751 struct nbt_name_register
*name_register
= &name_register_
;
6752 struct nbt_name_release release_
;
6753 struct nbt_name_release
*release
= &release_
;
6755 struct test_conflict_owned_active_vs_replica_struct records
[] = {
6757 * unique vs. unique section
6760 * unique,active vs. unique,active with same ip(s), unchecked
6763 .line
= __location__
,
6764 .name
= _NBT_NAME("_UA_UA_SI_U", 0x00, NULL
),
6768 .num_ips
= ctx
->addresses_best_num
,
6769 .ips
= ctx
->addresses_best
,
6770 .apply_expected
= true
6776 .type
= WREPL_TYPE_UNIQUE
,
6777 .state
= WREPL_STATE_ACTIVE
,
6778 .node
= WREPL_NODE_B
,
6780 .num_ips
= ctx
->addresses_best_num
,
6781 .ips
= ctx
->addresses_best
,
6782 .apply_expected
= true
6786 * unique,active vs. unique,active with different ip(s), positive response
6789 .line
= __location__
,
6790 .name
= _NBT_NAME("_UA_UA_DI_P", 0x00, NULL
),
6794 .num_ips
= ctx
->addresses_best_num
,
6795 .ips
= ctx
->addresses_best
,
6796 .apply_expected
= true
6803 .type
= WREPL_TYPE_UNIQUE
,
6804 .state
= WREPL_STATE_ACTIVE
,
6805 .node
= WREPL_NODE_B
,
6807 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6808 .ips
= addresses_B_1
,
6809 .apply_expected
= false
6813 * unique,active vs. unique,active with different ip(s), positive response other ips
6816 .line
= __location__
,
6817 .name
= _NBT_NAME("_UA_UA_DI_O", 0x00, NULL
),
6821 .num_ips
= ctx
->addresses_best_num
,
6822 .ips
= ctx
->addresses_best
,
6823 .apply_expected
= true
6828 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
6829 .ips
= addresses_A_3_4
,
6832 .type
= WREPL_TYPE_UNIQUE
,
6833 .state
= WREPL_STATE_ACTIVE
,
6834 .node
= WREPL_NODE_B
,
6836 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6837 .ips
= addresses_B_1
,
6838 .apply_expected
= false
6842 * unique,active vs. unique,active with different ip(s), negative response
6845 .line
= __location__
,
6846 .name
= _NBT_NAME("_UA_UA_DI_N", 0x00, NULL
),
6850 .num_ips
= ctx
->addresses_best_num
,
6851 .ips
= ctx
->addresses_best
,
6852 .apply_expected
= true
6859 .type
= WREPL_TYPE_UNIQUE
,
6860 .state
= WREPL_STATE_ACTIVE
,
6861 .node
= WREPL_NODE_B
,
6863 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6864 .ips
= addresses_B_1
,
6865 .apply_expected
= true
6869 * unique,active vs. unique,tombstone with same ip(s), unchecked
6872 .line
= __location__
,
6873 .name
= _NBT_NAME("_UA_UT_SI_U", 0x00, NULL
),
6877 .num_ips
= ctx
->addresses_best_num
,
6878 .ips
= ctx
->addresses_best
,
6879 .apply_expected
= true
6885 .type
= WREPL_TYPE_UNIQUE
,
6886 .state
= WREPL_STATE_TOMBSTONE
,
6887 .node
= WREPL_NODE_B
,
6889 .num_ips
= ctx
->addresses_best_num
,
6890 .ips
= ctx
->addresses_best
,
6891 .apply_expected
= false
6895 * unique,active vs. unique,tombstone with different ip(s), unchecked
6898 .line
= __location__
,
6899 .name
= _NBT_NAME("_UA_UT_DI_U", 0x00, NULL
),
6903 .num_ips
= ctx
->addresses_best_num
,
6904 .ips
= ctx
->addresses_best
,
6905 .apply_expected
= true
6911 .type
= WREPL_TYPE_UNIQUE
,
6912 .state
= WREPL_STATE_TOMBSTONE
,
6913 .node
= WREPL_NODE_B
,
6915 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6916 .ips
= addresses_B_1
,
6917 .apply_expected
= false
6921 * unique vs. group section
6924 * unique,active vs. group,active with same ip(s), release expected
6927 .line
= __location__
,
6928 .name
= _NBT_NAME("_UA_GA_SI_R", 0x00, NULL
),
6932 .num_ips
= ctx
->addresses_best_num
,
6933 .ips
= ctx
->addresses_best
,
6934 .apply_expected
= true
6938 .expect_release
= true,
6941 .type
= WREPL_TYPE_GROUP
,
6942 .state
= WREPL_STATE_ACTIVE
,
6943 .node
= WREPL_NODE_B
,
6945 .num_ips
= ctx
->addresses_best_num
,
6946 .ips
= ctx
->addresses_best
,
6947 .apply_expected
= true
6951 * unique,active vs. group,active with different ip(s), release expected
6954 .line
= __location__
,
6955 .name
= _NBT_NAME("_UA_GA_DI_R", 0x00, NULL
),
6959 .num_ips
= ctx
->addresses_best_num
,
6960 .ips
= ctx
->addresses_best
,
6961 .apply_expected
= true
6965 .expect_release
= true,
6968 .type
= WREPL_TYPE_GROUP
,
6969 .state
= WREPL_STATE_ACTIVE
,
6970 .node
= WREPL_NODE_B
,
6972 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6973 .ips
= addresses_B_1
,
6974 .apply_expected
= true
6978 * unique,active vs. group,tombstone with same ip(s), unchecked
6981 .line
= __location__
,
6982 .name
= _NBT_NAME("_UA_GT_SI_U", 0x00, NULL
),
6986 .num_ips
= ctx
->addresses_best_num
,
6987 .ips
= ctx
->addresses_best
,
6988 .apply_expected
= true
6994 .type
= WREPL_TYPE_GROUP
,
6995 .state
= WREPL_STATE_TOMBSTONE
,
6996 .node
= WREPL_NODE_B
,
6998 .num_ips
= ctx
->addresses_best_num
,
6999 .ips
= ctx
->addresses_best
,
7000 .apply_expected
= false
7004 * unique,active vs. group,tombstone with different ip(s), unchecked
7007 .line
= __location__
,
7008 .name
= _NBT_NAME("_UA_GT_DI_U", 0x00, NULL
),
7012 .num_ips
= ctx
->addresses_best_num
,
7013 .ips
= ctx
->addresses_best
,
7014 .apply_expected
= true
7020 .type
= WREPL_TYPE_GROUP
,
7021 .state
= WREPL_STATE_TOMBSTONE
,
7022 .node
= WREPL_NODE_B
,
7024 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7025 .ips
= addresses_B_1
,
7026 .apply_expected
= false
7030 * unique vs. special group section
7033 * unique,active vs. sgroup,active with same ip(s), release expected
7036 .line
= __location__
,
7037 .name
= _NBT_NAME("_UA_SA_SI_R", 0x00, NULL
),
7041 .num_ips
= ctx
->addresses_best_num
,
7042 .ips
= ctx
->addresses_best
,
7043 .apply_expected
= true
7047 .expect_release
= true,
7050 .type
= WREPL_TYPE_SGROUP
,
7051 .state
= WREPL_STATE_ACTIVE
,
7052 .node
= WREPL_NODE_B
,
7054 .num_ips
= ctx
->addresses_best_num
,
7055 .ips
= ctx
->addresses_best
,
7056 .apply_expected
= true
7060 * unique,active vs. group,active with different ip(s), release expected
7063 .line
= __location__
,
7064 .name
= _NBT_NAME("_UA_SA_DI_R", 0x00, NULL
),
7068 .num_ips
= ctx
->addresses_best_num
,
7069 .ips
= ctx
->addresses_best
,
7070 .apply_expected
= true
7074 .expect_release
= true,
7077 .type
= WREPL_TYPE_SGROUP
,
7078 .state
= WREPL_STATE_ACTIVE
,
7079 .node
= WREPL_NODE_B
,
7081 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7082 .ips
= addresses_B_1
,
7083 .apply_expected
= true
7087 * unique,active vs. sgroup,tombstone with same ip(s), unchecked
7090 .line
= __location__
,
7091 .name
= _NBT_NAME("_UA_ST_SI_U", 0x00, NULL
),
7095 .num_ips
= ctx
->addresses_best_num
,
7096 .ips
= ctx
->addresses_best
,
7097 .apply_expected
= true
7103 .type
= WREPL_TYPE_SGROUP
,
7104 .state
= WREPL_STATE_TOMBSTONE
,
7105 .node
= WREPL_NODE_B
,
7107 .num_ips
= ctx
->addresses_best_num
,
7108 .ips
= ctx
->addresses_best
,
7109 .apply_expected
= false
7113 * unique,active vs. sgroup,tombstone with different ip(s), unchecked
7116 .line
= __location__
,
7117 .name
= _NBT_NAME("_UA_ST_DI_U", 0x00, NULL
),
7121 .num_ips
= ctx
->addresses_best_num
,
7122 .ips
= ctx
->addresses_best
,
7123 .apply_expected
= true
7129 .type
= WREPL_TYPE_SGROUP
,
7130 .state
= WREPL_STATE_TOMBSTONE
,
7131 .node
= WREPL_NODE_B
,
7133 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7134 .ips
= addresses_B_1
,
7135 .apply_expected
= false
7139 * unique vs. multi homed section
7142 * unique,active vs. mhomed,active with same ip(s), unchecked
7145 .line
= __location__
,
7146 .name
= _NBT_NAME("_UA_MA_SI_U", 0x00, NULL
),
7150 .num_ips
= ctx
->addresses_best_num
,
7151 .ips
= ctx
->addresses_best
,
7152 .apply_expected
= true
7158 .type
= WREPL_TYPE_MHOMED
,
7159 .state
= WREPL_STATE_ACTIVE
,
7160 .node
= WREPL_NODE_B
,
7162 .num_ips
= ctx
->addresses_best_num
,
7163 .ips
= ctx
->addresses_best
,
7164 .apply_expected
= true
7168 * unique,active vs. mhomed,active with superset ip(s), unchecked
7171 .line
= __location__
,
7172 .name
= _NBT_NAME("_UA_MA_SP_U", 0x00, NULL
),
7176 .num_ips
= ctx
->addresses_best_num
,
7177 .ips
= ctx
->addresses_best
,
7178 .apply_expected
= true
7184 .type
= WREPL_TYPE_MHOMED
,
7185 .state
= WREPL_STATE_ACTIVE
,
7186 .node
= WREPL_NODE_B
,
7188 .num_ips
= ctx
->addresses_all_num
,
7189 .ips
= ctx
->addresses_all
,
7190 .apply_expected
= true
7194 * unique,active vs. mhomed,active with different ip(s), positive response
7197 .line
= __location__
,
7198 .name
= _NBT_NAME("_UA_MA_DI_P", 0x00, NULL
),
7202 .num_ips
= ctx
->addresses_best_num
,
7203 .ips
= ctx
->addresses_best
,
7204 .apply_expected
= true
7211 .type
= WREPL_TYPE_MHOMED
,
7212 .state
= WREPL_STATE_ACTIVE
,
7213 .node
= WREPL_NODE_B
,
7215 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7216 .ips
= addresses_B_3_4
,
7217 .apply_expected
= false
7221 * unique,active vs. mhomed,active with different ip(s), positive response other ips
7224 .line
= __location__
,
7225 .name
= _NBT_NAME("_UA_MA_DI_O", 0x00, NULL
),
7229 .num_ips
= ctx
->addresses_best_num
,
7230 .ips
= ctx
->addresses_best
,
7231 .apply_expected
= true
7236 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
7237 .ips
= addresses_A_3_4
,
7240 .type
= WREPL_TYPE_MHOMED
,
7241 .state
= WREPL_STATE_ACTIVE
,
7242 .node
= WREPL_NODE_B
,
7244 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7245 .ips
= addresses_B_3_4
,
7246 .apply_expected
= false
7250 * unique,active vs. mhomed,active with different ip(s), negative response
7253 .line
= __location__
,
7254 .name
= _NBT_NAME("_UA_MA_DI_N", 0x00, NULL
),
7258 .num_ips
= ctx
->addresses_best_num
,
7259 .ips
= ctx
->addresses_best
,
7260 .apply_expected
= true
7267 .type
= WREPL_TYPE_MHOMED
,
7268 .state
= WREPL_STATE_ACTIVE
,
7269 .node
= WREPL_NODE_B
,
7271 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7272 .ips
= addresses_B_3_4
,
7273 .apply_expected
= true
7277 * unique,active vs. mhomed,tombstone with same ip(s), unchecked
7280 .line
= __location__
,
7281 .name
= _NBT_NAME("_UA_MT_SI_U", 0x00, NULL
),
7285 .num_ips
= ctx
->addresses_best_num
,
7286 .ips
= ctx
->addresses_best
,
7287 .apply_expected
= true
7293 .type
= WREPL_TYPE_MHOMED
,
7294 .state
= WREPL_STATE_TOMBSTONE
,
7295 .node
= WREPL_NODE_B
,
7297 .num_ips
= ctx
->addresses_best_num
,
7298 .ips
= ctx
->addresses_best
,
7299 .apply_expected
= false
7303 * unique,active vs. mhomed,tombstone with different ip(s), unchecked
7306 .line
= __location__
,
7307 .name
= _NBT_NAME("_UA_MT_DI_U", 0x00, NULL
),
7311 .num_ips
= ctx
->addresses_best_num
,
7312 .ips
= ctx
->addresses_best
,
7313 .apply_expected
= true
7319 .type
= WREPL_TYPE_MHOMED
,
7320 .state
= WREPL_STATE_TOMBSTONE
,
7321 .node
= WREPL_NODE_B
,
7323 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7324 .ips
= addresses_B_3_4
,
7325 .apply_expected
= false
7329 * normal group vs. unique section
7332 * group,active vs. unique,active with same ip(s), unchecked
7335 .line
= __location__
,
7336 .name
= _NBT_NAME("_GA_UA_SI_U", 0x00, NULL
),
7338 .nb_flags
= NBT_NM_GROUP
,
7340 .num_ips
= ctx
->addresses_best_num
,
7341 .ips
= ctx
->addresses_best
,
7342 .apply_expected
= true
7348 .type
= WREPL_TYPE_UNIQUE
,
7349 .state
= WREPL_STATE_ACTIVE
,
7350 .node
= WREPL_NODE_B
,
7352 .num_ips
= ctx
->addresses_best_num
,
7353 .ips
= ctx
->addresses_best
,
7354 .apply_expected
= false
7358 * group,active vs. unique,active with different ip(s), unchecked
7361 .line
= __location__
,
7362 .name
= _NBT_NAME("_GA_UA_DI_U", 0x00, NULL
),
7364 .nb_flags
= NBT_NM_GROUP
,
7366 .num_ips
= ctx
->addresses_best_num
,
7367 .ips
= ctx
->addresses_best
,
7368 .apply_expected
= true
7374 .type
= WREPL_TYPE_UNIQUE
,
7375 .state
= WREPL_STATE_ACTIVE
,
7376 .node
= WREPL_NODE_B
,
7378 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7379 .ips
= addresses_B_1
,
7380 .apply_expected
= false
7384 * group,active vs. unique,tombstone with same ip(s), unchecked
7387 .line
= __location__
,
7388 .name
= _NBT_NAME("_GA_UT_SI_U", 0x00, NULL
),
7390 .nb_flags
= NBT_NM_GROUP
,
7392 .num_ips
= ctx
->addresses_best_num
,
7393 .ips
= ctx
->addresses_best
,
7394 .apply_expected
= true
7400 .type
= WREPL_TYPE_UNIQUE
,
7401 .state
= WREPL_STATE_TOMBSTONE
,
7402 .node
= WREPL_NODE_B
,
7404 .num_ips
= ctx
->addresses_best_num
,
7405 .ips
= ctx
->addresses_best
,
7406 .apply_expected
= false
7410 * group,active vs. unique,tombstone with different ip(s), unchecked
7413 .line
= __location__
,
7414 .name
= _NBT_NAME("_GA_UT_DI_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
= ARRAY_SIZE(addresses_B_1
),
7431 .ips
= addresses_B_1
,
7432 .apply_expected
= false
7436 * normal group vs. normal group section
7439 * group,active vs. group,active with same ip(s), unchecked
7442 .line
= __location__
,
7443 .name
= _NBT_NAME("_GA_GA_SI_U", 0x00, NULL
),
7445 .nb_flags
= NBT_NM_GROUP
,
7447 .num_ips
= ctx
->addresses_best_num
,
7448 .ips
= ctx
->addresses_best
,
7449 .apply_expected
= true
7455 .type
= WREPL_TYPE_GROUP
,
7456 .state
= WREPL_STATE_ACTIVE
,
7457 .node
= WREPL_NODE_B
,
7459 .num_ips
= ctx
->addresses_best_num
,
7460 .ips
= ctx
->addresses_best
,
7461 .apply_expected
= true
7465 * group,active vs. group,active with different ip(s), unchecked
7468 .line
= __location__
,
7469 .name
= _NBT_NAME("_GA_GA_DI_U", 0x00, NULL
),
7471 .nb_flags
= NBT_NM_GROUP
,
7473 .num_ips
= ctx
->addresses_best_num
,
7474 .ips
= ctx
->addresses_best
,
7475 .apply_expected
= true
7481 .type
= WREPL_TYPE_GROUP
,
7482 .state
= WREPL_STATE_ACTIVE
,
7483 .node
= WREPL_NODE_B
,
7485 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7486 .ips
= addresses_B_1
,
7487 .apply_expected
= true
7491 * group,active vs. group,tombstone with same ip(s), unchecked
7494 .line
= __location__
,
7495 .name
= _NBT_NAME("_GA_GT_SI_U", 0x00, NULL
),
7497 .nb_flags
= NBT_NM_GROUP
,
7499 .num_ips
= ctx
->addresses_best_num
,
7500 .ips
= ctx
->addresses_best
,
7501 .apply_expected
= true
7507 .type
= WREPL_TYPE_GROUP
,
7508 .state
= WREPL_STATE_TOMBSTONE
,
7509 .node
= WREPL_NODE_B
,
7511 .num_ips
= ctx
->addresses_best_num
,
7512 .ips
= ctx
->addresses_best
,
7513 .apply_expected
= false
7517 * group,active vs. group,tombstone with different ip(s), unchecked
7520 .line
= __location__
,
7521 .name
= _NBT_NAME("_GA_GT_DI_U", 0x00, NULL
),
7523 .nb_flags
= NBT_NM_GROUP
,
7525 .num_ips
= ctx
->addresses_best_num
,
7526 .ips
= ctx
->addresses_best
,
7527 .apply_expected
= true
7533 .type
= WREPL_TYPE_GROUP
,
7534 .state
= WREPL_STATE_TOMBSTONE
,
7535 .node
= WREPL_NODE_B
,
7537 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7538 .ips
= addresses_B_1
,
7539 .apply_expected
= false
7543 * normal group vs. special group section
7546 * group,active vs. sgroup,active with same ip(s), unchecked
7549 .line
= __location__
,
7550 .name
= _NBT_NAME("_GA_SA_SI_U", 0x00, NULL
),
7552 .nb_flags
= NBT_NM_GROUP
,
7554 .num_ips
= ctx
->addresses_best_num
,
7555 .ips
= ctx
->addresses_best
,
7556 .apply_expected
= true
7562 .type
= WREPL_TYPE_SGROUP
,
7563 .state
= WREPL_STATE_ACTIVE
,
7564 .node
= WREPL_NODE_B
,
7566 .num_ips
= ctx
->addresses_best_num
,
7567 .ips
= ctx
->addresses_best
,
7568 .apply_expected
= false
7572 * group,active vs. sgroup,active with different ip(s), unchecked
7575 .line
= __location__
,
7576 .name
= _NBT_NAME("_GA_SA_DI_U", 0x00, NULL
),
7578 .nb_flags
= NBT_NM_GROUP
,
7580 .num_ips
= ctx
->addresses_best_num
,
7581 .ips
= ctx
->addresses_best
,
7582 .apply_expected
= true
7588 .type
= WREPL_TYPE_SGROUP
,
7589 .state
= WREPL_STATE_ACTIVE
,
7590 .node
= WREPL_NODE_B
,
7592 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7593 .ips
= addresses_B_3_4
,
7594 .apply_expected
= false
7598 * group,active vs. sgroup,tombstone with same ip(s), unchecked
7601 .line
= __location__
,
7602 .name
= _NBT_NAME("_GA_ST_SI_U", 0x00, NULL
),
7604 .nb_flags
= NBT_NM_GROUP
,
7606 .num_ips
= ctx
->addresses_best_num
,
7607 .ips
= ctx
->addresses_best
,
7608 .apply_expected
= true
7614 .type
= WREPL_TYPE_SGROUP
,
7615 .state
= WREPL_STATE_TOMBSTONE
,
7616 .node
= WREPL_NODE_B
,
7618 .num_ips
= ctx
->addresses_best_num
,
7619 .ips
= ctx
->addresses_best
,
7620 .apply_expected
= false
7624 * group,active vs. sgroup,tombstone with different ip(s), unchecked
7627 .line
= __location__
,
7628 .name
= _NBT_NAME("_GA_ST_DI_U", 0x00, NULL
),
7630 .nb_flags
= NBT_NM_GROUP
,
7632 .num_ips
= ctx
->addresses_best_num
,
7633 .ips
= ctx
->addresses_best
,
7634 .apply_expected
= true
7640 .type
= WREPL_TYPE_SGROUP
,
7641 .state
= WREPL_STATE_TOMBSTONE
,
7642 .node
= WREPL_NODE_B
,
7644 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7645 .ips
= addresses_B_3_4
,
7646 .apply_expected
= false
7650 * normal group vs. multi homed section
7653 * group,active vs. mhomed,active with same ip(s), unchecked
7656 .line
= __location__
,
7657 .name
= _NBT_NAME("_GA_MA_SI_U", 0x00, NULL
),
7659 .nb_flags
= NBT_NM_GROUP
,
7661 .num_ips
= ctx
->addresses_best_num
,
7662 .ips
= ctx
->addresses_best
,
7663 .apply_expected
= true
7669 .type
= WREPL_TYPE_MHOMED
,
7670 .state
= WREPL_STATE_ACTIVE
,
7671 .node
= WREPL_NODE_B
,
7673 .num_ips
= ctx
->addresses_best_num
,
7674 .ips
= ctx
->addresses_best
,
7675 .apply_expected
= false
7679 * group,active vs. mhomed,active with different ip(s), unchecked
7682 .line
= __location__
,
7683 .name
= _NBT_NAME("_GA_MA_DI_U", 0x00, NULL
),
7685 .nb_flags
= NBT_NM_GROUP
,
7687 .num_ips
= ctx
->addresses_best_num
,
7688 .ips
= ctx
->addresses_best
,
7689 .apply_expected
= true
7695 .type
= WREPL_TYPE_MHOMED
,
7696 .state
= WREPL_STATE_ACTIVE
,
7697 .node
= WREPL_NODE_B
,
7699 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7700 .ips
= addresses_B_3_4
,
7701 .apply_expected
= false
7705 * group,active vs. mhomed,tombstone with same ip(s), unchecked
7708 .line
= __location__
,
7709 .name
= _NBT_NAME("_GA_MT_SI_U", 0x00, NULL
),
7711 .nb_flags
= NBT_NM_GROUP
,
7713 .num_ips
= ctx
->addresses_best_num
,
7714 .ips
= ctx
->addresses_best
,
7715 .apply_expected
= true
7721 .type
= WREPL_TYPE_MHOMED
,
7722 .state
= WREPL_STATE_TOMBSTONE
,
7723 .node
= WREPL_NODE_B
,
7725 .num_ips
= ctx
->addresses_best_num
,
7726 .ips
= ctx
->addresses_best
,
7727 .apply_expected
= false
7731 * group,active vs. mhomed,tombstone with different ip(s), unchecked
7734 .line
= __location__
,
7735 .name
= _NBT_NAME("_GA_MT_DI_U", 0x00, NULL
),
7737 .nb_flags
= NBT_NM_GROUP
,
7739 .num_ips
= ctx
->addresses_best_num
,
7740 .ips
= ctx
->addresses_best
,
7741 .apply_expected
= true
7747 .type
= WREPL_TYPE_MHOMED
,
7748 .state
= WREPL_STATE_TOMBSTONE
,
7749 .node
= WREPL_NODE_B
,
7751 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7752 .ips
= addresses_B_3_4
,
7753 .apply_expected
= false
7757 * special group vs. unique section
7760 * sgroup,active vs. unique,active with same ip(s), unchecked
7763 .line
= __location__
,
7764 .name
= _NBT_NAME("_SA_UA_SI_U", 0x1C, NULL
),
7766 .nb_flags
= NBT_NM_GROUP
,
7768 .num_ips
= ctx
->addresses_best_num
,
7769 .ips
= ctx
->addresses_best
,
7770 .apply_expected
= true
7776 .type
= WREPL_TYPE_UNIQUE
,
7777 .state
= WREPL_STATE_ACTIVE
,
7778 .node
= WREPL_NODE_B
,
7780 .num_ips
= ctx
->addresses_best_num
,
7781 .ips
= ctx
->addresses_best
,
7782 .apply_expected
= false
7786 * sgroup,active vs. unique,active with different ip(s), unchecked
7789 .line
= __location__
,
7790 .name
= _NBT_NAME("_SA_UA_DI_U", 0x1C, NULL
),
7792 .nb_flags
= NBT_NM_GROUP
,
7794 .num_ips
= ctx
->addresses_best_num
,
7795 .ips
= ctx
->addresses_best
,
7796 .apply_expected
= true
7802 .type
= WREPL_TYPE_UNIQUE
,
7803 .state
= WREPL_STATE_ACTIVE
,
7804 .node
= WREPL_NODE_B
,
7806 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7807 .ips
= addresses_B_1
,
7808 .apply_expected
= false
7812 * sgroup,active vs. unique,tombstone with same ip(s), unchecked
7815 .line
= __location__
,
7816 .name
= _NBT_NAME("_SA_UT_SI_U", 0x1C, NULL
),
7818 .nb_flags
= NBT_NM_GROUP
,
7820 .num_ips
= ctx
->addresses_best_num
,
7821 .ips
= ctx
->addresses_best
,
7822 .apply_expected
= true
7828 .type
= WREPL_TYPE_UNIQUE
,
7829 .state
= WREPL_STATE_TOMBSTONE
,
7830 .node
= WREPL_NODE_B
,
7832 .num_ips
= ctx
->addresses_best_num
,
7833 .ips
= ctx
->addresses_best
,
7834 .apply_expected
= false
7838 * sgroup,active vs. unique,tombstone with different ip(s), unchecked
7841 .line
= __location__
,
7842 .name
= _NBT_NAME("_SA_UT_DI_U", 0x1C, NULL
),
7844 .nb_flags
= NBT_NM_GROUP
,
7846 .num_ips
= ctx
->addresses_best_num
,
7847 .ips
= ctx
->addresses_best
,
7848 .apply_expected
= true
7854 .type
= WREPL_TYPE_UNIQUE
,
7855 .state
= WREPL_STATE_TOMBSTONE
,
7856 .node
= WREPL_NODE_B
,
7858 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7859 .ips
= addresses_B_1
,
7860 .apply_expected
= false
7864 * special group vs. normal group section
7867 * sgroup,active vs. group,active with same ip(s), unchecked
7870 .line
= __location__
,
7871 .name
= _NBT_NAME("_SA_GA_SI_U", 0x1C, NULL
),
7873 .nb_flags
= NBT_NM_GROUP
,
7875 .num_ips
= ctx
->addresses_best_num
,
7876 .ips
= ctx
->addresses_best
,
7877 .apply_expected
= true
7883 .type
= WREPL_TYPE_GROUP
,
7884 .state
= WREPL_STATE_ACTIVE
,
7885 .node
= WREPL_NODE_B
,
7887 .num_ips
= ctx
->addresses_best_num
,
7888 .ips
= ctx
->addresses_best
,
7889 .apply_expected
= false
7893 * sgroup,active vs. group,active with different ip(s), unchecked
7896 .line
= __location__
,
7897 .name
= _NBT_NAME("_SA_GA_DI_U", 0x1C, NULL
),
7899 .nb_flags
= NBT_NM_GROUP
,
7901 .num_ips
= ctx
->addresses_best_num
,
7902 .ips
= ctx
->addresses_best
,
7903 .apply_expected
= true
7909 .type
= WREPL_TYPE_GROUP
,
7910 .state
= WREPL_STATE_ACTIVE
,
7911 .node
= WREPL_NODE_B
,
7913 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7914 .ips
= addresses_B_1
,
7915 .apply_expected
= false
7919 * sgroup,active vs. group,tombstone with same ip(s), unchecked
7922 .line
= __location__
,
7923 .name
= _NBT_NAME("_SA_GT_SI_U", 0x1C, NULL
),
7925 .nb_flags
= NBT_NM_GROUP
,
7927 .num_ips
= ctx
->addresses_best_num
,
7928 .ips
= ctx
->addresses_best
,
7929 .apply_expected
= true
7935 .type
= WREPL_TYPE_GROUP
,
7936 .state
= WREPL_STATE_TOMBSTONE
,
7937 .node
= WREPL_NODE_B
,
7939 .num_ips
= ctx
->addresses_best_num
,
7940 .ips
= ctx
->addresses_best
,
7941 .apply_expected
= false
7945 * sgroup,active vs. group,tombstone with different ip(s), unchecked
7948 .line
= __location__
,
7949 .name
= _NBT_NAME("_SA_GT_DI_U", 0x1C, NULL
),
7951 .nb_flags
= NBT_NM_GROUP
,
7953 .num_ips
= ctx
->addresses_best_num
,
7954 .ips
= ctx
->addresses_best
,
7955 .apply_expected
= true
7961 .type
= WREPL_TYPE_GROUP
,
7962 .state
= WREPL_STATE_TOMBSTONE
,
7963 .node
= WREPL_NODE_B
,
7965 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7966 .ips
= addresses_B_1
,
7967 .apply_expected
= false
7971 * special group vs. multi homed section
7974 * sgroup,active vs. mhomed,active with same ip(s), unchecked
7977 .line
= __location__
,
7978 .name
= _NBT_NAME("_SA_MA_SI_U", 0x1C, NULL
),
7980 .nb_flags
= NBT_NM_GROUP
,
7982 .num_ips
= ctx
->addresses_best_num
,
7983 .ips
= ctx
->addresses_best
,
7984 .apply_expected
= true
7990 .type
= WREPL_TYPE_MHOMED
,
7991 .state
= WREPL_STATE_ACTIVE
,
7992 .node
= WREPL_NODE_B
,
7994 .num_ips
= ctx
->addresses_best_num
,
7995 .ips
= ctx
->addresses_best
,
7996 .apply_expected
= false
8000 * sgroup,active vs. mhomed,active with different ip(s), unchecked
8003 .line
= __location__
,
8004 .name
= _NBT_NAME("_SA_MA_DI_U", 0x1C, NULL
),
8006 .nb_flags
= NBT_NM_GROUP
,
8008 .num_ips
= ctx
->addresses_best_num
,
8009 .ips
= ctx
->addresses_best
,
8010 .apply_expected
= true
8016 .type
= WREPL_TYPE_MHOMED
,
8017 .state
= WREPL_STATE_ACTIVE
,
8018 .node
= WREPL_NODE_B
,
8020 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8021 .ips
= addresses_B_1
,
8022 .apply_expected
= false
8026 * sgroup,active vs. mhomed,tombstone with same ip(s), unchecked
8029 .line
= __location__
,
8030 .name
= _NBT_NAME("_SA_MT_SI_U", 0x1C, NULL
),
8032 .nb_flags
= NBT_NM_GROUP
,
8034 .num_ips
= ctx
->addresses_best_num
,
8035 .ips
= ctx
->addresses_best
,
8036 .apply_expected
= true
8042 .type
= WREPL_TYPE_MHOMED
,
8043 .state
= WREPL_STATE_TOMBSTONE
,
8044 .node
= WREPL_NODE_B
,
8046 .num_ips
= ctx
->addresses_best_num
,
8047 .ips
= ctx
->addresses_best
,
8048 .apply_expected
= false
8052 * sgroup,active vs. mhomed,tombstone with different ip(s), unchecked
8055 .line
= __location__
,
8056 .name
= _NBT_NAME("_SA_MT_DI_U", 0x1C, NULL
),
8058 .nb_flags
= NBT_NM_GROUP
,
8060 .num_ips
= ctx
->addresses_best_num
,
8061 .ips
= ctx
->addresses_best
,
8062 .apply_expected
= true
8068 .type
= WREPL_TYPE_MHOMED
,
8069 .state
= WREPL_STATE_TOMBSTONE
,
8070 .node
= WREPL_NODE_B
,
8072 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8073 .ips
= addresses_B_1
,
8074 .apply_expected
= false
8078 * multi homed vs. unique section
8081 * mhomed,active vs. unique,active with same ip(s), unchecked
8084 .line
= __location__
,
8085 .name
= _NBT_NAME("_MA_UA_SI_U", 0x00, NULL
),
8089 .num_ips
= ctx
->addresses_best_num
,
8090 .ips
= ctx
->addresses_best
,
8091 .apply_expected
= true
8097 .type
= WREPL_TYPE_UNIQUE
,
8098 .state
= WREPL_STATE_ACTIVE
,
8099 .node
= WREPL_NODE_B
,
8101 .num_ips
= ctx
->addresses_best_num
,
8102 .ips
= ctx
->addresses_best
,
8103 .apply_expected
= true
8107 * mhomed,active vs. unique,active with different ip(s), positive response
8110 .line
= __location__
,
8111 .name
= _NBT_NAME("_MA_UA_DI_P", 0x00, NULL
),
8115 .num_ips
= ctx
->addresses_best_num
,
8116 .ips
= ctx
->addresses_best
,
8117 .apply_expected
= true
8124 .type
= WREPL_TYPE_UNIQUE
,
8125 .state
= WREPL_STATE_ACTIVE
,
8126 .node
= WREPL_NODE_B
,
8128 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8129 .ips
= addresses_B_1
,
8130 .apply_expected
= false
8134 * mhomed,active vs. unique,active with different ip(s), positive response other ips
8137 .line
= __location__
,
8138 .name
= _NBT_NAME("_MA_UA_DI_O", 0x00, NULL
),
8142 .num_ips
= ctx
->addresses_best_num
,
8143 .ips
= ctx
->addresses_best
,
8144 .apply_expected
= true
8149 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
8150 .ips
= addresses_A_3_4
,
8153 .type
= WREPL_TYPE_UNIQUE
,
8154 .state
= WREPL_STATE_ACTIVE
,
8155 .node
= WREPL_NODE_B
,
8157 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8158 .ips
= addresses_B_1
,
8159 .apply_expected
= false
8163 * mhomed,active vs. unique,active with different ip(s), negative response
8166 .line
= __location__
,
8167 .name
= _NBT_NAME("_MA_UA_DI_N", 0x00, NULL
),
8171 .num_ips
= ctx
->addresses_best_num
,
8172 .ips
= ctx
->addresses_best
,
8173 .apply_expected
= true
8180 .type
= WREPL_TYPE_UNIQUE
,
8181 .state
= WREPL_STATE_ACTIVE
,
8182 .node
= WREPL_NODE_B
,
8184 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8185 .ips
= addresses_B_1
,
8186 .apply_expected
= true
8190 * mhomed,active vs. unique,tombstone with same ip(s), unchecked
8193 .line
= __location__
,
8194 .name
= _NBT_NAME("_MA_UT_SI_U", 0x00, NULL
),
8198 .num_ips
= ctx
->addresses_best_num
,
8199 .ips
= ctx
->addresses_best
,
8200 .apply_expected
= true
8206 .type
= WREPL_TYPE_UNIQUE
,
8207 .state
= WREPL_STATE_TOMBSTONE
,
8208 .node
= WREPL_NODE_B
,
8210 .num_ips
= ctx
->addresses_best_num
,
8211 .ips
= ctx
->addresses_best
,
8212 .apply_expected
= false
8216 * mhomed,active vs. unique,tombstone with different ip(s), unchecked
8219 .line
= __location__
,
8220 .name
= _NBT_NAME("_MA_UT_DI_U", 0x00, NULL
),
8224 .num_ips
= ctx
->addresses_best_num
,
8225 .ips
= ctx
->addresses_best
,
8226 .apply_expected
= true
8232 .type
= WREPL_TYPE_UNIQUE
,
8233 .state
= WREPL_STATE_TOMBSTONE
,
8234 .node
= WREPL_NODE_B
,
8236 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8237 .ips
= addresses_B_1
,
8238 .apply_expected
= false
8242 * multi homed vs. normal group section
8245 * mhomed,active vs. group,active with same ip(s), release expected
8248 .line
= __location__
,
8249 .name
= _NBT_NAME("_MA_GA_SI_R", 0x00, NULL
),
8253 .num_ips
= ctx
->addresses_best_num
,
8254 .ips
= ctx
->addresses_best
,
8255 .apply_expected
= true
8259 .expect_release
= true,
8262 .type
= WREPL_TYPE_GROUP
,
8263 .state
= WREPL_STATE_ACTIVE
,
8264 .node
= WREPL_NODE_B
,
8266 .num_ips
= ctx
->addresses_best_num
,
8267 .ips
= ctx
->addresses_best
,
8268 .apply_expected
= true
8272 * mhomed,active vs. group,active with different ip(s), release expected
8275 .line
= __location__
,
8276 .name
= _NBT_NAME("_MA_GA_DI_R", 0x00, NULL
),
8280 .num_ips
= ctx
->addresses_best_num
,
8281 .ips
= ctx
->addresses_best
,
8282 .apply_expected
= true
8286 .expect_release
= true,
8289 .type
= WREPL_TYPE_GROUP
,
8290 .state
= WREPL_STATE_ACTIVE
,
8291 .node
= WREPL_NODE_B
,
8293 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8294 .ips
= addresses_B_1
,
8295 .apply_expected
= true
8299 * mhomed,active vs. group,tombstone with same ip(s), unchecked
8302 .line
= __location__
,
8303 .name
= _NBT_NAME("_MA_GT_SI_U", 0x00, NULL
),
8307 .num_ips
= ctx
->addresses_best_num
,
8308 .ips
= ctx
->addresses_best
,
8309 .apply_expected
= true
8315 .type
= WREPL_TYPE_GROUP
,
8316 .state
= WREPL_STATE_TOMBSTONE
,
8317 .node
= WREPL_NODE_B
,
8319 .num_ips
= ctx
->addresses_best_num
,
8320 .ips
= ctx
->addresses_best
,
8321 .apply_expected
= false
8325 * mhomed,active vs. group,tombstone with different ip(s), unchecked
8328 .line
= __location__
,
8329 .name
= _NBT_NAME("_MA_GT_DI_U", 0x00, NULL
),
8333 .num_ips
= ctx
->addresses_best_num
,
8334 .ips
= ctx
->addresses_best
,
8335 .apply_expected
= true
8341 .type
= WREPL_TYPE_GROUP
,
8342 .state
= WREPL_STATE_TOMBSTONE
,
8343 .node
= WREPL_NODE_B
,
8345 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8346 .ips
= addresses_B_1
,
8347 .apply_expected
= false
8351 * multi homed vs. special group section
8354 * mhomed,active vs. sgroup,active with same ip(s), release expected
8357 .line
= __location__
,
8358 .name
= _NBT_NAME("_MA_SA_SI_R", 0x00, NULL
),
8362 .num_ips
= ctx
->addresses_best_num
,
8363 .ips
= ctx
->addresses_best
,
8364 .apply_expected
= true
8368 .expect_release
= true,
8371 .type
= WREPL_TYPE_SGROUP
,
8372 .state
= WREPL_STATE_ACTIVE
,
8373 .node
= WREPL_NODE_B
,
8375 .num_ips
= ctx
->addresses_best_num
,
8376 .ips
= ctx
->addresses_best
,
8377 .apply_expected
= true
8381 * mhomed,active vs. group,active with different ip(s), release expected
8384 .line
= __location__
,
8385 .name
= _NBT_NAME("_MA_SA_DI_R", 0x00, NULL
),
8389 .num_ips
= ctx
->addresses_best_num
,
8390 .ips
= ctx
->addresses_best
,
8391 .apply_expected
= true
8395 .expect_release
= true,
8398 .type
= WREPL_TYPE_SGROUP
,
8399 .state
= WREPL_STATE_ACTIVE
,
8400 .node
= WREPL_NODE_B
,
8402 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8403 .ips
= addresses_B_1
,
8404 .apply_expected
= true
8408 * mhomed,active vs. sgroup,tombstone with same ip(s), unchecked
8411 .line
= __location__
,
8412 .name
= _NBT_NAME("_MA_ST_SI_U", 0x00, NULL
),
8416 .num_ips
= ctx
->addresses_best_num
,
8417 .ips
= ctx
->addresses_best
,
8418 .apply_expected
= true
8424 .type
= WREPL_TYPE_SGROUP
,
8425 .state
= WREPL_STATE_TOMBSTONE
,
8426 .node
= WREPL_NODE_B
,
8428 .num_ips
= ctx
->addresses_best_num
,
8429 .ips
= ctx
->addresses_best
,
8430 .apply_expected
= false
8434 * mhomed,active vs. sgroup,tombstone with different ip(s), unchecked
8437 .line
= __location__
,
8438 .name
= _NBT_NAME("_MA_ST_DI_U", 0x00, NULL
),
8442 .num_ips
= ctx
->addresses_best_num
,
8443 .ips
= ctx
->addresses_best
,
8444 .apply_expected
= true
8450 .type
= WREPL_TYPE_SGROUP
,
8451 .state
= WREPL_STATE_TOMBSTONE
,
8452 .node
= WREPL_NODE_B
,
8454 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8455 .ips
= addresses_B_1
,
8456 .apply_expected
= false
8460 * multi homed vs. multi homed section
8463 * mhomed,active vs. mhomed,active with same ip(s), unchecked
8466 .line
= __location__
,
8467 .name
= _NBT_NAME("_MA_MA_SI_U", 0x00, NULL
),
8471 .num_ips
= ctx
->addresses_best_num
,
8472 .ips
= ctx
->addresses_best
,
8473 .apply_expected
= true
8479 .type
= WREPL_TYPE_MHOMED
,
8480 .state
= WREPL_STATE_ACTIVE
,
8481 .node
= WREPL_NODE_B
,
8483 .num_ips
= ctx
->addresses_best_num
,
8484 .ips
= ctx
->addresses_best
,
8485 .apply_expected
= true
8489 * mhomed,active vs. mhomed,active with superset ip(s), unchecked
8492 .line
= __location__
,
8493 .name
= _NBT_NAME("_MA_MA_SP_U", 0x00, NULL
),
8497 .num_ips
= ctx
->addresses_best_num
,
8498 .ips
= ctx
->addresses_best
,
8499 .apply_expected
= true
8505 .type
= WREPL_TYPE_MHOMED
,
8506 .state
= WREPL_STATE_ACTIVE
,
8507 .node
= WREPL_NODE_B
,
8509 .num_ips
= ctx
->addresses_all_num
,
8510 .ips
= ctx
->addresses_all
,
8511 .apply_expected
= true
8515 * mhomed,active vs. mhomed,active with different ip(s), positive response
8518 .line
= __location__
,
8519 .name
= _NBT_NAME("_MA_MA_DI_P", 0x00, NULL
),
8523 .num_ips
= ctx
->addresses_best_num
,
8524 .ips
= ctx
->addresses_best
,
8525 .apply_expected
= true
8532 .type
= WREPL_TYPE_MHOMED
,
8533 .state
= WREPL_STATE_ACTIVE
,
8534 .node
= WREPL_NODE_B
,
8536 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8537 .ips
= addresses_B_3_4
,
8538 .apply_expected
= false
8542 * mhomed,active vs. mhomed,active with different ip(s), positive response other ips
8545 .line
= __location__
,
8546 .name
= _NBT_NAME("_MA_MA_DI_O", 0x00, NULL
),
8550 .num_ips
= ctx
->addresses_best_num
,
8551 .ips
= ctx
->addresses_best
,
8552 .apply_expected
= true
8557 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
8558 .ips
= addresses_A_3_4
,
8561 .type
= WREPL_TYPE_MHOMED
,
8562 .state
= WREPL_STATE_ACTIVE
,
8563 .node
= WREPL_NODE_B
,
8565 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8566 .ips
= addresses_B_3_4
,
8567 .apply_expected
= false
8571 * mhomed,active vs. mhomed,active with different ip(s), negative response
8574 .line
= __location__
,
8575 .name
= _NBT_NAME("_MA_MA_DI_N", 0x00, NULL
),
8579 .num_ips
= ctx
->addresses_best_num
,
8580 .ips
= ctx
->addresses_best
,
8581 .apply_expected
= true
8588 .type
= WREPL_TYPE_MHOMED
,
8589 .state
= WREPL_STATE_ACTIVE
,
8590 .node
= WREPL_NODE_B
,
8592 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8593 .ips
= addresses_B_3_4
,
8594 .apply_expected
= true
8598 * mhomed,active vs. mhomed,tombstone with same ip(s), unchecked
8601 .line
= __location__
,
8602 .name
= _NBT_NAME("_MA_MT_SI_U", 0x00, NULL
),
8606 .num_ips
= ctx
->addresses_best_num
,
8607 .ips
= ctx
->addresses_best
,
8608 .apply_expected
= true
8614 .type
= WREPL_TYPE_MHOMED
,
8615 .state
= WREPL_STATE_TOMBSTONE
,
8616 .node
= WREPL_NODE_B
,
8618 .num_ips
= ctx
->addresses_best_num
,
8619 .ips
= ctx
->addresses_best
,
8620 .apply_expected
= false
8624 * mhomed,active vs. mhomed,tombstone with different ip(s), unchecked
8627 .line
= __location__
,
8628 .name
= _NBT_NAME("_MA_MT_DI_U", 0x00, NULL
),
8632 .num_ips
= ctx
->addresses_best_num
,
8633 .ips
= ctx
->addresses_best
,
8634 .apply_expected
= true
8640 .type
= WREPL_TYPE_MHOMED
,
8641 .state
= WREPL_STATE_TOMBSTONE
,
8642 .node
= WREPL_NODE_B
,
8644 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8645 .ips
= addresses_B_3_4
,
8646 .apply_expected
= false
8650 * some more multi homed test, including merging
8653 * mhomed,active vs. mhomed,active with superset ip(s), unchecked
8656 .line
= __location__
,
8657 .section
= "Test Replica vs. owned active: some more MHOMED combinations",
8658 .name
= _NBT_NAME("_MA_MA_SP_U", 0x00, NULL
),
8659 .comment
= "C:MHOMED vs. B:ALL => B:ALL",
8660 .skip
= (ctx
->addresses_all_num
< 3),
8664 .num_ips
= ctx
->addresses_mhomed_num
,
8665 .ips
= ctx
->addresses_mhomed
,
8666 .apply_expected
= true
8672 .type
= WREPL_TYPE_MHOMED
,
8673 .state
= WREPL_STATE_ACTIVE
,
8674 .node
= WREPL_NODE_B
,
8676 .num_ips
= ctx
->addresses_all_num
,
8677 .ips
= ctx
->addresses_all
,
8678 .apply_expected
= true
8682 * mhomed,active vs. mhomed,active with same ips, unchecked
8685 .line
= __location__
,
8686 .name
= _NBT_NAME("_MA_MA_SM_U", 0x00, NULL
),
8687 .comment
= "C:MHOMED vs. B:MHOMED => B:MHOMED",
8688 .skip
= (ctx
->addresses_mhomed_num
< 2),
8692 .num_ips
= ctx
->addresses_mhomed_num
,
8693 .ips
= ctx
->addresses_mhomed
,
8694 .apply_expected
= true
8700 .type
= WREPL_TYPE_MHOMED
,
8701 .state
= WREPL_STATE_ACTIVE
,
8702 .node
= WREPL_NODE_B
,
8704 .num_ips
= ctx
->addresses_mhomed_num
,
8705 .ips
= ctx
->addresses_mhomed
,
8706 .apply_expected
= true
8710 * mhomed,active vs. mhomed,active with subset ip(s), positive response
8713 .line
= __location__
,
8714 .name
= _NBT_NAME("_MA_MA_SB_P", 0x00, NULL
),
8715 .comment
= "C:MHOMED vs. B:BEST (C:MHOMED) => B:MHOMED",
8716 .skip
= (ctx
->addresses_mhomed_num
< 2),
8720 .num_ips
= ctx
->addresses_mhomed_num
,
8721 .ips
= ctx
->addresses_mhomed
,
8722 .apply_expected
= true
8729 .type
= WREPL_TYPE_MHOMED
,
8730 .state
= WREPL_STATE_ACTIVE
,
8731 .node
= WREPL_NODE_B
,
8733 .num_ips
= ctx
->addresses_best_num
,
8734 .ips
= ctx
->addresses_best
,
8735 .mhomed_merge
= true
8739 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with all addresses
8742 .line
= __location__
,
8743 .name
= _NBT_NAME("_MA_MA_SB_A", 0x00, NULL
),
8744 .comment
= "C:MHOMED vs. B:BEST (C:ALL) => B:MHOMED",
8745 .skip
= (ctx
->addresses_all_num
< 3),
8749 .num_ips
= ctx
->addresses_mhomed_num
,
8750 .ips
= ctx
->addresses_mhomed
,
8751 .apply_expected
= true
8756 .num_ips
= ctx
->addresses_all_num
,
8757 .ips
= ctx
->addresses_all
,
8760 .type
= WREPL_TYPE_MHOMED
,
8761 .state
= WREPL_STATE_ACTIVE
,
8762 .node
= WREPL_NODE_B
,
8764 .num_ips
= ctx
->addresses_best_num
,
8765 .ips
= ctx
->addresses_best
,
8766 .mhomed_merge
= true
8770 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with replicas addresses
8771 * TODO: check why the server sends a name release demand for one address?
8772 * the release demand has no effect to the database record...
8775 .line
= __location__
,
8776 .name
= _NBT_NAME("_MA_MA_SB_PRA", 0x00, NULL
),
8777 .comment
= "C:MHOMED vs. B:BEST (C:BEST) => C:MHOMED",
8778 .skip
= (ctx
->addresses_all_num
< 2),
8782 .num_ips
= ctx
->addresses_mhomed_num
,
8783 .ips
= ctx
->addresses_mhomed
,
8784 .apply_expected
= true
8789 .num_ips
= ctx
->addresses_best_num
,
8790 .ips
= ctx
->addresses_best
,
8791 .late_release
= true
8794 .type
= WREPL_TYPE_MHOMED
,
8795 .state
= WREPL_STATE_ACTIVE
,
8796 .node
= WREPL_NODE_B
,
8798 .num_ips
= ctx
->addresses_best_num
,
8799 .ips
= ctx
->addresses_best
,
8800 .apply_expected
= false
8804 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with other addresses
8807 .line
= __location__
,
8808 .name
= _NBT_NAME("_MA_MA_SB_O", 0x00, NULL
),
8809 .comment
= "C:MHOMED vs. B:BEST (B:B_3_4) =>C:MHOMED",
8810 .skip
= (ctx
->addresses_all_num
< 2),
8814 .num_ips
= ctx
->addresses_mhomed_num
,
8815 .ips
= ctx
->addresses_mhomed
,
8816 .apply_expected
= true
8821 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8822 .ips
= addresses_B_3_4
,
8825 .type
= WREPL_TYPE_MHOMED
,
8826 .state
= WREPL_STATE_ACTIVE
,
8827 .node
= WREPL_NODE_B
,
8829 .num_ips
= ctx
->addresses_best_num
,
8830 .ips
= ctx
->addresses_best
,
8831 .apply_expected
= false
8835 * mhomed,active vs. mhomed,active with subset ip(s), negative response
8838 .line
= __location__
,
8839 .name
= _NBT_NAME("_MA_MA_SB_N", 0x00, NULL
),
8840 .comment
= "C:MHOMED vs. B:BEST (NEGATIVE) => B:BEST",
8841 .skip
= (ctx
->addresses_mhomed_num
< 2),
8845 .num_ips
= ctx
->addresses_mhomed_num
,
8846 .ips
= ctx
->addresses_mhomed
,
8847 .apply_expected
= true
8854 .type
= WREPL_TYPE_MHOMED
,
8855 .state
= WREPL_STATE_ACTIVE
,
8856 .node
= WREPL_NODE_B
,
8858 .num_ips
= ctx
->addresses_best_num
,
8859 .ips
= ctx
->addresses_best
,
8860 .apply_expected
= true
8864 * some more multi homed and unique test, including merging
8867 * mhomed,active vs. unique,active with subset ip(s), positive response
8870 .line
= __location__
,
8871 .section
= "Test Replica vs. owned active: some more UNIQUE,MHOMED combinations",
8872 .name
= _NBT_NAME("_MA_UA_SB_P", 0x00, NULL
),
8873 .comment
= "C:MHOMED vs. B:UNIQUE,BEST (C:MHOMED) => B:MHOMED",
8874 .skip
= (ctx
->addresses_all_num
< 2),
8878 .num_ips
= ctx
->addresses_mhomed_num
,
8879 .ips
= ctx
->addresses_mhomed
,
8880 .apply_expected
= true
8887 .type
= WREPL_TYPE_UNIQUE
,
8888 .state
= WREPL_STATE_ACTIVE
,
8889 .node
= WREPL_NODE_B
,
8891 .num_ips
= ctx
->addresses_best_num
,
8892 .ips
= ctx
->addresses_best
,
8893 .mhomed_merge
= true
8897 * unique,active vs. unique,active with different ip(s), positive response, with replicas address
8898 * TODO: check why the server sends a name release demand for one address?
8899 * the release demand has no effect to the database record...
8902 .line
= __location__
,
8903 .name
= _NBT_NAME("_UA_UA_DI_PRA", 0x00, NULL
),
8904 .comment
= "C:BEST vs. B:BEST2 (C:BEST2,LR:BEST2) => C:BEST",
8905 .skip
= (ctx
->addresses_all_num
< 2),
8909 .num_ips
= ctx
->addresses_best_num
,
8910 .ips
= ctx
->addresses_best
,
8911 .apply_expected
= true
8916 .num_ips
= ctx
->addresses_best2_num
,
8917 .ips
= ctx
->addresses_best2
,
8918 .late_release
= true
8921 .type
= WREPL_TYPE_UNIQUE
,
8922 .state
= WREPL_STATE_ACTIVE
,
8923 .node
= WREPL_NODE_B
,
8925 .num_ips
= ctx
->addresses_best2_num
,
8926 .ips
= ctx
->addresses_best2
,
8927 .apply_expected
= false,
8931 * unique,active vs. unique,active with different ip(s), positive response, with all addresses
8934 .line
= __location__
,
8935 .name
= _NBT_NAME("_UA_UA_DI_A", 0x00, NULL
),
8936 .comment
= "C:BEST vs. B:BEST2 (C:ALL) => B:MHOMED",
8937 .skip
= (ctx
->addresses_all_num
< 3),
8941 .num_ips
= ctx
->addresses_best_num
,
8942 .ips
= ctx
->addresses_best
,
8943 .apply_expected
= true
8948 .num_ips
= ctx
->addresses_all_num
,
8949 .ips
= ctx
->addresses_all
,
8952 .type
= WREPL_TYPE_UNIQUE
,
8953 .state
= WREPL_STATE_ACTIVE
,
8954 .node
= WREPL_NODE_B
,
8956 .num_ips
= ctx
->addresses_best2_num
,
8957 .ips
= ctx
->addresses_best2
,
8958 .mhomed_merge
= true,
8962 * unique,active vs. mhomed,active with different ip(s), positive response, with all addresses
8965 .line
= __location__
,
8966 .name
= _NBT_NAME("_UA_MA_DI_A", 0x00, NULL
),
8967 .comment
= "C:BEST vs. B:BEST2 (C:ALL) => B:MHOMED",
8968 .skip
= (ctx
->addresses_all_num
< 3),
8972 .num_ips
= ctx
->addresses_best_num
,
8973 .ips
= ctx
->addresses_best
,
8974 .apply_expected
= true
8979 .num_ips
= ctx
->addresses_all_num
,
8980 .ips
= ctx
->addresses_all
,
8983 .type
= WREPL_TYPE_MHOMED
,
8984 .state
= WREPL_STATE_ACTIVE
,
8985 .node
= WREPL_NODE_B
,
8987 .num_ips
= ctx
->addresses_best2_num
,
8988 .ips
= ctx
->addresses_best2
,
8989 .mhomed_merge
= true,
8993 * special group vs. special group merging section
8996 * sgroup,active vs. sgroup,active with different ip(s)
8999 .line
= __location__
,
9000 .section
= "Test Replica vs. owned active: SGROUP vs. SGROUP tests",
9001 .name
= _NBT_NAME("_SA_SA_DI_U", 0x1C, NULL
),
9002 .skip
= (ctx
->addresses_all_num
< 3),
9004 .nb_flags
= NBT_NM_GROUP
,
9006 .num_ips
= ctx
->addresses_mhomed_num
,
9007 .ips
= ctx
->addresses_mhomed
,
9008 .apply_expected
= true
9014 .type
= WREPL_TYPE_SGROUP
,
9015 .state
= WREPL_STATE_ACTIVE
,
9016 .node
= WREPL_NODE_B
,
9018 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
9019 .ips
= addresses_B_3_4
,
9020 .sgroup_merge
= true
9024 * sgroup,active vs. sgroup,active with same ip(s)
9027 .line
= __location__
,
9028 .name
= _NBT_NAME("_SA_SA_SI_U", 0x1C, NULL
),
9029 .skip
= (ctx
->addresses_all_num
< 3),
9031 .nb_flags
= NBT_NM_GROUP
,
9033 .num_ips
= ctx
->addresses_mhomed_num
,
9034 .ips
= ctx
->addresses_mhomed
,
9035 .apply_expected
= true
9041 .type
= WREPL_TYPE_SGROUP
,
9042 .state
= WREPL_STATE_ACTIVE
,
9043 .node
= WREPL_NODE_B
,
9045 .num_ips
= ctx
->addresses_mhomed_num
,
9046 .ips
= ctx
->addresses_mhomed
,
9047 .sgroup_merge
= true
9051 * sgroup,active vs. sgroup,active with superset ip(s)
9054 .line
= __location__
,
9055 .name
= _NBT_NAME("_SA_SA_SP_U", 0x1C, NULL
),
9056 .skip
= (ctx
->addresses_all_num
< 3),
9058 .nb_flags
= NBT_NM_GROUP
,
9060 .num_ips
= ctx
->addresses_mhomed_num
,
9061 .ips
= ctx
->addresses_mhomed
,
9062 .apply_expected
= true
9068 .type
= WREPL_TYPE_SGROUP
,
9069 .state
= WREPL_STATE_ACTIVE
,
9070 .node
= WREPL_NODE_B
,
9072 .num_ips
= ctx
->addresses_all_num
,
9073 .ips
= ctx
->addresses_all
,
9074 .sgroup_merge
= true
9078 * sgroup,active vs. sgroup,active with subset ip(s)
9081 .line
= __location__
,
9082 .name
= _NBT_NAME("_SA_SA_SB_U", 0x1C, NULL
),
9083 .skip
= (ctx
->addresses_all_num
< 3),
9085 .nb_flags
= NBT_NM_GROUP
,
9087 .num_ips
= ctx
->addresses_mhomed_num
,
9088 .ips
= ctx
->addresses_mhomed
,
9089 .apply_expected
= true
9095 .type
= WREPL_TYPE_SGROUP
,
9096 .state
= WREPL_STATE_ACTIVE
,
9097 .node
= WREPL_NODE_B
,
9099 .num_ips
= ctx
->addresses_best_num
,
9100 .ips
= ctx
->addresses_best
,
9101 .sgroup_merge
= true
9105 * sgroup,active vs. sgroup,tombstone with different ip(s)
9108 .line
= __location__
,
9109 .name
= _NBT_NAME("_SA_ST_DI_U", 0x1C, NULL
),
9110 .skip
= (ctx
->addresses_all_num
< 3),
9112 .nb_flags
= NBT_NM_GROUP
,
9114 .num_ips
= ctx
->addresses_mhomed_num
,
9115 .ips
= ctx
->addresses_mhomed
,
9116 .apply_expected
= true
9122 .type
= WREPL_TYPE_SGROUP
,
9123 .state
= WREPL_STATE_TOMBSTONE
,
9124 .node
= WREPL_NODE_B
,
9126 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
9127 .ips
= addresses_B_3_4
,
9128 .apply_expected
= false
9132 * sgroup,active vs. sgroup,tombstone with same ip(s)
9135 .line
= __location__
,
9136 .name
= _NBT_NAME("_SA_ST_SI_U", 0x1C, NULL
),
9137 .skip
= (ctx
->addresses_all_num
< 3),
9139 .nb_flags
= NBT_NM_GROUP
,
9141 .num_ips
= ctx
->addresses_mhomed_num
,
9142 .ips
= ctx
->addresses_mhomed
,
9143 .apply_expected
= true
9149 .type
= WREPL_TYPE_SGROUP
,
9150 .state
= WREPL_STATE_TOMBSTONE
,
9151 .node
= WREPL_NODE_B
,
9153 .num_ips
= ctx
->addresses_mhomed_num
,
9154 .ips
= ctx
->addresses_mhomed
,
9155 .apply_expected
= false
9159 * sgroup,active vs. sgroup,tombstone with superset ip(s)
9162 .line
= __location__
,
9163 .name
= _NBT_NAME("_SA_ST_SP_U", 0x1C, NULL
),
9164 .skip
= (ctx
->addresses_all_num
< 3),
9166 .nb_flags
= NBT_NM_GROUP
,
9168 .num_ips
= ctx
->addresses_mhomed_num
,
9169 .ips
= ctx
->addresses_mhomed
,
9170 .apply_expected
= true
9176 .type
= WREPL_TYPE_SGROUP
,
9177 .state
= WREPL_STATE_TOMBSTONE
,
9178 .node
= WREPL_NODE_B
,
9180 .num_ips
= ctx
->addresses_all_num
,
9181 .ips
= ctx
->addresses_all
,
9182 .apply_expected
= false
9186 * sgroup,active vs. sgroup,tombstone with subset ip(s)
9189 .line
= __location__
,
9190 .name
= _NBT_NAME("_SA_ST_SB_U", 0x1C, NULL
),
9191 .skip
= (ctx
->addresses_all_num
< 3),
9193 .nb_flags
= NBT_NM_GROUP
,
9195 .num_ips
= ctx
->addresses_mhomed_num
,
9196 .ips
= ctx
->addresses_mhomed
,
9197 .apply_expected
= true
9203 .type
= WREPL_TYPE_SGROUP
,
9204 .state
= WREPL_STATE_TOMBSTONE
,
9205 .node
= WREPL_NODE_B
,
9207 .num_ips
= ctx
->addresses_best_num
,
9208 .ips
= ctx
->addresses_best
,
9209 .apply_expected
= false
9214 if (!ctx
->nbtsock_srv
) {
9215 torture_comment(tctx
, "SKIP: Test Replica records vs. owned active records: not bound to port[%d]\n",
9216 lpcfg_nbt_port(tctx
->lp_ctx
));
9220 torture_comment(tctx
, "Test Replica records vs. owned active records\n");
9222 for(i
=0; ret
&& i
< ARRAY_SIZE(records
); i
++) {
9224 struct test_conflict_owned_active_vs_replica_struct record
= records
[i
];
9225 uint32_t j
, count
= 1;
9228 if (records
[i
].wins
.mhomed
|| records
[i
].name
.type
== 0x1C) {
9229 count
= records
[i
].wins
.num_ips
;
9232 if (records
[i
].section
) {
9233 torture_comment(tctx
, "%s\n", records
[i
].section
);
9236 if (records
[i
].skip
) {
9237 torture_comment(tctx
, "%s => SKIPPED\n", nbt_name_string(ctx
, &records
[i
].name
));
9241 if (records
[i
].replica
.mhomed_merge
) {
9242 action
= "MHOMED_MERGE";
9243 } else if (records
[i
].replica
.sgroup_merge
) {
9244 action
= "SGROUP_MERGE";
9245 } else if (records
[i
].replica
.apply_expected
) {
9248 action
= "NOT REPLACE";
9251 torture_comment(tctx
, "%s%s%s => %s\n",
9252 nbt_name_string(ctx
, &records
[i
].name
),
9253 (records
[i
].comment
?": ":""),
9254 (records
[i
].comment
?records
[i
].comment
:""),
9257 /* Prepare for multi homed registration */
9258 ZERO_STRUCT(records
[i
].defend
);
9259 records
[i
].defend
.timeout
= 10;
9260 records
[i
].defend
.positive
= true;
9261 nbt_set_incoming_handler(ctx
->nbtsock_srv
,
9262 test_conflict_owned_active_vs_replica_handler
,
9264 if (ctx
->nbtsock_srv2
) {
9265 nbt_set_incoming_handler(ctx
->nbtsock_srv2
,
9266 test_conflict_owned_active_vs_replica_handler
,
9273 for (j
=0; j
< count
; j
++) {
9274 struct nbt_name_request
*req
;
9276 name_register
->in
.name
= records
[i
].name
;
9277 name_register
->in
.dest_addr
= ctx
->address
;
9278 name_register
->in
.dest_port
= lpcfg_nbt_port(tctx
->lp_ctx
);
9279 name_register
->in
.address
= records
[i
].wins
.ips
[j
].ip
;
9280 name_register
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
9281 name_register
->in
.register_demand
= false;
9282 name_register
->in
.broadcast
= false;
9283 name_register
->in
.multi_homed
= records
[i
].wins
.mhomed
;
9284 name_register
->in
.ttl
= 300000;
9285 name_register
->in
.timeout
= 70;
9286 name_register
->in
.retries
= 0;
9288 req
= nbt_name_register_send(ctx
->nbtsock
, name_register
);
9290 /* push the request on the wire */
9291 event_loop_once(ctx
->nbtsock
->event_ctx
);
9294 * if we register multiple addresses,
9295 * the server will do name queries to see if the old addresses
9298 if (records
[i
].wins
.mhomed
&& j
> 0) {
9299 end
= timeval_current_ofs(records
[i
].defend
.timeout
,0);
9300 records
[i
].defend
.ret
= true;
9301 while (records
[i
].defend
.timeout
> 0) {
9302 event_loop_once(ctx
->nbtsock_srv
->event_ctx
);
9303 if (timeval_expired(&end
)) break;
9305 ret
&= records
[i
].defend
.ret
;
9308 status
= nbt_name_register_recv(req
, ctx
, name_register
);
9309 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
9310 torture_comment(tctx
, "No response from %s for name register\n", ctx
->address
);
9313 if (!NT_STATUS_IS_OK(status
)) {
9314 torture_comment(tctx
, "Bad response from %s for name register - %s\n",
9315 ctx
->address
, nt_errstr(status
));
9318 CHECK_VALUE(tctx
, name_register
->out
.rcode
, 0);
9319 CHECK_VALUE_STRING(tctx
, name_register
->out
.reply_from
, ctx
->address
);
9320 CHECK_VALUE(tctx
, name_register
->out
.name
.type
, records
[i
].name
.type
);
9321 CHECK_VALUE_STRING(tctx
, name_register
->out
.name
.name
, records
[i
].name
.name
);
9322 CHECK_VALUE_STRING(tctx
, name_register
->out
.name
.scope
, records
[i
].name
.scope
);
9323 CHECK_VALUE_STRING(tctx
, name_register
->out
.reply_addr
, records
[i
].wins
.ips
[j
].ip
);
9326 /* Prepare for the current test */
9327 records
[i
].defend
= record
.defend
;
9328 nbt_set_incoming_handler(ctx
->nbtsock_srv
,
9329 test_conflict_owned_active_vs_replica_handler
,
9331 if (ctx
->nbtsock_srv2
) {
9332 nbt_set_incoming_handler(ctx
->nbtsock_srv2
,
9333 test_conflict_owned_active_vs_replica_handler
,
9340 wins_name
->name
= &records
[i
].name
;
9341 wins_name
->flags
= WREPL_NAME_FLAGS(records
[i
].replica
.type
,
9342 records
[i
].replica
.state
,
9343 records
[i
].replica
.node
,
9344 records
[i
].replica
.is_static
);
9345 wins_name
->id
= ++ctx
->b
.max_version
;
9346 if (wins_name
->flags
& 2) {
9347 wins_name
->addresses
.addresses
.num_ips
= records
[i
].replica
.num_ips
;
9348 wins_name
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
9349 records
[i
].replica
.ips
);
9351 wins_name
->addresses
.ip
= records
[i
].replica
.ips
[0].ip
;
9353 wins_name
->unknown
= "255.255.255.255";
9355 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9358 * wait for the name query, which is handled in
9359 * test_conflict_owned_active_vs_replica_handler()
9361 end
= timeval_current_ofs(records
[i
].defend
.timeout
,0);
9362 records
[i
].defend
.ret
= true;
9363 while (records
[i
].defend
.timeout
> 0) {
9364 event_loop_once(ctx
->nbtsock_srv
->event_ctx
);
9365 if (timeval_expired(&end
)) break;
9367 ret
&= records
[i
].defend
.ret
;
9369 if (records
[i
].defend
.late_release
) {
9370 records
[i
].defend
= record
.defend
;
9371 records
[i
].defend
.expect_release
= true;
9373 * wait for the name release demand, which is handled in
9374 * test_conflict_owned_active_vs_replica_handler()
9376 end
= timeval_current_ofs(records
[i
].defend
.timeout
,0);
9377 records
[i
].defend
.ret
= true;
9378 while (records
[i
].defend
.timeout
> 0) {
9379 event_loop_once(ctx
->nbtsock_srv
->event_ctx
);
9380 if (timeval_expired(&end
)) break;
9382 ret
&= records
[i
].defend
.ret
;
9385 if (records
[i
].replica
.mhomed_merge
) {
9386 ret
&= test_wrepl_mhomed_merged(tctx
, ctx
, &ctx
->c
,
9387 records
[i
].wins
.num_ips
, records
[i
].wins
.ips
,
9389 records
[i
].replica
.num_ips
, records
[i
].replica
.ips
,
9391 } else if (records
[i
].replica
.sgroup_merge
) {
9392 ret
&= test_wrepl_sgroup_merged(tctx
, ctx
, NULL
,
9394 records
[i
].wins
.num_ips
, records
[i
].wins
.ips
,
9396 records
[i
].replica
.num_ips
, records
[i
].replica
.ips
,
9399 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
,
9400 records
[i
].replica
.apply_expected
);
9403 if (records
[i
].replica
.apply_expected
||
9404 records
[i
].replica
.mhomed_merge
) {
9405 wins_name
->name
= &records
[i
].name
;
9406 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE
,
9407 WREPL_STATE_TOMBSTONE
,
9408 WREPL_NODE_B
, false);
9409 wins_name
->id
= ++ctx
->b
.max_version
;
9410 wins_name
->addresses
.ip
= addresses_B_1
[0].ip
;
9411 wins_name
->unknown
= "255.255.255.255";
9413 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9414 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
, true);
9416 for (j
=0; j
< count
; j
++) {
9417 struct nbt_name_socket
*nbtsock
= ctx
->nbtsock
;
9419 if (ctx
->myaddr2
&& strcmp(records
[i
].wins
.ips
[j
].ip
, ctx
->myaddr2
->addr
) == 0) {
9420 nbtsock
= ctx
->nbtsock2
;
9423 release
->in
.name
= records
[i
].name
;
9424 release
->in
.dest_addr
= ctx
->address
;
9425 release
->in
.dest_port
= lpcfg_nbt_port(tctx
->lp_ctx
);
9426 release
->in
.address
= records
[i
].wins
.ips
[j
].ip
;
9427 release
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
9428 release
->in
.broadcast
= false;
9429 release
->in
.timeout
= 30;
9430 release
->in
.retries
= 0;
9432 status
= nbt_name_release(nbtsock
, ctx
, release
);
9433 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
9434 torture_comment(tctx
, "No response from %s for name release\n", ctx
->address
);
9437 if (!NT_STATUS_IS_OK(status
)) {
9438 torture_comment(tctx
, "Bad response from %s for name query - %s\n",
9439 ctx
->address
, nt_errstr(status
));
9442 CHECK_VALUE(tctx
, release
->out
.rcode
, 0);
9445 if (records
[i
].replica
.sgroup_merge
) {
9446 /* clean up the SGROUP record */
9447 wins_name
->name
= &records
[i
].name
;
9448 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
9450 WREPL_NODE_B
, false);
9451 wins_name
->id
= ++ctx
->b
.max_version
;
9452 wins_name
->addresses
.addresses
.num_ips
= 0;
9453 wins_name
->addresses
.addresses
.ips
= NULL
;
9454 wins_name
->unknown
= "255.255.255.255";
9455 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9457 /* take ownership of the SGROUP record */
9458 wins_name
->name
= &records
[i
].name
;
9459 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
9461 WREPL_NODE_B
, false);
9462 wins_name
->id
= ++ctx
->b
.max_version
;
9463 wins_name
->addresses
.addresses
.num_ips
= ARRAY_SIZE(addresses_B_1
);
9464 wins_name
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
9466 wins_name
->unknown
= "255.255.255.255";
9467 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9468 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
, true);
9470 /* overwrite the SGROUP record with unique,tombstone */
9471 wins_name
->name
= &records
[i
].name
;
9472 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE
,
9473 WREPL_STATE_TOMBSTONE
,
9474 WREPL_NODE_B
, false);
9475 wins_name
->id
= ++ctx
->b
.max_version
;
9476 wins_name
->addresses
.ip
= addresses_A_1
[0].ip
;
9477 wins_name
->unknown
= "255.255.255.255";
9478 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9479 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
, true);
9484 torture_comment(tctx
, "conflict handled wrong or record[%u]: %s\n", i
, records
[i
].line
);
9492 #define _NBT_ASSERT(v, correct) do { \
9493 if ((v) != (correct)) { \
9494 printf("(%s) Incorrect value %s=%d - should be %s (%d)\n", \
9495 __location__, #v, v, #correct, correct); \
9500 #define _NBT_ASSERT_STRING(v, correct) do { \
9501 if ( ((!v) && (correct)) || \
9502 ((v) && (!correct)) || \
9503 ((v) && (correct) && strcmp(v,correct) != 0)) { \
9504 printf("(%s) Incorrect value %s=%s - should be %s\n", \
9505 __location__, #v, v, correct); \
9510 static void test_conflict_owned_active_vs_replica_handler_query(struct nbt_name_socket
*nbtsock
,
9511 struct nbt_name_packet
*req_packet
,
9512 struct socket_address
*src
)
9514 struct nbt_name
*name
;
9515 struct nbt_name_packet
*rep_packet
;
9516 struct test_conflict_owned_active_vs_replica_struct
*rec
=
9517 (struct test_conflict_owned_active_vs_replica_struct
*)nbtsock
->incoming
.private_data
;
9519 _NBT_ASSERT(req_packet
->qdcount
, 1);
9520 _NBT_ASSERT(req_packet
->questions
[0].question_type
, NBT_QTYPE_NETBIOS
);
9521 _NBT_ASSERT(req_packet
->questions
[0].question_class
, NBT_QCLASS_IP
);
9523 name
= &req_packet
->questions
[0].name
;
9525 _NBT_ASSERT(name
->type
, rec
->name
.type
);
9526 _NBT_ASSERT_STRING(name
->name
, rec
->name
.name
);
9527 _NBT_ASSERT_STRING(name
->scope
, rec
->name
.scope
);
9529 _NBT_ASSERT(rec
->defend
.expect_release
, false);
9531 rep_packet
= talloc_zero(nbtsock
, struct nbt_name_packet
);
9532 if (rep_packet
== NULL
) return;
9534 rep_packet
->name_trn_id
= req_packet
->name_trn_id
;
9535 rep_packet
->ancount
= 1;
9537 rep_packet
->answers
= talloc_array(rep_packet
, struct nbt_res_rec
, 1);
9538 if (rep_packet
->answers
== NULL
) return;
9540 rep_packet
->answers
[0].name
= *name
;
9541 rep_packet
->answers
[0].rr_class
= NBT_QCLASS_IP
;
9542 rep_packet
->answers
[0].ttl
= 0;
9544 if (rec
->defend
.positive
) {
9545 uint32_t i
, num_ips
;
9546 const struct wrepl_ip
*ips
;
9548 if (rec
->defend
.num_ips
> 0) {
9549 num_ips
= rec
->defend
.num_ips
;
9550 ips
= rec
->defend
.ips
;
9552 num_ips
= rec
->wins
.num_ips
;
9553 ips
= rec
->wins
.ips
;
9556 /* send a positive reply */
9557 rep_packet
->operation
=
9560 NBT_FLAG_AUTHORITIVE
|
9561 NBT_FLAG_RECURSION_DESIRED
|
9562 NBT_FLAG_RECURSION_AVAIL
;
9564 rep_packet
->answers
[0].rr_type
= NBT_QTYPE_NETBIOS
;
9566 rep_packet
->answers
[0].rdata
.netbios
.length
= num_ips
*6;
9567 rep_packet
->answers
[0].rdata
.netbios
.addresses
=
9568 talloc_array(rep_packet
->answers
, struct nbt_rdata_address
, num_ips
);
9569 if (rep_packet
->answers
[0].rdata
.netbios
.addresses
== NULL
) return;
9571 for (i
=0; i
< num_ips
; i
++) {
9572 struct nbt_rdata_address
*addr
=
9573 &rep_packet
->answers
[0].rdata
.netbios
.addresses
[i
];
9574 addr
->nb_flags
= rec
->wins
.nb_flags
;
9575 addr
->ipaddr
= ips
[i
].ip
;
9577 DEBUG(2,("Sending positive name query reply for %s to %s:%d\n",
9578 nbt_name_string(rep_packet
, name
), src
->addr
, src
->port
));
9580 /* send a negative reply */
9581 rep_packet
->operation
=
9584 NBT_FLAG_AUTHORITIVE
|
9587 rep_packet
->answers
[0].rr_type
= NBT_QTYPE_NULL
;
9589 ZERO_STRUCT(rep_packet
->answers
[0].rdata
);
9591 DEBUG(2,("Sending negative name query reply for %s to %s:%d\n",
9592 nbt_name_string(rep_packet
, name
), src
->addr
, src
->port
));
9595 nbt_name_reply_send(nbtsock
, src
, rep_packet
);
9596 talloc_free(rep_packet
);
9598 /* make sure we push the reply to the wire */
9599 while (nbtsock
->send_queue
) {
9600 event_loop_once(nbtsock
->event_ctx
);
9604 rec
->defend
.timeout
= 0;
9605 rec
->defend
.ret
= true;
9608 static void test_conflict_owned_active_vs_replica_handler_release(
9609 struct nbt_name_socket
*nbtsock
,
9610 struct nbt_name_packet
*req_packet
,
9611 struct socket_address
*src
)
9613 struct nbt_name
*name
;
9614 struct nbt_name_packet
*rep_packet
;
9615 struct test_conflict_owned_active_vs_replica_struct
*rec
=
9616 (struct test_conflict_owned_active_vs_replica_struct
*)nbtsock
->incoming
.private_data
;
9618 _NBT_ASSERT(req_packet
->qdcount
, 1);
9619 _NBT_ASSERT(req_packet
->questions
[0].question_type
, NBT_QTYPE_NETBIOS
);
9620 _NBT_ASSERT(req_packet
->questions
[0].question_class
, NBT_QCLASS_IP
);
9622 name
= &req_packet
->questions
[0].name
;
9624 _NBT_ASSERT(name
->type
, rec
->name
.type
);
9625 _NBT_ASSERT_STRING(name
->name
, rec
->name
.name
);
9626 _NBT_ASSERT_STRING(name
->scope
, rec
->name
.scope
);
9628 _NBT_ASSERT(rec
->defend
.expect_release
, true);
9630 rep_packet
= talloc_zero(nbtsock
, struct nbt_name_packet
);
9631 if (rep_packet
== NULL
) return;
9633 rep_packet
->name_trn_id
= req_packet
->name_trn_id
;
9634 rep_packet
->ancount
= 1;
9635 rep_packet
->operation
=
9637 NBT_OPCODE_RELEASE
|
9638 NBT_FLAG_AUTHORITIVE
;
9640 rep_packet
->answers
= talloc_array(rep_packet
, struct nbt_res_rec
, 1);
9641 if (rep_packet
->answers
== NULL
) return;
9643 rep_packet
->answers
[0].name
= *name
;
9644 rep_packet
->answers
[0].rr_type
= NBT_QTYPE_NETBIOS
;
9645 rep_packet
->answers
[0].rr_class
= NBT_QCLASS_IP
;
9646 rep_packet
->answers
[0].ttl
= req_packet
->additional
[0].ttl
;
9647 rep_packet
->answers
[0].rdata
= req_packet
->additional
[0].rdata
;
9649 DEBUG(2,("Sending name release reply for %s to %s:%d\n",
9650 nbt_name_string(rep_packet
, name
), src
->addr
, src
->port
));
9652 nbt_name_reply_send(nbtsock
, src
, rep_packet
);
9653 talloc_free(rep_packet
);
9655 /* make sure we push the reply to the wire */
9656 while (nbtsock
->send_queue
) {
9657 event_loop_once(nbtsock
->event_ctx
);
9661 rec
->defend
.timeout
= 0;
9662 rec
->defend
.ret
= true;
9665 static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket
*nbtsock
,
9666 struct nbt_name_packet
*req_packet
,
9667 struct socket_address
*src
)
9669 struct test_conflict_owned_active_vs_replica_struct
*rec
=
9670 (struct test_conflict_owned_active_vs_replica_struct
*)nbtsock
->incoming
.private_data
;
9672 rec
->defend
.ret
= false;
9674 switch (req_packet
->operation
& NBT_OPCODE
) {
9675 case NBT_OPCODE_QUERY
:
9676 test_conflict_owned_active_vs_replica_handler_query(nbtsock
, req_packet
, src
);
9678 case NBT_OPCODE_RELEASE
:
9679 test_conflict_owned_active_vs_replica_handler_release(nbtsock
, req_packet
, src
);
9682 printf("%s: unexpected incoming packet\n", __location__
);
9688 test WINS replication replica conflicts operations
9690 static bool torture_nbt_winsreplication_replica(struct torture_context
*tctx
)
9693 struct test_wrepl_conflict_conn
*ctx
;
9695 const char *address
;
9696 struct nbt_name name
;
9698 if (!torture_nbt_get_name(tctx
, &name
, &address
))
9701 ctx
= test_create_conflict_ctx(tctx
, address
);
9702 if (!ctx
) return false;
9704 ret
&= test_conflict_same_owner(tctx
, ctx
);
9705 ret
&= test_conflict_different_owner(tctx
, ctx
);
9711 test WINS replication owned conflicts operations
9713 static bool torture_nbt_winsreplication_owned(struct torture_context
*tctx
)
9715 const char *address
;
9716 struct nbt_name name
;
9718 struct test_wrepl_conflict_conn
*ctx
;
9720 if (torture_setting_bool(tctx
, "quick", false))
9722 "skip NBT-WINSREPLICATION-OWNED test in quick test mode\n");
9724 if (!torture_nbt_get_name(tctx
, &name
, &address
))
9727 ctx
= test_create_conflict_ctx(tctx
, address
);
9728 torture_assert(tctx
, ctx
!= NULL
, "Creating context failed");
9730 ret
&= test_conflict_owned_released_vs_replica(tctx
, ctx
);
9731 ret
&= test_conflict_owned_active_vs_replica(tctx
, ctx
);
9737 test simple WINS replication operations
9739 struct torture_suite
*torture_nbt_winsreplication(TALLOC_CTX
*mem_ctx
)
9741 struct torture_suite
*suite
= torture_suite_create(
9742 mem_ctx
, "WINSREPLICATION");
9743 struct torture_tcase
*tcase
;
9745 tcase
= torture_suite_add_simple_test(suite
, "assoc_ctx1",
9747 tcase
->tests
->dangerous
= true;
9749 torture_suite_add_simple_test(suite
, "assoc_ctx2",
9752 torture_suite_add_simple_test(suite
, "wins_replication",
9753 test_wins_replication
);
9755 torture_suite_add_simple_test(suite
, "replica",
9756 torture_nbt_winsreplication_replica
);
9758 torture_suite_add_simple_test(suite
, "owned",
9759 torture_nbt_winsreplication_owned
);