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_interface_list(tctx
, tctx
->lp_ctx
, &ifaces
);
620 ctx
->myaddr
= socket_address_from_strings(tctx
, ctx
->nbtsock
->sock
->backend_name
, iface_list_best_ip(ifaces
, address
), 0);
621 if (!ctx
->myaddr
) return NULL
;
623 for (i
= 0; i
< iface_list_count(ifaces
); i
++) {
624 if (strcmp(ctx
->myaddr
->addr
, iface_list_n_ip(ifaces
, i
)) == 0) continue;
625 ctx
->myaddr2
= socket_address_from_strings(tctx
, ctx
->nbtsock
->sock
->backend_name
, iface_list_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_list_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_list_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 struct torture_context
*tctx
;
6705 const char *line
; /* just better debugging */
6706 const char *section
; /* just better debugging */
6707 struct nbt_name name
;
6708 const char *comment
;
6714 const struct wrepl_ip
*ips
;
6715 bool apply_expected
;
6720 bool expect_release
;
6723 /* when num_ips == 0, then .wins.ips are used */
6725 const struct wrepl_ip
*ips
;
6728 enum wrepl_name_type type
;
6729 enum wrepl_name_state state
;
6730 enum wrepl_name_node node
;
6733 const struct wrepl_ip
*ips
;
6734 bool apply_expected
;
6740 static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket
*nbtsock
,
6741 struct nbt_name_packet
*req_packet
,
6742 struct socket_address
*src
);
6744 static bool test_conflict_owned_active_vs_replica(struct torture_context
*tctx
,
6745 struct test_wrepl_conflict_conn
*ctx
)
6749 struct wrepl_wins_name wins_name_
;
6750 struct wrepl_wins_name
*wins_name
= &wins_name_
;
6751 struct nbt_name_register name_register_
;
6752 struct nbt_name_register
*name_register
= &name_register_
;
6753 struct nbt_name_release release_
;
6754 struct nbt_name_release
*release
= &release_
;
6756 struct test_conflict_owned_active_vs_replica_struct records
[] = {
6758 * unique vs. unique section
6761 * unique,active vs. unique,active with same ip(s), unchecked
6765 .line
= __location__
,
6766 .name
= _NBT_NAME("_UA_UA_SI_U", 0x00, NULL
),
6770 .num_ips
= ctx
->addresses_best_num
,
6771 .ips
= ctx
->addresses_best
,
6772 .apply_expected
= true
6778 .type
= WREPL_TYPE_UNIQUE
,
6779 .state
= WREPL_STATE_ACTIVE
,
6780 .node
= WREPL_NODE_B
,
6782 .num_ips
= ctx
->addresses_best_num
,
6783 .ips
= ctx
->addresses_best
,
6784 .apply_expected
= true
6788 * unique,active vs. unique,active with different ip(s), positive response
6792 .line
= __location__
,
6793 .name
= _NBT_NAME("_UA_UA_DI_P", 0x00, NULL
),
6797 .num_ips
= ctx
->addresses_best_num
,
6798 .ips
= ctx
->addresses_best
,
6799 .apply_expected
= true
6806 .type
= WREPL_TYPE_UNIQUE
,
6807 .state
= WREPL_STATE_ACTIVE
,
6808 .node
= WREPL_NODE_B
,
6810 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6811 .ips
= addresses_B_1
,
6812 .apply_expected
= false
6816 * unique,active vs. unique,active with different ip(s), positive response other ips
6820 .line
= __location__
,
6821 .name
= _NBT_NAME("_UA_UA_DI_O", 0x00, NULL
),
6825 .num_ips
= ctx
->addresses_best_num
,
6826 .ips
= ctx
->addresses_best
,
6827 .apply_expected
= true
6832 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
6833 .ips
= addresses_A_3_4
,
6836 .type
= WREPL_TYPE_UNIQUE
,
6837 .state
= WREPL_STATE_ACTIVE
,
6838 .node
= WREPL_NODE_B
,
6840 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6841 .ips
= addresses_B_1
,
6842 .apply_expected
= false
6846 * unique,active vs. unique,active with different ip(s), negative response
6850 .line
= __location__
,
6851 .name
= _NBT_NAME("_UA_UA_DI_N", 0x00, NULL
),
6855 .num_ips
= ctx
->addresses_best_num
,
6856 .ips
= ctx
->addresses_best
,
6857 .apply_expected
= true
6864 .type
= WREPL_TYPE_UNIQUE
,
6865 .state
= WREPL_STATE_ACTIVE
,
6866 .node
= WREPL_NODE_B
,
6868 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6869 .ips
= addresses_B_1
,
6870 .apply_expected
= true
6874 * unique,active vs. unique,tombstone with same ip(s), unchecked
6878 .line
= __location__
,
6879 .name
= _NBT_NAME("_UA_UT_SI_U", 0x00, NULL
),
6883 .num_ips
= ctx
->addresses_best_num
,
6884 .ips
= ctx
->addresses_best
,
6885 .apply_expected
= true
6891 .type
= WREPL_TYPE_UNIQUE
,
6892 .state
= WREPL_STATE_TOMBSTONE
,
6893 .node
= WREPL_NODE_B
,
6895 .num_ips
= ctx
->addresses_best_num
,
6896 .ips
= ctx
->addresses_best
,
6897 .apply_expected
= false
6901 * unique,active vs. unique,tombstone with different ip(s), unchecked
6905 .line
= __location__
,
6906 .name
= _NBT_NAME("_UA_UT_DI_U", 0x00, NULL
),
6910 .num_ips
= ctx
->addresses_best_num
,
6911 .ips
= ctx
->addresses_best
,
6912 .apply_expected
= true
6918 .type
= WREPL_TYPE_UNIQUE
,
6919 .state
= WREPL_STATE_TOMBSTONE
,
6920 .node
= WREPL_NODE_B
,
6922 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6923 .ips
= addresses_B_1
,
6924 .apply_expected
= false
6928 * unique vs. group section
6931 * unique,active vs. group,active with same ip(s), release expected
6935 .line
= __location__
,
6936 .name
= _NBT_NAME("_UA_GA_SI_R", 0x00, NULL
),
6940 .num_ips
= ctx
->addresses_best_num
,
6941 .ips
= ctx
->addresses_best
,
6942 .apply_expected
= true
6946 .expect_release
= true,
6949 .type
= WREPL_TYPE_GROUP
,
6950 .state
= WREPL_STATE_ACTIVE
,
6951 .node
= WREPL_NODE_B
,
6953 .num_ips
= ctx
->addresses_best_num
,
6954 .ips
= ctx
->addresses_best
,
6955 .apply_expected
= true
6959 * unique,active vs. group,active with different ip(s), release expected
6963 .line
= __location__
,
6964 .name
= _NBT_NAME("_UA_GA_DI_R", 0x00, NULL
),
6968 .num_ips
= ctx
->addresses_best_num
,
6969 .ips
= ctx
->addresses_best
,
6970 .apply_expected
= true
6974 .expect_release
= true,
6977 .type
= WREPL_TYPE_GROUP
,
6978 .state
= WREPL_STATE_ACTIVE
,
6979 .node
= WREPL_NODE_B
,
6981 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6982 .ips
= addresses_B_1
,
6983 .apply_expected
= true
6987 * unique,active vs. group,tombstone with same ip(s), unchecked
6991 .line
= __location__
,
6992 .name
= _NBT_NAME("_UA_GT_SI_U", 0x00, NULL
),
6996 .num_ips
= ctx
->addresses_best_num
,
6997 .ips
= ctx
->addresses_best
,
6998 .apply_expected
= true
7004 .type
= WREPL_TYPE_GROUP
,
7005 .state
= WREPL_STATE_TOMBSTONE
,
7006 .node
= WREPL_NODE_B
,
7008 .num_ips
= ctx
->addresses_best_num
,
7009 .ips
= ctx
->addresses_best
,
7010 .apply_expected
= false
7014 * unique,active vs. group,tombstone with different ip(s), unchecked
7018 .line
= __location__
,
7019 .name
= _NBT_NAME("_UA_GT_DI_U", 0x00, NULL
),
7023 .num_ips
= ctx
->addresses_best_num
,
7024 .ips
= ctx
->addresses_best
,
7025 .apply_expected
= true
7031 .type
= WREPL_TYPE_GROUP
,
7032 .state
= WREPL_STATE_TOMBSTONE
,
7033 .node
= WREPL_NODE_B
,
7035 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7036 .ips
= addresses_B_1
,
7037 .apply_expected
= false
7041 * unique vs. special group section
7044 * unique,active vs. sgroup,active with same ip(s), release expected
7048 .line
= __location__
,
7049 .name
= _NBT_NAME("_UA_SA_SI_R", 0x00, NULL
),
7053 .num_ips
= ctx
->addresses_best_num
,
7054 .ips
= ctx
->addresses_best
,
7055 .apply_expected
= true
7059 .expect_release
= true,
7062 .type
= WREPL_TYPE_SGROUP
,
7063 .state
= WREPL_STATE_ACTIVE
,
7064 .node
= WREPL_NODE_B
,
7066 .num_ips
= ctx
->addresses_best_num
,
7067 .ips
= ctx
->addresses_best
,
7068 .apply_expected
= true
7072 * unique,active vs. group,active with different ip(s), release expected
7076 .line
= __location__
,
7077 .name
= _NBT_NAME("_UA_SA_DI_R", 0x00, NULL
),
7081 .num_ips
= ctx
->addresses_best_num
,
7082 .ips
= ctx
->addresses_best
,
7083 .apply_expected
= true
7087 .expect_release
= true,
7090 .type
= WREPL_TYPE_SGROUP
,
7091 .state
= WREPL_STATE_ACTIVE
,
7092 .node
= WREPL_NODE_B
,
7094 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7095 .ips
= addresses_B_1
,
7096 .apply_expected
= true
7100 * unique,active vs. sgroup,tombstone with same ip(s), unchecked
7104 .line
= __location__
,
7105 .name
= _NBT_NAME("_UA_ST_SI_U", 0x00, NULL
),
7109 .num_ips
= ctx
->addresses_best_num
,
7110 .ips
= ctx
->addresses_best
,
7111 .apply_expected
= true
7117 .type
= WREPL_TYPE_SGROUP
,
7118 .state
= WREPL_STATE_TOMBSTONE
,
7119 .node
= WREPL_NODE_B
,
7121 .num_ips
= ctx
->addresses_best_num
,
7122 .ips
= ctx
->addresses_best
,
7123 .apply_expected
= false
7127 * unique,active vs. sgroup,tombstone with different ip(s), unchecked
7131 .line
= __location__
,
7132 .name
= _NBT_NAME("_UA_ST_DI_U", 0x00, NULL
),
7136 .num_ips
= ctx
->addresses_best_num
,
7137 .ips
= ctx
->addresses_best
,
7138 .apply_expected
= true
7144 .type
= WREPL_TYPE_SGROUP
,
7145 .state
= WREPL_STATE_TOMBSTONE
,
7146 .node
= WREPL_NODE_B
,
7148 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7149 .ips
= addresses_B_1
,
7150 .apply_expected
= false
7154 * unique vs. multi homed section
7157 * unique,active vs. mhomed,active with same ip(s), unchecked
7161 .line
= __location__
,
7162 .name
= _NBT_NAME("_UA_MA_SI_U", 0x00, NULL
),
7166 .num_ips
= ctx
->addresses_best_num
,
7167 .ips
= ctx
->addresses_best
,
7168 .apply_expected
= true
7174 .type
= WREPL_TYPE_MHOMED
,
7175 .state
= WREPL_STATE_ACTIVE
,
7176 .node
= WREPL_NODE_B
,
7178 .num_ips
= ctx
->addresses_best_num
,
7179 .ips
= ctx
->addresses_best
,
7180 .apply_expected
= true
7184 * unique,active vs. mhomed,active with superset ip(s), unchecked
7188 .line
= __location__
,
7189 .name
= _NBT_NAME("_UA_MA_SP_U", 0x00, NULL
),
7193 .num_ips
= ctx
->addresses_best_num
,
7194 .ips
= ctx
->addresses_best
,
7195 .apply_expected
= true
7201 .type
= WREPL_TYPE_MHOMED
,
7202 .state
= WREPL_STATE_ACTIVE
,
7203 .node
= WREPL_NODE_B
,
7205 .num_ips
= ctx
->addresses_all_num
,
7206 .ips
= ctx
->addresses_all
,
7207 .apply_expected
= true
7211 * unique,active vs. mhomed,active with different ip(s), positive response
7215 .line
= __location__
,
7216 .name
= _NBT_NAME("_UA_MA_DI_P", 0x00, NULL
),
7220 .num_ips
= ctx
->addresses_best_num
,
7221 .ips
= ctx
->addresses_best
,
7222 .apply_expected
= true
7229 .type
= WREPL_TYPE_MHOMED
,
7230 .state
= WREPL_STATE_ACTIVE
,
7231 .node
= WREPL_NODE_B
,
7233 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7234 .ips
= addresses_B_3_4
,
7235 .apply_expected
= false
7239 * unique,active vs. mhomed,active with different ip(s), positive response other ips
7243 .line
= __location__
,
7244 .name
= _NBT_NAME("_UA_MA_DI_O", 0x00, NULL
),
7248 .num_ips
= ctx
->addresses_best_num
,
7249 .ips
= ctx
->addresses_best
,
7250 .apply_expected
= true
7255 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
7256 .ips
= addresses_A_3_4
,
7259 .type
= WREPL_TYPE_MHOMED
,
7260 .state
= WREPL_STATE_ACTIVE
,
7261 .node
= WREPL_NODE_B
,
7263 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7264 .ips
= addresses_B_3_4
,
7265 .apply_expected
= false
7269 * unique,active vs. mhomed,active with different ip(s), negative response
7273 .line
= __location__
,
7274 .name
= _NBT_NAME("_UA_MA_DI_N", 0x00, NULL
),
7278 .num_ips
= ctx
->addresses_best_num
,
7279 .ips
= ctx
->addresses_best
,
7280 .apply_expected
= true
7287 .type
= WREPL_TYPE_MHOMED
,
7288 .state
= WREPL_STATE_ACTIVE
,
7289 .node
= WREPL_NODE_B
,
7291 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7292 .ips
= addresses_B_3_4
,
7293 .apply_expected
= true
7297 * unique,active vs. mhomed,tombstone with same ip(s), unchecked
7301 .line
= __location__
,
7302 .name
= _NBT_NAME("_UA_MT_SI_U", 0x00, NULL
),
7306 .num_ips
= ctx
->addresses_best_num
,
7307 .ips
= ctx
->addresses_best
,
7308 .apply_expected
= true
7314 .type
= WREPL_TYPE_MHOMED
,
7315 .state
= WREPL_STATE_TOMBSTONE
,
7316 .node
= WREPL_NODE_B
,
7318 .num_ips
= ctx
->addresses_best_num
,
7319 .ips
= ctx
->addresses_best
,
7320 .apply_expected
= false
7324 * unique,active vs. mhomed,tombstone with different ip(s), unchecked
7328 .line
= __location__
,
7329 .name
= _NBT_NAME("_UA_MT_DI_U", 0x00, NULL
),
7333 .num_ips
= ctx
->addresses_best_num
,
7334 .ips
= ctx
->addresses_best
,
7335 .apply_expected
= true
7341 .type
= WREPL_TYPE_MHOMED
,
7342 .state
= WREPL_STATE_TOMBSTONE
,
7343 .node
= WREPL_NODE_B
,
7345 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7346 .ips
= addresses_B_3_4
,
7347 .apply_expected
= false
7351 * normal group vs. unique section
7354 * group,active vs. unique,active with same ip(s), unchecked
7358 .line
= __location__
,
7359 .name
= _NBT_NAME("_GA_UA_SI_U", 0x00, NULL
),
7361 .nb_flags
= NBT_NM_GROUP
,
7363 .num_ips
= ctx
->addresses_best_num
,
7364 .ips
= ctx
->addresses_best
,
7365 .apply_expected
= true
7371 .type
= WREPL_TYPE_UNIQUE
,
7372 .state
= WREPL_STATE_ACTIVE
,
7373 .node
= WREPL_NODE_B
,
7375 .num_ips
= ctx
->addresses_best_num
,
7376 .ips
= ctx
->addresses_best
,
7377 .apply_expected
= false
7381 * group,active vs. unique,active with different ip(s), unchecked
7385 .line
= __location__
,
7386 .name
= _NBT_NAME("_GA_UA_DI_U", 0x00, NULL
),
7388 .nb_flags
= NBT_NM_GROUP
,
7390 .num_ips
= ctx
->addresses_best_num
,
7391 .ips
= ctx
->addresses_best
,
7392 .apply_expected
= true
7398 .type
= WREPL_TYPE_UNIQUE
,
7399 .state
= WREPL_STATE_ACTIVE
,
7400 .node
= WREPL_NODE_B
,
7402 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7403 .ips
= addresses_B_1
,
7404 .apply_expected
= false
7408 * group,active vs. unique,tombstone with same ip(s), unchecked
7412 .line
= __location__
,
7413 .name
= _NBT_NAME("_GA_UT_SI_U", 0x00, NULL
),
7415 .nb_flags
= NBT_NM_GROUP
,
7417 .num_ips
= ctx
->addresses_best_num
,
7418 .ips
= ctx
->addresses_best
,
7419 .apply_expected
= true
7425 .type
= WREPL_TYPE_UNIQUE
,
7426 .state
= WREPL_STATE_TOMBSTONE
,
7427 .node
= WREPL_NODE_B
,
7429 .num_ips
= ctx
->addresses_best_num
,
7430 .ips
= ctx
->addresses_best
,
7431 .apply_expected
= false
7435 * group,active vs. unique,tombstone with different ip(s), unchecked
7439 .line
= __location__
,
7440 .name
= _NBT_NAME("_GA_UT_DI_U", 0x00, NULL
),
7442 .nb_flags
= NBT_NM_GROUP
,
7444 .num_ips
= ctx
->addresses_best_num
,
7445 .ips
= ctx
->addresses_best
,
7446 .apply_expected
= true
7452 .type
= WREPL_TYPE_UNIQUE
,
7453 .state
= WREPL_STATE_TOMBSTONE
,
7454 .node
= WREPL_NODE_B
,
7456 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7457 .ips
= addresses_B_1
,
7458 .apply_expected
= false
7462 * normal group vs. normal group section
7465 * group,active vs. group,active with same ip(s), unchecked
7469 .line
= __location__
,
7470 .name
= _NBT_NAME("_GA_GA_SI_U", 0x00, NULL
),
7472 .nb_flags
= NBT_NM_GROUP
,
7474 .num_ips
= ctx
->addresses_best_num
,
7475 .ips
= ctx
->addresses_best
,
7476 .apply_expected
= true
7482 .type
= WREPL_TYPE_GROUP
,
7483 .state
= WREPL_STATE_ACTIVE
,
7484 .node
= WREPL_NODE_B
,
7486 .num_ips
= ctx
->addresses_best_num
,
7487 .ips
= ctx
->addresses_best
,
7488 .apply_expected
= true
7492 * group,active vs. group,active with different ip(s), unchecked
7496 .line
= __location__
,
7497 .name
= _NBT_NAME("_GA_GA_DI_U", 0x00, NULL
),
7499 .nb_flags
= NBT_NM_GROUP
,
7501 .num_ips
= ctx
->addresses_best_num
,
7502 .ips
= ctx
->addresses_best
,
7503 .apply_expected
= true
7509 .type
= WREPL_TYPE_GROUP
,
7510 .state
= WREPL_STATE_ACTIVE
,
7511 .node
= WREPL_NODE_B
,
7513 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7514 .ips
= addresses_B_1
,
7515 .apply_expected
= true
7519 * group,active vs. group,tombstone with same ip(s), unchecked
7523 .line
= __location__
,
7524 .name
= _NBT_NAME("_GA_GT_SI_U", 0x00, NULL
),
7526 .nb_flags
= NBT_NM_GROUP
,
7528 .num_ips
= ctx
->addresses_best_num
,
7529 .ips
= ctx
->addresses_best
,
7530 .apply_expected
= true
7536 .type
= WREPL_TYPE_GROUP
,
7537 .state
= WREPL_STATE_TOMBSTONE
,
7538 .node
= WREPL_NODE_B
,
7540 .num_ips
= ctx
->addresses_best_num
,
7541 .ips
= ctx
->addresses_best
,
7542 .apply_expected
= false
7546 * group,active vs. group,tombstone with different ip(s), unchecked
7550 .line
= __location__
,
7551 .name
= _NBT_NAME("_GA_GT_DI_U", 0x00, NULL
),
7553 .nb_flags
= NBT_NM_GROUP
,
7555 .num_ips
= ctx
->addresses_best_num
,
7556 .ips
= ctx
->addresses_best
,
7557 .apply_expected
= true
7563 .type
= WREPL_TYPE_GROUP
,
7564 .state
= WREPL_STATE_TOMBSTONE
,
7565 .node
= WREPL_NODE_B
,
7567 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7568 .ips
= addresses_B_1
,
7569 .apply_expected
= false
7573 * normal group vs. special group section
7576 * group,active vs. sgroup,active with same ip(s), unchecked
7580 .line
= __location__
,
7581 .name
= _NBT_NAME("_GA_SA_SI_U", 0x00, NULL
),
7583 .nb_flags
= NBT_NM_GROUP
,
7585 .num_ips
= ctx
->addresses_best_num
,
7586 .ips
= ctx
->addresses_best
,
7587 .apply_expected
= true
7593 .type
= WREPL_TYPE_SGROUP
,
7594 .state
= WREPL_STATE_ACTIVE
,
7595 .node
= WREPL_NODE_B
,
7597 .num_ips
= ctx
->addresses_best_num
,
7598 .ips
= ctx
->addresses_best
,
7599 .apply_expected
= false
7603 * group,active vs. sgroup,active with different ip(s), unchecked
7607 .line
= __location__
,
7608 .name
= _NBT_NAME("_GA_SA_DI_U", 0x00, NULL
),
7610 .nb_flags
= NBT_NM_GROUP
,
7612 .num_ips
= ctx
->addresses_best_num
,
7613 .ips
= ctx
->addresses_best
,
7614 .apply_expected
= true
7620 .type
= WREPL_TYPE_SGROUP
,
7621 .state
= WREPL_STATE_ACTIVE
,
7622 .node
= WREPL_NODE_B
,
7624 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7625 .ips
= addresses_B_3_4
,
7626 .apply_expected
= false
7630 * group,active vs. sgroup,tombstone with same ip(s), unchecked
7634 .line
= __location__
,
7635 .name
= _NBT_NAME("_GA_ST_SI_U", 0x00, NULL
),
7637 .nb_flags
= NBT_NM_GROUP
,
7639 .num_ips
= ctx
->addresses_best_num
,
7640 .ips
= ctx
->addresses_best
,
7641 .apply_expected
= true
7647 .type
= WREPL_TYPE_SGROUP
,
7648 .state
= WREPL_STATE_TOMBSTONE
,
7649 .node
= WREPL_NODE_B
,
7651 .num_ips
= ctx
->addresses_best_num
,
7652 .ips
= ctx
->addresses_best
,
7653 .apply_expected
= false
7657 * group,active vs. sgroup,tombstone with different ip(s), unchecked
7661 .line
= __location__
,
7662 .name
= _NBT_NAME("_GA_ST_DI_U", 0x00, NULL
),
7664 .nb_flags
= NBT_NM_GROUP
,
7666 .num_ips
= ctx
->addresses_best_num
,
7667 .ips
= ctx
->addresses_best
,
7668 .apply_expected
= true
7674 .type
= WREPL_TYPE_SGROUP
,
7675 .state
= WREPL_STATE_TOMBSTONE
,
7676 .node
= WREPL_NODE_B
,
7678 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7679 .ips
= addresses_B_3_4
,
7680 .apply_expected
= false
7684 * normal group vs. multi homed section
7687 * group,active vs. mhomed,active with same ip(s), unchecked
7691 .line
= __location__
,
7692 .name
= _NBT_NAME("_GA_MA_SI_U", 0x00, NULL
),
7694 .nb_flags
= NBT_NM_GROUP
,
7696 .num_ips
= ctx
->addresses_best_num
,
7697 .ips
= ctx
->addresses_best
,
7698 .apply_expected
= true
7704 .type
= WREPL_TYPE_MHOMED
,
7705 .state
= WREPL_STATE_ACTIVE
,
7706 .node
= WREPL_NODE_B
,
7708 .num_ips
= ctx
->addresses_best_num
,
7709 .ips
= ctx
->addresses_best
,
7710 .apply_expected
= false
7714 * group,active vs. mhomed,active with different ip(s), unchecked
7718 .line
= __location__
,
7719 .name
= _NBT_NAME("_GA_MA_DI_U", 0x00, NULL
),
7721 .nb_flags
= NBT_NM_GROUP
,
7723 .num_ips
= ctx
->addresses_best_num
,
7724 .ips
= ctx
->addresses_best
,
7725 .apply_expected
= true
7731 .type
= WREPL_TYPE_MHOMED
,
7732 .state
= WREPL_STATE_ACTIVE
,
7733 .node
= WREPL_NODE_B
,
7735 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7736 .ips
= addresses_B_3_4
,
7737 .apply_expected
= false
7741 * group,active vs. mhomed,tombstone with same ip(s), unchecked
7745 .line
= __location__
,
7746 .name
= _NBT_NAME("_GA_MT_SI_U", 0x00, NULL
),
7748 .nb_flags
= NBT_NM_GROUP
,
7750 .num_ips
= ctx
->addresses_best_num
,
7751 .ips
= ctx
->addresses_best
,
7752 .apply_expected
= true
7758 .type
= WREPL_TYPE_MHOMED
,
7759 .state
= WREPL_STATE_TOMBSTONE
,
7760 .node
= WREPL_NODE_B
,
7762 .num_ips
= ctx
->addresses_best_num
,
7763 .ips
= ctx
->addresses_best
,
7764 .apply_expected
= false
7768 * group,active vs. mhomed,tombstone with different ip(s), unchecked
7772 .line
= __location__
,
7773 .name
= _NBT_NAME("_GA_MT_DI_U", 0x00, NULL
),
7775 .nb_flags
= NBT_NM_GROUP
,
7777 .num_ips
= ctx
->addresses_best_num
,
7778 .ips
= ctx
->addresses_best
,
7779 .apply_expected
= true
7785 .type
= WREPL_TYPE_MHOMED
,
7786 .state
= WREPL_STATE_TOMBSTONE
,
7787 .node
= WREPL_NODE_B
,
7789 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7790 .ips
= addresses_B_3_4
,
7791 .apply_expected
= false
7795 * special group vs. unique section
7798 * sgroup,active vs. unique,active with same ip(s), unchecked
7802 .line
= __location__
,
7803 .name
= _NBT_NAME("_SA_UA_SI_U", 0x1C, NULL
),
7805 .nb_flags
= NBT_NM_GROUP
,
7807 .num_ips
= ctx
->addresses_best_num
,
7808 .ips
= ctx
->addresses_best
,
7809 .apply_expected
= true
7815 .type
= WREPL_TYPE_UNIQUE
,
7816 .state
= WREPL_STATE_ACTIVE
,
7817 .node
= WREPL_NODE_B
,
7819 .num_ips
= ctx
->addresses_best_num
,
7820 .ips
= ctx
->addresses_best
,
7821 .apply_expected
= false
7825 * sgroup,active vs. unique,active with different ip(s), unchecked
7829 .line
= __location__
,
7830 .name
= _NBT_NAME("_SA_UA_DI_U", 0x1C, NULL
),
7832 .nb_flags
= NBT_NM_GROUP
,
7834 .num_ips
= ctx
->addresses_best_num
,
7835 .ips
= ctx
->addresses_best
,
7836 .apply_expected
= true
7842 .type
= WREPL_TYPE_UNIQUE
,
7843 .state
= WREPL_STATE_ACTIVE
,
7844 .node
= WREPL_NODE_B
,
7846 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7847 .ips
= addresses_B_1
,
7848 .apply_expected
= false
7852 * sgroup,active vs. unique,tombstone with same ip(s), unchecked
7856 .line
= __location__
,
7857 .name
= _NBT_NAME("_SA_UT_SI_U", 0x1C, NULL
),
7859 .nb_flags
= NBT_NM_GROUP
,
7861 .num_ips
= ctx
->addresses_best_num
,
7862 .ips
= ctx
->addresses_best
,
7863 .apply_expected
= true
7869 .type
= WREPL_TYPE_UNIQUE
,
7870 .state
= WREPL_STATE_TOMBSTONE
,
7871 .node
= WREPL_NODE_B
,
7873 .num_ips
= ctx
->addresses_best_num
,
7874 .ips
= ctx
->addresses_best
,
7875 .apply_expected
= false
7879 * sgroup,active vs. unique,tombstone with different ip(s), unchecked
7883 .line
= __location__
,
7884 .name
= _NBT_NAME("_SA_UT_DI_U", 0x1C, NULL
),
7886 .nb_flags
= NBT_NM_GROUP
,
7888 .num_ips
= ctx
->addresses_best_num
,
7889 .ips
= ctx
->addresses_best
,
7890 .apply_expected
= true
7896 .type
= WREPL_TYPE_UNIQUE
,
7897 .state
= WREPL_STATE_TOMBSTONE
,
7898 .node
= WREPL_NODE_B
,
7900 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7901 .ips
= addresses_B_1
,
7902 .apply_expected
= false
7906 * special group vs. normal group section
7909 * sgroup,active vs. group,active with same ip(s), unchecked
7913 .line
= __location__
,
7914 .name
= _NBT_NAME("_SA_GA_SI_U", 0x1C, NULL
),
7916 .nb_flags
= NBT_NM_GROUP
,
7918 .num_ips
= ctx
->addresses_best_num
,
7919 .ips
= ctx
->addresses_best
,
7920 .apply_expected
= true
7926 .type
= WREPL_TYPE_GROUP
,
7927 .state
= WREPL_STATE_ACTIVE
,
7928 .node
= WREPL_NODE_B
,
7930 .num_ips
= ctx
->addresses_best_num
,
7931 .ips
= ctx
->addresses_best
,
7932 .apply_expected
= false
7936 * sgroup,active vs. group,active with different ip(s), unchecked
7940 .line
= __location__
,
7941 .name
= _NBT_NAME("_SA_GA_DI_U", 0x1C, NULL
),
7943 .nb_flags
= NBT_NM_GROUP
,
7945 .num_ips
= ctx
->addresses_best_num
,
7946 .ips
= ctx
->addresses_best
,
7947 .apply_expected
= true
7953 .type
= WREPL_TYPE_GROUP
,
7954 .state
= WREPL_STATE_ACTIVE
,
7955 .node
= WREPL_NODE_B
,
7957 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7958 .ips
= addresses_B_1
,
7959 .apply_expected
= false
7963 * sgroup,active vs. group,tombstone with same ip(s), unchecked
7967 .line
= __location__
,
7968 .name
= _NBT_NAME("_SA_GT_SI_U", 0x1C, NULL
),
7970 .nb_flags
= NBT_NM_GROUP
,
7972 .num_ips
= ctx
->addresses_best_num
,
7973 .ips
= ctx
->addresses_best
,
7974 .apply_expected
= true
7980 .type
= WREPL_TYPE_GROUP
,
7981 .state
= WREPL_STATE_TOMBSTONE
,
7982 .node
= WREPL_NODE_B
,
7984 .num_ips
= ctx
->addresses_best_num
,
7985 .ips
= ctx
->addresses_best
,
7986 .apply_expected
= false
7990 * sgroup,active vs. group,tombstone with different ip(s), unchecked
7994 .line
= __location__
,
7995 .name
= _NBT_NAME("_SA_GT_DI_U", 0x1C, NULL
),
7997 .nb_flags
= NBT_NM_GROUP
,
7999 .num_ips
= ctx
->addresses_best_num
,
8000 .ips
= ctx
->addresses_best
,
8001 .apply_expected
= true
8007 .type
= WREPL_TYPE_GROUP
,
8008 .state
= WREPL_STATE_TOMBSTONE
,
8009 .node
= WREPL_NODE_B
,
8011 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8012 .ips
= addresses_B_1
,
8013 .apply_expected
= false
8017 * special group vs. multi homed section
8020 * sgroup,active vs. mhomed,active with same ip(s), unchecked
8024 .line
= __location__
,
8025 .name
= _NBT_NAME("_SA_MA_SI_U", 0x1C, NULL
),
8027 .nb_flags
= NBT_NM_GROUP
,
8029 .num_ips
= ctx
->addresses_best_num
,
8030 .ips
= ctx
->addresses_best
,
8031 .apply_expected
= true
8037 .type
= WREPL_TYPE_MHOMED
,
8038 .state
= WREPL_STATE_ACTIVE
,
8039 .node
= WREPL_NODE_B
,
8041 .num_ips
= ctx
->addresses_best_num
,
8042 .ips
= ctx
->addresses_best
,
8043 .apply_expected
= false
8047 * sgroup,active vs. mhomed,active with different ip(s), unchecked
8051 .line
= __location__
,
8052 .name
= _NBT_NAME("_SA_MA_DI_U", 0x1C, NULL
),
8054 .nb_flags
= NBT_NM_GROUP
,
8056 .num_ips
= ctx
->addresses_best_num
,
8057 .ips
= ctx
->addresses_best
,
8058 .apply_expected
= true
8064 .type
= WREPL_TYPE_MHOMED
,
8065 .state
= WREPL_STATE_ACTIVE
,
8066 .node
= WREPL_NODE_B
,
8068 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8069 .ips
= addresses_B_1
,
8070 .apply_expected
= false
8074 * sgroup,active vs. mhomed,tombstone with same ip(s), unchecked
8078 .line
= __location__
,
8079 .name
= _NBT_NAME("_SA_MT_SI_U", 0x1C, NULL
),
8081 .nb_flags
= NBT_NM_GROUP
,
8083 .num_ips
= ctx
->addresses_best_num
,
8084 .ips
= ctx
->addresses_best
,
8085 .apply_expected
= true
8091 .type
= WREPL_TYPE_MHOMED
,
8092 .state
= WREPL_STATE_TOMBSTONE
,
8093 .node
= WREPL_NODE_B
,
8095 .num_ips
= ctx
->addresses_best_num
,
8096 .ips
= ctx
->addresses_best
,
8097 .apply_expected
= false
8101 * sgroup,active vs. mhomed,tombstone with different ip(s), unchecked
8105 .line
= __location__
,
8106 .name
= _NBT_NAME("_SA_MT_DI_U", 0x1C, NULL
),
8108 .nb_flags
= NBT_NM_GROUP
,
8110 .num_ips
= ctx
->addresses_best_num
,
8111 .ips
= ctx
->addresses_best
,
8112 .apply_expected
= true
8118 .type
= WREPL_TYPE_MHOMED
,
8119 .state
= WREPL_STATE_TOMBSTONE
,
8120 .node
= WREPL_NODE_B
,
8122 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8123 .ips
= addresses_B_1
,
8124 .apply_expected
= false
8128 * multi homed vs. unique section
8131 * mhomed,active vs. unique,active with same ip(s), unchecked
8135 .line
= __location__
,
8136 .name
= _NBT_NAME("_MA_UA_SI_U", 0x00, NULL
),
8140 .num_ips
= ctx
->addresses_best_num
,
8141 .ips
= ctx
->addresses_best
,
8142 .apply_expected
= true
8148 .type
= WREPL_TYPE_UNIQUE
,
8149 .state
= WREPL_STATE_ACTIVE
,
8150 .node
= WREPL_NODE_B
,
8152 .num_ips
= ctx
->addresses_best_num
,
8153 .ips
= ctx
->addresses_best
,
8154 .apply_expected
= true
8158 * mhomed,active vs. unique,active with different ip(s), positive response
8162 .line
= __location__
,
8163 .name
= _NBT_NAME("_MA_UA_DI_P", 0x00, NULL
),
8167 .num_ips
= ctx
->addresses_best_num
,
8168 .ips
= ctx
->addresses_best
,
8169 .apply_expected
= true
8176 .type
= WREPL_TYPE_UNIQUE
,
8177 .state
= WREPL_STATE_ACTIVE
,
8178 .node
= WREPL_NODE_B
,
8180 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8181 .ips
= addresses_B_1
,
8182 .apply_expected
= false
8186 * mhomed,active vs. unique,active with different ip(s), positive response other ips
8190 .line
= __location__
,
8191 .name
= _NBT_NAME("_MA_UA_DI_O", 0x00, NULL
),
8195 .num_ips
= ctx
->addresses_best_num
,
8196 .ips
= ctx
->addresses_best
,
8197 .apply_expected
= true
8202 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
8203 .ips
= addresses_A_3_4
,
8206 .type
= WREPL_TYPE_UNIQUE
,
8207 .state
= WREPL_STATE_ACTIVE
,
8208 .node
= WREPL_NODE_B
,
8210 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8211 .ips
= addresses_B_1
,
8212 .apply_expected
= false
8216 * mhomed,active vs. unique,active with different ip(s), negative response
8220 .line
= __location__
,
8221 .name
= _NBT_NAME("_MA_UA_DI_N", 0x00, NULL
),
8225 .num_ips
= ctx
->addresses_best_num
,
8226 .ips
= ctx
->addresses_best
,
8227 .apply_expected
= true
8234 .type
= WREPL_TYPE_UNIQUE
,
8235 .state
= WREPL_STATE_ACTIVE
,
8236 .node
= WREPL_NODE_B
,
8238 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8239 .ips
= addresses_B_1
,
8240 .apply_expected
= true
8244 * mhomed,active vs. unique,tombstone with same ip(s), unchecked
8248 .line
= __location__
,
8249 .name
= _NBT_NAME("_MA_UT_SI_U", 0x00, NULL
),
8253 .num_ips
= ctx
->addresses_best_num
,
8254 .ips
= ctx
->addresses_best
,
8255 .apply_expected
= true
8261 .type
= WREPL_TYPE_UNIQUE
,
8262 .state
= WREPL_STATE_TOMBSTONE
,
8263 .node
= WREPL_NODE_B
,
8265 .num_ips
= ctx
->addresses_best_num
,
8266 .ips
= ctx
->addresses_best
,
8267 .apply_expected
= false
8271 * mhomed,active vs. unique,tombstone with different ip(s), unchecked
8275 .line
= __location__
,
8276 .name
= _NBT_NAME("_MA_UT_DI_U", 0x00, NULL
),
8280 .num_ips
= ctx
->addresses_best_num
,
8281 .ips
= ctx
->addresses_best
,
8282 .apply_expected
= true
8288 .type
= WREPL_TYPE_UNIQUE
,
8289 .state
= WREPL_STATE_TOMBSTONE
,
8290 .node
= WREPL_NODE_B
,
8292 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8293 .ips
= addresses_B_1
,
8294 .apply_expected
= false
8298 * multi homed vs. normal group section
8301 * mhomed,active vs. group,active with same ip(s), release expected
8305 .line
= __location__
,
8306 .name
= _NBT_NAME("_MA_GA_SI_R", 0x00, NULL
),
8310 .num_ips
= ctx
->addresses_best_num
,
8311 .ips
= ctx
->addresses_best
,
8312 .apply_expected
= true
8316 .expect_release
= true,
8319 .type
= WREPL_TYPE_GROUP
,
8320 .state
= WREPL_STATE_ACTIVE
,
8321 .node
= WREPL_NODE_B
,
8323 .num_ips
= ctx
->addresses_best_num
,
8324 .ips
= ctx
->addresses_best
,
8325 .apply_expected
= true
8329 * mhomed,active vs. group,active with different ip(s), release expected
8333 .line
= __location__
,
8334 .name
= _NBT_NAME("_MA_GA_DI_R", 0x00, NULL
),
8338 .num_ips
= ctx
->addresses_best_num
,
8339 .ips
= ctx
->addresses_best
,
8340 .apply_expected
= true
8344 .expect_release
= true,
8347 .type
= WREPL_TYPE_GROUP
,
8348 .state
= WREPL_STATE_ACTIVE
,
8349 .node
= WREPL_NODE_B
,
8351 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8352 .ips
= addresses_B_1
,
8353 .apply_expected
= true
8357 * mhomed,active vs. group,tombstone with same ip(s), unchecked
8361 .line
= __location__
,
8362 .name
= _NBT_NAME("_MA_GT_SI_U", 0x00, NULL
),
8366 .num_ips
= ctx
->addresses_best_num
,
8367 .ips
= ctx
->addresses_best
,
8368 .apply_expected
= true
8374 .type
= WREPL_TYPE_GROUP
,
8375 .state
= WREPL_STATE_TOMBSTONE
,
8376 .node
= WREPL_NODE_B
,
8378 .num_ips
= ctx
->addresses_best_num
,
8379 .ips
= ctx
->addresses_best
,
8380 .apply_expected
= false
8384 * mhomed,active vs. group,tombstone with different ip(s), unchecked
8388 .line
= __location__
,
8389 .name
= _NBT_NAME("_MA_GT_DI_U", 0x00, NULL
),
8393 .num_ips
= ctx
->addresses_best_num
,
8394 .ips
= ctx
->addresses_best
,
8395 .apply_expected
= true
8401 .type
= WREPL_TYPE_GROUP
,
8402 .state
= WREPL_STATE_TOMBSTONE
,
8403 .node
= WREPL_NODE_B
,
8405 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8406 .ips
= addresses_B_1
,
8407 .apply_expected
= false
8411 * multi homed vs. special group section
8414 * mhomed,active vs. sgroup,active with same ip(s), release expected
8418 .line
= __location__
,
8419 .name
= _NBT_NAME("_MA_SA_SI_R", 0x00, NULL
),
8423 .num_ips
= ctx
->addresses_best_num
,
8424 .ips
= ctx
->addresses_best
,
8425 .apply_expected
= true
8429 .expect_release
= true,
8432 .type
= WREPL_TYPE_SGROUP
,
8433 .state
= WREPL_STATE_ACTIVE
,
8434 .node
= WREPL_NODE_B
,
8436 .num_ips
= ctx
->addresses_best_num
,
8437 .ips
= ctx
->addresses_best
,
8438 .apply_expected
= true
8442 * mhomed,active vs. group,active with different ip(s), release expected
8446 .line
= __location__
,
8447 .name
= _NBT_NAME("_MA_SA_DI_R", 0x00, NULL
),
8451 .num_ips
= ctx
->addresses_best_num
,
8452 .ips
= ctx
->addresses_best
,
8453 .apply_expected
= true
8457 .expect_release
= true,
8460 .type
= WREPL_TYPE_SGROUP
,
8461 .state
= WREPL_STATE_ACTIVE
,
8462 .node
= WREPL_NODE_B
,
8464 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8465 .ips
= addresses_B_1
,
8466 .apply_expected
= true
8470 * mhomed,active vs. sgroup,tombstone with same ip(s), unchecked
8474 .line
= __location__
,
8475 .name
= _NBT_NAME("_MA_ST_SI_U", 0x00, NULL
),
8479 .num_ips
= ctx
->addresses_best_num
,
8480 .ips
= ctx
->addresses_best
,
8481 .apply_expected
= true
8487 .type
= WREPL_TYPE_SGROUP
,
8488 .state
= WREPL_STATE_TOMBSTONE
,
8489 .node
= WREPL_NODE_B
,
8491 .num_ips
= ctx
->addresses_best_num
,
8492 .ips
= ctx
->addresses_best
,
8493 .apply_expected
= false
8497 * mhomed,active vs. sgroup,tombstone with different ip(s), unchecked
8501 .line
= __location__
,
8502 .name
= _NBT_NAME("_MA_ST_DI_U", 0x00, NULL
),
8506 .num_ips
= ctx
->addresses_best_num
,
8507 .ips
= ctx
->addresses_best
,
8508 .apply_expected
= true
8514 .type
= WREPL_TYPE_SGROUP
,
8515 .state
= WREPL_STATE_TOMBSTONE
,
8516 .node
= WREPL_NODE_B
,
8518 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8519 .ips
= addresses_B_1
,
8520 .apply_expected
= false
8524 * multi homed vs. multi homed section
8527 * mhomed,active vs. mhomed,active with same ip(s), unchecked
8531 .line
= __location__
,
8532 .name
= _NBT_NAME("_MA_MA_SI_U", 0x00, NULL
),
8536 .num_ips
= ctx
->addresses_best_num
,
8537 .ips
= ctx
->addresses_best
,
8538 .apply_expected
= true
8544 .type
= WREPL_TYPE_MHOMED
,
8545 .state
= WREPL_STATE_ACTIVE
,
8546 .node
= WREPL_NODE_B
,
8548 .num_ips
= ctx
->addresses_best_num
,
8549 .ips
= ctx
->addresses_best
,
8550 .apply_expected
= true
8554 * mhomed,active vs. mhomed,active with superset ip(s), unchecked
8558 .line
= __location__
,
8559 .name
= _NBT_NAME("_MA_MA_SP_U", 0x00, NULL
),
8563 .num_ips
= ctx
->addresses_best_num
,
8564 .ips
= ctx
->addresses_best
,
8565 .apply_expected
= true
8571 .type
= WREPL_TYPE_MHOMED
,
8572 .state
= WREPL_STATE_ACTIVE
,
8573 .node
= WREPL_NODE_B
,
8575 .num_ips
= ctx
->addresses_all_num
,
8576 .ips
= ctx
->addresses_all
,
8577 .apply_expected
= true
8581 * mhomed,active vs. mhomed,active with different ip(s), positive response
8585 .line
= __location__
,
8586 .name
= _NBT_NAME("_MA_MA_DI_P", 0x00, NULL
),
8590 .num_ips
= ctx
->addresses_best_num
,
8591 .ips
= ctx
->addresses_best
,
8592 .apply_expected
= true
8599 .type
= WREPL_TYPE_MHOMED
,
8600 .state
= WREPL_STATE_ACTIVE
,
8601 .node
= WREPL_NODE_B
,
8603 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8604 .ips
= addresses_B_3_4
,
8605 .apply_expected
= false
8609 * mhomed,active vs. mhomed,active with different ip(s), positive response other ips
8613 .line
= __location__
,
8614 .name
= _NBT_NAME("_MA_MA_DI_O", 0x00, NULL
),
8618 .num_ips
= ctx
->addresses_best_num
,
8619 .ips
= ctx
->addresses_best
,
8620 .apply_expected
= true
8625 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
8626 .ips
= addresses_A_3_4
,
8629 .type
= WREPL_TYPE_MHOMED
,
8630 .state
= WREPL_STATE_ACTIVE
,
8631 .node
= WREPL_NODE_B
,
8633 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8634 .ips
= addresses_B_3_4
,
8635 .apply_expected
= false
8639 * mhomed,active vs. mhomed,active with different ip(s), negative response
8643 .line
= __location__
,
8644 .name
= _NBT_NAME("_MA_MA_DI_N", 0x00, NULL
),
8648 .num_ips
= ctx
->addresses_best_num
,
8649 .ips
= ctx
->addresses_best
,
8650 .apply_expected
= true
8657 .type
= WREPL_TYPE_MHOMED
,
8658 .state
= WREPL_STATE_ACTIVE
,
8659 .node
= WREPL_NODE_B
,
8661 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8662 .ips
= addresses_B_3_4
,
8663 .apply_expected
= true
8667 * mhomed,active vs. mhomed,tombstone with same ip(s), unchecked
8671 .line
= __location__
,
8672 .name
= _NBT_NAME("_MA_MT_SI_U", 0x00, NULL
),
8676 .num_ips
= ctx
->addresses_best_num
,
8677 .ips
= ctx
->addresses_best
,
8678 .apply_expected
= true
8684 .type
= WREPL_TYPE_MHOMED
,
8685 .state
= WREPL_STATE_TOMBSTONE
,
8686 .node
= WREPL_NODE_B
,
8688 .num_ips
= ctx
->addresses_best_num
,
8689 .ips
= ctx
->addresses_best
,
8690 .apply_expected
= false
8694 * mhomed,active vs. mhomed,tombstone with different ip(s), unchecked
8698 .line
= __location__
,
8699 .name
= _NBT_NAME("_MA_MT_DI_U", 0x00, NULL
),
8703 .num_ips
= ctx
->addresses_best_num
,
8704 .ips
= ctx
->addresses_best
,
8705 .apply_expected
= true
8711 .type
= WREPL_TYPE_MHOMED
,
8712 .state
= WREPL_STATE_TOMBSTONE
,
8713 .node
= WREPL_NODE_B
,
8715 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8716 .ips
= addresses_B_3_4
,
8717 .apply_expected
= false
8721 * some more multi homed test, including merging
8724 * mhomed,active vs. mhomed,active with superset ip(s), unchecked
8728 .line
= __location__
,
8729 .section
= "Test Replica vs. owned active: some more MHOMED combinations",
8730 .name
= _NBT_NAME("_MA_MA_SP_U", 0x00, NULL
),
8731 .comment
= "C:MHOMED vs. B:ALL => B:ALL",
8732 .skip
= (ctx
->addresses_all_num
< 3),
8736 .num_ips
= ctx
->addresses_mhomed_num
,
8737 .ips
= ctx
->addresses_mhomed
,
8738 .apply_expected
= true
8744 .type
= WREPL_TYPE_MHOMED
,
8745 .state
= WREPL_STATE_ACTIVE
,
8746 .node
= WREPL_NODE_B
,
8748 .num_ips
= ctx
->addresses_all_num
,
8749 .ips
= ctx
->addresses_all
,
8750 .apply_expected
= true
8754 * mhomed,active vs. mhomed,active with same ips, unchecked
8758 .line
= __location__
,
8759 .name
= _NBT_NAME("_MA_MA_SM_U", 0x00, NULL
),
8760 .comment
= "C:MHOMED vs. B:MHOMED => B:MHOMED",
8761 .skip
= (ctx
->addresses_mhomed_num
< 2),
8765 .num_ips
= ctx
->addresses_mhomed_num
,
8766 .ips
= ctx
->addresses_mhomed
,
8767 .apply_expected
= true
8773 .type
= WREPL_TYPE_MHOMED
,
8774 .state
= WREPL_STATE_ACTIVE
,
8775 .node
= WREPL_NODE_B
,
8777 .num_ips
= ctx
->addresses_mhomed_num
,
8778 .ips
= ctx
->addresses_mhomed
,
8779 .apply_expected
= true
8783 * mhomed,active vs. mhomed,active with subset ip(s), positive response
8787 .line
= __location__
,
8788 .name
= _NBT_NAME("_MA_MA_SB_P", 0x00, NULL
),
8789 .comment
= "C:MHOMED vs. B:BEST (C:MHOMED) => B:MHOMED",
8790 .skip
= (ctx
->addresses_mhomed_num
< 2),
8794 .num_ips
= ctx
->addresses_mhomed_num
,
8795 .ips
= ctx
->addresses_mhomed
,
8796 .apply_expected
= true
8803 .type
= WREPL_TYPE_MHOMED
,
8804 .state
= WREPL_STATE_ACTIVE
,
8805 .node
= WREPL_NODE_B
,
8807 .num_ips
= ctx
->addresses_best_num
,
8808 .ips
= ctx
->addresses_best
,
8809 .mhomed_merge
= true
8813 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with all addresses
8817 .line
= __location__
,
8818 .name
= _NBT_NAME("_MA_MA_SB_A", 0x00, NULL
),
8819 .comment
= "C:MHOMED vs. B:BEST (C:ALL) => B:MHOMED",
8820 .skip
= (ctx
->addresses_all_num
< 3),
8824 .num_ips
= ctx
->addresses_mhomed_num
,
8825 .ips
= ctx
->addresses_mhomed
,
8826 .apply_expected
= true
8831 .num_ips
= ctx
->addresses_all_num
,
8832 .ips
= ctx
->addresses_all
,
8835 .type
= WREPL_TYPE_MHOMED
,
8836 .state
= WREPL_STATE_ACTIVE
,
8837 .node
= WREPL_NODE_B
,
8839 .num_ips
= ctx
->addresses_best_num
,
8840 .ips
= ctx
->addresses_best
,
8841 .mhomed_merge
= true
8845 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with replicas addresses
8846 * TODO: check why the server sends a name release demand for one address?
8847 * the release demand has no effect to the database record...
8851 .line
= __location__
,
8852 .name
= _NBT_NAME("_MA_MA_SB_PRA", 0x00, NULL
),
8853 .comment
= "C:MHOMED vs. B:BEST (C:BEST) => C:MHOMED",
8854 .skip
= (ctx
->addresses_all_num
< 2),
8858 .num_ips
= ctx
->addresses_mhomed_num
,
8859 .ips
= ctx
->addresses_mhomed
,
8860 .apply_expected
= true
8865 .num_ips
= ctx
->addresses_best_num
,
8866 .ips
= ctx
->addresses_best
,
8867 .late_release
= true
8870 .type
= WREPL_TYPE_MHOMED
,
8871 .state
= WREPL_STATE_ACTIVE
,
8872 .node
= WREPL_NODE_B
,
8874 .num_ips
= ctx
->addresses_best_num
,
8875 .ips
= ctx
->addresses_best
,
8876 .apply_expected
= false
8880 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with other addresses
8884 .line
= __location__
,
8885 .name
= _NBT_NAME("_MA_MA_SB_O", 0x00, NULL
),
8886 .comment
= "C:MHOMED vs. B:BEST (B:B_3_4) =>C:MHOMED",
8887 .skip
= (ctx
->addresses_all_num
< 2),
8891 .num_ips
= ctx
->addresses_mhomed_num
,
8892 .ips
= ctx
->addresses_mhomed
,
8893 .apply_expected
= true
8898 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8899 .ips
= addresses_B_3_4
,
8902 .type
= WREPL_TYPE_MHOMED
,
8903 .state
= WREPL_STATE_ACTIVE
,
8904 .node
= WREPL_NODE_B
,
8906 .num_ips
= ctx
->addresses_best_num
,
8907 .ips
= ctx
->addresses_best
,
8908 .apply_expected
= false
8912 * mhomed,active vs. mhomed,active with subset ip(s), negative response
8916 .line
= __location__
,
8917 .name
= _NBT_NAME("_MA_MA_SB_N", 0x00, NULL
),
8918 .comment
= "C:MHOMED vs. B:BEST (NEGATIVE) => B:BEST",
8919 .skip
= (ctx
->addresses_mhomed_num
< 2),
8923 .num_ips
= ctx
->addresses_mhomed_num
,
8924 .ips
= ctx
->addresses_mhomed
,
8925 .apply_expected
= true
8932 .type
= WREPL_TYPE_MHOMED
,
8933 .state
= WREPL_STATE_ACTIVE
,
8934 .node
= WREPL_NODE_B
,
8936 .num_ips
= ctx
->addresses_best_num
,
8937 .ips
= ctx
->addresses_best
,
8938 .apply_expected
= true
8942 * some more multi homed and unique test, including merging
8945 * mhomed,active vs. unique,active with subset ip(s), positive response
8949 .line
= __location__
,
8950 .section
= "Test Replica vs. owned active: some more UNIQUE,MHOMED combinations",
8951 .name
= _NBT_NAME("_MA_UA_SB_P", 0x00, NULL
),
8952 .comment
= "C:MHOMED vs. B:UNIQUE,BEST (C:MHOMED) => B:MHOMED",
8953 .skip
= (ctx
->addresses_all_num
< 2),
8957 .num_ips
= ctx
->addresses_mhomed_num
,
8958 .ips
= ctx
->addresses_mhomed
,
8959 .apply_expected
= true
8966 .type
= WREPL_TYPE_UNIQUE
,
8967 .state
= WREPL_STATE_ACTIVE
,
8968 .node
= WREPL_NODE_B
,
8970 .num_ips
= ctx
->addresses_best_num
,
8971 .ips
= ctx
->addresses_best
,
8972 .mhomed_merge
= true
8976 * unique,active vs. unique,active with different ip(s), positive response, with replicas address
8977 * TODO: check why the server sends a name release demand for one address?
8978 * the release demand has no effect to the database record...
8982 .line
= __location__
,
8983 .name
= _NBT_NAME("_UA_UA_DI_PRA", 0x00, NULL
),
8984 .comment
= "C:BEST vs. B:BEST2 (C:BEST2,LR:BEST2) => C:BEST",
8985 .skip
= (ctx
->addresses_all_num
< 2),
8989 .num_ips
= ctx
->addresses_best_num
,
8990 .ips
= ctx
->addresses_best
,
8991 .apply_expected
= true
8996 .num_ips
= ctx
->addresses_best2_num
,
8997 .ips
= ctx
->addresses_best2
,
8998 .late_release
= true
9001 .type
= WREPL_TYPE_UNIQUE
,
9002 .state
= WREPL_STATE_ACTIVE
,
9003 .node
= WREPL_NODE_B
,
9005 .num_ips
= ctx
->addresses_best2_num
,
9006 .ips
= ctx
->addresses_best2
,
9007 .apply_expected
= false,
9011 * unique,active vs. unique,active with different ip(s), positive response, with all addresses
9015 .line
= __location__
,
9016 .name
= _NBT_NAME("_UA_UA_DI_A", 0x00, NULL
),
9017 .comment
= "C:BEST vs. B:BEST2 (C:ALL) => B:MHOMED",
9018 .skip
= (ctx
->addresses_all_num
< 3),
9022 .num_ips
= ctx
->addresses_best_num
,
9023 .ips
= ctx
->addresses_best
,
9024 .apply_expected
= true
9029 .num_ips
= ctx
->addresses_all_num
,
9030 .ips
= ctx
->addresses_all
,
9033 .type
= WREPL_TYPE_UNIQUE
,
9034 .state
= WREPL_STATE_ACTIVE
,
9035 .node
= WREPL_NODE_B
,
9037 .num_ips
= ctx
->addresses_best2_num
,
9038 .ips
= ctx
->addresses_best2
,
9039 .mhomed_merge
= true,
9043 * unique,active vs. mhomed,active with different ip(s), positive response, with all addresses
9047 .line
= __location__
,
9048 .name
= _NBT_NAME("_UA_MA_DI_A", 0x00, NULL
),
9049 .comment
= "C:BEST vs. B:BEST2 (C:ALL) => B:MHOMED",
9050 .skip
= (ctx
->addresses_all_num
< 3),
9054 .num_ips
= ctx
->addresses_best_num
,
9055 .ips
= ctx
->addresses_best
,
9056 .apply_expected
= true
9061 .num_ips
= ctx
->addresses_all_num
,
9062 .ips
= ctx
->addresses_all
,
9065 .type
= WREPL_TYPE_MHOMED
,
9066 .state
= WREPL_STATE_ACTIVE
,
9067 .node
= WREPL_NODE_B
,
9069 .num_ips
= ctx
->addresses_best2_num
,
9070 .ips
= ctx
->addresses_best2
,
9071 .mhomed_merge
= true,
9075 * special group vs. special group merging section
9078 * sgroup,active vs. sgroup,active with different ip(s)
9082 .line
= __location__
,
9083 .section
= "Test Replica vs. owned active: SGROUP vs. SGROUP tests",
9084 .name
= _NBT_NAME("_SA_SA_DI_U", 0x1C, NULL
),
9085 .skip
= (ctx
->addresses_all_num
< 3),
9087 .nb_flags
= NBT_NM_GROUP
,
9089 .num_ips
= ctx
->addresses_mhomed_num
,
9090 .ips
= ctx
->addresses_mhomed
,
9091 .apply_expected
= true
9097 .type
= WREPL_TYPE_SGROUP
,
9098 .state
= WREPL_STATE_ACTIVE
,
9099 .node
= WREPL_NODE_B
,
9101 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
9102 .ips
= addresses_B_3_4
,
9103 .sgroup_merge
= true
9107 * sgroup,active vs. sgroup,active with same ip(s)
9111 .line
= __location__
,
9112 .name
= _NBT_NAME("_SA_SA_SI_U", 0x1C, NULL
),
9113 .skip
= (ctx
->addresses_all_num
< 3),
9115 .nb_flags
= NBT_NM_GROUP
,
9117 .num_ips
= ctx
->addresses_mhomed_num
,
9118 .ips
= ctx
->addresses_mhomed
,
9119 .apply_expected
= true
9125 .type
= WREPL_TYPE_SGROUP
,
9126 .state
= WREPL_STATE_ACTIVE
,
9127 .node
= WREPL_NODE_B
,
9129 .num_ips
= ctx
->addresses_mhomed_num
,
9130 .ips
= ctx
->addresses_mhomed
,
9131 .sgroup_merge
= true
9135 * sgroup,active vs. sgroup,active with superset ip(s)
9139 .line
= __location__
,
9140 .name
= _NBT_NAME("_SA_SA_SP_U", 0x1C, NULL
),
9141 .skip
= (ctx
->addresses_all_num
< 3),
9143 .nb_flags
= NBT_NM_GROUP
,
9145 .num_ips
= ctx
->addresses_mhomed_num
,
9146 .ips
= ctx
->addresses_mhomed
,
9147 .apply_expected
= true
9153 .type
= WREPL_TYPE_SGROUP
,
9154 .state
= WREPL_STATE_ACTIVE
,
9155 .node
= WREPL_NODE_B
,
9157 .num_ips
= ctx
->addresses_all_num
,
9158 .ips
= ctx
->addresses_all
,
9159 .sgroup_merge
= true
9163 * sgroup,active vs. sgroup,active with subset ip(s)
9167 .line
= __location__
,
9168 .name
= _NBT_NAME("_SA_SA_SB_U", 0x1C, NULL
),
9169 .skip
= (ctx
->addresses_all_num
< 3),
9171 .nb_flags
= NBT_NM_GROUP
,
9173 .num_ips
= ctx
->addresses_mhomed_num
,
9174 .ips
= ctx
->addresses_mhomed
,
9175 .apply_expected
= true
9181 .type
= WREPL_TYPE_SGROUP
,
9182 .state
= WREPL_STATE_ACTIVE
,
9183 .node
= WREPL_NODE_B
,
9185 .num_ips
= ctx
->addresses_best_num
,
9186 .ips
= ctx
->addresses_best
,
9187 .sgroup_merge
= true
9191 * sgroup,active vs. sgroup,tombstone with different ip(s)
9195 .line
= __location__
,
9196 .name
= _NBT_NAME("_SA_ST_DI_U", 0x1C, NULL
),
9197 .skip
= (ctx
->addresses_all_num
< 3),
9199 .nb_flags
= NBT_NM_GROUP
,
9201 .num_ips
= ctx
->addresses_mhomed_num
,
9202 .ips
= ctx
->addresses_mhomed
,
9203 .apply_expected
= true
9209 .type
= WREPL_TYPE_SGROUP
,
9210 .state
= WREPL_STATE_TOMBSTONE
,
9211 .node
= WREPL_NODE_B
,
9213 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
9214 .ips
= addresses_B_3_4
,
9215 .apply_expected
= false
9219 * sgroup,active vs. sgroup,tombstone with same ip(s)
9223 .line
= __location__
,
9224 .name
= _NBT_NAME("_SA_ST_SI_U", 0x1C, NULL
),
9225 .skip
= (ctx
->addresses_all_num
< 3),
9227 .nb_flags
= NBT_NM_GROUP
,
9229 .num_ips
= ctx
->addresses_mhomed_num
,
9230 .ips
= ctx
->addresses_mhomed
,
9231 .apply_expected
= true
9237 .type
= WREPL_TYPE_SGROUP
,
9238 .state
= WREPL_STATE_TOMBSTONE
,
9239 .node
= WREPL_NODE_B
,
9241 .num_ips
= ctx
->addresses_mhomed_num
,
9242 .ips
= ctx
->addresses_mhomed
,
9243 .apply_expected
= false
9247 * sgroup,active vs. sgroup,tombstone with superset ip(s)
9251 .line
= __location__
,
9252 .name
= _NBT_NAME("_SA_ST_SP_U", 0x1C, NULL
),
9253 .skip
= (ctx
->addresses_all_num
< 3),
9255 .nb_flags
= NBT_NM_GROUP
,
9257 .num_ips
= ctx
->addresses_mhomed_num
,
9258 .ips
= ctx
->addresses_mhomed
,
9259 .apply_expected
= true
9265 .type
= WREPL_TYPE_SGROUP
,
9266 .state
= WREPL_STATE_TOMBSTONE
,
9267 .node
= WREPL_NODE_B
,
9269 .num_ips
= ctx
->addresses_all_num
,
9270 .ips
= ctx
->addresses_all
,
9271 .apply_expected
= false
9275 * sgroup,active vs. sgroup,tombstone with subset ip(s)
9279 .line
= __location__
,
9280 .name
= _NBT_NAME("_SA_ST_SB_U", 0x1C, NULL
),
9281 .skip
= (ctx
->addresses_all_num
< 3),
9283 .nb_flags
= NBT_NM_GROUP
,
9285 .num_ips
= ctx
->addresses_mhomed_num
,
9286 .ips
= ctx
->addresses_mhomed
,
9287 .apply_expected
= true
9293 .type
= WREPL_TYPE_SGROUP
,
9294 .state
= WREPL_STATE_TOMBSTONE
,
9295 .node
= WREPL_NODE_B
,
9297 .num_ips
= ctx
->addresses_best_num
,
9298 .ips
= ctx
->addresses_best
,
9299 .apply_expected
= false
9304 if (!ctx
->nbtsock_srv
) {
9305 torture_comment(tctx
, "SKIP: Test Replica records vs. owned active records: not bound to port[%d]\n",
9306 lpcfg_nbt_port(tctx
->lp_ctx
));
9310 torture_comment(tctx
, "Test Replica records vs. owned active records\n");
9312 for(i
=0; ret
&& i
< ARRAY_SIZE(records
); i
++) {
9314 struct test_conflict_owned_active_vs_replica_struct record
= records
[i
];
9315 uint32_t j
, count
= 1;
9318 if (records
[i
].wins
.mhomed
|| records
[i
].name
.type
== 0x1C) {
9319 count
= records
[i
].wins
.num_ips
;
9322 if (records
[i
].section
) {
9323 torture_comment(tctx
, "%s\n", records
[i
].section
);
9326 if (records
[i
].skip
) {
9327 torture_comment(tctx
, "%s => SKIPPED\n", nbt_name_string(ctx
, &records
[i
].name
));
9331 if (records
[i
].replica
.mhomed_merge
) {
9332 action
= "MHOMED_MERGE";
9333 } else if (records
[i
].replica
.sgroup_merge
) {
9334 action
= "SGROUP_MERGE";
9335 } else if (records
[i
].replica
.apply_expected
) {
9338 action
= "NOT REPLACE";
9341 torture_comment(tctx
, "%s%s%s => %s\n",
9342 nbt_name_string(ctx
, &records
[i
].name
),
9343 (records
[i
].comment
?": ":""),
9344 (records
[i
].comment
?records
[i
].comment
:""),
9347 /* Prepare for multi homed registration */
9348 ZERO_STRUCT(records
[i
].defend
);
9349 records
[i
].defend
.timeout
= 10;
9350 records
[i
].defend
.positive
= true;
9351 nbt_set_incoming_handler(ctx
->nbtsock_srv
,
9352 test_conflict_owned_active_vs_replica_handler
,
9354 if (ctx
->nbtsock_srv2
) {
9355 nbt_set_incoming_handler(ctx
->nbtsock_srv2
,
9356 test_conflict_owned_active_vs_replica_handler
,
9363 for (j
=0; j
< count
; j
++) {
9364 struct nbt_name_request
*req
;
9366 name_register
->in
.name
= records
[i
].name
;
9367 name_register
->in
.dest_addr
= ctx
->address
;
9368 name_register
->in
.dest_port
= lpcfg_nbt_port(tctx
->lp_ctx
);
9369 name_register
->in
.address
= records
[i
].wins
.ips
[j
].ip
;
9370 name_register
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
9371 name_register
->in
.register_demand
= false;
9372 name_register
->in
.broadcast
= false;
9373 name_register
->in
.multi_homed
= records
[i
].wins
.mhomed
;
9374 name_register
->in
.ttl
= 300000;
9375 name_register
->in
.timeout
= 70;
9376 name_register
->in
.retries
= 0;
9378 req
= nbt_name_register_send(ctx
->nbtsock
, name_register
);
9380 /* push the request on the wire */
9381 tevent_loop_once(ctx
->nbtsock
->event_ctx
);
9384 * if we register multiple addresses,
9385 * the server will do name queries to see if the old addresses
9388 if (records
[i
].wins
.mhomed
&& j
> 0) {
9389 end
= timeval_current_ofs(records
[i
].defend
.timeout
,0);
9390 records
[i
].defend
.ret
= true;
9391 while (records
[i
].defend
.timeout
> 0) {
9392 tevent_loop_once(ctx
->nbtsock_srv
->event_ctx
);
9393 if (timeval_expired(&end
)) break;
9395 ret
&= records
[i
].defend
.ret
;
9398 status
= nbt_name_register_recv(req
, ctx
, name_register
);
9399 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
9400 torture_comment(tctx
, "No response from %s for name register\n", ctx
->address
);
9403 if (!NT_STATUS_IS_OK(status
)) {
9404 torture_comment(tctx
, "Bad response from %s for name register - %s\n",
9405 ctx
->address
, nt_errstr(status
));
9408 CHECK_VALUE(tctx
, name_register
->out
.rcode
, 0);
9409 CHECK_VALUE_STRING(tctx
, name_register
->out
.reply_from
, ctx
->address
);
9410 CHECK_VALUE(tctx
, name_register
->out
.name
.type
, records
[i
].name
.type
);
9411 CHECK_VALUE_STRING(tctx
, name_register
->out
.name
.name
, records
[i
].name
.name
);
9412 CHECK_VALUE_STRING(tctx
, name_register
->out
.name
.scope
, records
[i
].name
.scope
);
9413 CHECK_VALUE_STRING(tctx
, name_register
->out
.reply_addr
, records
[i
].wins
.ips
[j
].ip
);
9416 /* Prepare for the current test */
9417 records
[i
].defend
= record
.defend
;
9418 nbt_set_incoming_handler(ctx
->nbtsock_srv
,
9419 test_conflict_owned_active_vs_replica_handler
,
9421 if (ctx
->nbtsock_srv2
) {
9422 nbt_set_incoming_handler(ctx
->nbtsock_srv2
,
9423 test_conflict_owned_active_vs_replica_handler
,
9430 wins_name
->name
= &records
[i
].name
;
9431 wins_name
->flags
= WREPL_NAME_FLAGS(records
[i
].replica
.type
,
9432 records
[i
].replica
.state
,
9433 records
[i
].replica
.node
,
9434 records
[i
].replica
.is_static
);
9435 wins_name
->id
= ++ctx
->b
.max_version
;
9436 if (wins_name
->flags
& 2) {
9437 wins_name
->addresses
.addresses
.num_ips
= records
[i
].replica
.num_ips
;
9438 wins_name
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
9439 records
[i
].replica
.ips
);
9441 wins_name
->addresses
.ip
= records
[i
].replica
.ips
[0].ip
;
9443 wins_name
->unknown
= "255.255.255.255";
9445 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9448 * wait for the name query, which is handled in
9449 * test_conflict_owned_active_vs_replica_handler()
9451 end
= timeval_current_ofs(records
[i
].defend
.timeout
,0);
9452 records
[i
].defend
.ret
= true;
9453 while (records
[i
].defend
.timeout
> 0) {
9454 tevent_loop_once(ctx
->nbtsock_srv
->event_ctx
);
9455 if (timeval_expired(&end
)) break;
9457 ret
&= records
[i
].defend
.ret
;
9459 if (records
[i
].defend
.late_release
) {
9460 records
[i
].defend
= record
.defend
;
9461 records
[i
].defend
.expect_release
= true;
9463 * wait for the name release demand, which is handled in
9464 * test_conflict_owned_active_vs_replica_handler()
9466 end
= timeval_current_ofs(records
[i
].defend
.timeout
,0);
9467 records
[i
].defend
.ret
= true;
9468 while (records
[i
].defend
.timeout
> 0) {
9469 tevent_loop_once(ctx
->nbtsock_srv
->event_ctx
);
9470 if (timeval_expired(&end
)) break;
9472 ret
&= records
[i
].defend
.ret
;
9475 if (records
[i
].replica
.mhomed_merge
) {
9476 ret
&= test_wrepl_mhomed_merged(tctx
, ctx
, &ctx
->c
,
9477 records
[i
].wins
.num_ips
, records
[i
].wins
.ips
,
9479 records
[i
].replica
.num_ips
, records
[i
].replica
.ips
,
9481 } else if (records
[i
].replica
.sgroup_merge
) {
9482 ret
&= test_wrepl_sgroup_merged(tctx
, ctx
, NULL
,
9484 records
[i
].wins
.num_ips
, records
[i
].wins
.ips
,
9486 records
[i
].replica
.num_ips
, records
[i
].replica
.ips
,
9489 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
,
9490 records
[i
].replica
.apply_expected
);
9493 if (records
[i
].replica
.apply_expected
||
9494 records
[i
].replica
.mhomed_merge
) {
9495 wins_name
->name
= &records
[i
].name
;
9496 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE
,
9497 WREPL_STATE_TOMBSTONE
,
9498 WREPL_NODE_B
, false);
9499 wins_name
->id
= ++ctx
->b
.max_version
;
9500 wins_name
->addresses
.ip
= addresses_B_1
[0].ip
;
9501 wins_name
->unknown
= "255.255.255.255";
9503 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9504 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
, true);
9506 for (j
=0; j
< count
; j
++) {
9507 struct nbt_name_socket
*nbtsock
= ctx
->nbtsock
;
9509 if (ctx
->myaddr2
&& strcmp(records
[i
].wins
.ips
[j
].ip
, ctx
->myaddr2
->addr
) == 0) {
9510 nbtsock
= ctx
->nbtsock2
;
9513 release
->in
.name
= records
[i
].name
;
9514 release
->in
.dest_addr
= ctx
->address
;
9515 release
->in
.dest_port
= lpcfg_nbt_port(tctx
->lp_ctx
);
9516 release
->in
.address
= records
[i
].wins
.ips
[j
].ip
;
9517 release
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
9518 release
->in
.broadcast
= false;
9519 release
->in
.timeout
= 30;
9520 release
->in
.retries
= 0;
9522 status
= nbt_name_release(nbtsock
, ctx
, release
);
9523 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
9524 torture_comment(tctx
, "No response from %s for name release\n", ctx
->address
);
9527 if (!NT_STATUS_IS_OK(status
)) {
9528 torture_comment(tctx
, "Bad response from %s for name query - %s\n",
9529 ctx
->address
, nt_errstr(status
));
9532 CHECK_VALUE(tctx
, release
->out
.rcode
, 0);
9535 if (records
[i
].replica
.sgroup_merge
) {
9536 /* clean up the SGROUP record */
9537 wins_name
->name
= &records
[i
].name
;
9538 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
9540 WREPL_NODE_B
, false);
9541 wins_name
->id
= ++ctx
->b
.max_version
;
9542 wins_name
->addresses
.addresses
.num_ips
= 0;
9543 wins_name
->addresses
.addresses
.ips
= NULL
;
9544 wins_name
->unknown
= "255.255.255.255";
9545 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9547 /* take ownership of the SGROUP record */
9548 wins_name
->name
= &records
[i
].name
;
9549 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
9551 WREPL_NODE_B
, false);
9552 wins_name
->id
= ++ctx
->b
.max_version
;
9553 wins_name
->addresses
.addresses
.num_ips
= ARRAY_SIZE(addresses_B_1
);
9554 wins_name
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
9556 wins_name
->unknown
= "255.255.255.255";
9557 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9558 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
, true);
9560 /* overwrite the SGROUP record with unique,tombstone */
9561 wins_name
->name
= &records
[i
].name
;
9562 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE
,
9563 WREPL_STATE_TOMBSTONE
,
9564 WREPL_NODE_B
, false);
9565 wins_name
->id
= ++ctx
->b
.max_version
;
9566 wins_name
->addresses
.ip
= addresses_A_1
[0].ip
;
9567 wins_name
->unknown
= "255.255.255.255";
9568 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9569 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
, true);
9574 torture_comment(tctx
, "conflict handled wrong or record[%u]: %s\n", i
, records
[i
].line
);
9582 #define __NBT_LABEL_CAT1__(a,b) a##b
9583 #define __NBT_LABEL_CAT2__(a,b) __NBT_LABEL_CAT1__(a,b)
9584 #define _NBT_LABEL __NBT_LABEL_CAT2__(_label_, __LINE__)
9586 #define _NBT_ASSERT(v, correct) do { \
9588 torture_assert_int_equal_goto(rec->tctx, v, correct, \
9589 _ret, _NBT_LABEL, "Invalid int value"); \
9596 #define _NBT_ASSERT_STRING(v, correct) do { \
9598 torture_assert_str_equal_goto(rec->tctx, v, correct, \
9599 _ret, _NBT_LABEL, "Invalid string value"); \
9606 static void test_conflict_owned_active_vs_replica_handler_query(struct nbt_name_socket
*nbtsock
,
9607 struct nbt_name_packet
*req_packet
,
9608 struct socket_address
*src
)
9610 struct nbt_name
*name
;
9611 struct nbt_name_packet
*rep_packet
;
9612 struct test_conflict_owned_active_vs_replica_struct
*rec
=
9613 (struct test_conflict_owned_active_vs_replica_struct
*)nbtsock
->incoming
.private_data
;
9615 _NBT_ASSERT(req_packet
->qdcount
, 1);
9616 _NBT_ASSERT(req_packet
->questions
[0].question_type
, NBT_QTYPE_NETBIOS
);
9617 _NBT_ASSERT(req_packet
->questions
[0].question_class
, NBT_QCLASS_IP
);
9619 name
= &req_packet
->questions
[0].name
;
9621 _NBT_ASSERT_STRING(name
->name
, rec
->name
.name
);
9622 _NBT_ASSERT(name
->type
, rec
->name
.type
);
9623 _NBT_ASSERT_STRING(name
->scope
, rec
->name
.scope
);
9625 _NBT_ASSERT(rec
->defend
.expect_release
, false);
9627 rep_packet
= talloc_zero(nbtsock
, struct nbt_name_packet
);
9628 if (rep_packet
== NULL
) return;
9630 rep_packet
->name_trn_id
= req_packet
->name_trn_id
;
9631 rep_packet
->ancount
= 1;
9633 rep_packet
->answers
= talloc_array(rep_packet
, struct nbt_res_rec
, 1);
9634 if (rep_packet
->answers
== NULL
) return;
9636 rep_packet
->answers
[0].name
= *name
;
9637 rep_packet
->answers
[0].rr_class
= NBT_QCLASS_IP
;
9638 rep_packet
->answers
[0].ttl
= 0;
9640 if (rec
->defend
.positive
) {
9641 uint32_t i
, num_ips
;
9642 const struct wrepl_ip
*ips
;
9644 if (rec
->defend
.num_ips
> 0) {
9645 num_ips
= rec
->defend
.num_ips
;
9646 ips
= rec
->defend
.ips
;
9648 num_ips
= rec
->wins
.num_ips
;
9649 ips
= rec
->wins
.ips
;
9652 /* send a positive reply */
9653 rep_packet
->operation
=
9656 NBT_FLAG_AUTHORITATIVE
|
9657 NBT_FLAG_RECURSION_DESIRED
|
9658 NBT_FLAG_RECURSION_AVAIL
;
9660 rep_packet
->answers
[0].rr_type
= NBT_QTYPE_NETBIOS
;
9662 rep_packet
->answers
[0].rdata
.netbios
.length
= num_ips
*6;
9663 rep_packet
->answers
[0].rdata
.netbios
.addresses
=
9664 talloc_array(rep_packet
->answers
, struct nbt_rdata_address
, num_ips
);
9665 if (rep_packet
->answers
[0].rdata
.netbios
.addresses
== NULL
) return;
9667 for (i
=0; i
< num_ips
; i
++) {
9668 struct nbt_rdata_address
*addr
=
9669 &rep_packet
->answers
[0].rdata
.netbios
.addresses
[i
];
9670 addr
->nb_flags
= rec
->wins
.nb_flags
;
9671 addr
->ipaddr
= ips
[i
].ip
;
9673 DEBUG(2,("Sending positive name query reply for %s to %s:%d\n",
9674 nbt_name_string(rep_packet
, name
), src
->addr
, src
->port
));
9676 /* send a negative reply */
9677 rep_packet
->operation
=
9680 NBT_FLAG_AUTHORITATIVE
|
9683 rep_packet
->answers
[0].rr_type
= NBT_QTYPE_NULL
;
9685 ZERO_STRUCT(rep_packet
->answers
[0].rdata
);
9687 DEBUG(2,("Sending negative name query reply for %s to %s:%d\n",
9688 nbt_name_string(rep_packet
, name
), src
->addr
, src
->port
));
9691 nbt_name_reply_send(nbtsock
, src
, rep_packet
);
9692 talloc_free(rep_packet
);
9694 /* make sure we push the reply to the wire */
9695 while (nbtsock
->send_queue
) {
9696 tevent_loop_once(nbtsock
->event_ctx
);
9700 rec
->defend
.timeout
= 0;
9701 rec
->defend
.ret
= true;
9704 static void test_conflict_owned_active_vs_replica_handler_release(
9705 struct nbt_name_socket
*nbtsock
,
9706 struct nbt_name_packet
*req_packet
,
9707 struct socket_address
*src
)
9709 struct nbt_name
*name
;
9710 struct nbt_name_packet
*rep_packet
;
9711 struct test_conflict_owned_active_vs_replica_struct
*rec
=
9712 (struct test_conflict_owned_active_vs_replica_struct
*)nbtsock
->incoming
.private_data
;
9714 _NBT_ASSERT(req_packet
->qdcount
, 1);
9715 _NBT_ASSERT(req_packet
->questions
[0].question_type
, NBT_QTYPE_NETBIOS
);
9716 _NBT_ASSERT(req_packet
->questions
[0].question_class
, NBT_QCLASS_IP
);
9718 name
= &req_packet
->questions
[0].name
;
9720 _NBT_ASSERT_STRING(name
->name
, rec
->name
.name
);
9721 _NBT_ASSERT(name
->type
, rec
->name
.type
);
9722 _NBT_ASSERT_STRING(name
->scope
, rec
->name
.scope
);
9724 _NBT_ASSERT(rec
->defend
.expect_release
, true);
9726 rep_packet
= talloc_zero(nbtsock
, struct nbt_name_packet
);
9727 if (rep_packet
== NULL
) return;
9729 rep_packet
->name_trn_id
= req_packet
->name_trn_id
;
9730 rep_packet
->ancount
= 1;
9731 rep_packet
->operation
=
9733 NBT_OPCODE_RELEASE
|
9734 NBT_FLAG_AUTHORITATIVE
;
9736 rep_packet
->answers
= talloc_array(rep_packet
, struct nbt_res_rec
, 1);
9737 if (rep_packet
->answers
== NULL
) return;
9739 rep_packet
->answers
[0].name
= *name
;
9740 rep_packet
->answers
[0].rr_type
= NBT_QTYPE_NETBIOS
;
9741 rep_packet
->answers
[0].rr_class
= NBT_QCLASS_IP
;
9742 rep_packet
->answers
[0].ttl
= req_packet
->additional
[0].ttl
;
9743 rep_packet
->answers
[0].rdata
= req_packet
->additional
[0].rdata
;
9745 DEBUG(2,("Sending name release reply for %s to %s:%d\n",
9746 nbt_name_string(rep_packet
, name
), src
->addr
, src
->port
));
9748 nbt_name_reply_send(nbtsock
, src
, rep_packet
);
9749 talloc_free(rep_packet
);
9751 /* make sure we push the reply to the wire */
9752 while (nbtsock
->send_queue
) {
9753 tevent_loop_once(nbtsock
->event_ctx
);
9757 rec
->defend
.timeout
= 0;
9758 rec
->defend
.ret
= true;
9761 static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket
*nbtsock
,
9762 struct nbt_name_packet
*req_packet
,
9763 struct socket_address
*src
)
9765 struct test_conflict_owned_active_vs_replica_struct
*rec
=
9766 (struct test_conflict_owned_active_vs_replica_struct
*)nbtsock
->incoming
.private_data
;
9767 struct nbt_name
*name
= &req_packet
->questions
[0].name
;
9769 if (req_packet
->operation
& NBT_FLAG_BROADCAST
) {
9770 torture_comment(rec
->tctx
,
9771 "%s: incoming packet name[%s] flags[0x%08X] from[%s]\n",
9773 nbt_name_string(rec
->tctx
, name
),
9774 req_packet
->operation
,
9779 rec
->defend
.ret
= false;
9781 switch (req_packet
->operation
& NBT_OPCODE
) {
9782 case NBT_OPCODE_QUERY
:
9783 test_conflict_owned_active_vs_replica_handler_query(nbtsock
, req_packet
, src
);
9785 case NBT_OPCODE_RELEASE
:
9786 test_conflict_owned_active_vs_replica_handler_release(nbtsock
, req_packet
, src
);
9789 torture_comment(rec
->tctx
,
9790 "%s: unexpected packet name[%s] flags[0x%08X] from[%s]\n",
9792 nbt_name_string(rec
->tctx
, name
),
9793 req_packet
->operation
,
9795 _NBT_ASSERT((req_packet
->operation
& NBT_OPCODE
), NBT_OPCODE_QUERY
);
9801 test WINS replication replica conflicts operations
9803 static bool torture_nbt_winsreplication_replica(struct torture_context
*tctx
)
9806 struct test_wrepl_conflict_conn
*ctx
;
9808 const char *address
;
9809 struct nbt_name name
;
9811 if (!torture_nbt_get_name(tctx
, &name
, &address
))
9814 ctx
= test_create_conflict_ctx(tctx
, address
);
9815 if (!ctx
) return false;
9817 ret
&= test_conflict_same_owner(tctx
, ctx
);
9818 ret
&= test_conflict_different_owner(tctx
, ctx
);
9824 test WINS replication owned conflicts operations
9826 static bool torture_nbt_winsreplication_owned(struct torture_context
*tctx
)
9828 const char *address
;
9829 struct nbt_name name
;
9831 struct test_wrepl_conflict_conn
*ctx
;
9833 if (torture_setting_bool(tctx
, "quick", false))
9835 "skip NBT-WINSREPLICATION-OWNED test in quick test mode\n");
9837 if (!torture_nbt_get_name(tctx
, &name
, &address
))
9840 ctx
= test_create_conflict_ctx(tctx
, address
);
9841 torture_assert(tctx
, ctx
!= NULL
, "Creating context failed");
9843 ret
&= test_conflict_owned_released_vs_replica(tctx
, ctx
);
9844 ret
&= test_conflict_owned_active_vs_replica(tctx
, ctx
);
9850 test simple WINS replication operations
9852 struct torture_suite
*torture_nbt_winsreplication(TALLOC_CTX
*mem_ctx
)
9854 struct torture_suite
*suite
= torture_suite_create(
9855 mem_ctx
, "winsreplication");
9856 struct torture_tcase
*tcase
;
9858 tcase
= torture_suite_add_simple_test(suite
, "assoc_ctx1",
9860 tcase
->tests
->dangerous
= true;
9862 torture_suite_add_simple_test(suite
, "assoc_ctx2", test_assoc_ctx2
);
9864 torture_suite_add_simple_test(suite
, "wins_replication",
9865 test_wins_replication
);
9867 torture_suite_add_simple_test(suite
, "replica",
9868 torture_nbt_winsreplication_replica
);
9870 torture_suite_add_simple_test(suite
, "owned",
9871 torture_nbt_winsreplication_owned
);