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 wrepl_request
*req
;
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_pull_table pull_table
;
92 struct wrepl_packet packet
;
93 struct wrepl_send_ctrl ctrl
;
94 struct wrepl_packet
*rep_packet
;
95 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
, lp_iconv_convenience(tctx
->lp_ctx
));
106 wrepl_socket2
= wrepl_socket_init(tctx
, tctx
->ev
, lp_iconv_convenience(tctx
->lp_ctx
));
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 req
= wrepl_request_send(wrepl_socket2
, &packet
, &ctrl
);
136 status
= wrepl_request_recv(req
, tctx
, &rep_packet
);
137 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
139 torture_comment(tctx
, "Send a association request (conn2), to make sure the last request was ignored\n");
140 status
= wrepl_associate(wrepl_socket2
, &associate2
);
141 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
143 torture_comment(tctx
, "Send a replication table query, with invalid assoc (conn1), receive answer from conn2\n");
144 pull_table
.in
.assoc_ctx
= 0;
145 req
= wrepl_pull_table_send(wrepl_socket1
, &pull_table
);
146 status
= wrepl_request_recv(req
, tctx
, &rep_packet
);
147 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
149 torture_comment(tctx
, "Send a association request (conn1), to make sure the last request was handled correct\n");
150 status
= wrepl_associate(wrepl_socket1
, &associate2
);
151 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
153 assoc_stop
.in
.assoc_ctx
= associate1
.out
.assoc_ctx
;
154 assoc_stop
.in
.reason
= 4;
155 torture_comment(tctx
, "Send a association stop request (conn1), reson: %u\n", assoc_stop
.in
.reason
);
156 status
= wrepl_associate_stop(wrepl_socket1
, &assoc_stop
);
157 CHECK_STATUS(tctx
, status
, NT_STATUS_END_OF_FILE
);
159 assoc_stop
.in
.assoc_ctx
= associate2
.out
.assoc_ctx
;
160 assoc_stop
.in
.reason
= 0;
161 torture_comment(tctx
, "Send a association stop request (conn2), reson: %u\n", assoc_stop
.in
.reason
);
162 status
= wrepl_associate_stop(wrepl_socket2
, &assoc_stop
);
163 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
165 torture_comment(tctx
, "Close 2 wrepl connections\n");
166 talloc_free(wrepl_socket1
);
167 talloc_free(wrepl_socket2
);
172 test if we always get back the same assoc_ctx
174 static bool test_assoc_ctx2(struct torture_context
*tctx
)
176 struct wrepl_socket
*wrepl_socket
;
177 struct wrepl_associate associate
;
179 struct nbt_name name
;
183 if (!torture_nbt_get_name(tctx
, &name
, &address
))
186 torture_comment(tctx
, "Test if we always get back the same assoc_ctx\n");
188 wrepl_socket
= wrepl_socket_init(tctx
, tctx
->ev
, lp_iconv_convenience(tctx
->lp_ctx
));
190 torture_comment(tctx
, "Setup wrepl connections\n");
191 status
= wrepl_connect(wrepl_socket
, wrepl_best_ip(tctx
->lp_ctx
, address
), address
);
192 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
194 torture_comment(tctx
, "Send 1st start association request\n");
195 status
= wrepl_associate(wrepl_socket
, &associate
);
196 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
197 assoc_ctx1
= associate
.out
.assoc_ctx
;
198 torture_comment(tctx
, "1st association context: 0x%x\n", associate
.out
.assoc_ctx
);
200 torture_comment(tctx
, "Send 2nd start association request\n");
201 status
= wrepl_associate(wrepl_socket
, &associate
);
202 torture_assert_ntstatus_ok(tctx
, status
, "2nd start association failed");
203 torture_assert(tctx
, associate
.out
.assoc_ctx
== assoc_ctx1
,
204 "Different context returned");
205 torture_comment(tctx
, "2nd association context: 0x%x\n", associate
.out
.assoc_ctx
);
207 torture_comment(tctx
, "Send 3rd start association request\n");
208 status
= wrepl_associate(wrepl_socket
, &associate
);
209 torture_assert(tctx
, associate
.out
.assoc_ctx
== assoc_ctx1
,
210 "Different context returned");
211 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
212 torture_comment(tctx
, "3rd association context: 0x%x\n", associate
.out
.assoc_ctx
);
214 torture_comment(tctx
, "Close wrepl connections\n");
215 talloc_free(wrepl_socket
);
221 display a replication entry
223 static void display_entry(struct torture_context
*tctx
, struct wrepl_name
*name
)
227 torture_comment(tctx
, "%s\n", nbt_name_string(tctx
, &name
->name
));
228 torture_comment(tctx
, "\tTYPE:%u STATE:%u NODE:%u STATIC:%u VERSION_ID: %llu\n",
229 name
->type
, name
->state
, name
->node
, name
->is_static
, (long long)name
->version_id
);
230 torture_comment(tctx
, "\tRAW_FLAGS: 0x%08X OWNER: %-15s\n",
231 name
->raw_flags
, name
->owner
);
232 for (i
=0;i
<name
->num_addresses
;i
++) {
233 torture_comment(tctx
, "\tADDR: %-15s OWNER: %-15s\n",
234 name
->addresses
[i
].address
, name
->addresses
[i
].owner
);
239 test a full replication dump from a WINS server
241 static bool test_wins_replication(struct torture_context
*tctx
)
243 struct wrepl_socket
*wrepl_socket
;
246 struct wrepl_associate associate
;
247 struct wrepl_pull_table pull_table
;
248 struct wrepl_pull_names pull_names
;
249 struct nbt_name name
;
252 if (!torture_nbt_get_name(tctx
, &name
, &address
))
255 torture_comment(tctx
, "Test one pull replication cycle\n");
257 wrepl_socket
= wrepl_socket_init(tctx
, tctx
->ev
, lp_iconv_convenience(tctx
->lp_ctx
));
259 torture_comment(tctx
, "Setup wrepl connections\n");
260 status
= wrepl_connect(wrepl_socket
, wrepl_best_ip(tctx
->lp_ctx
, address
), address
);
261 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
263 torture_comment(tctx
, "Send a start association request\n");
265 status
= wrepl_associate(wrepl_socket
, &associate
);
266 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
268 torture_comment(tctx
, "association context: 0x%x\n", associate
.out
.assoc_ctx
);
270 torture_comment(tctx
, "Send a replication table query\n");
271 pull_table
.in
.assoc_ctx
= associate
.out
.assoc_ctx
;
273 status
= wrepl_pull_table(wrepl_socket
, tctx
, &pull_table
);
274 if (NT_STATUS_EQUAL(NT_STATUS_NETWORK_ACCESS_DENIED
,status
)) {
275 struct wrepl_packet packet
;
276 struct wrepl_request
*req
;
279 packet
.opcode
= WREPL_OPCODE_BITS
;
280 packet
.assoc_ctx
= associate
.out
.assoc_ctx
;
281 packet
.mess_type
= WREPL_STOP_ASSOCIATION
;
282 packet
.message
.stop
.reason
= 0;
284 req
= wrepl_request_send(wrepl_socket
, &packet
, NULL
);
287 torture_fail(tctx
, "We are not a valid pull partner for the server");
289 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
291 torture_comment(tctx
, "Found %d replication partners\n", pull_table
.out
.num_partners
);
293 for (i
=0;i
<pull_table
.out
.num_partners
;i
++) {
294 struct wrepl_wins_owner
*partner
= &pull_table
.out
.partners
[i
];
295 torture_comment(tctx
, "%s max_version=%6llu min_version=%6llu type=%d\n",
297 (long long)partner
->max_version
,
298 (long long)partner
->min_version
,
301 pull_names
.in
.assoc_ctx
= associate
.out
.assoc_ctx
;
302 pull_names
.in
.partner
= *partner
;
304 status
= wrepl_pull_names(wrepl_socket
, tctx
, &pull_names
);
305 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
307 torture_comment(tctx
, "Received %d names\n", pull_names
.out
.num_names
);
309 for (j
=0;j
<pull_names
.out
.num_names
;j
++) {
310 display_entry(tctx
, &pull_names
.out
.names
[j
]);
314 torture_comment(tctx
, "Close wrepl connections\n");
315 talloc_free(wrepl_socket
);
319 struct test_wrepl_conflict_conn
{
321 struct wrepl_socket
*pull
;
324 #define TEST_OWNER_A_ADDRESS "127.65.65.1"
325 #define TEST_ADDRESS_A_PREFIX "127.0.65"
326 #define TEST_OWNER_B_ADDRESS "127.66.66.1"
327 #define TEST_ADDRESS_B_PREFIX "127.0.66"
328 #define TEST_OWNER_X_ADDRESS "127.88.88.1"
329 #define TEST_ADDRESS_X_PREFIX "127.0.88"
331 struct wrepl_wins_owner a
, b
, c
, x
;
333 struct socket_address
*myaddr
;
334 struct socket_address
*myaddr2
;
335 struct nbt_name_socket
*nbtsock
;
336 struct nbt_name_socket
*nbtsock2
;
338 struct nbt_name_socket
*nbtsock_srv
;
339 struct nbt_name_socket
*nbtsock_srv2
;
341 uint32_t addresses_best_num
;
342 struct wrepl_ip
*addresses_best
;
344 uint32_t addresses_best2_num
;
345 struct wrepl_ip
*addresses_best2
;
347 uint32_t addresses_all_num
;
348 struct wrepl_ip
*addresses_all
;
350 uint32_t addresses_mhomed_num
;
351 struct wrepl_ip
*addresses_mhomed
;
354 static const struct wrepl_ip addresses_A_1
[] = {
356 .owner
= TEST_OWNER_A_ADDRESS
,
357 .ip
= TEST_ADDRESS_A_PREFIX
".1"
360 static const struct wrepl_ip addresses_A_2
[] = {
362 .owner
= TEST_OWNER_A_ADDRESS
,
363 .ip
= TEST_ADDRESS_A_PREFIX
".2"
366 static const struct wrepl_ip addresses_A_3_4
[] = {
368 .owner
= TEST_OWNER_A_ADDRESS
,
369 .ip
= TEST_ADDRESS_A_PREFIX
".3"
372 .owner
= TEST_OWNER_A_ADDRESS
,
373 .ip
= TEST_ADDRESS_A_PREFIX
".4"
376 static const struct wrepl_ip addresses_A_3_4_X_3_4
[] = {
378 .owner
= TEST_OWNER_A_ADDRESS
,
379 .ip
= TEST_ADDRESS_A_PREFIX
".3"
382 .owner
= TEST_OWNER_A_ADDRESS
,
383 .ip
= TEST_ADDRESS_A_PREFIX
".4"
386 .owner
= TEST_OWNER_X_ADDRESS
,
387 .ip
= TEST_ADDRESS_X_PREFIX
".3"
390 .owner
= TEST_OWNER_X_ADDRESS
,
391 .ip
= TEST_ADDRESS_X_PREFIX
".4"
394 static const struct wrepl_ip addresses_A_3_4_B_3_4
[] = {
396 .owner
= TEST_OWNER_A_ADDRESS
,
397 .ip
= TEST_ADDRESS_A_PREFIX
".3"
400 .owner
= TEST_OWNER_A_ADDRESS
,
401 .ip
= TEST_ADDRESS_A_PREFIX
".4"
404 .owner
= TEST_OWNER_B_ADDRESS
,
405 .ip
= TEST_ADDRESS_B_PREFIX
".3"
408 .owner
= TEST_OWNER_B_ADDRESS
,
409 .ip
= TEST_ADDRESS_B_PREFIX
".4"
412 static const struct wrepl_ip addresses_A_3_4_OWNER_B
[] = {
414 .owner
= TEST_OWNER_B_ADDRESS
,
415 .ip
= TEST_ADDRESS_A_PREFIX
".3"
418 .owner
= TEST_OWNER_B_ADDRESS
,
419 .ip
= TEST_ADDRESS_A_PREFIX
".4"
422 static const struct wrepl_ip addresses_A_3_4_X_3_4_OWNER_B
[] = {
424 .owner
= TEST_OWNER_B_ADDRESS
,
425 .ip
= TEST_ADDRESS_A_PREFIX
".3"
428 .owner
= TEST_OWNER_B_ADDRESS
,
429 .ip
= TEST_ADDRESS_A_PREFIX
".4"
432 .owner
= TEST_OWNER_B_ADDRESS
,
433 .ip
= TEST_ADDRESS_X_PREFIX
".3"
436 .owner
= TEST_OWNER_B_ADDRESS
,
437 .ip
= TEST_ADDRESS_X_PREFIX
".4"
441 static const struct wrepl_ip addresses_A_3_4_X_1_2
[] = {
443 .owner
= TEST_OWNER_A_ADDRESS
,
444 .ip
= TEST_ADDRESS_A_PREFIX
".3"
447 .owner
= TEST_OWNER_A_ADDRESS
,
448 .ip
= TEST_ADDRESS_A_PREFIX
".4"
451 .owner
= TEST_OWNER_X_ADDRESS
,
452 .ip
= TEST_ADDRESS_X_PREFIX
".1"
455 .owner
= TEST_OWNER_X_ADDRESS
,
456 .ip
= TEST_ADDRESS_X_PREFIX
".2"
460 static const struct wrepl_ip addresses_B_1
[] = {
462 .owner
= TEST_OWNER_B_ADDRESS
,
463 .ip
= TEST_ADDRESS_B_PREFIX
".1"
466 static const struct wrepl_ip addresses_B_2
[] = {
468 .owner
= TEST_OWNER_B_ADDRESS
,
469 .ip
= TEST_ADDRESS_B_PREFIX
".2"
472 static const struct wrepl_ip addresses_B_3_4
[] = {
474 .owner
= TEST_OWNER_B_ADDRESS
,
475 .ip
= TEST_ADDRESS_B_PREFIX
".3"
478 .owner
= TEST_OWNER_B_ADDRESS
,
479 .ip
= TEST_ADDRESS_B_PREFIX
".4"
482 static const struct wrepl_ip addresses_B_3_4_X_3_4
[] = {
484 .owner
= TEST_OWNER_B_ADDRESS
,
485 .ip
= TEST_ADDRESS_B_PREFIX
".3"
488 .owner
= TEST_OWNER_B_ADDRESS
,
489 .ip
= TEST_ADDRESS_B_PREFIX
".4"
492 .owner
= TEST_OWNER_X_ADDRESS
,
493 .ip
= TEST_ADDRESS_X_PREFIX
".3"
496 .owner
= TEST_OWNER_X_ADDRESS
,
497 .ip
= TEST_ADDRESS_X_PREFIX
".4"
500 static const struct wrepl_ip addresses_B_3_4_X_1_2
[] = {
502 .owner
= TEST_OWNER_B_ADDRESS
,
503 .ip
= TEST_ADDRESS_B_PREFIX
".3"
506 .owner
= TEST_OWNER_B_ADDRESS
,
507 .ip
= TEST_ADDRESS_B_PREFIX
".4"
510 .owner
= TEST_OWNER_X_ADDRESS
,
511 .ip
= TEST_ADDRESS_X_PREFIX
".1"
514 .owner
= TEST_OWNER_X_ADDRESS
,
515 .ip
= TEST_ADDRESS_X_PREFIX
".2"
519 static const struct wrepl_ip addresses_X_1_2
[] = {
521 .owner
= TEST_OWNER_X_ADDRESS
,
522 .ip
= TEST_ADDRESS_X_PREFIX
".1"
525 .owner
= TEST_OWNER_X_ADDRESS
,
526 .ip
= TEST_ADDRESS_X_PREFIX
".2"
529 static const struct wrepl_ip addresses_X_3_4
[] = {
531 .owner
= TEST_OWNER_X_ADDRESS
,
532 .ip
= TEST_ADDRESS_X_PREFIX
".3"
535 .owner
= TEST_OWNER_X_ADDRESS
,
536 .ip
= TEST_ADDRESS_X_PREFIX
".4"
540 static struct test_wrepl_conflict_conn
*test_create_conflict_ctx(
541 struct torture_context
*tctx
, const char *address
)
543 struct test_wrepl_conflict_conn
*ctx
;
544 struct wrepl_associate associate
;
545 struct wrepl_pull_table pull_table
;
546 struct socket_address
*nbt_srv_addr
;
549 struct interface
*ifaces
;
551 ctx
= talloc_zero(tctx
, struct test_wrepl_conflict_conn
);
552 if (!ctx
) return NULL
;
554 ctx
->address
= address
;
555 ctx
->pull
= wrepl_socket_init(ctx
, tctx
->ev
, lp_iconv_convenience(tctx
->lp_ctx
));
556 if (!ctx
->pull
) return NULL
;
558 torture_comment(tctx
, "Setup wrepl conflict pull connection\n");
559 status
= wrepl_connect(ctx
->pull
, wrepl_best_ip(tctx
->lp_ctx
, ctx
->address
), ctx
->address
);
560 if (!NT_STATUS_IS_OK(status
)) return NULL
;
562 status
= wrepl_associate(ctx
->pull
, &associate
);
563 if (!NT_STATUS_IS_OK(status
)) return NULL
;
565 ctx
->pull_assoc
= associate
.out
.assoc_ctx
;
567 ctx
->a
.address
= TEST_OWNER_A_ADDRESS
;
568 ctx
->a
.max_version
= 0;
569 ctx
->a
.min_version
= 0;
572 ctx
->b
.address
= TEST_OWNER_B_ADDRESS
;
573 ctx
->b
.max_version
= 0;
574 ctx
->b
.min_version
= 0;
577 ctx
->x
.address
= TEST_OWNER_X_ADDRESS
;
578 ctx
->x
.max_version
= 0;
579 ctx
->x
.min_version
= 0;
582 ctx
->c
.address
= address
;
583 ctx
->c
.max_version
= 0;
584 ctx
->c
.min_version
= 0;
587 pull_table
.in
.assoc_ctx
= ctx
->pull_assoc
;
588 status
= wrepl_pull_table(ctx
->pull
, ctx
->pull
, &pull_table
);
589 if (!NT_STATUS_IS_OK(status
)) return NULL
;
591 for (i
=0; i
< pull_table
.out
.num_partners
; i
++) {
592 if (strcmp(TEST_OWNER_A_ADDRESS
,pull_table
.out
.partners
[i
].address
)==0) {
593 ctx
->a
.max_version
= pull_table
.out
.partners
[i
].max_version
;
594 ctx
->a
.min_version
= pull_table
.out
.partners
[i
].min_version
;
596 if (strcmp(TEST_OWNER_B_ADDRESS
,pull_table
.out
.partners
[i
].address
)==0) {
597 ctx
->b
.max_version
= pull_table
.out
.partners
[i
].max_version
;
598 ctx
->b
.min_version
= pull_table
.out
.partners
[i
].min_version
;
600 if (strcmp(TEST_OWNER_X_ADDRESS
,pull_table
.out
.partners
[i
].address
)==0) {
601 ctx
->x
.max_version
= pull_table
.out
.partners
[i
].max_version
;
602 ctx
->x
.min_version
= pull_table
.out
.partners
[i
].min_version
;
604 if (strcmp(address
,pull_table
.out
.partners
[i
].address
)==0) {
605 ctx
->c
.max_version
= pull_table
.out
.partners
[i
].max_version
;
606 ctx
->c
.min_version
= pull_table
.out
.partners
[i
].min_version
;
610 talloc_free(pull_table
.out
.partners
);
612 ctx
->nbtsock
= nbt_name_socket_init(ctx
, tctx
->ev
, lp_iconv_convenience(tctx
->lp_ctx
));
613 if (!ctx
->nbtsock
) return NULL
;
615 load_interfaces(tctx
, lp_interfaces(tctx
->lp_ctx
), &ifaces
);
617 ctx
->myaddr
= socket_address_from_strings(tctx
, ctx
->nbtsock
->sock
->backend_name
, iface_best_ip(ifaces
, address
), 0);
618 if (!ctx
->myaddr
) return NULL
;
620 for (i
= 0; i
< iface_count(ifaces
); i
++) {
621 if (strcmp(ctx
->myaddr
->addr
, iface_n_ip(ifaces
, i
)) == 0) continue;
622 ctx
->myaddr2
= socket_address_from_strings(tctx
, ctx
->nbtsock
->sock
->backend_name
, iface_n_ip(ifaces
, i
), 0);
623 if (!ctx
->myaddr2
) return NULL
;
627 status
= socket_listen(ctx
->nbtsock
->sock
, ctx
->myaddr
, 0, 0);
628 if (!NT_STATUS_IS_OK(status
)) return NULL
;
630 ctx
->nbtsock_srv
= nbt_name_socket_init(ctx
, tctx
->ev
, lp_iconv_convenience(tctx
->lp_ctx
));
631 if (!ctx
->nbtsock_srv
) return NULL
;
633 /* Make a port 137 version of ctx->myaddr */
634 nbt_srv_addr
= socket_address_from_strings(tctx
, ctx
->nbtsock_srv
->sock
->backend_name
, ctx
->myaddr
->addr
, lp_nbt_port(tctx
->lp_ctx
));
635 if (!nbt_srv_addr
) return NULL
;
637 /* And if possible, bind to it. This won't work unless we are root or in sockewrapper */
638 status
= socket_listen(ctx
->nbtsock_srv
->sock
, nbt_srv_addr
, 0, 0);
639 talloc_free(nbt_srv_addr
);
640 if (!NT_STATUS_IS_OK(status
)) {
641 /* this isn't fatal */
642 talloc_free(ctx
->nbtsock_srv
);
643 ctx
->nbtsock_srv
= NULL
;
646 if (ctx
->myaddr2
&& ctx
->nbtsock_srv
) {
647 ctx
->nbtsock2
= nbt_name_socket_init(ctx
, tctx
->ev
, lp_iconv_convenience(tctx
->lp_ctx
));
648 if (!ctx
->nbtsock2
) return NULL
;
650 status
= socket_listen(ctx
->nbtsock2
->sock
, ctx
->myaddr2
, 0, 0);
651 if (!NT_STATUS_IS_OK(status
)) return NULL
;
653 ctx
->nbtsock_srv2
= nbt_name_socket_init(ctx
, ctx
->nbtsock_srv
->event_ctx
, lp_iconv_convenience(tctx
->lp_ctx
));
654 if (!ctx
->nbtsock_srv2
) return NULL
;
656 /* Make a port 137 version of ctx->myaddr2 */
657 nbt_srv_addr
= socket_address_from_strings(tctx
,
658 ctx
->nbtsock_srv
->sock
->backend_name
,
660 lp_nbt_port(tctx
->lp_ctx
));
661 if (!nbt_srv_addr
) return NULL
;
663 /* And if possible, bind to it. This won't work unless we are root or in sockewrapper */
664 status
= socket_listen(ctx
->nbtsock_srv2
->sock
, ctx
->myaddr2
, 0, 0);
665 talloc_free(nbt_srv_addr
);
666 if (!NT_STATUS_IS_OK(status
)) {
667 /* this isn't fatal */
668 talloc_free(ctx
->nbtsock_srv2
);
669 ctx
->nbtsock_srv2
= NULL
;
673 ctx
->addresses_best_num
= 1;
674 ctx
->addresses_best
= talloc_array(ctx
, struct wrepl_ip
, ctx
->addresses_best_num
);
675 if (!ctx
->addresses_best
) return NULL
;
676 ctx
->addresses_best
[0].owner
= ctx
->b
.address
;
677 ctx
->addresses_best
[0].ip
= ctx
->myaddr
->addr
;
679 ctx
->addresses_all_num
= iface_count(ifaces
);
680 ctx
->addresses_all
= talloc_array(ctx
, struct wrepl_ip
, ctx
->addresses_all_num
);
681 if (!ctx
->addresses_all
) return NULL
;
682 for (i
=0; i
< ctx
->addresses_all_num
; i
++) {
683 ctx
->addresses_all
[i
].owner
= ctx
->b
.address
;
684 ctx
->addresses_all
[i
].ip
= talloc_strdup(ctx
->addresses_all
, iface_n_ip(ifaces
, i
));
685 if (!ctx
->addresses_all
[i
].ip
) return NULL
;
688 if (ctx
->nbtsock_srv2
) {
689 ctx
->addresses_best2_num
= 1;
690 ctx
->addresses_best2
= talloc_array(ctx
, struct wrepl_ip
, ctx
->addresses_best2_num
);
691 if (!ctx
->addresses_best2
) return NULL
;
692 ctx
->addresses_best2
[0].owner
= ctx
->b
.address
;
693 ctx
->addresses_best2
[0].ip
= ctx
->myaddr2
->addr
;
695 ctx
->addresses_mhomed_num
= 2;
696 ctx
->addresses_mhomed
= talloc_array(ctx
, struct wrepl_ip
, ctx
->addresses_mhomed_num
);
697 if (!ctx
->addresses_mhomed
) return NULL
;
698 ctx
->addresses_mhomed
[0].owner
= ctx
->b
.address
;
699 ctx
->addresses_mhomed
[0].ip
= ctx
->myaddr
->addr
;
700 ctx
->addresses_mhomed
[1].owner
= ctx
->b
.address
;
701 ctx
->addresses_mhomed
[1].ip
= ctx
->myaddr2
->addr
;
707 static bool test_wrepl_update_one(struct torture_context
*tctx
,
708 struct test_wrepl_conflict_conn
*ctx
,
709 const struct wrepl_wins_owner
*owner
,
710 const struct wrepl_wins_name
*name
)
712 struct wrepl_socket
*wrepl_socket
;
713 struct wrepl_associate associate
;
714 struct wrepl_packet update_packet
, repl_send
;
715 struct wrepl_table
*update
;
716 struct wrepl_wins_owner wrepl_wins_owners
[1];
717 struct wrepl_packet
*repl_recv
;
718 struct wrepl_wins_owner
*send_request
;
719 struct wrepl_send_reply
*send_reply
;
720 struct wrepl_wins_name wrepl_wins_names
[1];
724 wrepl_socket
= wrepl_socket_init(ctx
, tctx
->ev
, lp_iconv_convenience(tctx
->lp_ctx
));
726 status
= wrepl_connect(wrepl_socket
, wrepl_best_ip(tctx
->lp_ctx
, ctx
->address
), ctx
->address
);
727 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
729 status
= wrepl_associate(wrepl_socket
, &associate
);
730 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
731 assoc_ctx
= associate
.out
.assoc_ctx
;
733 /* now send a WREPL_REPL_UPDATE message */
734 ZERO_STRUCT(update_packet
);
735 update_packet
.opcode
= WREPL_OPCODE_BITS
;
736 update_packet
.assoc_ctx
= assoc_ctx
;
737 update_packet
.mess_type
= WREPL_REPLICATION
;
738 update_packet
.message
.replication
.command
= WREPL_REPL_UPDATE
;
739 update
= &update_packet
.message
.replication
.info
.table
;
741 update
->partner_count
= ARRAY_SIZE(wrepl_wins_owners
);
742 update
->partners
= wrepl_wins_owners
;
743 update
->initiator
= "0.0.0.0";
745 wrepl_wins_owners
[0] = *owner
;
747 status
= wrepl_request(wrepl_socket
, wrepl_socket
,
748 &update_packet
, &repl_recv
);
749 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
750 CHECK_VALUE(tctx
, repl_recv
->mess_type
, WREPL_REPLICATION
);
751 CHECK_VALUE(tctx
, repl_recv
->message
.replication
.command
, WREPL_REPL_SEND_REQUEST
);
752 send_request
= &repl_recv
->message
.replication
.info
.owner
;
754 ZERO_STRUCT(repl_send
);
755 repl_send
.opcode
= WREPL_OPCODE_BITS
;
756 repl_send
.assoc_ctx
= assoc_ctx
;
757 repl_send
.mess_type
= WREPL_REPLICATION
;
758 repl_send
.message
.replication
.command
= WREPL_REPL_SEND_REPLY
;
759 send_reply
= &repl_send
.message
.replication
.info
.reply
;
761 send_reply
->num_names
= ARRAY_SIZE(wrepl_wins_names
);
762 send_reply
->names
= wrepl_wins_names
;
764 wrepl_wins_names
[0] = *name
;
766 status
= wrepl_request(wrepl_socket
, wrepl_socket
,
767 &repl_send
, &repl_recv
);
768 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
769 CHECK_VALUE(tctx
, repl_recv
->mess_type
, WREPL_STOP_ASSOCIATION
);
770 CHECK_VALUE(tctx
, repl_recv
->message
.stop
.reason
, 0);
772 talloc_free(wrepl_socket
);
776 static bool test_wrepl_is_applied(struct torture_context
*tctx
,
777 struct test_wrepl_conflict_conn
*ctx
,
778 const struct wrepl_wins_owner
*owner
,
779 const struct wrepl_wins_name
*name
,
783 struct wrepl_pull_names pull_names
;
784 struct wrepl_name
*names
;
786 pull_names
.in
.assoc_ctx
= ctx
->pull_assoc
;
787 pull_names
.in
.partner
= *owner
;
788 pull_names
.in
.partner
.min_version
= pull_names
.in
.partner
.max_version
;
790 status
= wrepl_pull_names(ctx
->pull
, ctx
->pull
, &pull_names
);
791 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
792 torture_assert(tctx
, pull_names
.out
.num_names
== (expected
?1:0),
793 talloc_asprintf(tctx
, "Invalid number of records returned - expected %d got %d", expected
, pull_names
.out
.num_names
));
795 names
= pull_names
.out
.names
;
798 uint32_t flags
= WREPL_NAME_FLAGS(names
[0].type
,
802 CHECK_VALUE(tctx
, names
[0].name
.type
, name
->name
->type
);
803 CHECK_VALUE_STRING(tctx
, names
[0].name
.name
, name
->name
->name
);
804 CHECK_VALUE_STRING(tctx
, names
[0].name
.scope
, name
->name
->scope
);
805 CHECK_VALUE(tctx
, flags
, name
->flags
);
806 CHECK_VALUE_UINT64(tctx
, names
[0].version_id
, name
->id
);
809 CHECK_VALUE(tctx
, names
[0].num_addresses
,
810 name
->addresses
.addresses
.num_ips
);
812 CHECK_VALUE(tctx
, names
[0].num_addresses
, 1);
813 CHECK_VALUE_STRING(tctx
, names
[0].addresses
[0].address
,
817 talloc_free(pull_names
.out
.names
);
821 static bool test_wrepl_mhomed_merged(struct torture_context
*tctx
,
822 struct test_wrepl_conflict_conn
*ctx
,
823 const struct wrepl_wins_owner
*owner1
,
824 uint32_t num_ips1
, const struct wrepl_ip
*ips1
,
825 const struct wrepl_wins_owner
*owner2
,
826 uint32_t num_ips2
, const struct wrepl_ip
*ips2
,
827 const struct wrepl_wins_name
*name2
)
830 struct wrepl_pull_names pull_names
;
831 struct wrepl_name
*names
;
834 uint32_t num_ips
= num_ips1
+ num_ips2
;
836 for (i
= 0; i
< num_ips2
; i
++) {
837 for (j
= 0; j
< num_ips1
; j
++) {
838 if (strcmp(ips2
[i
].ip
,ips1
[j
].ip
) == 0) {
845 pull_names
.in
.assoc_ctx
= ctx
->pull_assoc
;
846 pull_names
.in
.partner
= *owner2
;
847 pull_names
.in
.partner
.min_version
= pull_names
.in
.partner
.max_version
;
849 status
= wrepl_pull_names(ctx
->pull
, ctx
->pull
, &pull_names
);
850 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
851 CHECK_VALUE(tctx
, pull_names
.out
.num_names
, 1);
853 names
= pull_names
.out
.names
;
855 flags
= WREPL_NAME_FLAGS(names
[0].type
,
859 CHECK_VALUE(tctx
, names
[0].name
.type
, name2
->name
->type
);
860 CHECK_VALUE_STRING(tctx
, names
[0].name
.name
, name2
->name
->name
);
861 CHECK_VALUE_STRING(tctx
, names
[0].name
.scope
, name2
->name
->scope
);
862 CHECK_VALUE(tctx
, flags
, name2
->flags
| WREPL_TYPE_MHOMED
);
863 CHECK_VALUE_UINT64(tctx
, names
[0].version_id
, name2
->id
);
865 CHECK_VALUE(tctx
, names
[0].num_addresses
, num_ips
);
867 for (i
= 0; i
< names
[0].num_addresses
; i
++) {
868 const char *addr
= names
[0].addresses
[i
].address
;
869 const char *owner
= names
[0].addresses
[i
].owner
;
872 for (j
= 0; j
< num_ips2
; j
++) {
873 if (strcmp(addr
, ips2
[j
].ip
) == 0) {
875 CHECK_VALUE_STRING(tctx
, owner
, owner2
->address
);
882 for (j
= 0; j
< num_ips1
; j
++) {
883 if (strcmp(addr
, ips1
[j
].ip
) == 0) {
885 CHECK_VALUE_STRING(tctx
, owner
, owner1
->address
);
892 CHECK_VALUE_STRING(tctx
, addr
, "not found in address list");
894 talloc_free(pull_names
.out
.names
);
898 static bool test_wrepl_sgroup_merged(struct torture_context
*tctx
,
899 struct test_wrepl_conflict_conn
*ctx
,
900 struct wrepl_wins_owner
*merge_owner
,
901 struct wrepl_wins_owner
*owner1
,
902 uint32_t num_ips1
, const struct wrepl_ip
*ips1
,
903 struct wrepl_wins_owner
*owner2
,
904 uint32_t num_ips2
, const struct wrepl_ip
*ips2
,
905 const struct wrepl_wins_name
*name2
)
908 struct wrepl_pull_names pull_names
;
909 struct wrepl_name
*names
;
910 struct wrepl_name
*name
= NULL
;
913 uint32_t num_ips
= num_ips1
+ num_ips2
;
916 merge_owner
= &ctx
->c
;
919 for (i
= 0; i
< num_ips1
; i
++) {
920 if (owner1
!= &ctx
->c
&& strcmp(ips1
[i
].owner
,owner2
->address
) == 0) {
924 for (j
= 0; j
< num_ips2
; j
++) {
925 if (strcmp(ips1
[i
].ip
,ips2
[j
].ip
) == 0) {
933 pull_names
.in
.assoc_ctx
= ctx
->pull_assoc
;
934 pull_names
.in
.partner
= *merge_owner
;
935 pull_names
.in
.partner
.min_version
= pull_names
.in
.partner
.max_version
;
936 pull_names
.in
.partner
.max_version
= 0;
938 status
= wrepl_pull_names(ctx
->pull
, ctx
->pull
, &pull_names
);
939 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
941 names
= pull_names
.out
.names
;
943 for (i
= 0; i
< pull_names
.out
.num_names
; i
++) {
944 if (names
[i
].name
.type
!= name2
->name
->type
) continue;
945 if (!names
[i
].name
.name
) continue;
946 if (strcmp(names
[i
].name
.name
, name2
->name
->name
) != 0) continue;
947 if (names
[i
].name
.scope
) continue;
952 if (pull_names
.out
.num_names
> 0) {
953 merge_owner
->max_version
= names
[pull_names
.out
.num_names
-1].version_id
;
957 torture_comment(tctx
, "%s: Name '%s' not found\n", __location__
, nbt_name_string(ctx
, name2
->name
));
961 flags
= WREPL_NAME_FLAGS(name
->type
,
965 CHECK_VALUE(tctx
, name
->name
.type
, name2
->name
->type
);
966 CHECK_VALUE_STRING(tctx
, name
->name
.name
, name2
->name
->name
);
967 CHECK_VALUE_STRING(tctx
, name
->name
.scope
, name2
->name
->scope
);
968 CHECK_VALUE(tctx
, flags
, name2
->flags
);
970 CHECK_VALUE(tctx
, name
->num_addresses
, num_ips
);
972 for (i
= 0; i
< name
->num_addresses
; i
++) {
973 const char *addr
= name
->addresses
[i
].address
;
974 const char *owner
= name
->addresses
[i
].owner
;
977 for (j
= 0; j
< num_ips2
; j
++) {
978 if (strcmp(addr
, ips2
[j
].ip
) == 0) {
980 CHECK_VALUE_STRING(tctx
, owner
, ips2
[j
].owner
);
987 for (j
= 0; j
< num_ips1
; j
++) {
988 if (strcmp(addr
, ips1
[j
].ip
) == 0) {
990 if (owner1
== &ctx
->c
) {
991 CHECK_VALUE_STRING(tctx
, owner
, owner1
->address
);
993 CHECK_VALUE_STRING(tctx
, owner
, ips1
[j
].owner
);
1001 CHECK_VALUE_STRING(tctx
, addr
, "not found in address list");
1003 talloc_free(pull_names
.out
.names
);
1007 static bool test_conflict_same_owner(struct torture_context
*tctx
,
1008 struct test_wrepl_conflict_conn
*ctx
)
1010 static bool ret
= true;
1011 struct wrepl_wins_name wins_name1
;
1012 struct wrepl_wins_name wins_name2
;
1013 struct wrepl_wins_name
*wins_name_tmp
;
1014 struct wrepl_wins_name
*wins_name_last
;
1015 struct wrepl_wins_name
*wins_name_cur
;
1017 struct nbt_name names
[] = {
1018 _NBT_NAME("_SAME_OWNER_A", 0x00, NULL
),
1019 _NBT_NAME("_SAME_OWNER_A", 0x1C, NULL
),
1022 enum wrepl_name_type type
;
1023 enum wrepl_name_state state
;
1024 enum wrepl_name_node node
;
1027 const struct wrepl_ip
*ips
;
1030 .type
= WREPL_TYPE_GROUP
,
1031 .state
= WREPL_STATE_ACTIVE
,
1032 .node
= WREPL_NODE_B
,
1034 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1035 .ips
= addresses_A_1
,
1037 .type
= WREPL_TYPE_UNIQUE
,
1038 .state
= WREPL_STATE_ACTIVE
,
1039 .node
= WREPL_NODE_B
,
1041 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1042 .ips
= addresses_A_1
,
1044 .type
= WREPL_TYPE_UNIQUE
,
1045 .state
= WREPL_STATE_ACTIVE
,
1046 .node
= WREPL_NODE_B
,
1048 .num_ips
= ARRAY_SIZE(addresses_A_2
),
1049 .ips
= addresses_A_2
,
1051 .type
= WREPL_TYPE_UNIQUE
,
1052 .state
= WREPL_STATE_ACTIVE
,
1053 .node
= WREPL_NODE_B
,
1055 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1056 .ips
= addresses_A_1
,
1058 .type
= WREPL_TYPE_UNIQUE
,
1059 .state
= WREPL_STATE_ACTIVE
,
1060 .node
= WREPL_NODE_B
,
1062 .num_ips
= ARRAY_SIZE(addresses_A_2
),
1063 .ips
= addresses_A_2
,
1065 .type
= WREPL_TYPE_SGROUP
,
1066 .state
= WREPL_STATE_TOMBSTONE
,
1067 .node
= WREPL_NODE_B
,
1069 .num_ips
= ARRAY_SIZE(addresses_A_2
),
1070 .ips
= addresses_A_2
,
1072 .type
= WREPL_TYPE_MHOMED
,
1073 .state
= WREPL_STATE_TOMBSTONE
,
1074 .node
= WREPL_NODE_B
,
1076 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1077 .ips
= addresses_A_1
,
1079 .type
= WREPL_TYPE_MHOMED
,
1080 .state
= WREPL_STATE_RELEASED
,
1081 .node
= WREPL_NODE_B
,
1083 .num_ips
= ARRAY_SIZE(addresses_A_2
),
1084 .ips
= addresses_A_2
,
1086 .type
= WREPL_TYPE_SGROUP
,
1087 .state
= WREPL_STATE_ACTIVE
,
1088 .node
= WREPL_NODE_B
,
1090 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1091 .ips
= addresses_A_1
,
1093 .type
= WREPL_TYPE_SGROUP
,
1094 .state
= WREPL_STATE_ACTIVE
,
1095 .node
= WREPL_NODE_B
,
1097 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1098 .ips
= addresses_A_3_4
,
1100 .type
= WREPL_TYPE_SGROUP
,
1101 .state
= WREPL_STATE_TOMBSTONE
,
1102 .node
= WREPL_NODE_B
,
1104 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1105 .ips
= addresses_B_3_4
,
1107 /* the last one should always be a unique,tomstone record! */
1108 .type
= WREPL_TYPE_UNIQUE
,
1109 .state
= WREPL_STATE_TOMBSTONE
,
1110 .node
= WREPL_NODE_B
,
1112 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1113 .ips
= addresses_A_1
,
1117 wins_name_tmp
= NULL
;
1118 wins_name_last
= &wins_name2
;
1119 wins_name_cur
= &wins_name1
;
1121 for (j
=0; ret
&& j
< ARRAY_SIZE(names
); j
++) {
1122 torture_comment(tctx
, "Test Replica Conflicts with same owner[%s] for %s\n",
1123 nbt_name_string(ctx
, &names
[j
]), ctx
->a
.address
);
1125 for(i
=0; ret
&& i
< ARRAY_SIZE(records
); i
++) {
1126 wins_name_tmp
= wins_name_last
;
1127 wins_name_last
= wins_name_cur
;
1128 wins_name_cur
= wins_name_tmp
;
1131 torture_comment(tctx
, "%s,%s%s vs. %s,%s%s with %s ip(s) => %s\n",
1132 wrepl_name_type_string(records
[i
-1].type
),
1133 wrepl_name_state_string(records
[i
-1].state
),
1134 (records
[i
-1].is_static
?",static":""),
1135 wrepl_name_type_string(records
[i
].type
),
1136 wrepl_name_state_string(records
[i
].state
),
1137 (records
[i
].is_static
?",static":""),
1138 (records
[i
-1].ips
==records
[i
].ips
?"same":"different"),
1142 wins_name_cur
->name
= &names
[j
];
1143 wins_name_cur
->flags
= WREPL_NAME_FLAGS(records
[i
].type
,
1146 records
[i
].is_static
);
1147 wins_name_cur
->id
= ++ctx
->a
.max_version
;
1148 if (wins_name_cur
->flags
& 2) {
1149 wins_name_cur
->addresses
.addresses
.num_ips
= records
[i
].num_ips
;
1150 wins_name_cur
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
1153 wins_name_cur
->addresses
.ip
= records
[i
].ips
[0].ip
;
1155 wins_name_cur
->unknown
= "255.255.255.255";
1157 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->a
,wins_name_cur
);
1158 if (records
[i
].state
== WREPL_STATE_RELEASED
) {
1159 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->a
, wins_name_last
, false);
1160 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->a
, wins_name_cur
, false);
1162 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->a
, wins_name_cur
, true);
1165 /* the first one is a cleanup run */
1166 if (!ret
&& i
== 0) ret
= true;
1169 torture_comment(tctx
, "conflict handled wrong or record[%u]: %s\n", i
, __location__
);
1177 static bool test_conflict_different_owner(struct torture_context
*tctx
,
1178 struct test_wrepl_conflict_conn
*ctx
)
1181 struct wrepl_wins_name wins_name1
;
1182 struct wrepl_wins_name wins_name2
;
1183 struct wrepl_wins_name
*wins_name_r1
;
1184 struct wrepl_wins_name
*wins_name_r2
;
1187 const char *line
; /* just better debugging */
1188 struct nbt_name name
;
1189 const char *comment
;
1190 bool extra
; /* not the worst case, this is an extra test */
1193 struct wrepl_wins_owner
*owner
;
1194 enum wrepl_name_type type
;
1195 enum wrepl_name_state state
;
1196 enum wrepl_name_node node
;
1199 const struct wrepl_ip
*ips
;
1200 bool apply_expected
;
1202 struct wrepl_wins_owner
*merge_owner
;
1203 bool sgroup_cleanup
;
1207 * NOTE: the first record and the last applied one
1208 * needs to be from the same owner,
1209 * to not conflict in the next smbtorture run!!!
1212 .line
= __location__
,
1213 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1217 .type
= WREPL_TYPE_UNIQUE
,
1218 .state
= WREPL_STATE_TOMBSTONE
,
1219 .node
= WREPL_NODE_B
,
1221 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1222 .ips
= addresses_B_1
,
1223 .apply_expected
= true /* ignored */
1227 .type
= WREPL_TYPE_UNIQUE
,
1228 .state
= WREPL_STATE_TOMBSTONE
,
1229 .node
= WREPL_NODE_B
,
1231 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1232 .ips
= addresses_A_1
,
1233 .apply_expected
= true /* ignored */
1238 * unique vs unique section
1241 * unique,active vs. unique,active
1242 * => should be replaced
1245 .line
= __location__
,
1246 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1249 .type
= WREPL_TYPE_UNIQUE
,
1250 .state
= WREPL_STATE_ACTIVE
,
1251 .node
= WREPL_NODE_B
,
1253 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1254 .ips
= addresses_A_1
,
1255 .apply_expected
= true
1259 .type
= WREPL_TYPE_UNIQUE
,
1260 .state
= WREPL_STATE_ACTIVE
,
1261 .node
= WREPL_NODE_B
,
1263 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1264 .ips
= addresses_B_1
,
1265 .apply_expected
= true
1270 * unique,active vs. unique,tombstone
1271 * => should NOT be replaced
1274 .line
= __location__
,
1275 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1278 .type
= WREPL_TYPE_UNIQUE
,
1279 .state
= WREPL_STATE_ACTIVE
,
1280 .node
= WREPL_NODE_B
,
1282 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1283 .ips
= addresses_B_1
,
1284 .apply_expected
= true
1288 .type
= WREPL_TYPE_UNIQUE
,
1289 .state
= WREPL_STATE_TOMBSTONE
,
1290 .node
= WREPL_NODE_B
,
1292 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1293 .ips
= addresses_B_1
,
1294 .apply_expected
= false
1299 * unique,released vs. unique,active
1300 * => should be replaced
1303 .line
= __location__
,
1304 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1307 .type
= WREPL_TYPE_UNIQUE
,
1308 .state
= WREPL_STATE_RELEASED
,
1309 .node
= WREPL_NODE_B
,
1311 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1312 .ips
= addresses_B_1
,
1313 .apply_expected
= false
1317 .type
= WREPL_TYPE_UNIQUE
,
1318 .state
= WREPL_STATE_ACTIVE
,
1319 .node
= WREPL_NODE_B
,
1321 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1322 .ips
= addresses_A_1
,
1323 .apply_expected
= true
1328 * unique,released vs. unique,tombstone
1329 * => should be replaced
1332 .line
= __location__
,
1333 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1336 .type
= WREPL_TYPE_UNIQUE
,
1337 .state
= WREPL_STATE_RELEASED
,
1338 .node
= WREPL_NODE_B
,
1340 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1341 .ips
= addresses_A_1
,
1342 .apply_expected
= false
1346 .type
= WREPL_TYPE_UNIQUE
,
1347 .state
= WREPL_STATE_TOMBSTONE
,
1348 .node
= WREPL_NODE_B
,
1350 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1351 .ips
= addresses_B_1
,
1352 .apply_expected
= true
1357 * unique,tombstone vs. unique,active
1358 * => should be replaced
1361 .line
= __location__
,
1362 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1365 .type
= WREPL_TYPE_UNIQUE
,
1366 .state
= WREPL_STATE_TOMBSTONE
,
1367 .node
= WREPL_NODE_B
,
1369 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1370 .ips
= addresses_B_1
,
1371 .apply_expected
= true
1375 .type
= WREPL_TYPE_UNIQUE
,
1376 .state
= WREPL_STATE_ACTIVE
,
1377 .node
= WREPL_NODE_B
,
1379 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1380 .ips
= addresses_A_1
,
1381 .apply_expected
= true
1386 * unique,tombstone vs. unique,tombstone
1387 * => should be replaced
1390 .line
= __location__
,
1391 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1394 .type
= WREPL_TYPE_UNIQUE
,
1395 .state
= WREPL_STATE_TOMBSTONE
,
1396 .node
= WREPL_NODE_B
,
1398 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1399 .ips
= addresses_A_1
,
1400 .apply_expected
= true
1404 .type
= WREPL_TYPE_UNIQUE
,
1405 .state
= WREPL_STATE_TOMBSTONE
,
1406 .node
= WREPL_NODE_B
,
1408 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1409 .ips
= addresses_B_1
,
1410 .apply_expected
= true
1416 * unique vs normal groups section,
1419 * unique,active vs. group,active
1420 * => should be replaced
1423 .line
= __location__
,
1424 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1427 .type
= WREPL_TYPE_UNIQUE
,
1428 .state
= WREPL_STATE_ACTIVE
,
1429 .node
= WREPL_NODE_B
,
1431 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1432 .ips
= addresses_B_1
,
1433 .apply_expected
= true
1437 .type
= WREPL_TYPE_GROUP
,
1438 .state
= WREPL_STATE_ACTIVE
,
1439 .node
= WREPL_NODE_B
,
1441 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1442 .ips
= addresses_A_1
,
1443 .apply_expected
= true
1448 * unique,active vs. group,tombstone
1449 * => should NOT be replaced
1452 .line
= __location__
,
1453 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1456 .type
= WREPL_TYPE_UNIQUE
,
1457 .state
= WREPL_STATE_ACTIVE
,
1458 .node
= WREPL_NODE_B
,
1460 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1461 .ips
= addresses_A_1
,
1462 .apply_expected
= true
1466 .type
= WREPL_TYPE_GROUP
,
1467 .state
= WREPL_STATE_TOMBSTONE
,
1468 .node
= WREPL_NODE_B
,
1470 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1471 .ips
= addresses_A_1
,
1472 .apply_expected
= false
1477 * unique,released vs. group,active
1478 * => should be replaced
1481 .line
= __location__
,
1482 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1485 .type
= WREPL_TYPE_UNIQUE
,
1486 .state
= WREPL_STATE_RELEASED
,
1487 .node
= WREPL_NODE_B
,
1489 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1490 .ips
= addresses_A_1
,
1491 .apply_expected
= false
1495 .type
= WREPL_TYPE_GROUP
,
1496 .state
= WREPL_STATE_ACTIVE
,
1497 .node
= WREPL_NODE_B
,
1499 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1500 .ips
= addresses_B_1
,
1501 .apply_expected
= true
1506 * unique,released vs. group,tombstone
1507 * => should be replaced
1510 .line
= __location__
,
1511 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1514 .type
= WREPL_TYPE_UNIQUE
,
1515 .state
= WREPL_STATE_RELEASED
,
1516 .node
= WREPL_NODE_B
,
1518 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1519 .ips
= addresses_B_1
,
1520 .apply_expected
= false
1524 .type
= WREPL_TYPE_GROUP
,
1525 .state
= WREPL_STATE_TOMBSTONE
,
1526 .node
= WREPL_NODE_B
,
1528 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1529 .ips
= addresses_A_1
,
1530 .apply_expected
= true
1535 * unique,tombstone vs. group,active
1536 * => should be replaced
1539 .line
= __location__
,
1540 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1543 .type
= WREPL_TYPE_UNIQUE
,
1544 .state
= WREPL_STATE_TOMBSTONE
,
1545 .node
= WREPL_NODE_B
,
1547 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1548 .ips
= addresses_A_1
,
1549 .apply_expected
= true
1553 .type
= WREPL_TYPE_GROUP
,
1554 .state
= WREPL_STATE_ACTIVE
,
1555 .node
= WREPL_NODE_B
,
1557 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1558 .ips
= addresses_B_1
,
1559 .apply_expected
= true
1564 * unique,tombstone vs. group,tombstone
1565 * => should be replaced
1568 .line
= __location__
,
1569 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1572 .type
= WREPL_TYPE_UNIQUE
,
1573 .state
= WREPL_STATE_TOMBSTONE
,
1574 .node
= WREPL_NODE_B
,
1576 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1577 .ips
= addresses_B_1
,
1578 .apply_expected
= true
1582 .type
= WREPL_TYPE_GROUP
,
1583 .state
= WREPL_STATE_TOMBSTONE
,
1584 .node
= WREPL_NODE_B
,
1586 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1587 .ips
= addresses_A_1
,
1588 .apply_expected
= true
1593 * unique vs special groups section,
1596 * unique,active vs. sgroup,active
1597 * => should NOT be replaced
1600 .line
= __location__
,
1601 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1604 .type
= WREPL_TYPE_UNIQUE
,
1605 .state
= WREPL_STATE_ACTIVE
,
1606 .node
= WREPL_NODE_B
,
1608 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1609 .ips
= addresses_A_1
,
1610 .apply_expected
= true
1614 .type
= WREPL_TYPE_SGROUP
,
1615 .state
= WREPL_STATE_ACTIVE
,
1616 .node
= WREPL_NODE_B
,
1618 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1619 .ips
= addresses_A_1
,
1620 .apply_expected
= false
1625 * unique,active vs. sgroup,tombstone
1626 * => should NOT be replaced
1629 .line
= __location__
,
1630 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1633 .type
= WREPL_TYPE_UNIQUE
,
1634 .state
= WREPL_STATE_ACTIVE
,
1635 .node
= WREPL_NODE_B
,
1637 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1638 .ips
= addresses_A_1
,
1639 .apply_expected
= true
1643 .type
= WREPL_TYPE_SGROUP
,
1644 .state
= WREPL_STATE_TOMBSTONE
,
1645 .node
= WREPL_NODE_B
,
1647 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1648 .ips
= addresses_A_1
,
1649 .apply_expected
= false
1654 * unique,released vs. sgroup,active
1655 * => should be replaced
1658 .line
= __location__
,
1659 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1662 .type
= WREPL_TYPE_UNIQUE
,
1663 .state
= WREPL_STATE_RELEASED
,
1664 .node
= WREPL_NODE_B
,
1666 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1667 .ips
= addresses_A_1
,
1668 .apply_expected
= false
1672 .type
= WREPL_TYPE_SGROUP
,
1673 .state
= WREPL_STATE_ACTIVE
,
1674 .node
= WREPL_NODE_B
,
1676 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1677 .ips
= addresses_B_3_4
,
1678 .apply_expected
= true
1683 * unique,released vs. sgroup,tombstone
1684 * => should be replaced
1687 .line
= __location__
,
1688 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1691 .type
= WREPL_TYPE_UNIQUE
,
1692 .state
= WREPL_STATE_RELEASED
,
1693 .node
= WREPL_NODE_B
,
1695 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1696 .ips
= addresses_B_1
,
1697 .apply_expected
= false
1701 .type
= WREPL_TYPE_SGROUP
,
1702 .state
= WREPL_STATE_TOMBSTONE
,
1703 .node
= WREPL_NODE_B
,
1705 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1706 .ips
= addresses_A_3_4
,
1707 .apply_expected
= true
1712 * unique,tombstone vs. sgroup,active
1713 * => should be replaced
1716 .line
= __location__
,
1717 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1720 .type
= WREPL_TYPE_UNIQUE
,
1721 .state
= WREPL_STATE_TOMBSTONE
,
1722 .node
= WREPL_NODE_B
,
1724 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1725 .ips
= addresses_A_1
,
1726 .apply_expected
= true
1730 .type
= WREPL_TYPE_SGROUP
,
1731 .state
= WREPL_STATE_ACTIVE
,
1732 .node
= WREPL_NODE_B
,
1734 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1735 .ips
= addresses_B_3_4
,
1736 .apply_expected
= true
1741 * unique,tombstone vs. sgroup,tombstone
1742 * => should be replaced
1745 .line
= __location__
,
1746 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1749 .type
= WREPL_TYPE_UNIQUE
,
1750 .state
= WREPL_STATE_TOMBSTONE
,
1751 .node
= WREPL_NODE_B
,
1753 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1754 .ips
= addresses_B_1
,
1755 .apply_expected
= true
1759 .type
= WREPL_TYPE_SGROUP
,
1760 .state
= WREPL_STATE_TOMBSTONE
,
1761 .node
= WREPL_NODE_B
,
1763 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1764 .ips
= addresses_A_3_4
,
1765 .apply_expected
= true
1770 * unique vs multi homed section,
1773 * unique,active vs. mhomed,active
1774 * => should be replaced
1777 .line
= __location__
,
1778 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1781 .type
= WREPL_TYPE_UNIQUE
,
1782 .state
= WREPL_STATE_ACTIVE
,
1783 .node
= WREPL_NODE_B
,
1785 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1786 .ips
= addresses_A_1
,
1787 .apply_expected
= true
1791 .type
= WREPL_TYPE_MHOMED
,
1792 .state
= WREPL_STATE_ACTIVE
,
1793 .node
= WREPL_NODE_B
,
1795 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1796 .ips
= addresses_B_3_4
,
1797 .apply_expected
= true
1802 * unique,active vs. mhomed,tombstone
1803 * => should NOT be replaced
1806 .line
= __location__
,
1807 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1810 .type
= WREPL_TYPE_UNIQUE
,
1811 .state
= WREPL_STATE_ACTIVE
,
1812 .node
= WREPL_NODE_B
,
1814 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1815 .ips
= addresses_B_3_4
,
1816 .apply_expected
= true
1820 .type
= WREPL_TYPE_MHOMED
,
1821 .state
= WREPL_STATE_TOMBSTONE
,
1822 .node
= WREPL_NODE_B
,
1824 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1825 .ips
= addresses_B_3_4
,
1826 .apply_expected
= false
1831 * unique,released vs. mhomed,active
1832 * => should be replaced
1835 .line
= __location__
,
1836 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1839 .type
= WREPL_TYPE_UNIQUE
,
1840 .state
= WREPL_STATE_RELEASED
,
1841 .node
= WREPL_NODE_B
,
1843 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1844 .ips
= addresses_B_1
,
1845 .apply_expected
= false
1849 .type
= WREPL_TYPE_MHOMED
,
1850 .state
= WREPL_STATE_ACTIVE
,
1851 .node
= WREPL_NODE_B
,
1853 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1854 .ips
= addresses_A_3_4
,
1855 .apply_expected
= true
1860 * unique,released vs. mhomed,tombstone
1861 * => should be replaced
1864 .line
= __location__
,
1865 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1868 .type
= WREPL_TYPE_UNIQUE
,
1869 .state
= WREPL_STATE_RELEASED
,
1870 .node
= WREPL_NODE_B
,
1872 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1873 .ips
= addresses_A_1
,
1874 .apply_expected
= false
1878 .type
= WREPL_TYPE_MHOMED
,
1879 .state
= WREPL_STATE_TOMBSTONE
,
1880 .node
= WREPL_NODE_B
,
1882 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1883 .ips
= addresses_B_3_4
,
1884 .apply_expected
= true
1889 * unique,tombstone vs. mhomed,active
1890 * => should be replaced
1893 .line
= __location__
,
1894 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1897 .type
= WREPL_TYPE_UNIQUE
,
1898 .state
= WREPL_STATE_TOMBSTONE
,
1899 .node
= WREPL_NODE_B
,
1901 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1902 .ips
= addresses_B_1
,
1903 .apply_expected
= true
1907 .type
= WREPL_TYPE_MHOMED
,
1908 .state
= WREPL_STATE_ACTIVE
,
1909 .node
= WREPL_NODE_B
,
1911 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1912 .ips
= addresses_A_3_4
,
1913 .apply_expected
= true
1918 * unique,tombstone vs. mhomed,tombstone
1919 * => should be replaced
1922 .line
= __location__
,
1923 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1926 .type
= WREPL_TYPE_UNIQUE
,
1927 .state
= WREPL_STATE_TOMBSTONE
,
1928 .node
= WREPL_NODE_B
,
1930 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1931 .ips
= addresses_A_1
,
1932 .apply_expected
= true
1936 .type
= WREPL_TYPE_MHOMED
,
1937 .state
= WREPL_STATE_TOMBSTONE
,
1938 .node
= WREPL_NODE_B
,
1940 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1941 .ips
= addresses_B_3_4
,
1942 .apply_expected
= true
1947 * normal groups vs unique section,
1950 * group,active vs. unique,active
1951 * => should NOT be replaced
1954 .line
= __location__
,
1955 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1958 .type
= WREPL_TYPE_GROUP
,
1959 .state
= WREPL_STATE_ACTIVE
,
1960 .node
= WREPL_NODE_B
,
1962 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1963 .ips
= addresses_A_1
,
1964 .apply_expected
= true
1968 .type
= WREPL_TYPE_UNIQUE
,
1969 .state
= WREPL_STATE_ACTIVE
,
1970 .node
= WREPL_NODE_B
,
1972 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1973 .ips
= addresses_A_1
,
1974 .apply_expected
= false
1979 * group,active vs. unique,tombstone
1980 * => should NOT be replaced
1983 .line
= __location__
,
1984 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1987 .type
= WREPL_TYPE_GROUP
,
1988 .state
= WREPL_STATE_ACTIVE
,
1989 .node
= WREPL_NODE_B
,
1991 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1992 .ips
= addresses_A_1
,
1993 .apply_expected
= true
1997 .type
= WREPL_TYPE_UNIQUE
,
1998 .state
= WREPL_STATE_TOMBSTONE
,
1999 .node
= WREPL_NODE_B
,
2001 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2002 .ips
= addresses_A_1
,
2003 .apply_expected
= false
2008 * group,released vs. unique,active
2009 * => should NOT be replaced
2012 .line
= __location__
,
2013 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2016 .type
= WREPL_TYPE_GROUP
,
2017 .state
= WREPL_STATE_RELEASED
,
2018 .node
= WREPL_NODE_B
,
2020 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2021 .ips
= addresses_A_1
,
2022 .apply_expected
= false
2026 .type
= WREPL_TYPE_UNIQUE
,
2027 .state
= WREPL_STATE_ACTIVE
,
2028 .node
= WREPL_NODE_B
,
2030 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2031 .ips
= addresses_A_1
,
2032 .apply_expected
= false
2037 * group,released vs. unique,tombstone
2038 * => should NOT be replaced
2041 .line
= __location__
,
2042 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2045 .type
= WREPL_TYPE_GROUP
,
2046 .state
= WREPL_STATE_RELEASED
,
2047 .node
= WREPL_NODE_B
,
2049 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2050 .ips
= addresses_A_1
,
2051 .apply_expected
= false
2055 .type
= WREPL_TYPE_UNIQUE
,
2056 .state
= WREPL_STATE_TOMBSTONE
,
2057 .node
= WREPL_NODE_B
,
2059 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2060 .ips
= addresses_A_1
,
2061 .apply_expected
= false
2066 * group,tombstone vs. unique,active
2067 * => should NOT be replaced
2070 .line
= __location__
,
2071 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2074 .type
= WREPL_TYPE_GROUP
,
2075 .state
= WREPL_STATE_TOMBSTONE
,
2076 .node
= WREPL_NODE_B
,
2078 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2079 .ips
= addresses_A_1
,
2080 .apply_expected
= true
2084 .type
= WREPL_TYPE_UNIQUE
,
2085 .state
= WREPL_STATE_ACTIVE
,
2086 .node
= WREPL_NODE_B
,
2088 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2089 .ips
= addresses_A_1
,
2090 .apply_expected
= false
2095 * group,tombstone vs. unique,tombstone
2096 * => should NOT be replaced
2099 .line
= __location__
,
2100 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2103 .type
= WREPL_TYPE_GROUP
,
2104 .state
= WREPL_STATE_TOMBSTONE
,
2105 .node
= WREPL_NODE_B
,
2107 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2108 .ips
= addresses_A_1
,
2109 .apply_expected
= true
2113 .type
= WREPL_TYPE_UNIQUE
,
2114 .state
= WREPL_STATE_TOMBSTONE
,
2115 .node
= WREPL_NODE_B
,
2117 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2118 .ips
= addresses_A_1
,
2119 .apply_expected
= false
2124 * normal groups vs normal groups section,
2127 * group,active vs. group,active
2128 * => should NOT be replaced
2131 .line
= __location__
,
2132 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2135 .type
= WREPL_TYPE_GROUP
,
2136 .state
= WREPL_STATE_ACTIVE
,
2137 .node
= WREPL_NODE_B
,
2139 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2140 .ips
= addresses_A_1
,
2141 .apply_expected
= true
2145 .type
= WREPL_TYPE_GROUP
,
2146 .state
= WREPL_STATE_ACTIVE
,
2147 .node
= WREPL_NODE_B
,
2149 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2150 .ips
= addresses_A_1
,
2151 .apply_expected
= false
2156 * group,active vs. group,tombstone
2157 * => should NOT be replaced
2160 .line
= __location__
,
2161 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2164 .type
= WREPL_TYPE_GROUP
,
2165 .state
= WREPL_STATE_ACTIVE
,
2166 .node
= WREPL_NODE_B
,
2168 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2169 .ips
= addresses_A_1
,
2170 .apply_expected
= true
2174 .type
= WREPL_TYPE_GROUP
,
2175 .state
= WREPL_STATE_TOMBSTONE
,
2176 .node
= WREPL_NODE_B
,
2178 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2179 .ips
= addresses_A_1
,
2180 .apply_expected
= false
2185 * group,released vs. group,active
2186 * => should be replaced
2189 .line
= __location__
,
2190 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2193 .type
= WREPL_TYPE_GROUP
,
2194 .state
= WREPL_STATE_RELEASED
,
2195 .node
= WREPL_NODE_B
,
2197 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2198 .ips
= addresses_A_1
,
2199 .apply_expected
= false
2203 .type
= WREPL_TYPE_GROUP
,
2204 .state
= WREPL_STATE_ACTIVE
,
2205 .node
= WREPL_NODE_B
,
2207 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2208 .ips
= addresses_B_1
,
2209 .apply_expected
= true
2214 * group,released vs. group,tombstone
2215 * => should be replaced
2218 .line
= __location__
,
2219 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2222 .type
= WREPL_TYPE_GROUP
,
2223 .state
= WREPL_STATE_RELEASED
,
2224 .node
= WREPL_NODE_B
,
2226 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2227 .ips
= addresses_A_1
,
2228 .apply_expected
= false
2232 .type
= WREPL_TYPE_GROUP
,
2233 .state
= WREPL_STATE_TOMBSTONE
,
2234 .node
= WREPL_NODE_B
,
2236 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2237 .ips
= addresses_B_1
,
2238 .apply_expected
= true
2243 * group,tombstone vs. group,active
2244 * => should be replaced
2247 .line
= __location__
,
2248 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2251 .type
= WREPL_TYPE_GROUP
,
2252 .state
= WREPL_STATE_TOMBSTONE
,
2253 .node
= WREPL_NODE_B
,
2255 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2256 .ips
= addresses_B_1
,
2257 .apply_expected
= true
2261 .type
= WREPL_TYPE_GROUP
,
2262 .state
= WREPL_STATE_ACTIVE
,
2263 .node
= WREPL_NODE_B
,
2265 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2266 .ips
= addresses_A_1
,
2267 .apply_expected
= true
2272 * group,tombstone vs. group,tombstone
2273 * => should be replaced
2276 .line
= __location__
,
2277 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2280 .type
= WREPL_TYPE_GROUP
,
2281 .state
= WREPL_STATE_TOMBSTONE
,
2282 .node
= WREPL_NODE_B
,
2284 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2285 .ips
= addresses_A_1
,
2286 .apply_expected
= true
2290 .type
= WREPL_TYPE_GROUP
,
2291 .state
= WREPL_STATE_TOMBSTONE
,
2292 .node
= WREPL_NODE_B
,
2294 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2295 .ips
= addresses_B_1
,
2296 .apply_expected
= true
2301 * normal groups vs special groups section,
2304 * group,active vs. sgroup,active
2305 * => should NOT be replaced
2308 .line
= __location__
,
2309 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2312 .type
= WREPL_TYPE_GROUP
,
2313 .state
= WREPL_STATE_ACTIVE
,
2314 .node
= WREPL_NODE_B
,
2316 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2317 .ips
= addresses_B_1
,
2318 .apply_expected
= true
2322 .type
= WREPL_TYPE_SGROUP
,
2323 .state
= WREPL_STATE_ACTIVE
,
2324 .node
= WREPL_NODE_B
,
2326 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2327 .ips
= addresses_B_1
,
2328 .apply_expected
= false
2333 * group,active vs. sgroup,tombstone
2334 * => should NOT be replaced
2337 .line
= __location__
,
2338 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2341 .type
= WREPL_TYPE_GROUP
,
2342 .state
= WREPL_STATE_ACTIVE
,
2343 .node
= WREPL_NODE_B
,
2345 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2346 .ips
= addresses_B_1
,
2347 .apply_expected
= true
2351 .type
= WREPL_TYPE_SGROUP
,
2352 .state
= WREPL_STATE_TOMBSTONE
,
2353 .node
= WREPL_NODE_B
,
2355 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2356 .ips
= addresses_B_1
,
2357 .apply_expected
= false
2362 * group,released vs. sgroup,active
2363 * => should be replaced
2366 .line
= __location__
,
2367 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2370 .type
= WREPL_TYPE_GROUP
,
2371 .state
= WREPL_STATE_RELEASED
,
2372 .node
= WREPL_NODE_B
,
2374 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2375 .ips
= addresses_A_1
,
2376 .apply_expected
= false
2380 .type
= WREPL_TYPE_SGROUP
,
2381 .state
= WREPL_STATE_ACTIVE
,
2382 .node
= WREPL_NODE_B
,
2384 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2385 .ips
= addresses_B_1
,
2386 .apply_expected
= true
2391 * group,released vs. sgroup,tombstone
2392 * => should NOT be replaced
2395 .line
= __location__
,
2396 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2399 .type
= WREPL_TYPE_GROUP
,
2400 .state
= WREPL_STATE_RELEASED
,
2401 .node
= WREPL_NODE_B
,
2403 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2404 .ips
= addresses_B_1
,
2405 .apply_expected
= false
2409 .type
= WREPL_TYPE_SGROUP
,
2410 .state
= WREPL_STATE_TOMBSTONE
,
2411 .node
= WREPL_NODE_B
,
2413 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2414 .ips
= addresses_B_1
,
2415 .apply_expected
= false
2420 * group,tombstone vs. sgroup,active
2421 * => should be replaced
2424 .line
= __location__
,
2425 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2428 .type
= WREPL_TYPE_GROUP
,
2429 .state
= WREPL_STATE_TOMBSTONE
,
2430 .node
= WREPL_NODE_B
,
2432 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2433 .ips
= addresses_B_1
,
2434 .apply_expected
= true
2438 .type
= WREPL_TYPE_SGROUP
,
2439 .state
= WREPL_STATE_ACTIVE
,
2440 .node
= WREPL_NODE_B
,
2442 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2443 .ips
= addresses_A_1
,
2444 .apply_expected
= true
2449 * group,tombstone vs. sgroup,tombstone
2450 * => should be replaced
2453 .line
= __location__
,
2454 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2457 .type
= WREPL_TYPE_GROUP
,
2458 .state
= WREPL_STATE_TOMBSTONE
,
2459 .node
= WREPL_NODE_B
,
2461 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2462 .ips
= addresses_A_1
,
2463 .apply_expected
= true
2467 .type
= WREPL_TYPE_SGROUP
,
2468 .state
= WREPL_STATE_TOMBSTONE
,
2469 .node
= WREPL_NODE_B
,
2471 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2472 .ips
= addresses_B_1
,
2473 .apply_expected
= true
2478 * normal groups vs multi homed section,
2481 * group,active vs. mhomed,active
2482 * => should NOT be replaced
2485 .line
= __location__
,
2486 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2489 .type
= WREPL_TYPE_GROUP
,
2490 .state
= WREPL_STATE_ACTIVE
,
2491 .node
= WREPL_NODE_B
,
2493 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2494 .ips
= addresses_B_1
,
2495 .apply_expected
= true
2499 .type
= WREPL_TYPE_MHOMED
,
2500 .state
= WREPL_STATE_ACTIVE
,
2501 .node
= WREPL_NODE_B
,
2503 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2504 .ips
= addresses_B_1
,
2505 .apply_expected
= false
2510 * group,active vs. mhomed,tombstone
2511 * => should NOT be replaced
2514 .line
= __location__
,
2515 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2518 .type
= WREPL_TYPE_GROUP
,
2519 .state
= WREPL_STATE_ACTIVE
,
2520 .node
= WREPL_NODE_B
,
2522 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2523 .ips
= addresses_B_1
,
2524 .apply_expected
= true
2528 .type
= WREPL_TYPE_MHOMED
,
2529 .state
= WREPL_STATE_TOMBSTONE
,
2530 .node
= WREPL_NODE_B
,
2532 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2533 .ips
= addresses_B_1
,
2534 .apply_expected
= false
2539 * group,released vs. mhomed,active
2540 * => should NOT be replaced
2543 .line
= __location__
,
2544 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2547 .type
= WREPL_TYPE_GROUP
,
2548 .state
= WREPL_STATE_RELEASED
,
2549 .node
= WREPL_NODE_B
,
2551 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2552 .ips
= addresses_B_1
,
2553 .apply_expected
= false
2557 .type
= WREPL_TYPE_MHOMED
,
2558 .state
= WREPL_STATE_ACTIVE
,
2559 .node
= WREPL_NODE_B
,
2561 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2562 .ips
= addresses_B_1
,
2563 .apply_expected
= false
2568 * group,released vs. mhomed,tombstone
2569 * => should NOT be replaced
2572 .line
= __location__
,
2573 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2576 .type
= WREPL_TYPE_GROUP
,
2577 .state
= WREPL_STATE_RELEASED
,
2578 .node
= WREPL_NODE_B
,
2580 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2581 .ips
= addresses_B_1
,
2582 .apply_expected
= false
2586 .type
= WREPL_TYPE_MHOMED
,
2587 .state
= WREPL_STATE_TOMBSTONE
,
2588 .node
= WREPL_NODE_B
,
2590 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2591 .ips
= addresses_B_1
,
2592 .apply_expected
= false
2597 * group,tombstone vs. mhomed,active
2598 * => should be replaced
2601 .line
= __location__
,
2602 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2605 .type
= WREPL_TYPE_GROUP
,
2606 .state
= WREPL_STATE_TOMBSTONE
,
2607 .node
= WREPL_NODE_B
,
2609 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2610 .ips
= addresses_B_1
,
2611 .apply_expected
= true
2615 .type
= WREPL_TYPE_MHOMED
,
2616 .state
= WREPL_STATE_ACTIVE
,
2617 .node
= WREPL_NODE_B
,
2619 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2620 .ips
= addresses_A_1
,
2621 .apply_expected
= true
2626 * group,tombstone vs. mhomed,tombstone
2627 * => should be replaced
2630 .line
= __location__
,
2631 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2634 .type
= WREPL_TYPE_GROUP
,
2635 .state
= WREPL_STATE_TOMBSTONE
,
2636 .node
= WREPL_NODE_B
,
2638 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2639 .ips
= addresses_A_1
,
2640 .apply_expected
= true
2644 .type
= WREPL_TYPE_MHOMED
,
2645 .state
= WREPL_STATE_TOMBSTONE
,
2646 .node
= WREPL_NODE_B
,
2648 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2649 .ips
= addresses_B_1
,
2650 .apply_expected
= true
2655 * special groups vs unique section,
2658 * sgroup,active vs. unique,active
2659 * => should NOT be replaced
2662 .line
= __location__
,
2663 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2666 .type
= WREPL_TYPE_SGROUP
,
2667 .state
= WREPL_STATE_ACTIVE
,
2668 .node
= WREPL_NODE_B
,
2670 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2671 .ips
= addresses_B_1
,
2672 .apply_expected
= true
2676 .type
= WREPL_TYPE_UNIQUE
,
2677 .state
= WREPL_STATE_ACTIVE
,
2678 .node
= WREPL_NODE_B
,
2680 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2681 .ips
= addresses_B_1
,
2682 .apply_expected
= false
2687 * sgroup,active vs. unique,tombstone
2688 * => should NOT be replaced
2691 .line
= __location__
,
2692 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2695 .type
= WREPL_TYPE_SGROUP
,
2696 .state
= WREPL_STATE_ACTIVE
,
2697 .node
= WREPL_NODE_B
,
2699 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2700 .ips
= addresses_B_1
,
2701 .apply_expected
= true
2705 .type
= WREPL_TYPE_UNIQUE
,
2706 .state
= WREPL_STATE_TOMBSTONE
,
2707 .node
= WREPL_NODE_B
,
2709 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2710 .ips
= addresses_B_1
,
2711 .apply_expected
= false
2716 * sgroup,released vs. unique,active
2717 * => should be replaced
2720 .line
= __location__
,
2721 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2724 .type
= WREPL_TYPE_SGROUP
,
2725 .state
= WREPL_STATE_RELEASED
,
2726 .node
= WREPL_NODE_B
,
2728 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2729 .ips
= addresses_B_1
,
2730 .apply_expected
= false
2734 .type
= WREPL_TYPE_UNIQUE
,
2735 .state
= WREPL_STATE_ACTIVE
,
2736 .node
= WREPL_NODE_B
,
2738 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2739 .ips
= addresses_A_1
,
2740 .apply_expected
= true
2745 * sgroup,released vs. unique,tombstone
2746 * => should be replaced
2749 .line
= __location__
,
2750 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2753 .type
= WREPL_TYPE_SGROUP
,
2754 .state
= WREPL_STATE_RELEASED
,
2755 .node
= WREPL_NODE_B
,
2757 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2758 .ips
= addresses_A_1
,
2759 .apply_expected
= false
2763 .type
= WREPL_TYPE_UNIQUE
,
2764 .state
= WREPL_STATE_TOMBSTONE
,
2765 .node
= WREPL_NODE_B
,
2767 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2768 .ips
= addresses_B_1
,
2769 .apply_expected
= true
2774 * sgroup,tombstone vs. unique,active
2775 * => should be replaced
2778 .line
= __location__
,
2779 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2782 .type
= WREPL_TYPE_SGROUP
,
2783 .state
= WREPL_STATE_TOMBSTONE
,
2784 .node
= WREPL_NODE_B
,
2786 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2787 .ips
= addresses_A_1
,
2788 .apply_expected
= true
2792 .type
= WREPL_TYPE_UNIQUE
,
2793 .state
= WREPL_STATE_ACTIVE
,
2794 .node
= WREPL_NODE_B
,
2796 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2797 .ips
= addresses_B_1
,
2798 .apply_expected
= true
2803 * sgroup,tombstone vs. unique,tombstone
2804 * => should be replaced
2807 .line
= __location__
,
2808 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2811 .type
= WREPL_TYPE_SGROUP
,
2812 .state
= WREPL_STATE_TOMBSTONE
,
2813 .node
= WREPL_NODE_B
,
2815 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2816 .ips
= addresses_B_1
,
2817 .apply_expected
= true
2821 .type
= WREPL_TYPE_UNIQUE
,
2822 .state
= WREPL_STATE_TOMBSTONE
,
2823 .node
= WREPL_NODE_B
,
2825 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2826 .ips
= addresses_A_1
,
2827 .apply_expected
= true
2832 * special groups vs normal group section,
2835 * sgroup,active vs. group,active
2836 * => should NOT be replaced
2839 .line
= __location__
,
2840 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2843 .type
= WREPL_TYPE_SGROUP
,
2844 .state
= WREPL_STATE_ACTIVE
,
2845 .node
= WREPL_NODE_B
,
2847 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2848 .ips
= addresses_A_1
,
2849 .apply_expected
= true
2853 .type
= WREPL_TYPE_GROUP
,
2854 .state
= WREPL_STATE_ACTIVE
,
2855 .node
= WREPL_NODE_B
,
2857 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2858 .ips
= addresses_A_1
,
2859 .apply_expected
= false
2864 * sgroup,active vs. group,tombstone
2865 * => should NOT be replaced
2868 .line
= __location__
,
2869 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2872 .type
= WREPL_TYPE_SGROUP
,
2873 .state
= WREPL_STATE_ACTIVE
,
2874 .node
= WREPL_NODE_B
,
2876 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2877 .ips
= addresses_A_1
,
2878 .apply_expected
= true
2882 .type
= WREPL_TYPE_GROUP
,
2883 .state
= WREPL_STATE_TOMBSTONE
,
2884 .node
= WREPL_NODE_B
,
2886 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2887 .ips
= addresses_A_1
,
2888 .apply_expected
= false
2893 * sgroup,released vs. group,active
2894 * => should be replaced
2897 .line
= __location__
,
2898 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2901 .type
= WREPL_TYPE_SGROUP
,
2902 .state
= WREPL_STATE_RELEASED
,
2903 .node
= WREPL_NODE_B
,
2905 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2906 .ips
= addresses_A_1
,
2907 .apply_expected
= false
2911 .type
= WREPL_TYPE_GROUP
,
2912 .state
= WREPL_STATE_ACTIVE
,
2913 .node
= WREPL_NODE_B
,
2915 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2916 .ips
= addresses_B_1
,
2917 .apply_expected
= true
2922 * sgroup,released vs. group,tombstone
2923 * => should be replaced
2926 .line
= __location__
,
2927 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2930 .type
= WREPL_TYPE_SGROUP
,
2931 .state
= WREPL_STATE_RELEASED
,
2932 .node
= WREPL_NODE_B
,
2934 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2935 .ips
= addresses_B_1
,
2936 .apply_expected
= false
2940 .type
= WREPL_TYPE_GROUP
,
2941 .state
= WREPL_STATE_TOMBSTONE
,
2942 .node
= WREPL_NODE_B
,
2944 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2945 .ips
= addresses_A_1
,
2946 .apply_expected
= true
2951 * sgroup,tombstone vs. group,active
2952 * => should NOT be replaced
2955 .line
= __location__
,
2956 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2959 .type
= WREPL_TYPE_SGROUP
,
2960 .state
= WREPL_STATE_TOMBSTONE
,
2961 .node
= WREPL_NODE_B
,
2963 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2964 .ips
= addresses_A_1
,
2965 .apply_expected
= true
2969 .type
= WREPL_TYPE_GROUP
,
2970 .state
= WREPL_STATE_ACTIVE
,
2971 .node
= WREPL_NODE_B
,
2973 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2974 .ips
= addresses_B_1
,
2975 .apply_expected
= true
2980 * sgroup,tombstone vs. group,tombstone
2981 * => should NOT be replaced
2984 .line
= __location__
,
2985 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2988 .type
= WREPL_TYPE_SGROUP
,
2989 .state
= WREPL_STATE_TOMBSTONE
,
2990 .node
= WREPL_NODE_B
,
2992 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2993 .ips
= addresses_B_1
,
2994 .apply_expected
= true
2998 .type
= WREPL_TYPE_GROUP
,
2999 .state
= WREPL_STATE_TOMBSTONE
,
3000 .node
= WREPL_NODE_B
,
3002 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3003 .ips
= addresses_A_1
,
3004 .apply_expected
= true
3009 * special groups (not active) vs special group section,
3012 * sgroup,released vs. sgroup,active
3013 * => should be replaced
3016 .line
= __location__
,
3017 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3020 .type
= WREPL_TYPE_SGROUP
,
3021 .state
= WREPL_STATE_RELEASED
,
3022 .node
= WREPL_NODE_B
,
3024 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3025 .ips
= addresses_A_1
,
3026 .apply_expected
= false
3030 .type
= WREPL_TYPE_SGROUP
,
3031 .state
= WREPL_STATE_ACTIVE
,
3032 .node
= WREPL_NODE_B
,
3034 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3035 .ips
= addresses_B_1
,
3036 .apply_expected
= true
3041 * sgroup,released vs. sgroup,tombstone
3042 * => should be replaced
3045 .line
= __location__
,
3046 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3049 .type
= WREPL_TYPE_SGROUP
,
3050 .state
= WREPL_STATE_RELEASED
,
3051 .node
= WREPL_NODE_B
,
3053 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3054 .ips
= addresses_B_1
,
3055 .apply_expected
= false
3059 .type
= WREPL_TYPE_SGROUP
,
3060 .state
= WREPL_STATE_TOMBSTONE
,
3061 .node
= WREPL_NODE_B
,
3063 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3064 .ips
= addresses_A_1
,
3065 .apply_expected
= true
3070 * sgroup,tombstone vs. sgroup,active
3071 * => should NOT be replaced
3074 .line
= __location__
,
3075 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3078 .type
= WREPL_TYPE_SGROUP
,
3079 .state
= WREPL_STATE_TOMBSTONE
,
3080 .node
= WREPL_NODE_B
,
3082 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3083 .ips
= addresses_A_1
,
3084 .apply_expected
= true
3088 .type
= WREPL_TYPE_SGROUP
,
3089 .state
= WREPL_STATE_ACTIVE
,
3090 .node
= WREPL_NODE_B
,
3092 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3093 .ips
= addresses_B_1
,
3094 .apply_expected
= true
3099 * sgroup,tombstone vs. sgroup,tombstone
3100 * => should NOT be replaced
3103 .line
= __location__
,
3104 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3107 .type
= WREPL_TYPE_SGROUP
,
3108 .state
= WREPL_STATE_TOMBSTONE
,
3109 .node
= WREPL_NODE_B
,
3111 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3112 .ips
= addresses_B_1
,
3113 .apply_expected
= true
3117 .type
= WREPL_TYPE_SGROUP
,
3118 .state
= WREPL_STATE_TOMBSTONE
,
3119 .node
= WREPL_NODE_B
,
3121 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3122 .ips
= addresses_A_1
,
3123 .apply_expected
= true
3128 * special groups vs multi homed section,
3131 * sgroup,active vs. mhomed,active
3132 * => should NOT be replaced
3135 .line
= __location__
,
3136 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3139 .type
= WREPL_TYPE_SGROUP
,
3140 .state
= WREPL_STATE_ACTIVE
,
3141 .node
= WREPL_NODE_B
,
3143 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3144 .ips
= addresses_A_1
,
3145 .apply_expected
= true
3149 .type
= WREPL_TYPE_MHOMED
,
3150 .state
= WREPL_STATE_ACTIVE
,
3151 .node
= WREPL_NODE_B
,
3153 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3154 .ips
= addresses_A_1
,
3155 .apply_expected
= false
3160 * sgroup,active vs. mhomed,tombstone
3161 * => should NOT be replaced
3164 .line
= __location__
,
3165 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3168 .type
= WREPL_TYPE_SGROUP
,
3169 .state
= WREPL_STATE_ACTIVE
,
3170 .node
= WREPL_NODE_B
,
3172 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3173 .ips
= addresses_A_1
,
3174 .apply_expected
= true
3178 .type
= WREPL_TYPE_MHOMED
,
3179 .state
= WREPL_STATE_TOMBSTONE
,
3180 .node
= WREPL_NODE_B
,
3182 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3183 .ips
= addresses_A_1
,
3184 .apply_expected
= false
3189 * sgroup,released vs. mhomed,active
3190 * => should be replaced
3193 .line
= __location__
,
3194 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3197 .type
= WREPL_TYPE_SGROUP
,
3198 .state
= WREPL_STATE_RELEASED
,
3199 .node
= WREPL_NODE_B
,
3201 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3202 .ips
= addresses_A_1
,
3203 .apply_expected
= false
3207 .type
= WREPL_TYPE_MHOMED
,
3208 .state
= WREPL_STATE_ACTIVE
,
3209 .node
= WREPL_NODE_B
,
3211 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3212 .ips
= addresses_B_1
,
3213 .apply_expected
= true
3218 * sgroup,released vs. mhomed,tombstone
3219 * => should be replaced
3222 .line
= __location__
,
3223 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3226 .type
= WREPL_TYPE_SGROUP
,
3227 .state
= WREPL_STATE_RELEASED
,
3228 .node
= WREPL_NODE_B
,
3230 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3231 .ips
= addresses_B_1
,
3232 .apply_expected
= false
3236 .type
= WREPL_TYPE_MHOMED
,
3237 .state
= WREPL_STATE_TOMBSTONE
,
3238 .node
= WREPL_NODE_B
,
3240 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3241 .ips
= addresses_A_1
,
3242 .apply_expected
= true
3247 * sgroup,tombstone vs. mhomed,active
3248 * => should be replaced
3251 .line
= __location__
,
3252 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3255 .type
= WREPL_TYPE_SGROUP
,
3256 .state
= WREPL_STATE_TOMBSTONE
,
3257 .node
= WREPL_NODE_B
,
3259 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3260 .ips
= addresses_A_1
,
3261 .apply_expected
= true
3265 .type
= WREPL_TYPE_MHOMED
,
3266 .state
= WREPL_STATE_ACTIVE
,
3267 .node
= WREPL_NODE_B
,
3269 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3270 .ips
= addresses_B_1
,
3271 .apply_expected
= true
3276 * sgroup,tombstone vs. mhomed,tombstone
3277 * => should be replaced
3280 .line
= __location__
,
3281 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3284 .type
= WREPL_TYPE_SGROUP
,
3285 .state
= WREPL_STATE_TOMBSTONE
,
3286 .node
= WREPL_NODE_B
,
3288 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3289 .ips
= addresses_B_1
,
3290 .apply_expected
= true
3294 .type
= WREPL_TYPE_MHOMED
,
3295 .state
= WREPL_STATE_TOMBSTONE
,
3296 .node
= WREPL_NODE_B
,
3298 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3299 .ips
= addresses_A_1
,
3300 .apply_expected
= true
3305 * multi homed vs. unique section,
3308 * mhomed,active vs. unique,active
3309 * => should be replaced
3312 .line
= __location__
,
3313 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3316 .type
= WREPL_TYPE_MHOMED
,
3317 .state
= WREPL_STATE_ACTIVE
,
3318 .node
= WREPL_NODE_B
,
3320 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
3321 .ips
= addresses_A_3_4
,
3322 .apply_expected
= true
3326 .type
= WREPL_TYPE_UNIQUE
,
3327 .state
= WREPL_STATE_ACTIVE
,
3328 .node
= WREPL_NODE_B
,
3330 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3331 .ips
= addresses_B_1
,
3332 .apply_expected
= true
3337 * mhomed,active vs. unique,tombstone
3338 * => should NOT be replaced
3341 .line
= __location__
,
3342 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3345 .type
= WREPL_TYPE_MHOMED
,
3346 .state
= WREPL_STATE_ACTIVE
,
3347 .node
= WREPL_NODE_B
,
3349 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3350 .ips
= addresses_B_1
,
3351 .apply_expected
= true
3355 .type
= WREPL_TYPE_UNIQUE
,
3356 .state
= WREPL_STATE_TOMBSTONE
,
3357 .node
= WREPL_NODE_B
,
3359 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3360 .ips
= addresses_B_1
,
3361 .apply_expected
= false
3366 * mhomed,released vs. unique,active
3367 * => should be replaced
3370 .line
= __location__
,
3371 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3374 .type
= WREPL_TYPE_MHOMED
,
3375 .state
= WREPL_STATE_RELEASED
,
3376 .node
= WREPL_NODE_B
,
3378 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3379 .ips
= addresses_A_1
,
3380 .apply_expected
= false
3384 .type
= WREPL_TYPE_UNIQUE
,
3385 .state
= WREPL_STATE_ACTIVE
,
3386 .node
= WREPL_NODE_B
,
3388 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3389 .ips
= addresses_B_1
,
3390 .apply_expected
= true
3395 * mhomed,released vs. uinique,tombstone
3396 * => should be replaced
3399 .line
= __location__
,
3400 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3403 .type
= WREPL_TYPE_MHOMED
,
3404 .state
= WREPL_STATE_RELEASED
,
3405 .node
= WREPL_NODE_B
,
3407 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3408 .ips
= addresses_B_1
,
3409 .apply_expected
= false
3413 .type
= WREPL_TYPE_UNIQUE
,
3414 .state
= WREPL_STATE_TOMBSTONE
,
3415 .node
= WREPL_NODE_B
,
3417 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3418 .ips
= addresses_A_1
,
3419 .apply_expected
= true
3424 * mhomed,tombstone vs. unique,active
3425 * => should be replaced
3428 .line
= __location__
,
3429 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3432 .type
= WREPL_TYPE_MHOMED
,
3433 .state
= WREPL_STATE_TOMBSTONE
,
3434 .node
= WREPL_NODE_B
,
3436 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3437 .ips
= addresses_A_1
,
3438 .apply_expected
= true
3442 .type
= WREPL_TYPE_UNIQUE
,
3443 .state
= WREPL_STATE_ACTIVE
,
3444 .node
= WREPL_NODE_B
,
3446 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3447 .ips
= addresses_B_1
,
3448 .apply_expected
= true
3453 * mhomed,tombstone vs. uinique,tombstone
3454 * => should be replaced
3457 .line
= __location__
,
3458 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3461 .type
= WREPL_TYPE_MHOMED
,
3462 .state
= WREPL_STATE_TOMBSTONE
,
3463 .node
= WREPL_NODE_B
,
3465 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3466 .ips
= addresses_B_1
,
3467 .apply_expected
= true
3471 .type
= WREPL_TYPE_UNIQUE
,
3472 .state
= WREPL_STATE_TOMBSTONE
,
3473 .node
= WREPL_NODE_B
,
3475 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3476 .ips
= addresses_A_1
,
3477 .apply_expected
= true
3482 * multi homed vs. normal group section,
3485 * mhomed,active vs. group,active
3486 * => should be replaced
3489 .line
= __location__
,
3490 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3493 .type
= WREPL_TYPE_MHOMED
,
3494 .state
= WREPL_STATE_ACTIVE
,
3495 .node
= WREPL_NODE_B
,
3497 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3498 .ips
= addresses_A_1
,
3499 .apply_expected
= true
3503 .type
= WREPL_TYPE_GROUP
,
3504 .state
= WREPL_STATE_ACTIVE
,
3505 .node
= WREPL_NODE_B
,
3507 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3508 .ips
= addresses_B_1
,
3509 .apply_expected
= true
3514 * mhomed,active vs. group,tombstone
3515 * => should NOT be replaced
3518 .line
= __location__
,
3519 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3522 .type
= WREPL_TYPE_MHOMED
,
3523 .state
= WREPL_STATE_ACTIVE
,
3524 .node
= WREPL_NODE_B
,
3526 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3527 .ips
= addresses_B_1
,
3528 .apply_expected
= true
3532 .type
= WREPL_TYPE_GROUP
,
3533 .state
= WREPL_STATE_TOMBSTONE
,
3534 .node
= WREPL_NODE_B
,
3536 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3537 .ips
= addresses_B_1
,
3538 .apply_expected
= false
3543 * mhomed,released vs. group,active
3544 * => should be replaced
3547 .line
= __location__
,
3548 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3551 .type
= WREPL_TYPE_MHOMED
,
3552 .state
= WREPL_STATE_RELEASED
,
3553 .node
= WREPL_NODE_B
,
3555 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3556 .ips
= addresses_B_1
,
3557 .apply_expected
= false
3561 .type
= WREPL_TYPE_GROUP
,
3562 .state
= WREPL_STATE_ACTIVE
,
3563 .node
= WREPL_NODE_B
,
3565 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3566 .ips
= addresses_A_1
,
3567 .apply_expected
= true
3572 * mhomed,released vs. group,tombstone
3573 * => should be replaced
3576 .line
= __location__
,
3577 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3580 .type
= WREPL_TYPE_MHOMED
,
3581 .state
= WREPL_STATE_RELEASED
,
3582 .node
= WREPL_NODE_B
,
3584 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3585 .ips
= addresses_A_1
,
3586 .apply_expected
= false
3590 .type
= WREPL_TYPE_GROUP
,
3591 .state
= WREPL_STATE_TOMBSTONE
,
3592 .node
= WREPL_NODE_B
,
3594 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3595 .ips
= addresses_B_1
,
3596 .apply_expected
= true
3601 * mhomed,tombstone vs. group,active
3602 * => should be replaced
3605 .line
= __location__
,
3606 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3609 .type
= WREPL_TYPE_MHOMED
,
3610 .state
= WREPL_STATE_TOMBSTONE
,
3611 .node
= WREPL_NODE_B
,
3613 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3614 .ips
= addresses_B_1
,
3615 .apply_expected
= true
3619 .type
= WREPL_TYPE_GROUP
,
3620 .state
= WREPL_STATE_ACTIVE
,
3621 .node
= WREPL_NODE_B
,
3623 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3624 .ips
= addresses_A_1
,
3625 .apply_expected
= true
3630 * mhomed,tombstone vs. group,tombstone
3631 * => should be replaced
3634 .line
= __location__
,
3635 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3638 .type
= WREPL_TYPE_MHOMED
,
3639 .state
= WREPL_STATE_TOMBSTONE
,
3640 .node
= WREPL_NODE_B
,
3642 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3643 .ips
= addresses_A_1
,
3644 .apply_expected
= true
3648 .type
= WREPL_TYPE_GROUP
,
3649 .state
= WREPL_STATE_TOMBSTONE
,
3650 .node
= WREPL_NODE_B
,
3652 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3653 .ips
= addresses_B_1
,
3654 .apply_expected
= true
3659 * multi homed vs. special group section,
3662 * mhomed,active vs. sgroup,active
3663 * => should NOT be replaced
3666 .line
= __location__
,
3667 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3670 .type
= WREPL_TYPE_MHOMED
,
3671 .state
= WREPL_STATE_ACTIVE
,
3672 .node
= WREPL_NODE_B
,
3674 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3675 .ips
= addresses_A_1
,
3676 .apply_expected
= true
3680 .type
= WREPL_TYPE_SGROUP
,
3681 .state
= WREPL_STATE_ACTIVE
,
3682 .node
= WREPL_NODE_B
,
3684 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3685 .ips
= addresses_A_1
,
3686 .apply_expected
= false
3691 * mhomed,active vs. sgroup,tombstone
3692 * => should NOT be replaced
3695 .line
= __location__
,
3696 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3699 .type
= WREPL_TYPE_MHOMED
,
3700 .state
= WREPL_STATE_ACTIVE
,
3701 .node
= WREPL_NODE_B
,
3703 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3704 .ips
= addresses_A_1
,
3705 .apply_expected
= true
3709 .type
= WREPL_TYPE_SGROUP
,
3710 .state
= WREPL_STATE_TOMBSTONE
,
3711 .node
= WREPL_NODE_B
,
3713 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3714 .ips
= addresses_A_1
,
3715 .apply_expected
= false
3720 * mhomed,released vs. sgroup,active
3721 * => should be replaced
3724 .line
= __location__
,
3725 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3728 .type
= WREPL_TYPE_MHOMED
,
3729 .state
= WREPL_STATE_RELEASED
,
3730 .node
= WREPL_NODE_B
,
3732 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3733 .ips
= addresses_A_1
,
3734 .apply_expected
= false
3738 .type
= WREPL_TYPE_SGROUP
,
3739 .state
= WREPL_STATE_ACTIVE
,
3740 .node
= WREPL_NODE_B
,
3742 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3743 .ips
= addresses_B_1
,
3744 .apply_expected
= true
3749 * mhomed,released vs. sgroup,tombstone
3750 * => should be replaced
3753 .line
= __location__
,
3754 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3757 .type
= WREPL_TYPE_MHOMED
,
3758 .state
= WREPL_STATE_RELEASED
,
3759 .node
= WREPL_NODE_B
,
3761 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3762 .ips
= addresses_B_1
,
3763 .apply_expected
= false
3767 .type
= WREPL_TYPE_SGROUP
,
3768 .state
= WREPL_STATE_TOMBSTONE
,
3769 .node
= WREPL_NODE_B
,
3771 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3772 .ips
= addresses_A_1
,
3773 .apply_expected
= true
3778 * mhomed,tombstone vs. sgroup,active
3779 * => should be replaced
3782 .line
= __location__
,
3783 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3786 .type
= WREPL_TYPE_MHOMED
,
3787 .state
= WREPL_STATE_TOMBSTONE
,
3788 .node
= WREPL_NODE_B
,
3790 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3791 .ips
= addresses_A_1
,
3792 .apply_expected
= true
3796 .type
= WREPL_TYPE_SGROUP
,
3797 .state
= WREPL_STATE_ACTIVE
,
3798 .node
= WREPL_NODE_B
,
3800 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3801 .ips
= addresses_B_1
,
3802 .apply_expected
= true
3807 * mhomed,tombstone vs. sgroup,tombstone
3808 * => should be replaced
3811 .line
= __location__
,
3812 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3815 .type
= WREPL_TYPE_MHOMED
,
3816 .state
= WREPL_STATE_TOMBSTONE
,
3817 .node
= WREPL_NODE_B
,
3819 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3820 .ips
= addresses_B_1
,
3821 .apply_expected
= true
3825 .type
= WREPL_TYPE_SGROUP
,
3826 .state
= WREPL_STATE_TOMBSTONE
,
3827 .node
= WREPL_NODE_B
,
3829 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3830 .ips
= addresses_A_1
,
3831 .apply_expected
= true
3836 * multi homed vs. mlti homed section,
3839 * mhomed,active vs. mhomed,active
3840 * => should be replaced
3843 .line
= __location__
,
3844 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3847 .type
= WREPL_TYPE_MHOMED
,
3848 .state
= WREPL_STATE_ACTIVE
,
3849 .node
= WREPL_NODE_B
,
3851 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
3852 .ips
= addresses_A_3_4
,
3853 .apply_expected
= true
3857 .type
= WREPL_TYPE_MHOMED
,
3858 .state
= WREPL_STATE_ACTIVE
,
3859 .node
= WREPL_NODE_B
,
3861 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3862 .ips
= addresses_B_3_4
,
3863 .apply_expected
= true
3868 * mhomed,active vs. mhomed,tombstone
3869 * => should NOT be replaced
3872 .line
= __location__
,
3873 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3876 .type
= WREPL_TYPE_MHOMED
,
3877 .state
= WREPL_STATE_ACTIVE
,
3878 .node
= WREPL_NODE_B
,
3880 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3881 .ips
= addresses_B_3_4
,
3882 .apply_expected
= true
3886 .type
= WREPL_TYPE_MHOMED
,
3887 .state
= WREPL_STATE_TOMBSTONE
,
3888 .node
= WREPL_NODE_B
,
3890 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3891 .ips
= addresses_B_3_4
,
3892 .apply_expected
= false
3897 * mhomed,released vs. mhomed,active
3898 * => should be replaced
3901 .line
= __location__
,
3902 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3905 .type
= WREPL_TYPE_MHOMED
,
3906 .state
= WREPL_STATE_RELEASED
,
3907 .node
= WREPL_NODE_B
,
3909 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3910 .ips
= addresses_B_3_4
,
3911 .apply_expected
= false
3915 .type
= WREPL_TYPE_MHOMED
,
3916 .state
= WREPL_STATE_ACTIVE
,
3917 .node
= WREPL_NODE_B
,
3919 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
3920 .ips
= addresses_A_3_4
,
3921 .apply_expected
= true
3926 * mhomed,released vs. mhomed,tombstone
3927 * => should be replaced
3930 .line
= __location__
,
3931 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3934 .type
= WREPL_TYPE_MHOMED
,
3935 .state
= WREPL_STATE_RELEASED
,
3936 .node
= WREPL_NODE_B
,
3938 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
3939 .ips
= addresses_A_3_4
,
3940 .apply_expected
= false
3944 .type
= WREPL_TYPE_MHOMED
,
3945 .state
= WREPL_STATE_TOMBSTONE
,
3946 .node
= WREPL_NODE_B
,
3948 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3949 .ips
= addresses_B_3_4
,
3950 .apply_expected
= true
3955 * mhomed,tombstone vs. mhomed,active
3956 * => should be replaced
3959 .line
= __location__
,
3960 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3963 .type
= WREPL_TYPE_MHOMED
,
3964 .state
= WREPL_STATE_TOMBSTONE
,
3965 .node
= WREPL_NODE_B
,
3967 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3968 .ips
= addresses_B_3_4
,
3969 .apply_expected
= true
3973 .type
= WREPL_TYPE_MHOMED
,
3974 .state
= WREPL_STATE_ACTIVE
,
3975 .node
= WREPL_NODE_B
,
3977 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
3978 .ips
= addresses_A_3_4
,
3979 .apply_expected
= true
3984 * mhomed,tombstone vs. mhomed,tombstone
3985 * => should be replaced
3988 .line
= __location__
,
3989 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3992 .type
= WREPL_TYPE_MHOMED
,
3993 .state
= WREPL_STATE_TOMBSTONE
,
3994 .node
= WREPL_NODE_B
,
3996 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
3997 .ips
= addresses_A_3_4
,
3998 .apply_expected
= true
4002 .type
= WREPL_TYPE_MHOMED
,
4003 .state
= WREPL_STATE_TOMBSTONE
,
4004 .node
= WREPL_NODE_B
,
4006 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4007 .ips
= addresses_B_3_4
,
4008 .apply_expected
= true
4012 .line
= __location__
,
4013 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4017 .type
= WREPL_TYPE_UNIQUE
,
4018 .state
= WREPL_STATE_TOMBSTONE
,
4019 .node
= WREPL_NODE_B
,
4021 .num_ips
= ARRAY_SIZE(addresses_B_1
),
4022 .ips
= addresses_B_1
,
4023 .apply_expected
= true,
4027 .type
= WREPL_TYPE_UNIQUE
,
4028 .state
= WREPL_STATE_TOMBSTONE
,
4029 .node
= WREPL_NODE_B
,
4031 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4032 .ips
= addresses_A_1
,
4033 .apply_expected
= true,
4037 * special group vs special group section,
4040 * sgroup,active vs. sgroup,active same addresses
4041 * => should be NOT replaced
4044 .line
= __location__
,
4045 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4046 .comment
= "A:A_3_4 vs. B:A_3_4",
4050 .type
= WREPL_TYPE_SGROUP
,
4051 .state
= WREPL_STATE_ACTIVE
,
4052 .node
= WREPL_NODE_B
,
4054 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4055 .ips
= addresses_A_3_4
,
4056 .apply_expected
= true
4060 .type
= WREPL_TYPE_SGROUP
,
4061 .state
= WREPL_STATE_ACTIVE
,
4062 .node
= WREPL_NODE_B
,
4064 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4065 .ips
= addresses_A_3_4
,
4066 .apply_expected
= false,
4067 .sgroup_cleanup
= true
4071 * sgroup,active vs. sgroup,active same addresses
4072 * => should be NOT replaced
4075 .line
= __location__
,
4076 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4077 .comment
= "A:A_3_4 vs. B:NULL",
4081 .type
= WREPL_TYPE_SGROUP
,
4082 .state
= WREPL_STATE_ACTIVE
,
4083 .node
= WREPL_NODE_B
,
4085 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4086 .ips
= addresses_A_3_4
,
4087 .apply_expected
= true
4091 .type
= WREPL_TYPE_SGROUP
,
4092 .state
= WREPL_STATE_ACTIVE
,
4093 .node
= WREPL_NODE_B
,
4097 .apply_expected
= false,
4098 .sgroup_cleanup
= true
4102 * sgroup,active vs. sgroup,active subset addresses, special case...
4103 * => should NOT be replaced
4106 .line
= __location__
,
4107 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4108 .comment
= "A:A_3_4_X_3_4 vs. B:A_3_4",
4112 .type
= WREPL_TYPE_SGROUP
,
4113 .state
= WREPL_STATE_ACTIVE
,
4114 .node
= WREPL_NODE_B
,
4116 .num_ips
= ARRAY_SIZE(addresses_A_3_4_X_3_4
),
4117 .ips
= addresses_A_3_4_X_3_4
,
4118 .apply_expected
= true,
4122 .type
= WREPL_TYPE_SGROUP
,
4123 .state
= WREPL_STATE_ACTIVE
,
4124 .node
= WREPL_NODE_B
,
4126 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4127 .ips
= addresses_A_3_4
,
4128 .apply_expected
= false,
4132 .line
= __location__
,
4133 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4137 .type
= WREPL_TYPE_SGROUP
,
4138 .state
= WREPL_STATE_ACTIVE
,
4139 .node
= WREPL_NODE_B
,
4143 .apply_expected
= false,
4147 .type
= WREPL_TYPE_SGROUP
,
4148 .state
= WREPL_STATE_ACTIVE
,
4149 .node
= WREPL_NODE_B
,
4153 .apply_expected
= false,
4157 * sgroup,active vs. sgroup,active different addresses, but owner changed
4158 * => should be replaced
4161 .line
= __location__
,
4162 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4163 .comment
= "A:B_3_4 vs. B:A_3_4",
4167 .type
= WREPL_TYPE_SGROUP
,
4168 .state
= WREPL_STATE_ACTIVE
,
4169 .node
= WREPL_NODE_B
,
4171 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4172 .ips
= addresses_B_3_4
,
4173 .apply_expected
= true,
4177 .type
= WREPL_TYPE_SGROUP
,
4178 .state
= WREPL_STATE_ACTIVE
,
4179 .node
= WREPL_NODE_B
,
4181 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4182 .ips
= addresses_A_3_4
,
4183 .apply_expected
= true,
4184 .sgroup_cleanup
= true
4188 * sgroup,active vs. sgroup,active different addresses, but owner changed
4189 * => should be replaced
4192 .line
= __location__
,
4193 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4194 .comment
= "A:A_3_4 vs. B:A_3_4_OWNER_B",
4198 .type
= WREPL_TYPE_SGROUP
,
4199 .state
= WREPL_STATE_ACTIVE
,
4200 .node
= WREPL_NODE_B
,
4202 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4203 .ips
= addresses_A_3_4
,
4204 .apply_expected
= true,
4208 .type
= WREPL_TYPE_SGROUP
,
4209 .state
= WREPL_STATE_ACTIVE
,
4210 .node
= WREPL_NODE_B
,
4212 .num_ips
= ARRAY_SIZE(addresses_A_3_4_OWNER_B
),
4213 .ips
= addresses_A_3_4_OWNER_B
,
4214 .apply_expected
= true,
4215 .sgroup_cleanup
= true
4219 * sgroup,active vs. sgroup,active different addresses, but owner changed
4220 * => should be replaced
4223 .line
= __location__
,
4224 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4225 .comment
= "A:A_3_4_OWNER_B vs. B:A_3_4",
4229 .type
= WREPL_TYPE_SGROUP
,
4230 .state
= WREPL_STATE_ACTIVE
,
4231 .node
= WREPL_NODE_B
,
4233 .num_ips
= ARRAY_SIZE(addresses_A_3_4_OWNER_B
),
4234 .ips
= addresses_A_3_4_OWNER_B
,
4235 .apply_expected
= true,
4239 .type
= WREPL_TYPE_SGROUP
,
4240 .state
= WREPL_STATE_ACTIVE
,
4241 .node
= WREPL_NODE_B
,
4243 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4244 .ips
= addresses_A_3_4
,
4245 .apply_expected
= true,
4246 .sgroup_cleanup
= true
4250 * sgroup,active vs. sgroup,active different addresses
4251 * => should be merged
4254 .line
= __location__
,
4255 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4256 .comment
= "A:A_3_4 vs. B:B_3_4 => C:A_3_4_B_3_4",
4260 .type
= WREPL_TYPE_SGROUP
,
4261 .state
= WREPL_STATE_ACTIVE
,
4262 .node
= WREPL_NODE_B
,
4264 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4265 .ips
= addresses_A_3_4
,
4266 .apply_expected
= true,
4270 .type
= WREPL_TYPE_SGROUP
,
4271 .state
= WREPL_STATE_ACTIVE
,
4272 .node
= WREPL_NODE_B
,
4274 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4275 .ips
= addresses_B_3_4
,
4276 .sgroup_merge
= true,
4277 .sgroup_cleanup
= true,
4281 * sgroup,active vs. sgroup,active different addresses, special case...
4282 * => should be merged
4285 .line
= __location__
,
4286 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4287 .comment
= "A:B_3_4_X_3_4 vs. B:A_3_4 => B:A_3_4_X_3_4",
4291 .type
= WREPL_TYPE_SGROUP
,
4292 .state
= WREPL_STATE_ACTIVE
,
4293 .node
= WREPL_NODE_B
,
4295 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4296 .ips
= addresses_B_3_4_X_3_4
,
4297 .apply_expected
= true,
4301 .type
= WREPL_TYPE_SGROUP
,
4302 .state
= WREPL_STATE_ACTIVE
,
4303 .node
= WREPL_NODE_B
,
4305 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4306 .ips
= addresses_A_3_4
,
4307 .sgroup_merge
= true,
4308 .merge_owner
= &ctx
->b
,
4309 .sgroup_cleanup
= false
4313 .line
= __location__
,
4314 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4318 .type
= WREPL_TYPE_SGROUP
,
4319 .state
= WREPL_STATE_ACTIVE
,
4320 .node
= WREPL_NODE_B
,
4322 .num_ips
= ARRAY_SIZE(addresses_A_3_4_X_3_4_OWNER_B
),
4323 .ips
= addresses_A_3_4_X_3_4_OWNER_B
,
4324 .apply_expected
= true,
4328 .type
= WREPL_TYPE_SGROUP
,
4329 .state
= WREPL_STATE_ACTIVE
,
4330 .node
= WREPL_NODE_B
,
4334 .apply_expected
= false,
4338 * sgroup,active vs. sgroup,active different addresses, special case...
4339 * => should be merged
4342 .line
= __location__
,
4343 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4344 .comment
= "A:X_3_4 vs. B:A_3_4 => C:A_3_4_X_3_4",
4348 .type
= WREPL_TYPE_SGROUP
,
4349 .state
= WREPL_STATE_ACTIVE
,
4350 .node
= WREPL_NODE_B
,
4352 .num_ips
= ARRAY_SIZE(addresses_X_3_4
),
4353 .ips
= addresses_X_3_4
,
4354 .apply_expected
= true,
4358 .type
= WREPL_TYPE_SGROUP
,
4359 .state
= WREPL_STATE_ACTIVE
,
4360 .node
= WREPL_NODE_B
,
4362 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4363 .ips
= addresses_A_3_4
,
4364 .sgroup_merge
= true,
4365 .sgroup_cleanup
= false
4369 .line
= __location__
,
4370 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4374 .type
= WREPL_TYPE_SGROUP
,
4375 .state
= WREPL_STATE_ACTIVE
,
4376 .node
= WREPL_NODE_B
,
4380 .apply_expected
= false,
4384 .type
= WREPL_TYPE_SGROUP
,
4385 .state
= WREPL_STATE_ACTIVE
,
4386 .node
= WREPL_NODE_B
,
4390 .apply_expected
= false,
4394 * sgroup,active vs. sgroup,active different addresses, special case...
4395 * => should be merged
4398 .line
= __location__
,
4399 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4400 .comment
= "A:A_3_4_X_3_4 vs. B:A_3_4_OWNER_B => B:A_3_4_OWNER_B_X_3_4",
4404 .type
= WREPL_TYPE_SGROUP
,
4405 .state
= WREPL_STATE_ACTIVE
,
4406 .node
= WREPL_NODE_B
,
4408 .num_ips
= ARRAY_SIZE(addresses_A_3_4_X_3_4
),
4409 .ips
= addresses_A_3_4_X_3_4
,
4410 .apply_expected
= true,
4414 .type
= WREPL_TYPE_SGROUP
,
4415 .state
= WREPL_STATE_ACTIVE
,
4416 .node
= WREPL_NODE_B
,
4418 .num_ips
= ARRAY_SIZE(addresses_A_3_4_OWNER_B
),
4419 .ips
= addresses_A_3_4_OWNER_B
,
4420 .sgroup_merge
= true,
4421 .merge_owner
= &ctx
->b
,
4425 .line
= __location__
,
4426 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4430 .type
= WREPL_TYPE_SGROUP
,
4431 .state
= WREPL_STATE_ACTIVE
,
4432 .node
= WREPL_NODE_B
,
4436 .apply_expected
= false,
4440 .type
= WREPL_TYPE_SGROUP
,
4441 .state
= WREPL_STATE_ACTIVE
,
4442 .node
= WREPL_NODE_B
,
4446 .apply_expected
= false,
4450 * sgroup,active vs. sgroup,active partly different addresses, special case...
4451 * => should be merged
4454 .line
= __location__
,
4455 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4456 .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",
4460 .type
= WREPL_TYPE_SGROUP
,
4461 .state
= WREPL_STATE_ACTIVE
,
4462 .node
= WREPL_NODE_B
,
4464 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4465 .ips
= addresses_B_3_4_X_3_4
,
4466 .apply_expected
= true,
4470 .type
= WREPL_TYPE_SGROUP
,
4471 .state
= WREPL_STATE_ACTIVE
,
4472 .node
= WREPL_NODE_B
,
4474 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_1_2
),
4475 .ips
= addresses_B_3_4_X_1_2
,
4476 .sgroup_merge
= true,
4477 .sgroup_cleanup
= false
4481 .line
= __location__
,
4482 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4486 .type
= WREPL_TYPE_SGROUP
,
4487 .state
= WREPL_STATE_ACTIVE
,
4488 .node
= WREPL_NODE_B
,
4492 .apply_expected
= false,
4496 .type
= WREPL_TYPE_SGROUP
,
4497 .state
= WREPL_STATE_ACTIVE
,
4498 .node
= WREPL_NODE_B
,
4502 .apply_expected
= false,
4506 * sgroup,active vs. sgroup,active different addresses, special case...
4507 * => should be merged
4510 .line
= __location__
,
4511 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4512 .comment
= "A:A_3_4_B_3_4 vs. B:NULL => B:A_3_4",
4516 .type
= WREPL_TYPE_SGROUP
,
4517 .state
= WREPL_STATE_ACTIVE
,
4518 .node
= WREPL_NODE_B
,
4520 .num_ips
= ARRAY_SIZE(addresses_A_3_4_B_3_4
),
4521 .ips
= addresses_A_3_4_B_3_4
,
4522 .apply_expected
= true,
4526 .type
= WREPL_TYPE_SGROUP
,
4527 .state
= WREPL_STATE_ACTIVE
,
4528 .node
= WREPL_NODE_B
,
4532 .sgroup_merge
= true,
4533 .merge_owner
= &ctx
->b
,
4534 .sgroup_cleanup
= true
4538 .line
= __location__
,
4539 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4543 .type
= WREPL_TYPE_SGROUP
,
4544 .state
= WREPL_STATE_ACTIVE
,
4545 .node
= WREPL_NODE_B
,
4549 .apply_expected
= false,
4553 .type
= WREPL_TYPE_UNIQUE
,
4554 .state
= WREPL_STATE_TOMBSTONE
,
4555 .node
= WREPL_NODE_B
,
4557 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4558 .ips
= addresses_A_1
,
4559 .apply_expected
= true,
4563 * sgroup,active vs. sgroup,active different addresses, special case...
4564 * => should be merged
4567 .line
= __location__
,
4568 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4569 .comment
= "A:B_3_4_X_3_4 vs. B:NULL => B:X_3_4",
4573 .type
= WREPL_TYPE_SGROUP
,
4574 .state
= WREPL_STATE_ACTIVE
,
4575 .node
= WREPL_NODE_B
,
4577 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4578 .ips
= addresses_B_3_4_X_3_4
,
4579 .apply_expected
= true,
4583 .type
= WREPL_TYPE_SGROUP
,
4584 .state
= WREPL_STATE_ACTIVE
,
4585 .node
= WREPL_NODE_B
,
4589 .sgroup_merge
= true,
4590 .merge_owner
= &ctx
->b
,
4591 .sgroup_cleanup
= true
4595 .line
= __location__
,
4596 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4600 .type
= WREPL_TYPE_SGROUP
,
4601 .state
= WREPL_STATE_ACTIVE
,
4602 .node
= WREPL_NODE_B
,
4606 .apply_expected
= false,
4610 .type
= WREPL_TYPE_UNIQUE
,
4611 .state
= WREPL_STATE_TOMBSTONE
,
4612 .node
= WREPL_NODE_B
,
4614 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4615 .ips
= addresses_A_1
,
4616 .apply_expected
= true,
4621 * sgroup,active vs. sgroup,tombstone different no addresses, special
4622 * => should be replaced
4625 .line
= __location__
,
4626 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4627 .comment
= "A:B_3_4_X_3_4 vs. B:NULL => B:NULL",
4631 .type
= WREPL_TYPE_SGROUP
,
4632 .state
= WREPL_STATE_ACTIVE
,
4633 .node
= WREPL_NODE_B
,
4635 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4636 .ips
= addresses_B_3_4_X_3_4
,
4637 .apply_expected
= true,
4641 .type
= WREPL_TYPE_SGROUP
,
4642 .state
= WREPL_STATE_TOMBSTONE
,
4643 .node
= WREPL_NODE_B
,
4647 .apply_expected
= true,
4651 * sgroup,active vs. sgroup,tombstone different addresses
4652 * => should be replaced
4655 .line
= __location__
,
4656 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4657 .comment
= "A:B_3_4_X_3_4 vs. B:A_3_4 => B:A_3_4",
4661 .type
= WREPL_TYPE_SGROUP
,
4662 .state
= WREPL_STATE_ACTIVE
,
4663 .node
= WREPL_NODE_B
,
4665 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4666 .ips
= addresses_B_3_4_X_3_4
,
4667 .apply_expected
= true,
4671 .type
= WREPL_TYPE_SGROUP
,
4672 .state
= WREPL_STATE_TOMBSTONE
,
4673 .node
= WREPL_NODE_B
,
4675 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4676 .ips
= addresses_A_3_4
,
4677 .apply_expected
= true,
4681 * sgroup,active vs. sgroup,tombstone subset addresses
4682 * => should be replaced
4685 .line
= __location__
,
4686 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4687 .comment
= "A:B_3_4_X_3_4 vs. B:B_3_4 => B:B_3_4",
4691 .type
= WREPL_TYPE_SGROUP
,
4692 .state
= WREPL_STATE_ACTIVE
,
4693 .node
= WREPL_NODE_B
,
4695 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4696 .ips
= addresses_B_3_4_X_3_4
,
4697 .apply_expected
= true,
4701 .type
= WREPL_TYPE_SGROUP
,
4702 .state
= WREPL_STATE_TOMBSTONE
,
4703 .node
= WREPL_NODE_B
,
4705 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4706 .ips
= addresses_B_3_4
,
4707 .apply_expected
= true,
4711 * sgroup,active vs. sgroup,active same addresses
4712 * => should be replaced
4715 .line
= __location__
,
4716 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4717 .comment
= "A:B_3_4_X_3_4 vs. B:B_3_4_X_3_4 => B:B_3_4_X_3_4",
4721 .type
= WREPL_TYPE_SGROUP
,
4722 .state
= WREPL_STATE_ACTIVE
,
4723 .node
= WREPL_NODE_B
,
4725 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4726 .ips
= addresses_B_3_4_X_3_4
,
4727 .apply_expected
= true,
4731 .type
= WREPL_TYPE_SGROUP
,
4732 .state
= WREPL_STATE_TOMBSTONE
,
4733 .node
= WREPL_NODE_B
,
4735 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4736 .ips
= addresses_B_3_4_X_3_4
,
4737 .apply_expected
= true,
4742 * This should be the last record in this array,
4743 * we need to make sure the we leave a tombstoned unique entry
4747 .line
= __location__
,
4748 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4752 .type
= WREPL_TYPE_UNIQUE
,
4753 .state
= WREPL_STATE_TOMBSTONE
,
4754 .node
= WREPL_NODE_B
,
4756 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4757 .ips
= addresses_A_1
,
4758 .apply_expected
= true
4762 .type
= WREPL_TYPE_UNIQUE
,
4763 .state
= WREPL_STATE_TOMBSTONE
,
4764 .node
= WREPL_NODE_B
,
4766 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4767 .ips
= addresses_A_1
,
4768 .apply_expected
= true
4770 }}; /* do not add entries here, this should be the last record! */
4772 wins_name_r1
= &wins_name1
;
4773 wins_name_r2
= &wins_name2
;
4775 torture_comment(tctx
, "Test Replica Conflicts with different owners\n");
4777 for(i
=0; ret
&& i
< ARRAY_SIZE(records
); i
++) {
4779 if (!records
[i
].extra
&& !records
[i
].cleanup
) {
4780 /* we should test the worst cases */
4781 if (records
[i
].r2
.apply_expected
&& records
[i
].r1
.ips
==records
[i
].r2
.ips
) {
4782 torture_comment(tctx
, "(%s) Programmer error, invalid record[%u]: %s\n",
4783 __location__
, i
, records
[i
].line
);
4785 } else if (!records
[i
].r2
.apply_expected
&& records
[i
].r1
.ips
!=records
[i
].r2
.ips
) {
4786 torture_comment(tctx
, "(%s) Programmer error, invalid record[%u]: %s\n",
4787 __location__
, i
, records
[i
].line
);
4792 if (!records
[i
].cleanup
) {
4793 const char *expected
;
4796 if (records
[i
].r2
.sgroup_merge
) {
4797 expected
= "SGROUP_MERGE";
4798 } else if (records
[i
].r2
.apply_expected
) {
4799 expected
= "REPLACE";
4801 expected
= "NOT REPLACE";
4804 if (!records
[i
].r1
.ips
&& !records
[i
].r2
.ips
) {
4805 ips
= "with no ip(s)";
4806 } else if (records
[i
].r1
.ips
==records
[i
].r2
.ips
) {
4807 ips
= "with same ip(s)";
4809 ips
= "with different ip(s)";
4812 torture_comment(tctx
, "%s,%s%s vs. %s,%s%s %s => %s\n",
4813 wrepl_name_type_string(records
[i
].r1
.type
),
4814 wrepl_name_state_string(records
[i
].r1
.state
),
4815 (records
[i
].r1
.is_static
?",static":""),
4816 wrepl_name_type_string(records
[i
].r2
.type
),
4817 wrepl_name_state_string(records
[i
].r2
.state
),
4818 (records
[i
].r2
.is_static
?",static":""),
4819 (records
[i
].comment
?records
[i
].comment
:ips
),
4826 wins_name_r1
->name
= &records
[i
].name
;
4827 wins_name_r1
->flags
= WREPL_NAME_FLAGS(records
[i
].r1
.type
,
4828 records
[i
].r1
.state
,
4830 records
[i
].r1
.is_static
);
4831 wins_name_r1
->id
= ++records
[i
].r1
.owner
->max_version
;
4832 if (wins_name_r1
->flags
& 2) {
4833 wins_name_r1
->addresses
.addresses
.num_ips
= records
[i
].r1
.num_ips
;
4834 wins_name_r1
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
4837 wins_name_r1
->addresses
.ip
= records
[i
].r1
.ips
[0].ip
;
4839 wins_name_r1
->unknown
= "255.255.255.255";
4842 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r1
.owner
, wins_name_r1
);
4843 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r1
.owner
,
4844 wins_name_r1
, records
[i
].r1
.apply_expected
);
4849 wins_name_r2
->name
= &records
[i
].name
;
4850 wins_name_r2
->flags
= WREPL_NAME_FLAGS(records
[i
].r2
.type
,
4851 records
[i
].r2
.state
,
4853 records
[i
].r2
.is_static
);
4854 wins_name_r2
->id
= ++records
[i
].r2
.owner
->max_version
;
4855 if (wins_name_r2
->flags
& 2) {
4856 wins_name_r2
->addresses
.addresses
.num_ips
= records
[i
].r2
.num_ips
;
4857 wins_name_r2
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
4860 wins_name_r2
->addresses
.ip
= records
[i
].r2
.ips
[0].ip
;
4862 wins_name_r2
->unknown
= "255.255.255.255";
4865 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
);
4866 if (records
[i
].r1
.state
== WREPL_STATE_RELEASED
) {
4867 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r1
.owner
,
4868 wins_name_r1
, false);
4869 } else if (records
[i
].r2
.sgroup_merge
) {
4870 ret
&= test_wrepl_sgroup_merged(tctx
, ctx
, records
[i
].r2
.merge_owner
,
4871 records
[i
].r1
.owner
,
4872 records
[i
].r1
.num_ips
, records
[i
].r1
.ips
,
4873 records
[i
].r2
.owner
,
4874 records
[i
].r2
.num_ips
, records
[i
].r2
.ips
,
4876 } else if (records
[i
].r1
.owner
!= records
[i
].r2
.owner
) {
4878 _expected
= (records
[i
].r1
.apply_expected
&& !records
[i
].r2
.apply_expected
);
4879 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r1
.owner
,
4880 wins_name_r1
, _expected
);
4882 if (records
[i
].r2
.state
== WREPL_STATE_RELEASED
) {
4883 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r2
.owner
,
4884 wins_name_r2
, false);
4885 } else if (!records
[i
].r2
.sgroup_merge
) {
4886 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r2
.owner
,
4887 wins_name_r2
, records
[i
].r2
.apply_expected
);
4890 if (records
[i
].r2
.sgroup_cleanup
) {
4892 torture_comment(tctx
, "failed before sgroup_cleanup record[%u]: %s\n", i
, records
[i
].line
);
4896 /* clean up the SGROUP record */
4897 wins_name_r1
->name
= &records
[i
].name
;
4898 wins_name_r1
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
4900 WREPL_NODE_B
, false);
4901 wins_name_r1
->id
= ++records
[i
].r1
.owner
->max_version
;
4902 wins_name_r1
->addresses
.addresses
.num_ips
= 0;
4903 wins_name_r1
->addresses
.addresses
.ips
= NULL
;
4904 wins_name_r1
->unknown
= "255.255.255.255";
4905 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r1
.owner
, wins_name_r1
);
4907 /* here we test how names from an owner are deleted */
4908 if (records
[i
].r2
.sgroup_merge
&& records
[i
].r2
.num_ips
) {
4909 ret
&= test_wrepl_sgroup_merged(tctx
, ctx
, NULL
,
4910 records
[i
].r2
.owner
,
4911 records
[i
].r2
.num_ips
, records
[i
].r2
.ips
,
4912 records
[i
].r1
.owner
,
4917 /* clean up the SGROUP record */
4918 wins_name_r2
->name
= &records
[i
].name
;
4919 wins_name_r2
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
4921 WREPL_NODE_B
, false);
4922 wins_name_r2
->id
= ++records
[i
].r2
.owner
->max_version
;
4923 wins_name_r2
->addresses
.addresses
.num_ips
= 0;
4924 wins_name_r2
->addresses
.addresses
.ips
= NULL
;
4925 wins_name_r2
->unknown
= "255.255.255.255";
4926 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
);
4928 /* take ownership of the SGROUP record */
4929 wins_name_r2
->name
= &records
[i
].name
;
4930 wins_name_r2
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
4932 WREPL_NODE_B
, false);
4933 wins_name_r2
->id
= ++records
[i
].r2
.owner
->max_version
;
4934 wins_name_r2
->addresses
.addresses
.num_ips
= ARRAY_SIZE(addresses_B_1
);
4935 wins_name_r2
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
4937 wins_name_r2
->unknown
= "255.255.255.255";
4938 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
);
4939 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
, true);
4941 /* overwrite the SGROUP record with unique,tombstone */
4942 wins_name_r2
->name
= &records
[i
].name
;
4943 wins_name_r2
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
4944 WREPL_STATE_TOMBSTONE
,
4945 WREPL_NODE_B
, false);
4946 wins_name_r2
->id
= ++records
[i
].r2
.owner
->max_version
;
4947 wins_name_r2
->addresses
.addresses
.num_ips
= ARRAY_SIZE(addresses_B_1
);
4948 wins_name_r2
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
4950 wins_name_r2
->unknown
= "255.255.255.255";
4951 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
);
4952 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
, true);
4955 torture_comment(tctx
, "failed in sgroup_cleanup record[%u]: %s\n", i
, records
[i
].line
);
4960 /* the first one is a cleanup run */
4961 if (!ret
&& i
== 0) ret
= true;
4964 torture_comment(tctx
, "conflict handled wrong or record[%u]: %s\n", i
, records
[i
].line
);
4972 static bool test_conflict_owned_released_vs_replica(struct torture_context
*tctx
,
4973 struct test_wrepl_conflict_conn
*ctx
)
4977 struct wrepl_wins_name wins_name_
;
4978 struct wrepl_wins_name
*wins_name
= &wins_name_
;
4979 struct nbt_name_register name_register_
;
4980 struct nbt_name_register
*name_register
= &name_register_
;
4981 struct nbt_name_release release_
;
4982 struct nbt_name_release
*release
= &release_
;
4985 const char *line
; /* just better debugging */
4986 struct nbt_name name
;
4991 const struct wrepl_ip
*ips
;
4992 bool apply_expected
;
4995 enum wrepl_name_type type
;
4996 enum wrepl_name_state state
;
4997 enum wrepl_name_node node
;
5000 const struct wrepl_ip
*ips
;
5001 bool apply_expected
;
5005 * unique vs. unique section
5008 * unique,released vs. unique,active with same ip(s)
5011 .line
= __location__
,
5012 .name
= _NBT_NAME("_UR_UA_SI", 0x00, NULL
),
5016 .num_ips
= ctx
->addresses_best_num
,
5017 .ips
= ctx
->addresses_best
,
5018 .apply_expected
= true
5021 .type
= WREPL_TYPE_UNIQUE
,
5022 .state
= WREPL_STATE_ACTIVE
,
5023 .node
= WREPL_NODE_B
,
5025 .num_ips
= ctx
->addresses_best_num
,
5026 .ips
= ctx
->addresses_best
,
5027 .apply_expected
= true
5031 * unique,released vs. unique,active with different ip(s)
5034 .line
= __location__
,
5035 .name
= _NBT_NAME("_UR_UA_DI", 0x00, NULL
),
5039 .num_ips
= ctx
->addresses_best_num
,
5040 .ips
= ctx
->addresses_best
,
5041 .apply_expected
= true
5044 .type
= WREPL_TYPE_UNIQUE
,
5045 .state
= WREPL_STATE_ACTIVE
,
5046 .node
= WREPL_NODE_B
,
5048 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5049 .ips
= addresses_B_1
,
5050 .apply_expected
= true
5054 * unique,released vs. unique,tombstone with same ip(s)
5057 .line
= __location__
,
5058 .name
= _NBT_NAME("_UR_UT_SI", 0x00, NULL
),
5062 .num_ips
= ctx
->addresses_best_num
,
5063 .ips
= ctx
->addresses_best
,
5064 .apply_expected
= true
5067 .type
= WREPL_TYPE_UNIQUE
,
5068 .state
= WREPL_STATE_TOMBSTONE
,
5069 .node
= WREPL_NODE_B
,
5071 .num_ips
= ctx
->addresses_best_num
,
5072 .ips
= ctx
->addresses_best
,
5073 .apply_expected
= true
5077 * unique,released vs. unique,tombstone with different ip(s)
5080 .line
= __location__
,
5081 .name
= _NBT_NAME("_UR_UT_DI", 0x00, NULL
),
5085 .num_ips
= ctx
->addresses_best_num
,
5086 .ips
= ctx
->addresses_best
,
5087 .apply_expected
= true
5090 .type
= WREPL_TYPE_UNIQUE
,
5091 .state
= WREPL_STATE_TOMBSTONE
,
5092 .node
= WREPL_NODE_B
,
5094 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5095 .ips
= addresses_B_1
,
5096 .apply_expected
= true
5100 * unique vs. group section
5103 * unique,released vs. group,active with same ip(s)
5106 .line
= __location__
,
5107 .name
= _NBT_NAME("_UR_GA_SI", 0x00, NULL
),
5111 .num_ips
= ctx
->addresses_best_num
,
5112 .ips
= ctx
->addresses_best
,
5113 .apply_expected
= true
5116 .type
= WREPL_TYPE_GROUP
,
5117 .state
= WREPL_STATE_ACTIVE
,
5118 .node
= WREPL_NODE_B
,
5120 .num_ips
= ctx
->addresses_best_num
,
5121 .ips
= ctx
->addresses_best
,
5122 .apply_expected
= true
5126 * unique,released vs. group,active with different ip(s)
5129 .line
= __location__
,
5130 .name
= _NBT_NAME("_UR_GA_DI", 0x00, NULL
),
5134 .num_ips
= ctx
->addresses_best_num
,
5135 .ips
= ctx
->addresses_best
,
5136 .apply_expected
= true
5139 .type
= WREPL_TYPE_GROUP
,
5140 .state
= WREPL_STATE_ACTIVE
,
5141 .node
= WREPL_NODE_B
,
5143 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5144 .ips
= addresses_B_1
,
5145 .apply_expected
= true
5149 * unique,released vs. group,tombstone with same ip(s)
5152 .line
= __location__
,
5153 .name
= _NBT_NAME("_UR_GT_SI", 0x00, NULL
),
5157 .num_ips
= ctx
->addresses_best_num
,
5158 .ips
= ctx
->addresses_best
,
5159 .apply_expected
= true
5162 .type
= WREPL_TYPE_GROUP
,
5163 .state
= WREPL_STATE_TOMBSTONE
,
5164 .node
= WREPL_NODE_B
,
5166 .num_ips
= ctx
->addresses_best_num
,
5167 .ips
= ctx
->addresses_best
,
5168 .apply_expected
= true
5172 * unique,released vs. group,tombstone with different ip(s)
5175 .line
= __location__
,
5176 .name
= _NBT_NAME("_UR_GT_DI", 0x00, NULL
),
5180 .num_ips
= ctx
->addresses_best_num
,
5181 .ips
= ctx
->addresses_best
,
5182 .apply_expected
= true
5185 .type
= WREPL_TYPE_GROUP
,
5186 .state
= WREPL_STATE_TOMBSTONE
,
5187 .node
= WREPL_NODE_B
,
5189 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5190 .ips
= addresses_B_1
,
5191 .apply_expected
= true
5195 * unique vs. special group section
5198 * unique,released vs. sgroup,active with same ip(s)
5201 .line
= __location__
,
5202 .name
= _NBT_NAME("_UR_SA_SI", 0x00, NULL
),
5206 .num_ips
= ctx
->addresses_best_num
,
5207 .ips
= ctx
->addresses_best
,
5208 .apply_expected
= true
5211 .type
= WREPL_TYPE_SGROUP
,
5212 .state
= WREPL_STATE_ACTIVE
,
5213 .node
= WREPL_NODE_B
,
5215 .num_ips
= ctx
->addresses_best_num
,
5216 .ips
= ctx
->addresses_best
,
5217 .apply_expected
= true
5221 * unique,released vs. sgroup,active with different ip(s)
5224 .line
= __location__
,
5225 .name
= _NBT_NAME("_UR_SA_DI", 0x00, NULL
),
5229 .num_ips
= ctx
->addresses_best_num
,
5230 .ips
= ctx
->addresses_best
,
5231 .apply_expected
= true
5234 .type
= WREPL_TYPE_SGROUP
,
5235 .state
= WREPL_STATE_ACTIVE
,
5236 .node
= WREPL_NODE_B
,
5238 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5239 .ips
= addresses_B_1
,
5240 .apply_expected
= true
5244 * unique,released vs. sgroup,tombstone with same ip(s)
5247 .line
= __location__
,
5248 .name
= _NBT_NAME("_UR_ST_SI", 0x00, NULL
),
5252 .num_ips
= ctx
->addresses_best_num
,
5253 .ips
= ctx
->addresses_best
,
5254 .apply_expected
= true
5257 .type
= WREPL_TYPE_SGROUP
,
5258 .state
= WREPL_STATE_TOMBSTONE
,
5259 .node
= WREPL_NODE_B
,
5261 .num_ips
= ctx
->addresses_best_num
,
5262 .ips
= ctx
->addresses_best
,
5263 .apply_expected
= true
5267 * unique,released vs. sgroup,tombstone with different ip(s)
5270 .line
= __location__
,
5271 .name
= _NBT_NAME("_UR_ST_DI", 0x00, NULL
),
5275 .num_ips
= ctx
->addresses_best_num
,
5276 .ips
= ctx
->addresses_best
,
5277 .apply_expected
= true
5280 .type
= WREPL_TYPE_SGROUP
,
5281 .state
= WREPL_STATE_TOMBSTONE
,
5282 .node
= WREPL_NODE_B
,
5284 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5285 .ips
= addresses_B_1
,
5286 .apply_expected
= true
5290 * unique vs. multi homed section
5293 * unique,released vs. mhomed,active with same ip(s)
5296 .line
= __location__
,
5297 .name
= _NBT_NAME("_UR_MA_SI", 0x00, NULL
),
5301 .num_ips
= ctx
->addresses_best_num
,
5302 .ips
= ctx
->addresses_best
,
5303 .apply_expected
= true
5306 .type
= WREPL_TYPE_MHOMED
,
5307 .state
= WREPL_STATE_ACTIVE
,
5308 .node
= WREPL_NODE_B
,
5310 .num_ips
= ctx
->addresses_best_num
,
5311 .ips
= ctx
->addresses_best
,
5312 .apply_expected
= true
5316 * unique,released vs. mhomed,active with different ip(s)
5319 .line
= __location__
,
5320 .name
= _NBT_NAME("_UR_MA_DI", 0x00, NULL
),
5324 .num_ips
= ctx
->addresses_best_num
,
5325 .ips
= ctx
->addresses_best
,
5326 .apply_expected
= true
5329 .type
= WREPL_TYPE_MHOMED
,
5330 .state
= WREPL_STATE_ACTIVE
,
5331 .node
= WREPL_NODE_B
,
5333 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5334 .ips
= addresses_B_1
,
5335 .apply_expected
= true
5339 * unique,released vs. mhomed,tombstone with same ip(s)
5342 .line
= __location__
,
5343 .name
= _NBT_NAME("_UR_MT_SI", 0x00, NULL
),
5347 .num_ips
= ctx
->addresses_best_num
,
5348 .ips
= ctx
->addresses_best
,
5349 .apply_expected
= true
5352 .type
= WREPL_TYPE_MHOMED
,
5353 .state
= WREPL_STATE_TOMBSTONE
,
5354 .node
= WREPL_NODE_B
,
5356 .num_ips
= ctx
->addresses_best_num
,
5357 .ips
= ctx
->addresses_best
,
5358 .apply_expected
= true
5362 * unique,released vs. mhomed,tombstone with different ip(s)
5365 .line
= __location__
,
5366 .name
= _NBT_NAME("_UR_MT_DI", 0x00, NULL
),
5370 .num_ips
= ctx
->addresses_best_num
,
5371 .ips
= ctx
->addresses_best
,
5372 .apply_expected
= true
5375 .type
= WREPL_TYPE_MHOMED
,
5376 .state
= WREPL_STATE_TOMBSTONE
,
5377 .node
= WREPL_NODE_B
,
5379 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5380 .ips
= addresses_B_1
,
5381 .apply_expected
= true
5385 * group vs. unique section
5388 * group,released vs. unique,active with same ip(s)
5391 .line
= __location__
,
5392 .name
= _NBT_NAME("_GR_UA_SI", 0x00, NULL
),
5394 .nb_flags
= NBT_NM_GROUP
,
5396 .num_ips
= ctx
->addresses_best_num
,
5397 .ips
= ctx
->addresses_best
,
5398 .apply_expected
= true
5401 .type
= WREPL_TYPE_UNIQUE
,
5402 .state
= WREPL_STATE_ACTIVE
,
5403 .node
= WREPL_NODE_B
,
5405 .num_ips
= ctx
->addresses_best_num
,
5406 .ips
= ctx
->addresses_best
,
5407 .apply_expected
= false
5411 * group,released vs. unique,active with different ip(s)
5414 .line
= __location__
,
5415 .name
= _NBT_NAME("_GR_UA_DI", 0x00, NULL
),
5417 .nb_flags
= NBT_NM_GROUP
,
5419 .num_ips
= ctx
->addresses_best_num
,
5420 .ips
= ctx
->addresses_best
,
5421 .apply_expected
= true
5424 .type
= WREPL_TYPE_UNIQUE
,
5425 .state
= WREPL_STATE_ACTIVE
,
5426 .node
= WREPL_NODE_B
,
5428 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5429 .ips
= addresses_B_1
,
5430 .apply_expected
= false
5434 * group,released vs. unique,tombstone with same ip(s)
5437 .line
= __location__
,
5438 .name
= _NBT_NAME("_GR_UT_SI", 0x00, NULL
),
5440 .nb_flags
= NBT_NM_GROUP
,
5442 .num_ips
= ctx
->addresses_best_num
,
5443 .ips
= ctx
->addresses_best
,
5444 .apply_expected
= true
5447 .type
= WREPL_TYPE_UNIQUE
,
5448 .state
= WREPL_STATE_TOMBSTONE
,
5449 .node
= WREPL_NODE_B
,
5451 .num_ips
= ctx
->addresses_best_num
,
5452 .ips
= ctx
->addresses_best
,
5453 .apply_expected
= false
5457 * group,released vs. unique,tombstone with different ip(s)
5460 .line
= __location__
,
5461 .name
= _NBT_NAME("_GR_UT_DI", 0x00, NULL
),
5463 .nb_flags
= NBT_NM_GROUP
,
5465 .num_ips
= ctx
->addresses_best_num
,
5466 .ips
= ctx
->addresses_best
,
5467 .apply_expected
= true
5470 .type
= WREPL_TYPE_UNIQUE
,
5471 .state
= WREPL_STATE_TOMBSTONE
,
5472 .node
= WREPL_NODE_B
,
5474 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5475 .ips
= addresses_B_1
,
5476 .apply_expected
= false
5480 * group vs. group section
5483 * group,released vs. group,active with same ip(s)
5486 .line
= __location__
,
5487 .name
= _NBT_NAME("_GR_GA_SI", 0x00, NULL
),
5489 .nb_flags
= NBT_NM_GROUP
,
5491 .num_ips
= ctx
->addresses_best_num
,
5492 .ips
= ctx
->addresses_best
,
5493 .apply_expected
= true
5496 .type
= WREPL_TYPE_GROUP
,
5497 .state
= WREPL_STATE_ACTIVE
,
5498 .node
= WREPL_NODE_B
,
5500 .num_ips
= ctx
->addresses_best_num
,
5501 .ips
= ctx
->addresses_best
,
5502 .apply_expected
= true
5506 * group,released vs. group,active with different ip(s)
5509 .line
= __location__
,
5510 .name
= _NBT_NAME("_GR_GA_DI", 0x00, NULL
),
5512 .nb_flags
= NBT_NM_GROUP
,
5514 .num_ips
= ctx
->addresses_best_num
,
5515 .ips
= ctx
->addresses_best
,
5516 .apply_expected
= true
5519 .type
= WREPL_TYPE_GROUP
,
5520 .state
= WREPL_STATE_ACTIVE
,
5521 .node
= WREPL_NODE_B
,
5523 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5524 .ips
= addresses_B_1
,
5525 .apply_expected
= true
5529 * group,released vs. group,tombstone with same ip(s)
5532 .line
= __location__
,
5533 .name
= _NBT_NAME("_GR_GT_SI", 0x00, NULL
),
5535 .nb_flags
= NBT_NM_GROUP
,
5537 .num_ips
= ctx
->addresses_best_num
,
5538 .ips
= ctx
->addresses_best
,
5539 .apply_expected
= true
5542 .type
= WREPL_TYPE_GROUP
,
5543 .state
= WREPL_STATE_TOMBSTONE
,
5544 .node
= WREPL_NODE_B
,
5546 .num_ips
= ctx
->addresses_best_num
,
5547 .ips
= ctx
->addresses_best
,
5548 .apply_expected
= true
5552 * group,released vs. group,tombstone with different ip(s)
5555 .line
= __location__
,
5556 .name
= _NBT_NAME("_GR_GT_DI", 0x00, NULL
),
5558 .nb_flags
= NBT_NM_GROUP
,
5560 .num_ips
= ctx
->addresses_best_num
,
5561 .ips
= ctx
->addresses_best
,
5562 .apply_expected
= true
5565 .type
= WREPL_TYPE_GROUP
,
5566 .state
= WREPL_STATE_TOMBSTONE
,
5567 .node
= WREPL_NODE_B
,
5569 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5570 .ips
= addresses_B_1
,
5571 .apply_expected
= true
5575 * group vs. special group section
5578 * group,released vs. sgroup,active with same ip(s)
5581 .line
= __location__
,
5582 .name
= _NBT_NAME("_GR_SA_SI", 0x00, NULL
),
5584 .nb_flags
= NBT_NM_GROUP
,
5586 .num_ips
= ctx
->addresses_best_num
,
5587 .ips
= ctx
->addresses_best
,
5588 .apply_expected
= true
5591 .type
= WREPL_TYPE_SGROUP
,
5592 .state
= WREPL_STATE_ACTIVE
,
5593 .node
= WREPL_NODE_B
,
5595 .num_ips
= ctx
->addresses_best_num
,
5596 .ips
= ctx
->addresses_best
,
5597 .apply_expected
= false
5601 * group,released vs. sgroup,active with different ip(s)
5604 .line
= __location__
,
5605 .name
= _NBT_NAME("_GR_SA_DI", 0x00, NULL
),
5607 .nb_flags
= NBT_NM_GROUP
,
5609 .num_ips
= ctx
->addresses_best_num
,
5610 .ips
= ctx
->addresses_best
,
5611 .apply_expected
= true
5614 .type
= WREPL_TYPE_SGROUP
,
5615 .state
= WREPL_STATE_ACTIVE
,
5616 .node
= WREPL_NODE_B
,
5618 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5619 .ips
= addresses_B_1
,
5620 .apply_expected
= false
5624 * group,released vs. sgroup,tombstone with same ip(s)
5627 .line
= __location__
,
5628 .name
= _NBT_NAME("_GR_ST_SI", 0x00, NULL
),
5630 .nb_flags
= NBT_NM_GROUP
,
5632 .num_ips
= ctx
->addresses_best_num
,
5633 .ips
= ctx
->addresses_best
,
5634 .apply_expected
= true
5637 .type
= WREPL_TYPE_SGROUP
,
5638 .state
= WREPL_STATE_TOMBSTONE
,
5639 .node
= WREPL_NODE_B
,
5641 .num_ips
= ctx
->addresses_best_num
,
5642 .ips
= ctx
->addresses_best
,
5643 .apply_expected
= false
5647 * group,released vs. sgroup,tombstone with different ip(s)
5650 .line
= __location__
,
5651 .name
= _NBT_NAME("_GR_ST_DI", 0x00, NULL
),
5653 .nb_flags
= NBT_NM_GROUP
,
5655 .num_ips
= ctx
->addresses_best_num
,
5656 .ips
= ctx
->addresses_best
,
5657 .apply_expected
= true
5660 .type
= WREPL_TYPE_SGROUP
,
5661 .state
= WREPL_STATE_TOMBSTONE
,
5662 .node
= WREPL_NODE_B
,
5664 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5665 .ips
= addresses_B_1
,
5666 .apply_expected
= false
5670 * group vs. multi homed section
5673 * group,released vs. mhomed,active with same ip(s)
5676 .line
= __location__
,
5677 .name
= _NBT_NAME("_GR_MA_SI", 0x00, NULL
),
5679 .nb_flags
= NBT_NM_GROUP
,
5681 .num_ips
= ctx
->addresses_best_num
,
5682 .ips
= ctx
->addresses_best
,
5683 .apply_expected
= true
5686 .type
= WREPL_TYPE_MHOMED
,
5687 .state
= WREPL_STATE_ACTIVE
,
5688 .node
= WREPL_NODE_B
,
5690 .num_ips
= ctx
->addresses_best_num
,
5691 .ips
= ctx
->addresses_best
,
5692 .apply_expected
= false
5696 * group,released vs. mhomed,active with different ip(s)
5699 .line
= __location__
,
5700 .name
= _NBT_NAME("_GR_MA_DI", 0x00, NULL
),
5702 .nb_flags
= NBT_NM_GROUP
,
5704 .num_ips
= ctx
->addresses_best_num
,
5705 .ips
= ctx
->addresses_best
,
5706 .apply_expected
= true
5709 .type
= WREPL_TYPE_MHOMED
,
5710 .state
= WREPL_STATE_ACTIVE
,
5711 .node
= WREPL_NODE_B
,
5713 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5714 .ips
= addresses_B_1
,
5715 .apply_expected
= false
5719 * group,released vs. mhomed,tombstone with same ip(s)
5722 .line
= __location__
,
5723 .name
= _NBT_NAME("_GR_MT_SI", 0x00, NULL
),
5725 .nb_flags
= NBT_NM_GROUP
,
5727 .num_ips
= ctx
->addresses_best_num
,
5728 .ips
= ctx
->addresses_best
,
5729 .apply_expected
= true
5732 .type
= WREPL_TYPE_MHOMED
,
5733 .state
= WREPL_STATE_TOMBSTONE
,
5734 .node
= WREPL_NODE_B
,
5736 .num_ips
= ctx
->addresses_best_num
,
5737 .ips
= ctx
->addresses_best
,
5738 .apply_expected
= false
5742 * group,released vs. mhomed,tombstone with different ip(s)
5745 .line
= __location__
,
5746 .name
= _NBT_NAME("_GR_MT_DI", 0x00, NULL
),
5748 .nb_flags
= NBT_NM_GROUP
,
5750 .num_ips
= ctx
->addresses_best_num
,
5751 .ips
= ctx
->addresses_best
,
5752 .apply_expected
= true
5755 .type
= WREPL_TYPE_MHOMED
,
5756 .state
= WREPL_STATE_TOMBSTONE
,
5757 .node
= WREPL_NODE_B
,
5759 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5760 .ips
= addresses_B_1
,
5761 .apply_expected
= false
5765 * special group vs. unique section
5768 * sgroup,released vs. unique,active with same ip(s)
5771 .line
= __location__
,
5772 .name
= _NBT_NAME("_SR_UA_SI", 0x1C, NULL
),
5774 .nb_flags
= NBT_NM_GROUP
,
5776 .num_ips
= ctx
->addresses_best_num
,
5777 .ips
= ctx
->addresses_best
,
5778 .apply_expected
= true
5781 .type
= WREPL_TYPE_UNIQUE
,
5782 .state
= WREPL_STATE_ACTIVE
,
5783 .node
= WREPL_NODE_B
,
5785 .num_ips
= ctx
->addresses_best_num
,
5786 .ips
= ctx
->addresses_best
,
5787 .apply_expected
= true
5791 * sgroup,released vs. unique,active with different ip(s)
5794 .line
= __location__
,
5795 .name
= _NBT_NAME("_SR_UA_DI", 0x1C, NULL
),
5797 .nb_flags
= NBT_NM_GROUP
,
5799 .num_ips
= ctx
->addresses_best_num
,
5800 .ips
= ctx
->addresses_best
,
5801 .apply_expected
= true
5804 .type
= WREPL_TYPE_UNIQUE
,
5805 .state
= WREPL_STATE_ACTIVE
,
5806 .node
= WREPL_NODE_B
,
5808 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5809 .ips
= addresses_B_1
,
5810 .apply_expected
= true
5814 * sgroup,released vs. unique,tombstone with same ip(s)
5817 .line
= __location__
,
5818 .name
= _NBT_NAME("_SR_UT_SI", 0x1C, NULL
),
5820 .nb_flags
= NBT_NM_GROUP
,
5822 .num_ips
= ctx
->addresses_best_num
,
5823 .ips
= ctx
->addresses_best
,
5824 .apply_expected
= true
5827 .type
= WREPL_TYPE_UNIQUE
,
5828 .state
= WREPL_STATE_TOMBSTONE
,
5829 .node
= WREPL_NODE_B
,
5831 .num_ips
= ctx
->addresses_best_num
,
5832 .ips
= ctx
->addresses_best
,
5833 .apply_expected
= true
5837 * sgroup,released vs. unique,tombstone with different ip(s)
5840 .line
= __location__
,
5841 .name
= _NBT_NAME("_SR_UT_DI", 0x1C, NULL
),
5843 .nb_flags
= NBT_NM_GROUP
,
5845 .num_ips
= ctx
->addresses_best_num
,
5846 .ips
= ctx
->addresses_best
,
5847 .apply_expected
= true
5850 .type
= WREPL_TYPE_UNIQUE
,
5851 .state
= WREPL_STATE_TOMBSTONE
,
5852 .node
= WREPL_NODE_B
,
5854 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5855 .ips
= addresses_B_1
,
5856 .apply_expected
= true
5860 * special group vs. group section
5863 * sgroup,released vs. group,active with same ip(s)
5866 .line
= __location__
,
5867 .name
= _NBT_NAME("_SR_GA_SI", 0x1C, NULL
),
5869 .nb_flags
= NBT_NM_GROUP
,
5871 .num_ips
= ctx
->addresses_best_num
,
5872 .ips
= ctx
->addresses_best
,
5873 .apply_expected
= true
5876 .type
= WREPL_TYPE_GROUP
,
5877 .state
= WREPL_STATE_ACTIVE
,
5878 .node
= WREPL_NODE_B
,
5880 .num_ips
= ctx
->addresses_best_num
,
5881 .ips
= ctx
->addresses_best
,
5882 .apply_expected
= true
5886 * sgroup,released vs. group,active with different ip(s)
5889 .line
= __location__
,
5890 .name
= _NBT_NAME("_SR_GA_DI", 0x1C, NULL
),
5892 .nb_flags
= NBT_NM_GROUP
,
5894 .num_ips
= ctx
->addresses_best_num
,
5895 .ips
= ctx
->addresses_best
,
5896 .apply_expected
= true
5899 .type
= WREPL_TYPE_GROUP
,
5900 .state
= WREPL_STATE_ACTIVE
,
5901 .node
= WREPL_NODE_B
,
5903 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5904 .ips
= addresses_B_1
,
5905 .apply_expected
= true
5909 * sgroup,released vs. group,tombstone with same ip(s)
5912 .line
= __location__
,
5913 .name
= _NBT_NAME("_SR_GT_SI", 0x1C, NULL
),
5915 .nb_flags
= NBT_NM_GROUP
,
5917 .num_ips
= ctx
->addresses_best_num
,
5918 .ips
= ctx
->addresses_best
,
5919 .apply_expected
= true
5922 .type
= WREPL_TYPE_GROUP
,
5923 .state
= WREPL_STATE_TOMBSTONE
,
5924 .node
= WREPL_NODE_B
,
5926 .num_ips
= ctx
->addresses_best_num
,
5927 .ips
= ctx
->addresses_best
,
5928 .apply_expected
= true
5932 * sgroup,released vs. group,tombstone with different ip(s)
5935 .line
= __location__
,
5936 .name
= _NBT_NAME("_SR_GT_DI", 0x1C, NULL
),
5938 .nb_flags
= NBT_NM_GROUP
,
5940 .num_ips
= ctx
->addresses_best_num
,
5941 .ips
= ctx
->addresses_best
,
5942 .apply_expected
= true
5945 .type
= WREPL_TYPE_GROUP
,
5946 .state
= WREPL_STATE_TOMBSTONE
,
5947 .node
= WREPL_NODE_B
,
5949 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5950 .ips
= addresses_B_1
,
5951 .apply_expected
= true
5955 * special group vs. special group section
5958 * sgroup,released vs. sgroup,active with same ip(s)
5961 .line
= __location__
,
5962 .name
= _NBT_NAME("_SR_SA_SI", 0x1C, NULL
),
5964 .nb_flags
= NBT_NM_GROUP
,
5966 .num_ips
= ctx
->addresses_best_num
,
5967 .ips
= ctx
->addresses_best
,
5968 .apply_expected
= true
5971 .type
= WREPL_TYPE_SGROUP
,
5972 .state
= WREPL_STATE_ACTIVE
,
5973 .node
= WREPL_NODE_B
,
5975 .num_ips
= ctx
->addresses_best_num
,
5976 .ips
= ctx
->addresses_best
,
5977 .apply_expected
= true
5981 * sgroup,released vs. sgroup,active with different ip(s)
5984 .line
= __location__
,
5985 .name
= _NBT_NAME("_SR_SA_DI", 0x1C, NULL
),
5987 .nb_flags
= NBT_NM_GROUP
,
5989 .num_ips
= ctx
->addresses_best_num
,
5990 .ips
= ctx
->addresses_best
,
5991 .apply_expected
= true
5994 .type
= WREPL_TYPE_SGROUP
,
5995 .state
= WREPL_STATE_ACTIVE
,
5996 .node
= WREPL_NODE_B
,
5998 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5999 .ips
= addresses_B_1
,
6000 .apply_expected
= true
6004 * sgroup,released vs. sgroup,tombstone with same ip(s)
6007 .line
= __location__
,
6008 .name
= _NBT_NAME("_SR_ST_SI", 0x1C, NULL
),
6010 .nb_flags
= NBT_NM_GROUP
,
6012 .num_ips
= ctx
->addresses_best_num
,
6013 .ips
= ctx
->addresses_best
,
6014 .apply_expected
= true
6017 .type
= WREPL_TYPE_SGROUP
,
6018 .state
= WREPL_STATE_TOMBSTONE
,
6019 .node
= WREPL_NODE_B
,
6021 .num_ips
= ctx
->addresses_best_num
,
6022 .ips
= ctx
->addresses_best
,
6023 .apply_expected
= true
6027 * sgroup,released vs. sgroup,tombstone with different ip(s)
6030 .line
= __location__
,
6031 .name
= _NBT_NAME("_SR_ST_DI", 0x1C, NULL
),
6033 .nb_flags
= NBT_NM_GROUP
,
6035 .num_ips
= ctx
->addresses_best_num
,
6036 .ips
= ctx
->addresses_best
,
6037 .apply_expected
= true
6040 .type
= WREPL_TYPE_SGROUP
,
6041 .state
= WREPL_STATE_TOMBSTONE
,
6042 .node
= WREPL_NODE_B
,
6044 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6045 .ips
= addresses_B_1
,
6046 .apply_expected
= true
6050 * special group vs. multi homed section
6053 * sgroup,released vs. mhomed,active with same ip(s)
6056 .line
= __location__
,
6057 .name
= _NBT_NAME("_SR_MA_SI", 0x1C, NULL
),
6059 .nb_flags
= NBT_NM_GROUP
,
6061 .num_ips
= ctx
->addresses_best_num
,
6062 .ips
= ctx
->addresses_best
,
6063 .apply_expected
= true
6066 .type
= WREPL_TYPE_MHOMED
,
6067 .state
= WREPL_STATE_ACTIVE
,
6068 .node
= WREPL_NODE_B
,
6070 .num_ips
= ctx
->addresses_best_num
,
6071 .ips
= ctx
->addresses_best
,
6072 .apply_expected
= true
6076 * sgroup,released vs. mhomed,active with different ip(s)
6079 .line
= __location__
,
6080 .name
= _NBT_NAME("_SR_MA_DI", 0x1C, NULL
),
6082 .nb_flags
= NBT_NM_GROUP
,
6084 .num_ips
= ctx
->addresses_best_num
,
6085 .ips
= ctx
->addresses_best
,
6086 .apply_expected
= true
6089 .type
= WREPL_TYPE_MHOMED
,
6090 .state
= WREPL_STATE_ACTIVE
,
6091 .node
= WREPL_NODE_B
,
6093 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6094 .ips
= addresses_B_1
,
6095 .apply_expected
= true
6099 * sgroup,released vs. mhomed,tombstone with same ip(s)
6102 .line
= __location__
,
6103 .name
= _NBT_NAME("_SR_MT_SI", 0x1C, NULL
),
6105 .nb_flags
= NBT_NM_GROUP
,
6107 .num_ips
= ctx
->addresses_best_num
,
6108 .ips
= ctx
->addresses_best
,
6109 .apply_expected
= true
6112 .type
= WREPL_TYPE_MHOMED
,
6113 .state
= WREPL_STATE_TOMBSTONE
,
6114 .node
= WREPL_NODE_B
,
6116 .num_ips
= ctx
->addresses_best_num
,
6117 .ips
= ctx
->addresses_best
,
6118 .apply_expected
= true
6122 * sgroup,released vs. mhomed,tombstone with different ip(s)
6125 .line
= __location__
,
6126 .name
= _NBT_NAME("_SR_MT_DI", 0x1C, NULL
),
6128 .nb_flags
= NBT_NM_GROUP
,
6130 .num_ips
= ctx
->addresses_best_num
,
6131 .ips
= ctx
->addresses_best
,
6132 .apply_expected
= true
6135 .type
= WREPL_TYPE_MHOMED
,
6136 .state
= WREPL_STATE_TOMBSTONE
,
6137 .node
= WREPL_NODE_B
,
6139 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6140 .ips
= addresses_B_1
,
6141 .apply_expected
= true
6145 * multi homed vs. unique section
6148 * mhomed,released vs. unique,active with same ip(s)
6151 .line
= __location__
,
6152 .name
= _NBT_NAME("_MR_UA_SI", 0x00, NULL
),
6156 .num_ips
= ctx
->addresses_best_num
,
6157 .ips
= ctx
->addresses_best
,
6158 .apply_expected
= true
6161 .type
= WREPL_TYPE_UNIQUE
,
6162 .state
= WREPL_STATE_ACTIVE
,
6163 .node
= WREPL_NODE_B
,
6165 .num_ips
= ctx
->addresses_best_num
,
6166 .ips
= ctx
->addresses_best
,
6167 .apply_expected
= true
6171 * mhomed,released vs. unique,active with different ip(s)
6174 .line
= __location__
,
6175 .name
= _NBT_NAME("_MR_UA_DI", 0x00, NULL
),
6179 .num_ips
= ctx
->addresses_best_num
,
6180 .ips
= ctx
->addresses_best
,
6181 .apply_expected
= true
6184 .type
= WREPL_TYPE_UNIQUE
,
6185 .state
= WREPL_STATE_ACTIVE
,
6186 .node
= WREPL_NODE_B
,
6188 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6189 .ips
= addresses_B_1
,
6190 .apply_expected
= true
6194 * mhomed,released vs. unique,tombstone with same ip(s)
6197 .line
= __location__
,
6198 .name
= _NBT_NAME("_MR_UT_SI", 0x00, NULL
),
6202 .num_ips
= ctx
->addresses_best_num
,
6203 .ips
= ctx
->addresses_best
,
6204 .apply_expected
= true
6207 .type
= WREPL_TYPE_UNIQUE
,
6208 .state
= WREPL_STATE_TOMBSTONE
,
6209 .node
= WREPL_NODE_B
,
6211 .num_ips
= ctx
->addresses_best_num
,
6212 .ips
= ctx
->addresses_best
,
6213 .apply_expected
= true
6217 * mhomed,released vs. unique,tombstone with different ip(s)
6220 .line
= __location__
,
6221 .name
= _NBT_NAME("_MR_UT_DI", 0x00, NULL
),
6225 .num_ips
= ctx
->addresses_best_num
,
6226 .ips
= ctx
->addresses_best
,
6227 .apply_expected
= true
6230 .type
= WREPL_TYPE_UNIQUE
,
6231 .state
= WREPL_STATE_TOMBSTONE
,
6232 .node
= WREPL_NODE_B
,
6234 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6235 .ips
= addresses_B_1
,
6236 .apply_expected
= true
6240 * multi homed vs. group section
6243 * mhomed,released vs. group,active with same ip(s)
6246 .line
= __location__
,
6247 .name
= _NBT_NAME("_MR_GA_SI", 0x00, NULL
),
6251 .num_ips
= ctx
->addresses_best_num
,
6252 .ips
= ctx
->addresses_best
,
6253 .apply_expected
= true
6256 .type
= WREPL_TYPE_GROUP
,
6257 .state
= WREPL_STATE_ACTIVE
,
6258 .node
= WREPL_NODE_B
,
6260 .num_ips
= ctx
->addresses_best_num
,
6261 .ips
= ctx
->addresses_best
,
6262 .apply_expected
= true
6266 * mhomed,released vs. group,active with different ip(s)
6269 .line
= __location__
,
6270 .name
= _NBT_NAME("_MR_GA_DI", 0x00, NULL
),
6274 .num_ips
= ctx
->addresses_best_num
,
6275 .ips
= ctx
->addresses_best
,
6276 .apply_expected
= true
6279 .type
= WREPL_TYPE_GROUP
,
6280 .state
= WREPL_STATE_ACTIVE
,
6281 .node
= WREPL_NODE_B
,
6283 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6284 .ips
= addresses_B_1
,
6285 .apply_expected
= true
6289 * mhomed,released vs. group,tombstone with same ip(s)
6292 .line
= __location__
,
6293 .name
= _NBT_NAME("_MR_GT_SI", 0x00, NULL
),
6297 .num_ips
= ctx
->addresses_best_num
,
6298 .ips
= ctx
->addresses_best
,
6299 .apply_expected
= true
6302 .type
= WREPL_TYPE_GROUP
,
6303 .state
= WREPL_STATE_TOMBSTONE
,
6304 .node
= WREPL_NODE_B
,
6306 .num_ips
= ctx
->addresses_best_num
,
6307 .ips
= ctx
->addresses_best
,
6308 .apply_expected
= true
6312 * mhomed,released vs. group,tombstone with different ip(s)
6315 .line
= __location__
,
6316 .name
= _NBT_NAME("_MR_GT_DI", 0x00, NULL
),
6320 .num_ips
= ctx
->addresses_best_num
,
6321 .ips
= ctx
->addresses_best
,
6322 .apply_expected
= true
6325 .type
= WREPL_TYPE_GROUP
,
6326 .state
= WREPL_STATE_TOMBSTONE
,
6327 .node
= WREPL_NODE_B
,
6329 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6330 .ips
= addresses_B_1
,
6331 .apply_expected
= true
6335 * multi homed vs. special group section
6338 * mhomed,released vs. sgroup,active with same ip(s)
6341 .line
= __location__
,
6342 .name
= _NBT_NAME("_MR_SA_SI", 0x00, NULL
),
6346 .num_ips
= ctx
->addresses_best_num
,
6347 .ips
= ctx
->addresses_best
,
6348 .apply_expected
= true
6351 .type
= WREPL_TYPE_SGROUP
,
6352 .state
= WREPL_STATE_ACTIVE
,
6353 .node
= WREPL_NODE_B
,
6355 .num_ips
= ctx
->addresses_best_num
,
6356 .ips
= ctx
->addresses_best
,
6357 .apply_expected
= true
6361 * mhomed,released vs. sgroup,active with different ip(s)
6364 .line
= __location__
,
6365 .name
= _NBT_NAME("_MR_SA_DI", 0x00, NULL
),
6369 .num_ips
= ctx
->addresses_best_num
,
6370 .ips
= ctx
->addresses_best
,
6371 .apply_expected
= true
6374 .type
= WREPL_TYPE_SGROUP
,
6375 .state
= WREPL_STATE_ACTIVE
,
6376 .node
= WREPL_NODE_B
,
6378 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6379 .ips
= addresses_B_1
,
6380 .apply_expected
= true
6384 * mhomed,released vs. sgroup,tombstone with same ip(s)
6387 .line
= __location__
,
6388 .name
= _NBT_NAME("_MR_ST_SI", 0x00, NULL
),
6392 .num_ips
= ctx
->addresses_best_num
,
6393 .ips
= ctx
->addresses_best
,
6394 .apply_expected
= true
6397 .type
= WREPL_TYPE_SGROUP
,
6398 .state
= WREPL_STATE_TOMBSTONE
,
6399 .node
= WREPL_NODE_B
,
6401 .num_ips
= ctx
->addresses_best_num
,
6402 .ips
= ctx
->addresses_best
,
6403 .apply_expected
= true
6407 * mhomed,released vs. sgroup,tombstone with different ip(s)
6410 .line
= __location__
,
6411 .name
= _NBT_NAME("_MR_ST_DI", 0x00, NULL
),
6415 .num_ips
= ctx
->addresses_best_num
,
6416 .ips
= ctx
->addresses_best
,
6417 .apply_expected
= true
6420 .type
= WREPL_TYPE_SGROUP
,
6421 .state
= WREPL_STATE_TOMBSTONE
,
6422 .node
= WREPL_NODE_B
,
6424 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6425 .ips
= addresses_B_1
,
6426 .apply_expected
= true
6430 * multi homed vs. multi homed section
6433 * mhomed,released vs. mhomed,active with same ip(s)
6436 .line
= __location__
,
6437 .name
= _NBT_NAME("_MR_MA_SI", 0x00, NULL
),
6441 .num_ips
= ctx
->addresses_best_num
,
6442 .ips
= ctx
->addresses_best
,
6443 .apply_expected
= true
6446 .type
= WREPL_TYPE_MHOMED
,
6447 .state
= WREPL_STATE_ACTIVE
,
6448 .node
= WREPL_NODE_B
,
6450 .num_ips
= ctx
->addresses_best_num
,
6451 .ips
= ctx
->addresses_best
,
6452 .apply_expected
= true
6456 * mhomed,released vs. mhomed,active with different ip(s)
6459 .line
= __location__
,
6460 .name
= _NBT_NAME("_MR_MA_DI", 0x00, NULL
),
6464 .num_ips
= ctx
->addresses_best_num
,
6465 .ips
= ctx
->addresses_best
,
6466 .apply_expected
= true
6469 .type
= WREPL_TYPE_MHOMED
,
6470 .state
= WREPL_STATE_ACTIVE
,
6471 .node
= WREPL_NODE_B
,
6473 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6474 .ips
= addresses_B_1
,
6475 .apply_expected
= true
6479 * mhomed,released vs. mhomed,tombstone with same ip(s)
6482 .line
= __location__
,
6483 .name
= _NBT_NAME("_MR_MT_SI", 0x00, NULL
),
6487 .num_ips
= ctx
->addresses_best_num
,
6488 .ips
= ctx
->addresses_best
,
6489 .apply_expected
= true
6492 .type
= WREPL_TYPE_MHOMED
,
6493 .state
= WREPL_STATE_TOMBSTONE
,
6494 .node
= WREPL_NODE_B
,
6496 .num_ips
= ctx
->addresses_best_num
,
6497 .ips
= ctx
->addresses_best
,
6498 .apply_expected
= true
6502 * mhomed,released vs. mhomed,tombstone with different ip(s)
6505 .line
= __location__
,
6506 .name
= _NBT_NAME("_MR_MT_DI", 0x00, NULL
),
6510 .num_ips
= ctx
->addresses_best_num
,
6511 .ips
= ctx
->addresses_best
,
6512 .apply_expected
= true
6515 .type
= WREPL_TYPE_MHOMED
,
6516 .state
= WREPL_STATE_TOMBSTONE
,
6517 .node
= WREPL_NODE_B
,
6519 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6520 .ips
= addresses_B_1
,
6521 .apply_expected
= true
6526 torture_comment(tctx
, "Test Replica records vs. owned released records\n");
6528 for(i
=0; ret
&& i
< ARRAY_SIZE(records
); i
++) {
6529 torture_comment(tctx
, "%s => %s\n", nbt_name_string(ctx
, &records
[i
].name
),
6530 (records
[i
].replica
.apply_expected
?"REPLACE":"NOT REPLACE"));
6535 name_register
->in
.name
= records
[i
].name
;
6536 name_register
->in
.dest_addr
= ctx
->address
;
6537 name_register
->in
.dest_port
= lp_nbt_port(tctx
->lp_ctx
);
6538 name_register
->in
.address
= records
[i
].wins
.ips
[0].ip
;
6539 name_register
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
6540 name_register
->in
.register_demand
= false;
6541 name_register
->in
.broadcast
= false;
6542 name_register
->in
.multi_homed
= records
[i
].wins
.mhomed
;
6543 name_register
->in
.ttl
= 300000;
6544 name_register
->in
.timeout
= 70;
6545 name_register
->in
.retries
= 0;
6547 status
= nbt_name_register(ctx
->nbtsock
, ctx
, name_register
);
6548 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
6549 torture_comment(tctx
, "No response from %s for name register\n", ctx
->address
);
6552 if (!NT_STATUS_IS_OK(status
)) {
6553 torture_comment(tctx
, "Bad response from %s for name register - %s\n",
6554 ctx
->address
, nt_errstr(status
));
6557 CHECK_VALUE(tctx
, name_register
->out
.rcode
, 0);
6558 CHECK_VALUE_STRING(tctx
, name_register
->out
.reply_from
, ctx
->address
);
6559 CHECK_VALUE(tctx
, name_register
->out
.name
.type
, records
[i
].name
.type
);
6560 CHECK_VALUE_STRING(tctx
, name_register
->out
.name
.name
, records
[i
].name
.name
);
6561 CHECK_VALUE_STRING(tctx
, name_register
->out
.name
.scope
, records
[i
].name
.scope
);
6562 CHECK_VALUE_STRING(tctx
, name_register
->out
.reply_addr
, records
[i
].wins
.ips
[0].ip
);
6564 /* release the record */
6565 release
->in
.name
= records
[i
].name
;
6566 release
->in
.dest_port
= lp_nbt_port(tctx
->lp_ctx
);
6567 release
->in
.dest_addr
= ctx
->address
;
6568 release
->in
.address
= records
[i
].wins
.ips
[0].ip
;
6569 release
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
6570 release
->in
.broadcast
= false;
6571 release
->in
.timeout
= 30;
6572 release
->in
.retries
= 0;
6574 status
= nbt_name_release(ctx
->nbtsock
, ctx
, release
);
6575 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
6576 torture_comment(tctx
, "No response from %s for name release\n", ctx
->address
);
6579 if (!NT_STATUS_IS_OK(status
)) {
6580 torture_comment(tctx
, "Bad response from %s for name query - %s\n",
6581 ctx
->address
, nt_errstr(status
));
6584 CHECK_VALUE(tctx
, release
->out
.rcode
, 0);
6589 wins_name
->name
= &records
[i
].name
;
6590 wins_name
->flags
= WREPL_NAME_FLAGS(records
[i
].replica
.type
,
6591 records
[i
].replica
.state
,
6592 records
[i
].replica
.node
,
6593 records
[i
].replica
.is_static
);
6594 wins_name
->id
= ++ctx
->b
.max_version
;
6595 if (wins_name
->flags
& 2) {
6596 wins_name
->addresses
.addresses
.num_ips
= records
[i
].replica
.num_ips
;
6597 wins_name
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
6598 records
[i
].replica
.ips
);
6600 wins_name
->addresses
.ip
= records
[i
].replica
.ips
[0].ip
;
6602 wins_name
->unknown
= "255.255.255.255";
6604 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
6605 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
,
6606 records
[i
].replica
.apply_expected
);
6608 if (records
[i
].replica
.apply_expected
) {
6609 wins_name
->name
= &records
[i
].name
;
6610 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE
,
6611 WREPL_STATE_TOMBSTONE
,
6612 WREPL_NODE_B
, false);
6613 wins_name
->id
= ++ctx
->b
.max_version
;
6614 wins_name
->addresses
.ip
= addresses_B_1
[0].ip
;
6615 wins_name
->unknown
= "255.255.255.255";
6617 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
6618 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
, true);
6620 release
->in
.name
= records
[i
].name
;
6621 release
->in
.dest_addr
= ctx
->address
;
6622 release
->in
.dest_port
= lp_nbt_port(tctx
->lp_ctx
);
6623 release
->in
.address
= records
[i
].wins
.ips
[0].ip
;
6624 release
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
6625 release
->in
.broadcast
= false;
6626 release
->in
.timeout
= 30;
6627 release
->in
.retries
= 0;
6629 status
= nbt_name_release(ctx
->nbtsock
, ctx
, release
);
6630 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
6631 torture_comment(tctx
, "No response from %s for name release\n", ctx
->address
);
6634 if (!NT_STATUS_IS_OK(status
)) {
6635 torture_comment(tctx
, "Bad response from %s for name query - %s\n",
6636 ctx
->address
, nt_errstr(status
));
6639 CHECK_VALUE(tctx
, release
->out
.rcode
, 0);
6642 torture_comment(tctx
, "conflict handled wrong or record[%u]: %s\n", i
, records
[i
].line
);
6650 struct test_conflict_owned_active_vs_replica_struct
{
6651 const char *line
; /* just better debugging */
6652 const char *section
; /* just better debugging */
6653 struct nbt_name name
;
6654 const char *comment
;
6660 const struct wrepl_ip
*ips
;
6661 bool apply_expected
;
6666 bool expect_release
;
6669 /* when num_ips == 0, then .wins.ips are used */
6671 const struct wrepl_ip
*ips
;
6674 enum wrepl_name_type type
;
6675 enum wrepl_name_state state
;
6676 enum wrepl_name_node node
;
6679 const struct wrepl_ip
*ips
;
6680 bool apply_expected
;
6686 static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket
*nbtsock
,
6687 struct nbt_name_packet
*req_packet
,
6688 struct socket_address
*src
);
6690 static bool test_conflict_owned_active_vs_replica(struct torture_context
*tctx
,
6691 struct test_wrepl_conflict_conn
*ctx
)
6695 struct wrepl_wins_name wins_name_
;
6696 struct wrepl_wins_name
*wins_name
= &wins_name_
;
6697 struct nbt_name_register name_register_
;
6698 struct nbt_name_register
*name_register
= &name_register_
;
6699 struct nbt_name_release release_
;
6700 struct nbt_name_release
*release
= &release_
;
6702 struct test_conflict_owned_active_vs_replica_struct records
[] = {
6704 * unique vs. unique section
6707 * unique,active vs. unique,active with same ip(s), unchecked
6710 .line
= __location__
,
6711 .name
= _NBT_NAME("_UA_UA_SI_U", 0x00, NULL
),
6715 .num_ips
= ctx
->addresses_best_num
,
6716 .ips
= ctx
->addresses_best
,
6717 .apply_expected
= true
6723 .type
= WREPL_TYPE_UNIQUE
,
6724 .state
= WREPL_STATE_ACTIVE
,
6725 .node
= WREPL_NODE_B
,
6727 .num_ips
= ctx
->addresses_best_num
,
6728 .ips
= ctx
->addresses_best
,
6729 .apply_expected
= true
6733 * unique,active vs. unique,active with different ip(s), positive response
6736 .line
= __location__
,
6737 .name
= _NBT_NAME("_UA_UA_DI_P", 0x00, NULL
),
6741 .num_ips
= ctx
->addresses_best_num
,
6742 .ips
= ctx
->addresses_best
,
6743 .apply_expected
= true
6750 .type
= WREPL_TYPE_UNIQUE
,
6751 .state
= WREPL_STATE_ACTIVE
,
6752 .node
= WREPL_NODE_B
,
6754 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6755 .ips
= addresses_B_1
,
6756 .apply_expected
= false
6760 * unique,active vs. unique,active with different ip(s), positive response other ips
6763 .line
= __location__
,
6764 .name
= _NBT_NAME("_UA_UA_DI_O", 0x00, NULL
),
6768 .num_ips
= ctx
->addresses_best_num
,
6769 .ips
= ctx
->addresses_best
,
6770 .apply_expected
= true
6775 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
6776 .ips
= addresses_A_3_4
,
6779 .type
= WREPL_TYPE_UNIQUE
,
6780 .state
= WREPL_STATE_ACTIVE
,
6781 .node
= WREPL_NODE_B
,
6783 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6784 .ips
= addresses_B_1
,
6785 .apply_expected
= false
6789 * unique,active vs. unique,active with different ip(s), negative response
6792 .line
= __location__
,
6793 .name
= _NBT_NAME("_UA_UA_DI_N", 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
= true
6816 * unique,active vs. unique,tombstone with same ip(s), unchecked
6819 .line
= __location__
,
6820 .name
= _NBT_NAME("_UA_UT_SI_U", 0x00, NULL
),
6824 .num_ips
= ctx
->addresses_best_num
,
6825 .ips
= ctx
->addresses_best
,
6826 .apply_expected
= true
6832 .type
= WREPL_TYPE_UNIQUE
,
6833 .state
= WREPL_STATE_TOMBSTONE
,
6834 .node
= WREPL_NODE_B
,
6836 .num_ips
= ctx
->addresses_best_num
,
6837 .ips
= ctx
->addresses_best
,
6838 .apply_expected
= false
6842 * unique,active vs. unique,tombstone with different ip(s), unchecked
6845 .line
= __location__
,
6846 .name
= _NBT_NAME("_UA_UT_DI_U", 0x00, NULL
),
6850 .num_ips
= ctx
->addresses_best_num
,
6851 .ips
= ctx
->addresses_best
,
6852 .apply_expected
= true
6858 .type
= WREPL_TYPE_UNIQUE
,
6859 .state
= WREPL_STATE_TOMBSTONE
,
6860 .node
= WREPL_NODE_B
,
6862 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6863 .ips
= addresses_B_1
,
6864 .apply_expected
= false
6868 * unique vs. group section
6871 * unique,active vs. group,active with same ip(s), release expected
6874 .line
= __location__
,
6875 .name
= _NBT_NAME("_UA_GA_SI_R", 0x00, NULL
),
6879 .num_ips
= ctx
->addresses_best_num
,
6880 .ips
= ctx
->addresses_best
,
6881 .apply_expected
= true
6885 .expect_release
= true,
6888 .type
= WREPL_TYPE_GROUP
,
6889 .state
= WREPL_STATE_ACTIVE
,
6890 .node
= WREPL_NODE_B
,
6892 .num_ips
= ctx
->addresses_best_num
,
6893 .ips
= ctx
->addresses_best
,
6894 .apply_expected
= true
6898 * unique,active vs. group,active with different ip(s), release expected
6901 .line
= __location__
,
6902 .name
= _NBT_NAME("_UA_GA_DI_R", 0x00, NULL
),
6906 .num_ips
= ctx
->addresses_best_num
,
6907 .ips
= ctx
->addresses_best
,
6908 .apply_expected
= true
6912 .expect_release
= true,
6915 .type
= WREPL_TYPE_GROUP
,
6916 .state
= WREPL_STATE_ACTIVE
,
6917 .node
= WREPL_NODE_B
,
6919 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6920 .ips
= addresses_B_1
,
6921 .apply_expected
= true
6925 * unique,active vs. group,tombstone with same ip(s), unchecked
6928 .line
= __location__
,
6929 .name
= _NBT_NAME("_UA_GT_SI_U", 0x00, NULL
),
6933 .num_ips
= ctx
->addresses_best_num
,
6934 .ips
= ctx
->addresses_best
,
6935 .apply_expected
= true
6941 .type
= WREPL_TYPE_GROUP
,
6942 .state
= WREPL_STATE_TOMBSTONE
,
6943 .node
= WREPL_NODE_B
,
6945 .num_ips
= ctx
->addresses_best_num
,
6946 .ips
= ctx
->addresses_best
,
6947 .apply_expected
= false
6951 * unique,active vs. group,tombstone with different ip(s), unchecked
6954 .line
= __location__
,
6955 .name
= _NBT_NAME("_UA_GT_DI_U", 0x00, NULL
),
6959 .num_ips
= ctx
->addresses_best_num
,
6960 .ips
= ctx
->addresses_best
,
6961 .apply_expected
= true
6967 .type
= WREPL_TYPE_GROUP
,
6968 .state
= WREPL_STATE_TOMBSTONE
,
6969 .node
= WREPL_NODE_B
,
6971 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6972 .ips
= addresses_B_1
,
6973 .apply_expected
= false
6977 * unique vs. special group section
6980 * unique,active vs. sgroup,active with same ip(s), release expected
6983 .line
= __location__
,
6984 .name
= _NBT_NAME("_UA_SA_SI_R", 0x00, NULL
),
6988 .num_ips
= ctx
->addresses_best_num
,
6989 .ips
= ctx
->addresses_best
,
6990 .apply_expected
= true
6994 .expect_release
= true,
6997 .type
= WREPL_TYPE_SGROUP
,
6998 .state
= WREPL_STATE_ACTIVE
,
6999 .node
= WREPL_NODE_B
,
7001 .num_ips
= ctx
->addresses_best_num
,
7002 .ips
= ctx
->addresses_best
,
7003 .apply_expected
= true
7007 * unique,active vs. group,active with different ip(s), release expected
7010 .line
= __location__
,
7011 .name
= _NBT_NAME("_UA_SA_DI_R", 0x00, NULL
),
7015 .num_ips
= ctx
->addresses_best_num
,
7016 .ips
= ctx
->addresses_best
,
7017 .apply_expected
= true
7021 .expect_release
= true,
7024 .type
= WREPL_TYPE_SGROUP
,
7025 .state
= WREPL_STATE_ACTIVE
,
7026 .node
= WREPL_NODE_B
,
7028 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7029 .ips
= addresses_B_1
,
7030 .apply_expected
= true
7034 * unique,active vs. sgroup,tombstone with same ip(s), unchecked
7037 .line
= __location__
,
7038 .name
= _NBT_NAME("_UA_ST_SI_U", 0x00, NULL
),
7042 .num_ips
= ctx
->addresses_best_num
,
7043 .ips
= ctx
->addresses_best
,
7044 .apply_expected
= true
7050 .type
= WREPL_TYPE_SGROUP
,
7051 .state
= WREPL_STATE_TOMBSTONE
,
7052 .node
= WREPL_NODE_B
,
7054 .num_ips
= ctx
->addresses_best_num
,
7055 .ips
= ctx
->addresses_best
,
7056 .apply_expected
= false
7060 * unique,active vs. sgroup,tombstone with different ip(s), unchecked
7063 .line
= __location__
,
7064 .name
= _NBT_NAME("_UA_ST_DI_U", 0x00, NULL
),
7068 .num_ips
= ctx
->addresses_best_num
,
7069 .ips
= ctx
->addresses_best
,
7070 .apply_expected
= true
7076 .type
= WREPL_TYPE_SGROUP
,
7077 .state
= WREPL_STATE_TOMBSTONE
,
7078 .node
= WREPL_NODE_B
,
7080 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7081 .ips
= addresses_B_1
,
7082 .apply_expected
= false
7086 * unique vs. multi homed section
7089 * unique,active vs. mhomed,active with same ip(s), unchecked
7092 .line
= __location__
,
7093 .name
= _NBT_NAME("_UA_MA_SI_U", 0x00, NULL
),
7097 .num_ips
= ctx
->addresses_best_num
,
7098 .ips
= ctx
->addresses_best
,
7099 .apply_expected
= true
7105 .type
= WREPL_TYPE_MHOMED
,
7106 .state
= WREPL_STATE_ACTIVE
,
7107 .node
= WREPL_NODE_B
,
7109 .num_ips
= ctx
->addresses_best_num
,
7110 .ips
= ctx
->addresses_best
,
7111 .apply_expected
= true
7115 * unique,active vs. mhomed,active with superset ip(s), unchecked
7118 .line
= __location__
,
7119 .name
= _NBT_NAME("_UA_MA_SP_U", 0x00, NULL
),
7123 .num_ips
= ctx
->addresses_best_num
,
7124 .ips
= ctx
->addresses_best
,
7125 .apply_expected
= true
7131 .type
= WREPL_TYPE_MHOMED
,
7132 .state
= WREPL_STATE_ACTIVE
,
7133 .node
= WREPL_NODE_B
,
7135 .num_ips
= ctx
->addresses_all_num
,
7136 .ips
= ctx
->addresses_all
,
7137 .apply_expected
= true
7141 * unique,active vs. mhomed,active with different ip(s), positive response
7144 .line
= __location__
,
7145 .name
= _NBT_NAME("_UA_MA_DI_P", 0x00, NULL
),
7149 .num_ips
= ctx
->addresses_best_num
,
7150 .ips
= ctx
->addresses_best
,
7151 .apply_expected
= true
7158 .type
= WREPL_TYPE_MHOMED
,
7159 .state
= WREPL_STATE_ACTIVE
,
7160 .node
= WREPL_NODE_B
,
7162 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7163 .ips
= addresses_B_3_4
,
7164 .apply_expected
= false
7168 * unique,active vs. mhomed,active with different ip(s), positive response other ips
7171 .line
= __location__
,
7172 .name
= _NBT_NAME("_UA_MA_DI_O", 0x00, NULL
),
7176 .num_ips
= ctx
->addresses_best_num
,
7177 .ips
= ctx
->addresses_best
,
7178 .apply_expected
= true
7183 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
7184 .ips
= addresses_A_3_4
,
7187 .type
= WREPL_TYPE_MHOMED
,
7188 .state
= WREPL_STATE_ACTIVE
,
7189 .node
= WREPL_NODE_B
,
7191 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7192 .ips
= addresses_B_3_4
,
7193 .apply_expected
= false
7197 * unique,active vs. mhomed,active with different ip(s), negative response
7200 .line
= __location__
,
7201 .name
= _NBT_NAME("_UA_MA_DI_N", 0x00, NULL
),
7205 .num_ips
= ctx
->addresses_best_num
,
7206 .ips
= ctx
->addresses_best
,
7207 .apply_expected
= true
7214 .type
= WREPL_TYPE_MHOMED
,
7215 .state
= WREPL_STATE_ACTIVE
,
7216 .node
= WREPL_NODE_B
,
7218 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7219 .ips
= addresses_B_3_4
,
7220 .apply_expected
= true
7224 * unique,active vs. mhomed,tombstone with same ip(s), unchecked
7227 .line
= __location__
,
7228 .name
= _NBT_NAME("_UA_MT_SI_U", 0x00, NULL
),
7232 .num_ips
= ctx
->addresses_best_num
,
7233 .ips
= ctx
->addresses_best
,
7234 .apply_expected
= true
7240 .type
= WREPL_TYPE_MHOMED
,
7241 .state
= WREPL_STATE_TOMBSTONE
,
7242 .node
= WREPL_NODE_B
,
7244 .num_ips
= ctx
->addresses_best_num
,
7245 .ips
= ctx
->addresses_best
,
7246 .apply_expected
= false
7250 * unique,active vs. mhomed,tombstone with different ip(s), unchecked
7253 .line
= __location__
,
7254 .name
= _NBT_NAME("_UA_MT_DI_U", 0x00, NULL
),
7258 .num_ips
= ctx
->addresses_best_num
,
7259 .ips
= ctx
->addresses_best
,
7260 .apply_expected
= true
7266 .type
= WREPL_TYPE_MHOMED
,
7267 .state
= WREPL_STATE_TOMBSTONE
,
7268 .node
= WREPL_NODE_B
,
7270 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7271 .ips
= addresses_B_3_4
,
7272 .apply_expected
= false
7276 * normal group vs. unique section
7279 * group,active vs. unique,active with same ip(s), unchecked
7282 .line
= __location__
,
7283 .name
= _NBT_NAME("_GA_UA_SI_U", 0x00, NULL
),
7285 .nb_flags
= NBT_NM_GROUP
,
7287 .num_ips
= ctx
->addresses_best_num
,
7288 .ips
= ctx
->addresses_best
,
7289 .apply_expected
= true
7295 .type
= WREPL_TYPE_UNIQUE
,
7296 .state
= WREPL_STATE_ACTIVE
,
7297 .node
= WREPL_NODE_B
,
7299 .num_ips
= ctx
->addresses_best_num
,
7300 .ips
= ctx
->addresses_best
,
7301 .apply_expected
= false
7305 * group,active vs. unique,active with different ip(s), unchecked
7308 .line
= __location__
,
7309 .name
= _NBT_NAME("_GA_UA_DI_U", 0x00, NULL
),
7311 .nb_flags
= NBT_NM_GROUP
,
7313 .num_ips
= ctx
->addresses_best_num
,
7314 .ips
= ctx
->addresses_best
,
7315 .apply_expected
= true
7321 .type
= WREPL_TYPE_UNIQUE
,
7322 .state
= WREPL_STATE_ACTIVE
,
7323 .node
= WREPL_NODE_B
,
7325 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7326 .ips
= addresses_B_1
,
7327 .apply_expected
= false
7331 * group,active vs. unique,tombstone with same ip(s), unchecked
7334 .line
= __location__
,
7335 .name
= _NBT_NAME("_GA_UT_SI_U", 0x00, NULL
),
7337 .nb_flags
= NBT_NM_GROUP
,
7339 .num_ips
= ctx
->addresses_best_num
,
7340 .ips
= ctx
->addresses_best
,
7341 .apply_expected
= true
7347 .type
= WREPL_TYPE_UNIQUE
,
7348 .state
= WREPL_STATE_TOMBSTONE
,
7349 .node
= WREPL_NODE_B
,
7351 .num_ips
= ctx
->addresses_best_num
,
7352 .ips
= ctx
->addresses_best
,
7353 .apply_expected
= false
7357 * group,active vs. unique,tombstone with different ip(s), unchecked
7360 .line
= __location__
,
7361 .name
= _NBT_NAME("_GA_UT_DI_U", 0x00, NULL
),
7363 .nb_flags
= NBT_NM_GROUP
,
7365 .num_ips
= ctx
->addresses_best_num
,
7366 .ips
= ctx
->addresses_best
,
7367 .apply_expected
= true
7373 .type
= WREPL_TYPE_UNIQUE
,
7374 .state
= WREPL_STATE_TOMBSTONE
,
7375 .node
= WREPL_NODE_B
,
7377 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7378 .ips
= addresses_B_1
,
7379 .apply_expected
= false
7383 * normal group vs. normal group section
7386 * group,active vs. group,active with same ip(s), unchecked
7389 .line
= __location__
,
7390 .name
= _NBT_NAME("_GA_GA_SI_U", 0x00, NULL
),
7392 .nb_flags
= NBT_NM_GROUP
,
7394 .num_ips
= ctx
->addresses_best_num
,
7395 .ips
= ctx
->addresses_best
,
7396 .apply_expected
= true
7402 .type
= WREPL_TYPE_GROUP
,
7403 .state
= WREPL_STATE_ACTIVE
,
7404 .node
= WREPL_NODE_B
,
7406 .num_ips
= ctx
->addresses_best_num
,
7407 .ips
= ctx
->addresses_best
,
7408 .apply_expected
= true
7412 * group,active vs. group,active with different ip(s), unchecked
7415 .line
= __location__
,
7416 .name
= _NBT_NAME("_GA_GA_DI_U", 0x00, NULL
),
7418 .nb_flags
= NBT_NM_GROUP
,
7420 .num_ips
= ctx
->addresses_best_num
,
7421 .ips
= ctx
->addresses_best
,
7422 .apply_expected
= true
7428 .type
= WREPL_TYPE_GROUP
,
7429 .state
= WREPL_STATE_ACTIVE
,
7430 .node
= WREPL_NODE_B
,
7432 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7433 .ips
= addresses_B_1
,
7434 .apply_expected
= true
7438 * group,active vs. group,tombstone with same ip(s), unchecked
7441 .line
= __location__
,
7442 .name
= _NBT_NAME("_GA_GT_SI_U", 0x00, NULL
),
7444 .nb_flags
= NBT_NM_GROUP
,
7446 .num_ips
= ctx
->addresses_best_num
,
7447 .ips
= ctx
->addresses_best
,
7448 .apply_expected
= true
7454 .type
= WREPL_TYPE_GROUP
,
7455 .state
= WREPL_STATE_TOMBSTONE
,
7456 .node
= WREPL_NODE_B
,
7458 .num_ips
= ctx
->addresses_best_num
,
7459 .ips
= ctx
->addresses_best
,
7460 .apply_expected
= false
7464 * group,active vs. group,tombstone with different ip(s), unchecked
7467 .line
= __location__
,
7468 .name
= _NBT_NAME("_GA_GT_DI_U", 0x00, NULL
),
7470 .nb_flags
= NBT_NM_GROUP
,
7472 .num_ips
= ctx
->addresses_best_num
,
7473 .ips
= ctx
->addresses_best
,
7474 .apply_expected
= true
7480 .type
= WREPL_TYPE_GROUP
,
7481 .state
= WREPL_STATE_TOMBSTONE
,
7482 .node
= WREPL_NODE_B
,
7484 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7485 .ips
= addresses_B_1
,
7486 .apply_expected
= false
7490 * normal group vs. special group section
7493 * group,active vs. sgroup,active with same ip(s), unchecked
7496 .line
= __location__
,
7497 .name
= _NBT_NAME("_GA_SA_SI_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_SGROUP
,
7510 .state
= WREPL_STATE_ACTIVE
,
7511 .node
= WREPL_NODE_B
,
7513 .num_ips
= ctx
->addresses_best_num
,
7514 .ips
= ctx
->addresses_best
,
7515 .apply_expected
= false
7519 * group,active vs. sgroup,active with different ip(s), unchecked
7522 .line
= __location__
,
7523 .name
= _NBT_NAME("_GA_SA_DI_U", 0x00, NULL
),
7525 .nb_flags
= NBT_NM_GROUP
,
7527 .num_ips
= ctx
->addresses_best_num
,
7528 .ips
= ctx
->addresses_best
,
7529 .apply_expected
= true
7535 .type
= WREPL_TYPE_SGROUP
,
7536 .state
= WREPL_STATE_ACTIVE
,
7537 .node
= WREPL_NODE_B
,
7539 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7540 .ips
= addresses_B_3_4
,
7541 .apply_expected
= false
7545 * group,active vs. sgroup,tombstone with same ip(s), unchecked
7548 .line
= __location__
,
7549 .name
= _NBT_NAME("_GA_ST_SI_U", 0x00, NULL
),
7551 .nb_flags
= NBT_NM_GROUP
,
7553 .num_ips
= ctx
->addresses_best_num
,
7554 .ips
= ctx
->addresses_best
,
7555 .apply_expected
= true
7561 .type
= WREPL_TYPE_SGROUP
,
7562 .state
= WREPL_STATE_TOMBSTONE
,
7563 .node
= WREPL_NODE_B
,
7565 .num_ips
= ctx
->addresses_best_num
,
7566 .ips
= ctx
->addresses_best
,
7567 .apply_expected
= false
7571 * group,active vs. sgroup,tombstone with different ip(s), unchecked
7574 .line
= __location__
,
7575 .name
= _NBT_NAME("_GA_ST_DI_U", 0x00, NULL
),
7577 .nb_flags
= NBT_NM_GROUP
,
7579 .num_ips
= ctx
->addresses_best_num
,
7580 .ips
= ctx
->addresses_best
,
7581 .apply_expected
= true
7587 .type
= WREPL_TYPE_SGROUP
,
7588 .state
= WREPL_STATE_TOMBSTONE
,
7589 .node
= WREPL_NODE_B
,
7591 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7592 .ips
= addresses_B_3_4
,
7593 .apply_expected
= false
7597 * normal group vs. multi homed section
7600 * group,active vs. mhomed,active with same ip(s), unchecked
7603 .line
= __location__
,
7604 .name
= _NBT_NAME("_GA_MA_SI_U", 0x00, NULL
),
7606 .nb_flags
= NBT_NM_GROUP
,
7608 .num_ips
= ctx
->addresses_best_num
,
7609 .ips
= ctx
->addresses_best
,
7610 .apply_expected
= true
7616 .type
= WREPL_TYPE_MHOMED
,
7617 .state
= WREPL_STATE_ACTIVE
,
7618 .node
= WREPL_NODE_B
,
7620 .num_ips
= ctx
->addresses_best_num
,
7621 .ips
= ctx
->addresses_best
,
7622 .apply_expected
= false
7626 * group,active vs. mhomed,active with different ip(s), unchecked
7629 .line
= __location__
,
7630 .name
= _NBT_NAME("_GA_MA_DI_U", 0x00, NULL
),
7632 .nb_flags
= NBT_NM_GROUP
,
7634 .num_ips
= ctx
->addresses_best_num
,
7635 .ips
= ctx
->addresses_best
,
7636 .apply_expected
= true
7642 .type
= WREPL_TYPE_MHOMED
,
7643 .state
= WREPL_STATE_ACTIVE
,
7644 .node
= WREPL_NODE_B
,
7646 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7647 .ips
= addresses_B_3_4
,
7648 .apply_expected
= false
7652 * group,active vs. mhomed,tombstone with same ip(s), unchecked
7655 .line
= __location__
,
7656 .name
= _NBT_NAME("_GA_MT_SI_U", 0x00, NULL
),
7658 .nb_flags
= NBT_NM_GROUP
,
7660 .num_ips
= ctx
->addresses_best_num
,
7661 .ips
= ctx
->addresses_best
,
7662 .apply_expected
= true
7668 .type
= WREPL_TYPE_MHOMED
,
7669 .state
= WREPL_STATE_TOMBSTONE
,
7670 .node
= WREPL_NODE_B
,
7672 .num_ips
= ctx
->addresses_best_num
,
7673 .ips
= ctx
->addresses_best
,
7674 .apply_expected
= false
7678 * group,active vs. mhomed,tombstone with different ip(s), unchecked
7681 .line
= __location__
,
7682 .name
= _NBT_NAME("_GA_MT_DI_U", 0x00, NULL
),
7684 .nb_flags
= NBT_NM_GROUP
,
7686 .num_ips
= ctx
->addresses_best_num
,
7687 .ips
= ctx
->addresses_best
,
7688 .apply_expected
= true
7694 .type
= WREPL_TYPE_MHOMED
,
7695 .state
= WREPL_STATE_TOMBSTONE
,
7696 .node
= WREPL_NODE_B
,
7698 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7699 .ips
= addresses_B_3_4
,
7700 .apply_expected
= false
7704 * special group vs. unique section
7707 * sgroup,active vs. unique,active with same ip(s), unchecked
7710 .line
= __location__
,
7711 .name
= _NBT_NAME("_SA_UA_SI_U", 0x1C, NULL
),
7713 .nb_flags
= NBT_NM_GROUP
,
7715 .num_ips
= ctx
->addresses_best_num
,
7716 .ips
= ctx
->addresses_best
,
7717 .apply_expected
= true
7723 .type
= WREPL_TYPE_UNIQUE
,
7724 .state
= WREPL_STATE_ACTIVE
,
7725 .node
= WREPL_NODE_B
,
7727 .num_ips
= ctx
->addresses_best_num
,
7728 .ips
= ctx
->addresses_best
,
7729 .apply_expected
= false
7733 * sgroup,active vs. unique,active with different ip(s), unchecked
7736 .line
= __location__
,
7737 .name
= _NBT_NAME("_SA_UA_DI_U", 0x1C, NULL
),
7739 .nb_flags
= NBT_NM_GROUP
,
7741 .num_ips
= ctx
->addresses_best_num
,
7742 .ips
= ctx
->addresses_best
,
7743 .apply_expected
= true
7749 .type
= WREPL_TYPE_UNIQUE
,
7750 .state
= WREPL_STATE_ACTIVE
,
7751 .node
= WREPL_NODE_B
,
7753 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7754 .ips
= addresses_B_1
,
7755 .apply_expected
= false
7759 * sgroup,active vs. unique,tombstone with same ip(s), unchecked
7762 .line
= __location__
,
7763 .name
= _NBT_NAME("_SA_UT_SI_U", 0x1C, NULL
),
7765 .nb_flags
= NBT_NM_GROUP
,
7767 .num_ips
= ctx
->addresses_best_num
,
7768 .ips
= ctx
->addresses_best
,
7769 .apply_expected
= true
7775 .type
= WREPL_TYPE_UNIQUE
,
7776 .state
= WREPL_STATE_TOMBSTONE
,
7777 .node
= WREPL_NODE_B
,
7779 .num_ips
= ctx
->addresses_best_num
,
7780 .ips
= ctx
->addresses_best
,
7781 .apply_expected
= false
7785 * sgroup,active vs. unique,tombstone with different ip(s), unchecked
7788 .line
= __location__
,
7789 .name
= _NBT_NAME("_SA_UT_DI_U", 0x1C, NULL
),
7791 .nb_flags
= NBT_NM_GROUP
,
7793 .num_ips
= ctx
->addresses_best_num
,
7794 .ips
= ctx
->addresses_best
,
7795 .apply_expected
= true
7801 .type
= WREPL_TYPE_UNIQUE
,
7802 .state
= WREPL_STATE_TOMBSTONE
,
7803 .node
= WREPL_NODE_B
,
7805 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7806 .ips
= addresses_B_1
,
7807 .apply_expected
= false
7811 * special group vs. normal group section
7814 * sgroup,active vs. group,active with same ip(s), unchecked
7817 .line
= __location__
,
7818 .name
= _NBT_NAME("_SA_GA_SI_U", 0x1C, NULL
),
7820 .nb_flags
= NBT_NM_GROUP
,
7822 .num_ips
= ctx
->addresses_best_num
,
7823 .ips
= ctx
->addresses_best
,
7824 .apply_expected
= true
7830 .type
= WREPL_TYPE_GROUP
,
7831 .state
= WREPL_STATE_ACTIVE
,
7832 .node
= WREPL_NODE_B
,
7834 .num_ips
= ctx
->addresses_best_num
,
7835 .ips
= ctx
->addresses_best
,
7836 .apply_expected
= false
7840 * sgroup,active vs. group,active with different ip(s), unchecked
7843 .line
= __location__
,
7844 .name
= _NBT_NAME("_SA_GA_DI_U", 0x1C, NULL
),
7846 .nb_flags
= NBT_NM_GROUP
,
7848 .num_ips
= ctx
->addresses_best_num
,
7849 .ips
= ctx
->addresses_best
,
7850 .apply_expected
= true
7856 .type
= WREPL_TYPE_GROUP
,
7857 .state
= WREPL_STATE_ACTIVE
,
7858 .node
= WREPL_NODE_B
,
7860 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7861 .ips
= addresses_B_1
,
7862 .apply_expected
= false
7866 * sgroup,active vs. group,tombstone with same ip(s), unchecked
7869 .line
= __location__
,
7870 .name
= _NBT_NAME("_SA_GT_SI_U", 0x1C, NULL
),
7872 .nb_flags
= NBT_NM_GROUP
,
7874 .num_ips
= ctx
->addresses_best_num
,
7875 .ips
= ctx
->addresses_best
,
7876 .apply_expected
= true
7882 .type
= WREPL_TYPE_GROUP
,
7883 .state
= WREPL_STATE_TOMBSTONE
,
7884 .node
= WREPL_NODE_B
,
7886 .num_ips
= ctx
->addresses_best_num
,
7887 .ips
= ctx
->addresses_best
,
7888 .apply_expected
= false
7892 * sgroup,active vs. group,tombstone with different ip(s), unchecked
7895 .line
= __location__
,
7896 .name
= _NBT_NAME("_SA_GT_DI_U", 0x1C, NULL
),
7898 .nb_flags
= NBT_NM_GROUP
,
7900 .num_ips
= ctx
->addresses_best_num
,
7901 .ips
= ctx
->addresses_best
,
7902 .apply_expected
= true
7908 .type
= WREPL_TYPE_GROUP
,
7909 .state
= WREPL_STATE_TOMBSTONE
,
7910 .node
= WREPL_NODE_B
,
7912 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7913 .ips
= addresses_B_1
,
7914 .apply_expected
= false
7918 * special group vs. multi homed section
7921 * sgroup,active vs. mhomed,active with same ip(s), unchecked
7924 .line
= __location__
,
7925 .name
= _NBT_NAME("_SA_MA_SI_U", 0x1C, NULL
),
7927 .nb_flags
= NBT_NM_GROUP
,
7929 .num_ips
= ctx
->addresses_best_num
,
7930 .ips
= ctx
->addresses_best
,
7931 .apply_expected
= true
7937 .type
= WREPL_TYPE_MHOMED
,
7938 .state
= WREPL_STATE_ACTIVE
,
7939 .node
= WREPL_NODE_B
,
7941 .num_ips
= ctx
->addresses_best_num
,
7942 .ips
= ctx
->addresses_best
,
7943 .apply_expected
= false
7947 * sgroup,active vs. mhomed,active with different ip(s), unchecked
7950 .line
= __location__
,
7951 .name
= _NBT_NAME("_SA_MA_DI_U", 0x1C, NULL
),
7953 .nb_flags
= NBT_NM_GROUP
,
7955 .num_ips
= ctx
->addresses_best_num
,
7956 .ips
= ctx
->addresses_best
,
7957 .apply_expected
= true
7963 .type
= WREPL_TYPE_MHOMED
,
7964 .state
= WREPL_STATE_ACTIVE
,
7965 .node
= WREPL_NODE_B
,
7967 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7968 .ips
= addresses_B_1
,
7969 .apply_expected
= false
7973 * sgroup,active vs. mhomed,tombstone with same ip(s), unchecked
7976 .line
= __location__
,
7977 .name
= _NBT_NAME("_SA_MT_SI_U", 0x1C, NULL
),
7979 .nb_flags
= NBT_NM_GROUP
,
7981 .num_ips
= ctx
->addresses_best_num
,
7982 .ips
= ctx
->addresses_best
,
7983 .apply_expected
= true
7989 .type
= WREPL_TYPE_MHOMED
,
7990 .state
= WREPL_STATE_TOMBSTONE
,
7991 .node
= WREPL_NODE_B
,
7993 .num_ips
= ctx
->addresses_best_num
,
7994 .ips
= ctx
->addresses_best
,
7995 .apply_expected
= false
7999 * sgroup,active vs. mhomed,tombstone with different ip(s), unchecked
8002 .line
= __location__
,
8003 .name
= _NBT_NAME("_SA_MT_DI_U", 0x1C, NULL
),
8005 .nb_flags
= NBT_NM_GROUP
,
8007 .num_ips
= ctx
->addresses_best_num
,
8008 .ips
= ctx
->addresses_best
,
8009 .apply_expected
= true
8015 .type
= WREPL_TYPE_MHOMED
,
8016 .state
= WREPL_STATE_TOMBSTONE
,
8017 .node
= WREPL_NODE_B
,
8019 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8020 .ips
= addresses_B_1
,
8021 .apply_expected
= false
8025 * multi homed vs. unique section
8028 * mhomed,active vs. unique,active with same ip(s), unchecked
8031 .line
= __location__
,
8032 .name
= _NBT_NAME("_MA_UA_SI_U", 0x00, NULL
),
8036 .num_ips
= ctx
->addresses_best_num
,
8037 .ips
= ctx
->addresses_best
,
8038 .apply_expected
= true
8044 .type
= WREPL_TYPE_UNIQUE
,
8045 .state
= WREPL_STATE_ACTIVE
,
8046 .node
= WREPL_NODE_B
,
8048 .num_ips
= ctx
->addresses_best_num
,
8049 .ips
= ctx
->addresses_best
,
8050 .apply_expected
= true
8054 * mhomed,active vs. unique,active with different ip(s), positive response
8057 .line
= __location__
,
8058 .name
= _NBT_NAME("_MA_UA_DI_P", 0x00, NULL
),
8062 .num_ips
= ctx
->addresses_best_num
,
8063 .ips
= ctx
->addresses_best
,
8064 .apply_expected
= true
8071 .type
= WREPL_TYPE_UNIQUE
,
8072 .state
= WREPL_STATE_ACTIVE
,
8073 .node
= WREPL_NODE_B
,
8075 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8076 .ips
= addresses_B_1
,
8077 .apply_expected
= false
8081 * mhomed,active vs. unique,active with different ip(s), positive response other ips
8084 .line
= __location__
,
8085 .name
= _NBT_NAME("_MA_UA_DI_O", 0x00, NULL
),
8089 .num_ips
= ctx
->addresses_best_num
,
8090 .ips
= ctx
->addresses_best
,
8091 .apply_expected
= true
8096 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
8097 .ips
= addresses_A_3_4
,
8100 .type
= WREPL_TYPE_UNIQUE
,
8101 .state
= WREPL_STATE_ACTIVE
,
8102 .node
= WREPL_NODE_B
,
8104 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8105 .ips
= addresses_B_1
,
8106 .apply_expected
= false
8110 * mhomed,active vs. unique,active with different ip(s), negative response
8113 .line
= __location__
,
8114 .name
= _NBT_NAME("_MA_UA_DI_N", 0x00, NULL
),
8118 .num_ips
= ctx
->addresses_best_num
,
8119 .ips
= ctx
->addresses_best
,
8120 .apply_expected
= true
8127 .type
= WREPL_TYPE_UNIQUE
,
8128 .state
= WREPL_STATE_ACTIVE
,
8129 .node
= WREPL_NODE_B
,
8131 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8132 .ips
= addresses_B_1
,
8133 .apply_expected
= true
8137 * mhomed,active vs. unique,tombstone with same ip(s), unchecked
8140 .line
= __location__
,
8141 .name
= _NBT_NAME("_MA_UT_SI_U", 0x00, NULL
),
8145 .num_ips
= ctx
->addresses_best_num
,
8146 .ips
= ctx
->addresses_best
,
8147 .apply_expected
= true
8153 .type
= WREPL_TYPE_UNIQUE
,
8154 .state
= WREPL_STATE_TOMBSTONE
,
8155 .node
= WREPL_NODE_B
,
8157 .num_ips
= ctx
->addresses_best_num
,
8158 .ips
= ctx
->addresses_best
,
8159 .apply_expected
= false
8163 * mhomed,active vs. unique,tombstone with different ip(s), unchecked
8166 .line
= __location__
,
8167 .name
= _NBT_NAME("_MA_UT_DI_U", 0x00, NULL
),
8171 .num_ips
= ctx
->addresses_best_num
,
8172 .ips
= ctx
->addresses_best
,
8173 .apply_expected
= true
8179 .type
= WREPL_TYPE_UNIQUE
,
8180 .state
= WREPL_STATE_TOMBSTONE
,
8181 .node
= WREPL_NODE_B
,
8183 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8184 .ips
= addresses_B_1
,
8185 .apply_expected
= false
8189 * multi homed vs. normal group section
8192 * mhomed,active vs. group,active with same ip(s), release expected
8195 .line
= __location__
,
8196 .name
= _NBT_NAME("_MA_GA_SI_R", 0x00, NULL
),
8200 .num_ips
= ctx
->addresses_best_num
,
8201 .ips
= ctx
->addresses_best
,
8202 .apply_expected
= true
8206 .expect_release
= true,
8209 .type
= WREPL_TYPE_GROUP
,
8210 .state
= WREPL_STATE_ACTIVE
,
8211 .node
= WREPL_NODE_B
,
8213 .num_ips
= ctx
->addresses_best_num
,
8214 .ips
= ctx
->addresses_best
,
8215 .apply_expected
= true
8219 * mhomed,active vs. group,active with different ip(s), release expected
8222 .line
= __location__
,
8223 .name
= _NBT_NAME("_MA_GA_DI_R", 0x00, NULL
),
8227 .num_ips
= ctx
->addresses_best_num
,
8228 .ips
= ctx
->addresses_best
,
8229 .apply_expected
= true
8233 .expect_release
= true,
8236 .type
= WREPL_TYPE_GROUP
,
8237 .state
= WREPL_STATE_ACTIVE
,
8238 .node
= WREPL_NODE_B
,
8240 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8241 .ips
= addresses_B_1
,
8242 .apply_expected
= true
8246 * mhomed,active vs. group,tombstone with same ip(s), unchecked
8249 .line
= __location__
,
8250 .name
= _NBT_NAME("_MA_GT_SI_U", 0x00, NULL
),
8254 .num_ips
= ctx
->addresses_best_num
,
8255 .ips
= ctx
->addresses_best
,
8256 .apply_expected
= true
8262 .type
= WREPL_TYPE_GROUP
,
8263 .state
= WREPL_STATE_TOMBSTONE
,
8264 .node
= WREPL_NODE_B
,
8266 .num_ips
= ctx
->addresses_best_num
,
8267 .ips
= ctx
->addresses_best
,
8268 .apply_expected
= false
8272 * mhomed,active vs. group,tombstone with different ip(s), unchecked
8275 .line
= __location__
,
8276 .name
= _NBT_NAME("_MA_GT_DI_U", 0x00, NULL
),
8280 .num_ips
= ctx
->addresses_best_num
,
8281 .ips
= ctx
->addresses_best
,
8282 .apply_expected
= true
8288 .type
= WREPL_TYPE_GROUP
,
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. special group section
8301 * mhomed,active vs. sgroup,active with same ip(s), release expected
8304 .line
= __location__
,
8305 .name
= _NBT_NAME("_MA_SA_SI_R", 0x00, NULL
),
8309 .num_ips
= ctx
->addresses_best_num
,
8310 .ips
= ctx
->addresses_best
,
8311 .apply_expected
= true
8315 .expect_release
= true,
8318 .type
= WREPL_TYPE_SGROUP
,
8319 .state
= WREPL_STATE_ACTIVE
,
8320 .node
= WREPL_NODE_B
,
8322 .num_ips
= ctx
->addresses_best_num
,
8323 .ips
= ctx
->addresses_best
,
8324 .apply_expected
= true
8328 * mhomed,active vs. group,active with different ip(s), release expected
8331 .line
= __location__
,
8332 .name
= _NBT_NAME("_MA_SA_DI_R", 0x00, NULL
),
8336 .num_ips
= ctx
->addresses_best_num
,
8337 .ips
= ctx
->addresses_best
,
8338 .apply_expected
= true
8342 .expect_release
= true,
8345 .type
= WREPL_TYPE_SGROUP
,
8346 .state
= WREPL_STATE_ACTIVE
,
8347 .node
= WREPL_NODE_B
,
8349 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8350 .ips
= addresses_B_1
,
8351 .apply_expected
= true
8355 * mhomed,active vs. sgroup,tombstone with same ip(s), unchecked
8358 .line
= __location__
,
8359 .name
= _NBT_NAME("_MA_ST_SI_U", 0x00, NULL
),
8363 .num_ips
= ctx
->addresses_best_num
,
8364 .ips
= ctx
->addresses_best
,
8365 .apply_expected
= true
8371 .type
= WREPL_TYPE_SGROUP
,
8372 .state
= WREPL_STATE_TOMBSTONE
,
8373 .node
= WREPL_NODE_B
,
8375 .num_ips
= ctx
->addresses_best_num
,
8376 .ips
= ctx
->addresses_best
,
8377 .apply_expected
= false
8381 * mhomed,active vs. sgroup,tombstone with different ip(s), unchecked
8384 .line
= __location__
,
8385 .name
= _NBT_NAME("_MA_ST_DI_U", 0x00, NULL
),
8389 .num_ips
= ctx
->addresses_best_num
,
8390 .ips
= ctx
->addresses_best
,
8391 .apply_expected
= true
8397 .type
= WREPL_TYPE_SGROUP
,
8398 .state
= WREPL_STATE_TOMBSTONE
,
8399 .node
= WREPL_NODE_B
,
8401 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8402 .ips
= addresses_B_1
,
8403 .apply_expected
= false
8407 * multi homed vs. multi homed section
8410 * mhomed,active vs. mhomed,active with same ip(s), unchecked
8413 .line
= __location__
,
8414 .name
= _NBT_NAME("_MA_MA_SI_U", 0x00, NULL
),
8418 .num_ips
= ctx
->addresses_best_num
,
8419 .ips
= ctx
->addresses_best
,
8420 .apply_expected
= true
8426 .type
= WREPL_TYPE_MHOMED
,
8427 .state
= WREPL_STATE_ACTIVE
,
8428 .node
= WREPL_NODE_B
,
8430 .num_ips
= ctx
->addresses_best_num
,
8431 .ips
= ctx
->addresses_best
,
8432 .apply_expected
= true
8436 * mhomed,active vs. mhomed,active with superset ip(s), unchecked
8439 .line
= __location__
,
8440 .name
= _NBT_NAME("_MA_MA_SP_U", 0x00, NULL
),
8444 .num_ips
= ctx
->addresses_best_num
,
8445 .ips
= ctx
->addresses_best
,
8446 .apply_expected
= true
8452 .type
= WREPL_TYPE_MHOMED
,
8453 .state
= WREPL_STATE_ACTIVE
,
8454 .node
= WREPL_NODE_B
,
8456 .num_ips
= ctx
->addresses_all_num
,
8457 .ips
= ctx
->addresses_all
,
8458 .apply_expected
= true
8462 * mhomed,active vs. mhomed,active with different ip(s), positive response
8465 .line
= __location__
,
8466 .name
= _NBT_NAME("_MA_MA_DI_P", 0x00, NULL
),
8470 .num_ips
= ctx
->addresses_best_num
,
8471 .ips
= ctx
->addresses_best
,
8472 .apply_expected
= true
8479 .type
= WREPL_TYPE_MHOMED
,
8480 .state
= WREPL_STATE_ACTIVE
,
8481 .node
= WREPL_NODE_B
,
8483 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8484 .ips
= addresses_B_3_4
,
8485 .apply_expected
= false
8489 * mhomed,active vs. mhomed,active with different ip(s), positive response other ips
8492 .line
= __location__
,
8493 .name
= _NBT_NAME("_MA_MA_DI_O", 0x00, NULL
),
8497 .num_ips
= ctx
->addresses_best_num
,
8498 .ips
= ctx
->addresses_best
,
8499 .apply_expected
= true
8504 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
8505 .ips
= addresses_A_3_4
,
8508 .type
= WREPL_TYPE_MHOMED
,
8509 .state
= WREPL_STATE_ACTIVE
,
8510 .node
= WREPL_NODE_B
,
8512 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8513 .ips
= addresses_B_3_4
,
8514 .apply_expected
= false
8518 * mhomed,active vs. mhomed,active with different ip(s), negative response
8521 .line
= __location__
,
8522 .name
= _NBT_NAME("_MA_MA_DI_N", 0x00, NULL
),
8526 .num_ips
= ctx
->addresses_best_num
,
8527 .ips
= ctx
->addresses_best
,
8528 .apply_expected
= true
8535 .type
= WREPL_TYPE_MHOMED
,
8536 .state
= WREPL_STATE_ACTIVE
,
8537 .node
= WREPL_NODE_B
,
8539 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8540 .ips
= addresses_B_3_4
,
8541 .apply_expected
= true
8545 * mhomed,active vs. mhomed,tombstone with same ip(s), unchecked
8548 .line
= __location__
,
8549 .name
= _NBT_NAME("_MA_MT_SI_U", 0x00, NULL
),
8553 .num_ips
= ctx
->addresses_best_num
,
8554 .ips
= ctx
->addresses_best
,
8555 .apply_expected
= true
8561 .type
= WREPL_TYPE_MHOMED
,
8562 .state
= WREPL_STATE_TOMBSTONE
,
8563 .node
= WREPL_NODE_B
,
8565 .num_ips
= ctx
->addresses_best_num
,
8566 .ips
= ctx
->addresses_best
,
8567 .apply_expected
= false
8571 * mhomed,active vs. mhomed,tombstone with different ip(s), unchecked
8574 .line
= __location__
,
8575 .name
= _NBT_NAME("_MA_MT_DI_U", 0x00, NULL
),
8579 .num_ips
= ctx
->addresses_best_num
,
8580 .ips
= ctx
->addresses_best
,
8581 .apply_expected
= true
8587 .type
= WREPL_TYPE_MHOMED
,
8588 .state
= WREPL_STATE_TOMBSTONE
,
8589 .node
= WREPL_NODE_B
,
8591 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8592 .ips
= addresses_B_3_4
,
8593 .apply_expected
= false
8597 * some more multi homed test, including merging
8600 * mhomed,active vs. mhomed,active with superset ip(s), unchecked
8603 .line
= __location__
,
8604 .section
= "Test Replica vs. owned active: some more MHOMED combinations",
8605 .name
= _NBT_NAME("_MA_MA_SP_U", 0x00, NULL
),
8606 .comment
= "C:MHOMED vs. B:ALL => B:ALL",
8607 .skip
= (ctx
->addresses_all_num
< 3),
8611 .num_ips
= ctx
->addresses_mhomed_num
,
8612 .ips
= ctx
->addresses_mhomed
,
8613 .apply_expected
= true
8619 .type
= WREPL_TYPE_MHOMED
,
8620 .state
= WREPL_STATE_ACTIVE
,
8621 .node
= WREPL_NODE_B
,
8623 .num_ips
= ctx
->addresses_all_num
,
8624 .ips
= ctx
->addresses_all
,
8625 .apply_expected
= true
8629 * mhomed,active vs. mhomed,active with same ips, unchecked
8632 .line
= __location__
,
8633 .name
= _NBT_NAME("_MA_MA_SM_U", 0x00, NULL
),
8634 .comment
= "C:MHOMED vs. B:MHOMED => B:MHOMED",
8635 .skip
= (ctx
->addresses_mhomed_num
< 2),
8639 .num_ips
= ctx
->addresses_mhomed_num
,
8640 .ips
= ctx
->addresses_mhomed
,
8641 .apply_expected
= true
8647 .type
= WREPL_TYPE_MHOMED
,
8648 .state
= WREPL_STATE_ACTIVE
,
8649 .node
= WREPL_NODE_B
,
8651 .num_ips
= ctx
->addresses_mhomed_num
,
8652 .ips
= ctx
->addresses_mhomed
,
8653 .apply_expected
= true
8657 * mhomed,active vs. mhomed,active with subset ip(s), positive response
8660 .line
= __location__
,
8661 .name
= _NBT_NAME("_MA_MA_SB_P", 0x00, NULL
),
8662 .comment
= "C:MHOMED vs. B:BEST (C:MHOMED) => B:MHOMED",
8663 .skip
= (ctx
->addresses_mhomed_num
< 2),
8667 .num_ips
= ctx
->addresses_mhomed_num
,
8668 .ips
= ctx
->addresses_mhomed
,
8669 .apply_expected
= true
8676 .type
= WREPL_TYPE_MHOMED
,
8677 .state
= WREPL_STATE_ACTIVE
,
8678 .node
= WREPL_NODE_B
,
8680 .num_ips
= ctx
->addresses_best_num
,
8681 .ips
= ctx
->addresses_best
,
8682 .mhomed_merge
= true
8686 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with all addresses
8689 .line
= __location__
,
8690 .name
= _NBT_NAME("_MA_MA_SB_A", 0x00, NULL
),
8691 .comment
= "C:MHOMED vs. B:BEST (C:ALL) => B:MHOMED",
8692 .skip
= (ctx
->addresses_all_num
< 3),
8696 .num_ips
= ctx
->addresses_mhomed_num
,
8697 .ips
= ctx
->addresses_mhomed
,
8698 .apply_expected
= true
8703 .num_ips
= ctx
->addresses_all_num
,
8704 .ips
= ctx
->addresses_all
,
8707 .type
= WREPL_TYPE_MHOMED
,
8708 .state
= WREPL_STATE_ACTIVE
,
8709 .node
= WREPL_NODE_B
,
8711 .num_ips
= ctx
->addresses_best_num
,
8712 .ips
= ctx
->addresses_best
,
8713 .mhomed_merge
= true
8717 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with replicas addresses
8718 * TODO: check why the server sends a name release demand for one address?
8719 * the release demand has no effect to the database record...
8722 .line
= __location__
,
8723 .name
= _NBT_NAME("_MA_MA_SB_PRA", 0x00, NULL
),
8724 .comment
= "C:MHOMED vs. B:BEST (C:BEST) => C:MHOMED",
8725 .skip
= (ctx
->addresses_all_num
< 2),
8729 .num_ips
= ctx
->addresses_mhomed_num
,
8730 .ips
= ctx
->addresses_mhomed
,
8731 .apply_expected
= true
8736 .num_ips
= ctx
->addresses_best_num
,
8737 .ips
= ctx
->addresses_best
,
8738 .late_release
= true
8741 .type
= WREPL_TYPE_MHOMED
,
8742 .state
= WREPL_STATE_ACTIVE
,
8743 .node
= WREPL_NODE_B
,
8745 .num_ips
= ctx
->addresses_best_num
,
8746 .ips
= ctx
->addresses_best
,
8747 .apply_expected
= false
8751 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with other addresses
8754 .line
= __location__
,
8755 .name
= _NBT_NAME("_MA_MA_SB_O", 0x00, NULL
),
8756 .comment
= "C:MHOMED vs. B:BEST (B:B_3_4) =>C:MHOMED",
8757 .skip
= (ctx
->addresses_all_num
< 2),
8761 .num_ips
= ctx
->addresses_mhomed_num
,
8762 .ips
= ctx
->addresses_mhomed
,
8763 .apply_expected
= true
8768 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8769 .ips
= addresses_B_3_4
,
8772 .type
= WREPL_TYPE_MHOMED
,
8773 .state
= WREPL_STATE_ACTIVE
,
8774 .node
= WREPL_NODE_B
,
8776 .num_ips
= ctx
->addresses_best_num
,
8777 .ips
= ctx
->addresses_best
,
8778 .apply_expected
= false
8782 * mhomed,active vs. mhomed,active with subset ip(s), negative response
8785 .line
= __location__
,
8786 .name
= _NBT_NAME("_MA_MA_SB_N", 0x00, NULL
),
8787 .comment
= "C:MHOMED vs. B:BEST (NEGATIVE) => B:BEST",
8788 .skip
= (ctx
->addresses_mhomed_num
< 2),
8792 .num_ips
= ctx
->addresses_mhomed_num
,
8793 .ips
= ctx
->addresses_mhomed
,
8794 .apply_expected
= true
8801 .type
= WREPL_TYPE_MHOMED
,
8802 .state
= WREPL_STATE_ACTIVE
,
8803 .node
= WREPL_NODE_B
,
8805 .num_ips
= ctx
->addresses_best_num
,
8806 .ips
= ctx
->addresses_best
,
8807 .apply_expected
= true
8811 * some more multi homed and unique test, including merging
8814 * mhomed,active vs. unique,active with subset ip(s), positive response
8817 .line
= __location__
,
8818 .section
= "Test Replica vs. owned active: some more UNIQUE,MHOMED combinations",
8819 .name
= _NBT_NAME("_MA_UA_SB_P", 0x00, NULL
),
8820 .comment
= "C:MHOMED vs. B:UNIQUE,BEST (C:MHOMED) => B:MHOMED",
8821 .skip
= (ctx
->addresses_all_num
< 2),
8825 .num_ips
= ctx
->addresses_mhomed_num
,
8826 .ips
= ctx
->addresses_mhomed
,
8827 .apply_expected
= true
8834 .type
= WREPL_TYPE_UNIQUE
,
8835 .state
= WREPL_STATE_ACTIVE
,
8836 .node
= WREPL_NODE_B
,
8838 .num_ips
= ctx
->addresses_best_num
,
8839 .ips
= ctx
->addresses_best
,
8840 .mhomed_merge
= true
8844 * unique,active vs. unique,active with different ip(s), positive response, with replicas address
8845 * TODO: check why the server sends a name release demand for one address?
8846 * the release demand has no effect to the database record...
8849 .line
= __location__
,
8850 .name
= _NBT_NAME("_UA_UA_DI_PRA", 0x00, NULL
),
8851 .comment
= "C:BEST vs. B:BEST2 (C:BEST2,LR:BEST2) => C:BEST",
8852 .skip
= (ctx
->addresses_all_num
< 2),
8856 .num_ips
= ctx
->addresses_best_num
,
8857 .ips
= ctx
->addresses_best
,
8858 .apply_expected
= true
8863 .num_ips
= ctx
->addresses_best2_num
,
8864 .ips
= ctx
->addresses_best2
,
8865 .late_release
= true
8868 .type
= WREPL_TYPE_UNIQUE
,
8869 .state
= WREPL_STATE_ACTIVE
,
8870 .node
= WREPL_NODE_B
,
8872 .num_ips
= ctx
->addresses_best2_num
,
8873 .ips
= ctx
->addresses_best2
,
8874 .apply_expected
= false,
8878 * unique,active vs. unique,active with different ip(s), positive response, with all addresses
8881 .line
= __location__
,
8882 .name
= _NBT_NAME("_UA_UA_DI_A", 0x00, NULL
),
8883 .comment
= "C:BEST vs. B:BEST2 (C:ALL) => B:MHOMED",
8884 .skip
= (ctx
->addresses_all_num
< 3),
8888 .num_ips
= ctx
->addresses_best_num
,
8889 .ips
= ctx
->addresses_best
,
8890 .apply_expected
= true
8895 .num_ips
= ctx
->addresses_all_num
,
8896 .ips
= ctx
->addresses_all
,
8899 .type
= WREPL_TYPE_UNIQUE
,
8900 .state
= WREPL_STATE_ACTIVE
,
8901 .node
= WREPL_NODE_B
,
8903 .num_ips
= ctx
->addresses_best2_num
,
8904 .ips
= ctx
->addresses_best2
,
8905 .mhomed_merge
= true,
8909 * unique,active vs. mhomed,active with different ip(s), positive response, with all addresses
8912 .line
= __location__
,
8913 .name
= _NBT_NAME("_UA_MA_DI_A", 0x00, NULL
),
8914 .comment
= "C:BEST vs. B:BEST2 (C:ALL) => B:MHOMED",
8915 .skip
= (ctx
->addresses_all_num
< 3),
8919 .num_ips
= ctx
->addresses_best_num
,
8920 .ips
= ctx
->addresses_best
,
8921 .apply_expected
= true
8926 .num_ips
= ctx
->addresses_all_num
,
8927 .ips
= ctx
->addresses_all
,
8930 .type
= WREPL_TYPE_MHOMED
,
8931 .state
= WREPL_STATE_ACTIVE
,
8932 .node
= WREPL_NODE_B
,
8934 .num_ips
= ctx
->addresses_best2_num
,
8935 .ips
= ctx
->addresses_best2
,
8936 .mhomed_merge
= true,
8940 * special group vs. special group merging section
8943 * sgroup,active vs. sgroup,active with different ip(s)
8946 .line
= __location__
,
8947 .section
= "Test Replica vs. owned active: SGROUP vs. SGROUP tests",
8948 .name
= _NBT_NAME("_SA_SA_DI_U", 0x1C, NULL
),
8949 .skip
= (ctx
->addresses_all_num
< 3),
8951 .nb_flags
= NBT_NM_GROUP
,
8953 .num_ips
= ctx
->addresses_mhomed_num
,
8954 .ips
= ctx
->addresses_mhomed
,
8955 .apply_expected
= true
8961 .type
= WREPL_TYPE_SGROUP
,
8962 .state
= WREPL_STATE_ACTIVE
,
8963 .node
= WREPL_NODE_B
,
8965 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8966 .ips
= addresses_B_3_4
,
8967 .sgroup_merge
= true
8971 * sgroup,active vs. sgroup,active with same ip(s)
8974 .line
= __location__
,
8975 .name
= _NBT_NAME("_SA_SA_SI_U", 0x1C, NULL
),
8976 .skip
= (ctx
->addresses_all_num
< 3),
8978 .nb_flags
= NBT_NM_GROUP
,
8980 .num_ips
= ctx
->addresses_mhomed_num
,
8981 .ips
= ctx
->addresses_mhomed
,
8982 .apply_expected
= true
8988 .type
= WREPL_TYPE_SGROUP
,
8989 .state
= WREPL_STATE_ACTIVE
,
8990 .node
= WREPL_NODE_B
,
8992 .num_ips
= ctx
->addresses_mhomed_num
,
8993 .ips
= ctx
->addresses_mhomed
,
8994 .sgroup_merge
= true
8998 * sgroup,active vs. sgroup,active with superset ip(s)
9001 .line
= __location__
,
9002 .name
= _NBT_NAME("_SA_SA_SP_U", 0x1C, NULL
),
9003 .skip
= (ctx
->addresses_all_num
< 3),
9005 .nb_flags
= NBT_NM_GROUP
,
9007 .num_ips
= ctx
->addresses_mhomed_num
,
9008 .ips
= ctx
->addresses_mhomed
,
9009 .apply_expected
= true
9015 .type
= WREPL_TYPE_SGROUP
,
9016 .state
= WREPL_STATE_ACTIVE
,
9017 .node
= WREPL_NODE_B
,
9019 .num_ips
= ctx
->addresses_all_num
,
9020 .ips
= ctx
->addresses_all
,
9021 .sgroup_merge
= true
9025 * sgroup,active vs. sgroup,active with subset ip(s)
9028 .line
= __location__
,
9029 .name
= _NBT_NAME("_SA_SA_SB_U", 0x1C, NULL
),
9030 .skip
= (ctx
->addresses_all_num
< 3),
9032 .nb_flags
= NBT_NM_GROUP
,
9034 .num_ips
= ctx
->addresses_mhomed_num
,
9035 .ips
= ctx
->addresses_mhomed
,
9036 .apply_expected
= true
9042 .type
= WREPL_TYPE_SGROUP
,
9043 .state
= WREPL_STATE_ACTIVE
,
9044 .node
= WREPL_NODE_B
,
9046 .num_ips
= ctx
->addresses_best_num
,
9047 .ips
= ctx
->addresses_best
,
9048 .sgroup_merge
= true
9052 * sgroup,active vs. sgroup,tombstone with different ip(s)
9055 .line
= __location__
,
9056 .name
= _NBT_NAME("_SA_ST_DI_U", 0x1C, NULL
),
9057 .skip
= (ctx
->addresses_all_num
< 3),
9059 .nb_flags
= NBT_NM_GROUP
,
9061 .num_ips
= ctx
->addresses_mhomed_num
,
9062 .ips
= ctx
->addresses_mhomed
,
9063 .apply_expected
= true
9069 .type
= WREPL_TYPE_SGROUP
,
9070 .state
= WREPL_STATE_TOMBSTONE
,
9071 .node
= WREPL_NODE_B
,
9073 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
9074 .ips
= addresses_B_3_4
,
9075 .apply_expected
= false
9079 * sgroup,active vs. sgroup,tombstone with same ip(s)
9082 .line
= __location__
,
9083 .name
= _NBT_NAME("_SA_ST_SI_U", 0x1C, NULL
),
9084 .skip
= (ctx
->addresses_all_num
< 3),
9086 .nb_flags
= NBT_NM_GROUP
,
9088 .num_ips
= ctx
->addresses_mhomed_num
,
9089 .ips
= ctx
->addresses_mhomed
,
9090 .apply_expected
= true
9096 .type
= WREPL_TYPE_SGROUP
,
9097 .state
= WREPL_STATE_TOMBSTONE
,
9098 .node
= WREPL_NODE_B
,
9100 .num_ips
= ctx
->addresses_mhomed_num
,
9101 .ips
= ctx
->addresses_mhomed
,
9102 .apply_expected
= false
9106 * sgroup,active vs. sgroup,tombstone with superset ip(s)
9109 .line
= __location__
,
9110 .name
= _NBT_NAME("_SA_ST_SP_U", 0x1C, NULL
),
9111 .skip
= (ctx
->addresses_all_num
< 3),
9113 .nb_flags
= NBT_NM_GROUP
,
9115 .num_ips
= ctx
->addresses_mhomed_num
,
9116 .ips
= ctx
->addresses_mhomed
,
9117 .apply_expected
= true
9123 .type
= WREPL_TYPE_SGROUP
,
9124 .state
= WREPL_STATE_TOMBSTONE
,
9125 .node
= WREPL_NODE_B
,
9127 .num_ips
= ctx
->addresses_all_num
,
9128 .ips
= ctx
->addresses_all
,
9129 .apply_expected
= false
9133 * sgroup,active vs. sgroup,tombstone with subset ip(s)
9136 .line
= __location__
,
9137 .name
= _NBT_NAME("_SA_ST_SB_U", 0x1C, NULL
),
9138 .skip
= (ctx
->addresses_all_num
< 3),
9140 .nb_flags
= NBT_NM_GROUP
,
9142 .num_ips
= ctx
->addresses_mhomed_num
,
9143 .ips
= ctx
->addresses_mhomed
,
9144 .apply_expected
= true
9150 .type
= WREPL_TYPE_SGROUP
,
9151 .state
= WREPL_STATE_TOMBSTONE
,
9152 .node
= WREPL_NODE_B
,
9154 .num_ips
= ctx
->addresses_best_num
,
9155 .ips
= ctx
->addresses_best
,
9156 .apply_expected
= false
9161 if (!ctx
->nbtsock_srv
) {
9162 torture_comment(tctx
, "SKIP: Test Replica records vs. owned active records: not bound to port[%d]\n",
9163 lp_nbt_port(tctx
->lp_ctx
));
9167 torture_comment(tctx
, "Test Replica records vs. owned active records\n");
9169 for(i
=0; ret
&& i
< ARRAY_SIZE(records
); i
++) {
9171 struct test_conflict_owned_active_vs_replica_struct record
= records
[i
];
9172 uint32_t j
, count
= 1;
9175 if (records
[i
].wins
.mhomed
|| records
[i
].name
.type
== 0x1C) {
9176 count
= records
[i
].wins
.num_ips
;
9179 if (records
[i
].section
) {
9180 torture_comment(tctx
, "%s\n", records
[i
].section
);
9183 if (records
[i
].skip
) {
9184 torture_comment(tctx
, "%s => SKIPPED\n", nbt_name_string(ctx
, &records
[i
].name
));
9188 if (records
[i
].replica
.mhomed_merge
) {
9189 action
= "MHOMED_MERGE";
9190 } else if (records
[i
].replica
.sgroup_merge
) {
9191 action
= "SGROUP_MERGE";
9192 } else if (records
[i
].replica
.apply_expected
) {
9195 action
= "NOT REPLACE";
9198 torture_comment(tctx
, "%s%s%s => %s\n",
9199 nbt_name_string(ctx
, &records
[i
].name
),
9200 (records
[i
].comment
?": ":""),
9201 (records
[i
].comment
?records
[i
].comment
:""),
9204 /* Prepare for multi homed registration */
9205 ZERO_STRUCT(records
[i
].defend
);
9206 records
[i
].defend
.timeout
= 10;
9207 records
[i
].defend
.positive
= true;
9208 nbt_set_incoming_handler(ctx
->nbtsock_srv
,
9209 test_conflict_owned_active_vs_replica_handler
,
9211 if (ctx
->nbtsock_srv2
) {
9212 nbt_set_incoming_handler(ctx
->nbtsock_srv2
,
9213 test_conflict_owned_active_vs_replica_handler
,
9220 for (j
=0; j
< count
; j
++) {
9221 struct nbt_name_request
*req
;
9223 name_register
->in
.name
= records
[i
].name
;
9224 name_register
->in
.dest_addr
= ctx
->address
;
9225 name_register
->in
.dest_port
= lp_nbt_port(tctx
->lp_ctx
);
9226 name_register
->in
.address
= records
[i
].wins
.ips
[j
].ip
;
9227 name_register
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
9228 name_register
->in
.register_demand
= false;
9229 name_register
->in
.broadcast
= false;
9230 name_register
->in
.multi_homed
= records
[i
].wins
.mhomed
;
9231 name_register
->in
.ttl
= 300000;
9232 name_register
->in
.timeout
= 70;
9233 name_register
->in
.retries
= 0;
9235 req
= nbt_name_register_send(ctx
->nbtsock
, name_register
);
9237 /* push the request on the wire */
9238 event_loop_once(ctx
->nbtsock
->event_ctx
);
9241 * if we register multiple addresses,
9242 * the server will do name queries to see if the old addresses
9245 if (records
[i
].wins
.mhomed
&& j
> 0) {
9246 end
= timeval_current_ofs(records
[i
].defend
.timeout
,0);
9247 records
[i
].defend
.ret
= true;
9248 while (records
[i
].defend
.timeout
> 0) {
9249 event_loop_once(ctx
->nbtsock_srv
->event_ctx
);
9250 if (timeval_expired(&end
)) break;
9252 ret
&= records
[i
].defend
.ret
;
9255 status
= nbt_name_register_recv(req
, ctx
, name_register
);
9256 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
9257 torture_comment(tctx
, "No response from %s for name register\n", ctx
->address
);
9260 if (!NT_STATUS_IS_OK(status
)) {
9261 torture_comment(tctx
, "Bad response from %s for name register - %s\n",
9262 ctx
->address
, nt_errstr(status
));
9265 CHECK_VALUE(tctx
, name_register
->out
.rcode
, 0);
9266 CHECK_VALUE_STRING(tctx
, name_register
->out
.reply_from
, ctx
->address
);
9267 CHECK_VALUE(tctx
, name_register
->out
.name
.type
, records
[i
].name
.type
);
9268 CHECK_VALUE_STRING(tctx
, name_register
->out
.name
.name
, records
[i
].name
.name
);
9269 CHECK_VALUE_STRING(tctx
, name_register
->out
.name
.scope
, records
[i
].name
.scope
);
9270 CHECK_VALUE_STRING(tctx
, name_register
->out
.reply_addr
, records
[i
].wins
.ips
[j
].ip
);
9273 /* Prepare for the current test */
9274 records
[i
].defend
= record
.defend
;
9275 nbt_set_incoming_handler(ctx
->nbtsock_srv
,
9276 test_conflict_owned_active_vs_replica_handler
,
9278 if (ctx
->nbtsock_srv2
) {
9279 nbt_set_incoming_handler(ctx
->nbtsock_srv2
,
9280 test_conflict_owned_active_vs_replica_handler
,
9287 wins_name
->name
= &records
[i
].name
;
9288 wins_name
->flags
= WREPL_NAME_FLAGS(records
[i
].replica
.type
,
9289 records
[i
].replica
.state
,
9290 records
[i
].replica
.node
,
9291 records
[i
].replica
.is_static
);
9292 wins_name
->id
= ++ctx
->b
.max_version
;
9293 if (wins_name
->flags
& 2) {
9294 wins_name
->addresses
.addresses
.num_ips
= records
[i
].replica
.num_ips
;
9295 wins_name
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
9296 records
[i
].replica
.ips
);
9298 wins_name
->addresses
.ip
= records
[i
].replica
.ips
[0].ip
;
9300 wins_name
->unknown
= "255.255.255.255";
9302 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9305 * wait for the name query, which is handled in
9306 * test_conflict_owned_active_vs_replica_handler()
9308 end
= timeval_current_ofs(records
[i
].defend
.timeout
,0);
9309 records
[i
].defend
.ret
= true;
9310 while (records
[i
].defend
.timeout
> 0) {
9311 event_loop_once(ctx
->nbtsock_srv
->event_ctx
);
9312 if (timeval_expired(&end
)) break;
9314 ret
&= records
[i
].defend
.ret
;
9316 if (records
[i
].defend
.late_release
) {
9317 records
[i
].defend
= record
.defend
;
9318 records
[i
].defend
.expect_release
= true;
9320 * wait for the name release demand, which is handled in
9321 * test_conflict_owned_active_vs_replica_handler()
9323 end
= timeval_current_ofs(records
[i
].defend
.timeout
,0);
9324 records
[i
].defend
.ret
= true;
9325 while (records
[i
].defend
.timeout
> 0) {
9326 event_loop_once(ctx
->nbtsock_srv
->event_ctx
);
9327 if (timeval_expired(&end
)) break;
9329 ret
&= records
[i
].defend
.ret
;
9332 if (records
[i
].replica
.mhomed_merge
) {
9333 ret
&= test_wrepl_mhomed_merged(tctx
, ctx
, &ctx
->c
,
9334 records
[i
].wins
.num_ips
, records
[i
].wins
.ips
,
9336 records
[i
].replica
.num_ips
, records
[i
].replica
.ips
,
9338 } else if (records
[i
].replica
.sgroup_merge
) {
9339 ret
&= test_wrepl_sgroup_merged(tctx
, ctx
, NULL
,
9341 records
[i
].wins
.num_ips
, records
[i
].wins
.ips
,
9343 records
[i
].replica
.num_ips
, records
[i
].replica
.ips
,
9346 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
,
9347 records
[i
].replica
.apply_expected
);
9350 if (records
[i
].replica
.apply_expected
||
9351 records
[i
].replica
.mhomed_merge
) {
9352 wins_name
->name
= &records
[i
].name
;
9353 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE
,
9354 WREPL_STATE_TOMBSTONE
,
9355 WREPL_NODE_B
, false);
9356 wins_name
->id
= ++ctx
->b
.max_version
;
9357 wins_name
->addresses
.ip
= addresses_B_1
[0].ip
;
9358 wins_name
->unknown
= "255.255.255.255";
9360 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9361 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
, true);
9363 for (j
=0; j
< count
; j
++) {
9364 struct nbt_name_socket
*nbtsock
= ctx
->nbtsock
;
9366 if (ctx
->myaddr2
&& strcmp(records
[i
].wins
.ips
[j
].ip
, ctx
->myaddr2
->addr
) == 0) {
9367 nbtsock
= ctx
->nbtsock2
;
9370 release
->in
.name
= records
[i
].name
;
9371 release
->in
.dest_addr
= ctx
->address
;
9372 release
->in
.dest_port
= lp_nbt_port(tctx
->lp_ctx
);
9373 release
->in
.address
= records
[i
].wins
.ips
[j
].ip
;
9374 release
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
9375 release
->in
.broadcast
= false;
9376 release
->in
.timeout
= 30;
9377 release
->in
.retries
= 0;
9379 status
= nbt_name_release(nbtsock
, ctx
, release
);
9380 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
9381 torture_comment(tctx
, "No response from %s for name release\n", ctx
->address
);
9384 if (!NT_STATUS_IS_OK(status
)) {
9385 torture_comment(tctx
, "Bad response from %s for name query - %s\n",
9386 ctx
->address
, nt_errstr(status
));
9389 CHECK_VALUE(tctx
, release
->out
.rcode
, 0);
9392 if (records
[i
].replica
.sgroup_merge
) {
9393 /* clean up the SGROUP record */
9394 wins_name
->name
= &records
[i
].name
;
9395 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
9397 WREPL_NODE_B
, false);
9398 wins_name
->id
= ++ctx
->b
.max_version
;
9399 wins_name
->addresses
.addresses
.num_ips
= 0;
9400 wins_name
->addresses
.addresses
.ips
= NULL
;
9401 wins_name
->unknown
= "255.255.255.255";
9402 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9404 /* take ownership of the SGROUP record */
9405 wins_name
->name
= &records
[i
].name
;
9406 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
9408 WREPL_NODE_B
, false);
9409 wins_name
->id
= ++ctx
->b
.max_version
;
9410 wins_name
->addresses
.addresses
.num_ips
= ARRAY_SIZE(addresses_B_1
);
9411 wins_name
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
9413 wins_name
->unknown
= "255.255.255.255";
9414 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9415 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
, true);
9417 /* overwrite the SGROUP record with unique,tombstone */
9418 wins_name
->name
= &records
[i
].name
;
9419 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE
,
9420 WREPL_STATE_TOMBSTONE
,
9421 WREPL_NODE_B
, false);
9422 wins_name
->id
= ++ctx
->b
.max_version
;
9423 wins_name
->addresses
.ip
= addresses_A_1
[0].ip
;
9424 wins_name
->unknown
= "255.255.255.255";
9425 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9426 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
, true);
9431 torture_comment(tctx
, "conflict handled wrong or record[%u]: %s\n", i
, records
[i
].line
);
9439 #define _NBT_ASSERT(v, correct) do { \
9440 if ((v) != (correct)) { \
9441 printf("(%s) Incorrect value %s=%d - should be %s (%d)\n", \
9442 __location__, #v, v, #correct, correct); \
9447 #define _NBT_ASSERT_STRING(v, correct) do { \
9448 if ( ((!v) && (correct)) || \
9449 ((v) && (!correct)) || \
9450 ((v) && (correct) && strcmp(v,correct) != 0)) { \
9451 printf("(%s) Incorrect value %s=%s - should be %s\n", \
9452 __location__, #v, v, correct); \
9457 static void test_conflict_owned_active_vs_replica_handler_query(struct nbt_name_socket
*nbtsock
,
9458 struct nbt_name_packet
*req_packet
,
9459 struct socket_address
*src
)
9461 struct nbt_name
*name
;
9462 struct nbt_name_packet
*rep_packet
;
9463 struct test_conflict_owned_active_vs_replica_struct
*rec
=
9464 (struct test_conflict_owned_active_vs_replica_struct
*)nbtsock
->incoming
.private_data
;
9466 _NBT_ASSERT(req_packet
->qdcount
, 1);
9467 _NBT_ASSERT(req_packet
->questions
[0].question_type
, NBT_QTYPE_NETBIOS
);
9468 _NBT_ASSERT(req_packet
->questions
[0].question_class
, NBT_QCLASS_IP
);
9470 name
= &req_packet
->questions
[0].name
;
9472 _NBT_ASSERT(name
->type
, rec
->name
.type
);
9473 _NBT_ASSERT_STRING(name
->name
, rec
->name
.name
);
9474 _NBT_ASSERT_STRING(name
->scope
, rec
->name
.scope
);
9476 _NBT_ASSERT(rec
->defend
.expect_release
, false);
9478 rep_packet
= talloc_zero(nbtsock
, struct nbt_name_packet
);
9479 if (rep_packet
== NULL
) return;
9481 rep_packet
->name_trn_id
= req_packet
->name_trn_id
;
9482 rep_packet
->ancount
= 1;
9484 rep_packet
->answers
= talloc_array(rep_packet
, struct nbt_res_rec
, 1);
9485 if (rep_packet
->answers
== NULL
) return;
9487 rep_packet
->answers
[0].name
= *name
;
9488 rep_packet
->answers
[0].rr_class
= NBT_QCLASS_IP
;
9489 rep_packet
->answers
[0].ttl
= 0;
9491 if (rec
->defend
.positive
) {
9492 uint32_t i
, num_ips
;
9493 const struct wrepl_ip
*ips
;
9495 if (rec
->defend
.num_ips
> 0) {
9496 num_ips
= rec
->defend
.num_ips
;
9497 ips
= rec
->defend
.ips
;
9499 num_ips
= rec
->wins
.num_ips
;
9500 ips
= rec
->wins
.ips
;
9503 /* send a positive reply */
9504 rep_packet
->operation
=
9507 NBT_FLAG_AUTHORITIVE
|
9508 NBT_FLAG_RECURSION_DESIRED
|
9509 NBT_FLAG_RECURSION_AVAIL
;
9511 rep_packet
->answers
[0].rr_type
= NBT_QTYPE_NETBIOS
;
9513 rep_packet
->answers
[0].rdata
.netbios
.length
= num_ips
*6;
9514 rep_packet
->answers
[0].rdata
.netbios
.addresses
=
9515 talloc_array(rep_packet
->answers
, struct nbt_rdata_address
, num_ips
);
9516 if (rep_packet
->answers
[0].rdata
.netbios
.addresses
== NULL
) return;
9518 for (i
=0; i
< num_ips
; i
++) {
9519 struct nbt_rdata_address
*addr
=
9520 &rep_packet
->answers
[0].rdata
.netbios
.addresses
[i
];
9521 addr
->nb_flags
= rec
->wins
.nb_flags
;
9522 addr
->ipaddr
= ips
[i
].ip
;
9524 DEBUG(2,("Sending positive name query reply for %s to %s:%d\n",
9525 nbt_name_string(rep_packet
, name
), src
->addr
, src
->port
));
9527 /* send a negative reply */
9528 rep_packet
->operation
=
9531 NBT_FLAG_AUTHORITIVE
|
9534 rep_packet
->answers
[0].rr_type
= NBT_QTYPE_NULL
;
9536 ZERO_STRUCT(rep_packet
->answers
[0].rdata
);
9538 DEBUG(2,("Sending negative name query reply for %s to %s:%d\n",
9539 nbt_name_string(rep_packet
, name
), src
->addr
, src
->port
));
9542 nbt_name_reply_send(nbtsock
, src
, rep_packet
);
9543 talloc_free(rep_packet
);
9545 /* make sure we push the reply to the wire */
9546 while (nbtsock
->send_queue
) {
9547 event_loop_once(nbtsock
->event_ctx
);
9551 rec
->defend
.timeout
= 0;
9552 rec
->defend
.ret
= true;
9555 static void test_conflict_owned_active_vs_replica_handler_release(
9556 struct nbt_name_socket
*nbtsock
,
9557 struct nbt_name_packet
*req_packet
,
9558 struct socket_address
*src
)
9560 struct nbt_name
*name
;
9561 struct nbt_name_packet
*rep_packet
;
9562 struct test_conflict_owned_active_vs_replica_struct
*rec
=
9563 (struct test_conflict_owned_active_vs_replica_struct
*)nbtsock
->incoming
.private_data
;
9565 _NBT_ASSERT(req_packet
->qdcount
, 1);
9566 _NBT_ASSERT(req_packet
->questions
[0].question_type
, NBT_QTYPE_NETBIOS
);
9567 _NBT_ASSERT(req_packet
->questions
[0].question_class
, NBT_QCLASS_IP
);
9569 name
= &req_packet
->questions
[0].name
;
9571 _NBT_ASSERT(name
->type
, rec
->name
.type
);
9572 _NBT_ASSERT_STRING(name
->name
, rec
->name
.name
);
9573 _NBT_ASSERT_STRING(name
->scope
, rec
->name
.scope
);
9575 _NBT_ASSERT(rec
->defend
.expect_release
, true);
9577 rep_packet
= talloc_zero(nbtsock
, struct nbt_name_packet
);
9578 if (rep_packet
== NULL
) return;
9580 rep_packet
->name_trn_id
= req_packet
->name_trn_id
;
9581 rep_packet
->ancount
= 1;
9582 rep_packet
->operation
=
9584 NBT_OPCODE_RELEASE
|
9585 NBT_FLAG_AUTHORITIVE
;
9587 rep_packet
->answers
= talloc_array(rep_packet
, struct nbt_res_rec
, 1);
9588 if (rep_packet
->answers
== NULL
) return;
9590 rep_packet
->answers
[0].name
= *name
;
9591 rep_packet
->answers
[0].rr_type
= NBT_QTYPE_NETBIOS
;
9592 rep_packet
->answers
[0].rr_class
= NBT_QCLASS_IP
;
9593 rep_packet
->answers
[0].ttl
= req_packet
->additional
[0].ttl
;
9594 rep_packet
->answers
[0].rdata
= req_packet
->additional
[0].rdata
;
9596 DEBUG(2,("Sending name release reply for %s to %s:%d\n",
9597 nbt_name_string(rep_packet
, name
), src
->addr
, src
->port
));
9599 nbt_name_reply_send(nbtsock
, src
, rep_packet
);
9600 talloc_free(rep_packet
);
9602 /* make sure we push the reply to the wire */
9603 while (nbtsock
->send_queue
) {
9604 event_loop_once(nbtsock
->event_ctx
);
9608 rec
->defend
.timeout
= 0;
9609 rec
->defend
.ret
= true;
9612 static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket
*nbtsock
,
9613 struct nbt_name_packet
*req_packet
,
9614 struct socket_address
*src
)
9616 struct test_conflict_owned_active_vs_replica_struct
*rec
=
9617 (struct test_conflict_owned_active_vs_replica_struct
*)nbtsock
->incoming
.private_data
;
9619 rec
->defend
.ret
= false;
9621 switch (req_packet
->operation
& NBT_OPCODE
) {
9622 case NBT_OPCODE_QUERY
:
9623 test_conflict_owned_active_vs_replica_handler_query(nbtsock
, req_packet
, src
);
9625 case NBT_OPCODE_RELEASE
:
9626 test_conflict_owned_active_vs_replica_handler_release(nbtsock
, req_packet
, src
);
9629 printf("%s: unexpected incoming packet\n", __location__
);
9635 test WINS replication replica conflicts operations
9637 static bool torture_nbt_winsreplication_replica(struct torture_context
*tctx
)
9640 struct test_wrepl_conflict_conn
*ctx
;
9642 const char *address
;
9643 struct nbt_name name
;
9645 if (!torture_nbt_get_name(tctx
, &name
, &address
))
9648 ctx
= test_create_conflict_ctx(tctx
, address
);
9649 if (!ctx
) return false;
9651 ret
&= test_conflict_same_owner(tctx
, ctx
);
9652 ret
&= test_conflict_different_owner(tctx
, ctx
);
9658 test WINS replication owned conflicts operations
9660 static bool torture_nbt_winsreplication_owned(struct torture_context
*tctx
)
9662 const char *address
;
9663 struct nbt_name name
;
9665 struct test_wrepl_conflict_conn
*ctx
;
9667 if (torture_setting_bool(tctx
, "quick", false))
9669 "skip NBT-WINSREPLICATION-OWNED test in quick test mode\n");
9671 if (!torture_nbt_get_name(tctx
, &name
, &address
))
9674 ctx
= test_create_conflict_ctx(tctx
, address
);
9675 torture_assert(tctx
, ctx
!= NULL
, "Creating context failed");
9677 ret
&= test_conflict_owned_released_vs_replica(tctx
, ctx
);
9678 ret
&= test_conflict_owned_active_vs_replica(tctx
, ctx
);
9684 test simple WINS replication operations
9686 struct torture_suite
*torture_nbt_winsreplication(TALLOC_CTX
*mem_ctx
)
9688 struct torture_suite
*suite
= torture_suite_create(
9689 mem_ctx
, "WINSREPLICATION");
9690 struct torture_tcase
*tcase
;
9692 tcase
= torture_suite_add_simple_test(suite
, "assoc_ctx1",
9694 tcase
->tests
->dangerous
= true;
9696 torture_suite_add_simple_test(suite
, "assoc_ctx2",
9699 torture_suite_add_simple_test(suite
, "wins_replication",
9700 test_wins_replication
);
9702 torture_suite_add_simple_test(suite
, "replica",
9703 torture_nbt_winsreplication_replica
);
9705 torture_suite_add_simple_test(suite
, "owned",
9706 torture_nbt_winsreplication_owned
);