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 char *expected_scope
= NULL
;
803 CHECK_VALUE(tctx
, names
[0].name
.type
, name
->name
->type
);
804 CHECK_VALUE_STRING(tctx
, names
[0].name
.name
, name
->name
->name
);
806 if (names
[0].name
.scope
) {
807 expected_scope
= talloc_strndup(tctx
,
811 CHECK_VALUE_STRING(tctx
, names
[0].name
.scope
, expected_scope
);
812 CHECK_VALUE(tctx
, flags
, name
->flags
);
813 CHECK_VALUE_UINT64(tctx
, names
[0].version_id
, name
->id
);
816 CHECK_VALUE(tctx
, names
[0].num_addresses
,
817 name
->addresses
.addresses
.num_ips
);
819 CHECK_VALUE(tctx
, names
[0].num_addresses
, 1);
820 CHECK_VALUE_STRING(tctx
, names
[0].addresses
[0].address
,
824 talloc_free(pull_names
.out
.names
);
828 static bool test_wrepl_mhomed_merged(struct torture_context
*tctx
,
829 struct test_wrepl_conflict_conn
*ctx
,
830 const struct wrepl_wins_owner
*owner1
,
831 uint32_t num_ips1
, const struct wrepl_ip
*ips1
,
832 const struct wrepl_wins_owner
*owner2
,
833 uint32_t num_ips2
, const struct wrepl_ip
*ips2
,
834 const struct wrepl_wins_name
*name2
)
837 struct wrepl_pull_names pull_names
;
838 struct wrepl_name
*names
;
841 uint32_t num_ips
= num_ips1
+ num_ips2
;
843 for (i
= 0; i
< num_ips2
; i
++) {
844 for (j
= 0; j
< num_ips1
; j
++) {
845 if (strcmp(ips2
[i
].ip
,ips1
[j
].ip
) == 0) {
852 pull_names
.in
.assoc_ctx
= ctx
->pull_assoc
;
853 pull_names
.in
.partner
= *owner2
;
854 pull_names
.in
.partner
.min_version
= pull_names
.in
.partner
.max_version
;
856 status
= wrepl_pull_names(ctx
->pull
, ctx
->pull
, &pull_names
);
857 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
858 CHECK_VALUE(tctx
, pull_names
.out
.num_names
, 1);
860 names
= pull_names
.out
.names
;
862 flags
= WREPL_NAME_FLAGS(names
[0].type
,
866 CHECK_VALUE(tctx
, names
[0].name
.type
, name2
->name
->type
);
867 CHECK_VALUE_STRING(tctx
, names
[0].name
.name
, name2
->name
->name
);
868 CHECK_VALUE_STRING(tctx
, names
[0].name
.scope
, name2
->name
->scope
);
869 CHECK_VALUE(tctx
, flags
, name2
->flags
| WREPL_TYPE_MHOMED
);
870 CHECK_VALUE_UINT64(tctx
, names
[0].version_id
, name2
->id
);
872 CHECK_VALUE(tctx
, names
[0].num_addresses
, num_ips
);
874 for (i
= 0; i
< names
[0].num_addresses
; i
++) {
875 const char *addr
= names
[0].addresses
[i
].address
;
876 const char *owner
= names
[0].addresses
[i
].owner
;
879 for (j
= 0; j
< num_ips2
; j
++) {
880 if (strcmp(addr
, ips2
[j
].ip
) == 0) {
882 CHECK_VALUE_STRING(tctx
, owner
, owner2
->address
);
889 for (j
= 0; j
< num_ips1
; j
++) {
890 if (strcmp(addr
, ips1
[j
].ip
) == 0) {
892 CHECK_VALUE_STRING(tctx
, owner
, owner1
->address
);
899 CHECK_VALUE_STRING(tctx
, addr
, "not found in address list");
901 talloc_free(pull_names
.out
.names
);
905 static bool test_wrepl_sgroup_merged(struct torture_context
*tctx
,
906 struct test_wrepl_conflict_conn
*ctx
,
907 struct wrepl_wins_owner
*merge_owner
,
908 struct wrepl_wins_owner
*owner1
,
909 uint32_t num_ips1
, const struct wrepl_ip
*ips1
,
910 struct wrepl_wins_owner
*owner2
,
911 uint32_t num_ips2
, const struct wrepl_ip
*ips2
,
912 const struct wrepl_wins_name
*name2
)
915 struct wrepl_pull_names pull_names
;
916 struct wrepl_name
*names
;
917 struct wrepl_name
*name
= NULL
;
920 uint32_t num_ips
= num_ips1
+ num_ips2
;
923 merge_owner
= &ctx
->c
;
926 for (i
= 0; i
< num_ips1
; i
++) {
927 if (owner1
!= &ctx
->c
&& strcmp(ips1
[i
].owner
,owner2
->address
) == 0) {
931 for (j
= 0; j
< num_ips2
; j
++) {
932 if (strcmp(ips1
[i
].ip
,ips2
[j
].ip
) == 0) {
940 pull_names
.in
.assoc_ctx
= ctx
->pull_assoc
;
941 pull_names
.in
.partner
= *merge_owner
;
942 pull_names
.in
.partner
.min_version
= pull_names
.in
.partner
.max_version
;
943 pull_names
.in
.partner
.max_version
= 0;
945 status
= wrepl_pull_names(ctx
->pull
, ctx
->pull
, &pull_names
);
946 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
948 names
= pull_names
.out
.names
;
950 for (i
= 0; i
< pull_names
.out
.num_names
; i
++) {
951 if (names
[i
].name
.type
!= name2
->name
->type
) continue;
952 if (!names
[i
].name
.name
) continue;
953 if (strcmp(names
[i
].name
.name
, name2
->name
->name
) != 0) continue;
954 if (names
[i
].name
.scope
) continue;
959 if (pull_names
.out
.num_names
> 0) {
960 merge_owner
->max_version
= names
[pull_names
.out
.num_names
-1].version_id
;
964 torture_comment(tctx
, "%s: Name '%s' not found\n", __location__
, nbt_name_string(ctx
, name2
->name
));
968 flags
= WREPL_NAME_FLAGS(name
->type
,
972 CHECK_VALUE(tctx
, name
->name
.type
, name2
->name
->type
);
973 CHECK_VALUE_STRING(tctx
, name
->name
.name
, name2
->name
->name
);
974 CHECK_VALUE_STRING(tctx
, name
->name
.scope
, name2
->name
->scope
);
975 CHECK_VALUE(tctx
, flags
, name2
->flags
);
977 CHECK_VALUE(tctx
, name
->num_addresses
, num_ips
);
979 for (i
= 0; i
< name
->num_addresses
; i
++) {
980 const char *addr
= name
->addresses
[i
].address
;
981 const char *owner
= name
->addresses
[i
].owner
;
984 for (j
= 0; j
< num_ips2
; j
++) {
985 if (strcmp(addr
, ips2
[j
].ip
) == 0) {
987 CHECK_VALUE_STRING(tctx
, owner
, ips2
[j
].owner
);
994 for (j
= 0; j
< num_ips1
; j
++) {
995 if (strcmp(addr
, ips1
[j
].ip
) == 0) {
997 if (owner1
== &ctx
->c
) {
998 CHECK_VALUE_STRING(tctx
, owner
, owner1
->address
);
1000 CHECK_VALUE_STRING(tctx
, owner
, ips1
[j
].owner
);
1006 if (found
) continue;
1008 CHECK_VALUE_STRING(tctx
, addr
, "not found in address list");
1010 talloc_free(pull_names
.out
.names
);
1014 static char *test_nbt_winsrepl_scope_string(TALLOC_CTX
*mem_ctx
, uint8_t count
)
1019 res
= talloc_array(mem_ctx
, char, count
+1);
1024 for (i
=0; i
< count
; i
++) {
1025 res
[i
] = '0' + (i
%10);
1030 talloc_set_name_const(res
, res
);
1035 static bool test_conflict_same_owner(struct torture_context
*tctx
,
1036 struct test_wrepl_conflict_conn
*ctx
)
1038 static bool ret
= true;
1039 struct wrepl_wins_name wins_name1
;
1040 struct wrepl_wins_name wins_name2
;
1041 struct wrepl_wins_name
*wins_name_tmp
;
1042 struct wrepl_wins_name
*wins_name_last
;
1043 struct wrepl_wins_name
*wins_name_cur
;
1045 struct nbt_name names
[] = {
1046 _NBT_NAME("_SAME_OWNER_A", 0x00, NULL
),
1047 _NBT_NAME("_SAME_OWNER_A", 0x00,
1048 test_nbt_winsrepl_scope_string(tctx
, 1)),
1049 _NBT_NAME("_SAME_OWNER_A", 0x00,
1050 test_nbt_winsrepl_scope_string(tctx
, 2)),
1051 _NBT_NAME("_SAME_OWNER_A", 0x00,
1052 test_nbt_winsrepl_scope_string(tctx
, 3)),
1053 _NBT_NAME("_SAME_OWNER_A", 0x00,
1054 test_nbt_winsrepl_scope_string(tctx
, 4)),
1055 _NBT_NAME("_SAME_OWNER_A", 0x00,
1056 test_nbt_winsrepl_scope_string(tctx
, 5)),
1057 _NBT_NAME("_SAME_OWNER_A", 0x00,
1058 test_nbt_winsrepl_scope_string(tctx
, 6)),
1059 _NBT_NAME("_SAME_OWNER_A", 0x00,
1060 test_nbt_winsrepl_scope_string(tctx
, 7)),
1061 _NBT_NAME("_SAME_OWNER_A", 0x00,
1062 test_nbt_winsrepl_scope_string(tctx
, 8)),
1063 _NBT_NAME("_SAME_OWNER_A", 0x00,
1064 test_nbt_winsrepl_scope_string(tctx
, 9)),
1065 _NBT_NAME("_SAME_OWNER_A", 0x00,
1066 test_nbt_winsrepl_scope_string(tctx
, 237)),
1067 _NBT_NAME("_SAME_OWNER_A", 0x00,
1068 test_nbt_winsrepl_scope_string(tctx
, 238)),
1069 _NBT_NAME("_SAME_OWNER_A", 0x1C, NULL
),
1072 enum wrepl_name_type type
;
1073 enum wrepl_name_state state
;
1074 enum wrepl_name_node node
;
1077 const struct wrepl_ip
*ips
;
1080 .type
= WREPL_TYPE_GROUP
,
1081 .state
= WREPL_STATE_ACTIVE
,
1082 .node
= WREPL_NODE_B
,
1084 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1085 .ips
= addresses_A_1
,
1087 .type
= WREPL_TYPE_UNIQUE
,
1088 .state
= WREPL_STATE_ACTIVE
,
1089 .node
= WREPL_NODE_B
,
1091 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1092 .ips
= addresses_A_1
,
1094 .type
= WREPL_TYPE_UNIQUE
,
1095 .state
= WREPL_STATE_ACTIVE
,
1096 .node
= WREPL_NODE_B
,
1098 .num_ips
= ARRAY_SIZE(addresses_A_2
),
1099 .ips
= addresses_A_2
,
1101 .type
= WREPL_TYPE_UNIQUE
,
1102 .state
= WREPL_STATE_ACTIVE
,
1103 .node
= WREPL_NODE_B
,
1105 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1106 .ips
= addresses_A_1
,
1108 .type
= WREPL_TYPE_UNIQUE
,
1109 .state
= WREPL_STATE_ACTIVE
,
1110 .node
= WREPL_NODE_B
,
1112 .num_ips
= ARRAY_SIZE(addresses_A_2
),
1113 .ips
= addresses_A_2
,
1115 .type
= WREPL_TYPE_SGROUP
,
1116 .state
= WREPL_STATE_TOMBSTONE
,
1117 .node
= WREPL_NODE_B
,
1119 .num_ips
= ARRAY_SIZE(addresses_A_2
),
1120 .ips
= addresses_A_2
,
1122 .type
= WREPL_TYPE_MHOMED
,
1123 .state
= WREPL_STATE_TOMBSTONE
,
1124 .node
= WREPL_NODE_B
,
1126 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1127 .ips
= addresses_A_1
,
1129 .type
= WREPL_TYPE_MHOMED
,
1130 .state
= WREPL_STATE_RELEASED
,
1131 .node
= WREPL_NODE_B
,
1133 .num_ips
= ARRAY_SIZE(addresses_A_2
),
1134 .ips
= addresses_A_2
,
1136 .type
= WREPL_TYPE_SGROUP
,
1137 .state
= WREPL_STATE_ACTIVE
,
1138 .node
= WREPL_NODE_B
,
1140 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1141 .ips
= addresses_A_1
,
1143 .type
= WREPL_TYPE_SGROUP
,
1144 .state
= WREPL_STATE_ACTIVE
,
1145 .node
= WREPL_NODE_B
,
1147 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1148 .ips
= addresses_A_3_4
,
1150 .type
= WREPL_TYPE_SGROUP
,
1151 .state
= WREPL_STATE_TOMBSTONE
,
1152 .node
= WREPL_NODE_B
,
1154 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1155 .ips
= addresses_B_3_4
,
1157 /* the last one should always be a unique,tomstone record! */
1158 .type
= WREPL_TYPE_UNIQUE
,
1159 .state
= WREPL_STATE_TOMBSTONE
,
1160 .node
= WREPL_NODE_B
,
1162 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1163 .ips
= addresses_A_1
,
1167 wins_name_tmp
= NULL
;
1168 wins_name_last
= &wins_name2
;
1169 wins_name_cur
= &wins_name1
;
1171 for (j
=0; ret
&& j
< ARRAY_SIZE(names
); j
++) {
1172 torture_comment(tctx
, "Test Replica Conflicts with same owner[%s] for %s\n",
1173 nbt_name_string(ctx
, &names
[j
]), ctx
->a
.address
);
1175 for(i
=0; ret
&& i
< ARRAY_SIZE(records
); i
++) {
1176 wins_name_tmp
= wins_name_last
;
1177 wins_name_last
= wins_name_cur
;
1178 wins_name_cur
= wins_name_tmp
;
1181 torture_comment(tctx
, "%s,%s%s vs. %s,%s%s with %s ip(s) => %s\n",
1182 wrepl_name_type_string(records
[i
-1].type
),
1183 wrepl_name_state_string(records
[i
-1].state
),
1184 (records
[i
-1].is_static
?",static":""),
1185 wrepl_name_type_string(records
[i
].type
),
1186 wrepl_name_state_string(records
[i
].state
),
1187 (records
[i
].is_static
?",static":""),
1188 (records
[i
-1].ips
==records
[i
].ips
?"same":"different"),
1192 wins_name_cur
->name
= &names
[j
];
1193 wins_name_cur
->flags
= WREPL_NAME_FLAGS(records
[i
].type
,
1196 records
[i
].is_static
);
1197 wins_name_cur
->id
= ++ctx
->a
.max_version
;
1198 if (wins_name_cur
->flags
& 2) {
1199 wins_name_cur
->addresses
.addresses
.num_ips
= records
[i
].num_ips
;
1200 wins_name_cur
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
1203 wins_name_cur
->addresses
.ip
= records
[i
].ips
[0].ip
;
1205 wins_name_cur
->unknown
= "255.255.255.255";
1207 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->a
,wins_name_cur
);
1208 if (records
[i
].state
== WREPL_STATE_RELEASED
) {
1209 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->a
, wins_name_last
, false);
1210 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->a
, wins_name_cur
, false);
1212 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->a
, wins_name_cur
, true);
1215 /* the first one is a cleanup run */
1216 if (!ret
&& i
== 0) ret
= true;
1219 torture_comment(tctx
, "conflict handled wrong or record[%u]: %s\n", i
, __location__
);
1227 static bool test_conflict_different_owner(struct torture_context
*tctx
,
1228 struct test_wrepl_conflict_conn
*ctx
)
1231 struct wrepl_wins_name wins_name1
;
1232 struct wrepl_wins_name wins_name2
;
1233 struct wrepl_wins_name
*wins_name_r1
;
1234 struct wrepl_wins_name
*wins_name_r2
;
1237 const char *line
; /* just better debugging */
1238 struct nbt_name name
;
1239 const char *comment
;
1240 bool extra
; /* not the worst case, this is an extra test */
1243 struct wrepl_wins_owner
*owner
;
1244 enum wrepl_name_type type
;
1245 enum wrepl_name_state state
;
1246 enum wrepl_name_node node
;
1249 const struct wrepl_ip
*ips
;
1250 bool apply_expected
;
1252 struct wrepl_wins_owner
*merge_owner
;
1253 bool sgroup_cleanup
;
1257 * NOTE: the first record and the last applied one
1258 * needs to be from the same owner,
1259 * to not conflict in the next smbtorture run!!!
1262 .line
= __location__
,
1263 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1267 .type
= WREPL_TYPE_UNIQUE
,
1268 .state
= WREPL_STATE_TOMBSTONE
,
1269 .node
= WREPL_NODE_B
,
1271 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1272 .ips
= addresses_B_1
,
1273 .apply_expected
= true /* ignored */
1277 .type
= WREPL_TYPE_UNIQUE
,
1278 .state
= WREPL_STATE_TOMBSTONE
,
1279 .node
= WREPL_NODE_B
,
1281 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1282 .ips
= addresses_A_1
,
1283 .apply_expected
= true /* ignored */
1288 * unique vs unique section
1291 * unique,active vs. unique,active
1292 * => should be replaced
1295 .line
= __location__
,
1296 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1299 .type
= WREPL_TYPE_UNIQUE
,
1300 .state
= WREPL_STATE_ACTIVE
,
1301 .node
= WREPL_NODE_B
,
1303 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1304 .ips
= addresses_A_1
,
1305 .apply_expected
= true
1309 .type
= WREPL_TYPE_UNIQUE
,
1310 .state
= WREPL_STATE_ACTIVE
,
1311 .node
= WREPL_NODE_B
,
1313 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1314 .ips
= addresses_B_1
,
1315 .apply_expected
= true
1320 * unique,active vs. unique,tombstone
1321 * => should NOT be replaced
1324 .line
= __location__
,
1325 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1328 .type
= WREPL_TYPE_UNIQUE
,
1329 .state
= WREPL_STATE_ACTIVE
,
1330 .node
= WREPL_NODE_B
,
1332 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1333 .ips
= addresses_B_1
,
1334 .apply_expected
= true
1338 .type
= WREPL_TYPE_UNIQUE
,
1339 .state
= WREPL_STATE_TOMBSTONE
,
1340 .node
= WREPL_NODE_B
,
1342 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1343 .ips
= addresses_B_1
,
1344 .apply_expected
= false
1349 * unique,released vs. unique,active
1350 * => should be replaced
1353 .line
= __location__
,
1354 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1357 .type
= WREPL_TYPE_UNIQUE
,
1358 .state
= WREPL_STATE_RELEASED
,
1359 .node
= WREPL_NODE_B
,
1361 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1362 .ips
= addresses_B_1
,
1363 .apply_expected
= false
1367 .type
= WREPL_TYPE_UNIQUE
,
1368 .state
= WREPL_STATE_ACTIVE
,
1369 .node
= WREPL_NODE_B
,
1371 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1372 .ips
= addresses_A_1
,
1373 .apply_expected
= true
1378 * unique,released vs. unique,tombstone
1379 * => should be replaced
1382 .line
= __location__
,
1383 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1386 .type
= WREPL_TYPE_UNIQUE
,
1387 .state
= WREPL_STATE_RELEASED
,
1388 .node
= WREPL_NODE_B
,
1390 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1391 .ips
= addresses_A_1
,
1392 .apply_expected
= false
1396 .type
= WREPL_TYPE_UNIQUE
,
1397 .state
= WREPL_STATE_TOMBSTONE
,
1398 .node
= WREPL_NODE_B
,
1400 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1401 .ips
= addresses_B_1
,
1402 .apply_expected
= true
1407 * unique,tombstone vs. unique,active
1408 * => should be replaced
1411 .line
= __location__
,
1412 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1415 .type
= WREPL_TYPE_UNIQUE
,
1416 .state
= WREPL_STATE_TOMBSTONE
,
1417 .node
= WREPL_NODE_B
,
1419 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1420 .ips
= addresses_B_1
,
1421 .apply_expected
= true
1425 .type
= WREPL_TYPE_UNIQUE
,
1426 .state
= WREPL_STATE_ACTIVE
,
1427 .node
= WREPL_NODE_B
,
1429 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1430 .ips
= addresses_A_1
,
1431 .apply_expected
= true
1436 * unique,tombstone vs. unique,tombstone
1437 * => should be replaced
1440 .line
= __location__
,
1441 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1444 .type
= WREPL_TYPE_UNIQUE
,
1445 .state
= WREPL_STATE_TOMBSTONE
,
1446 .node
= WREPL_NODE_B
,
1448 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1449 .ips
= addresses_A_1
,
1450 .apply_expected
= true
1454 .type
= WREPL_TYPE_UNIQUE
,
1455 .state
= WREPL_STATE_TOMBSTONE
,
1456 .node
= WREPL_NODE_B
,
1458 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1459 .ips
= addresses_B_1
,
1460 .apply_expected
= true
1466 * unique vs normal groups section,
1469 * unique,active vs. group,active
1470 * => should be replaced
1473 .line
= __location__
,
1474 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1477 .type
= WREPL_TYPE_UNIQUE
,
1478 .state
= WREPL_STATE_ACTIVE
,
1479 .node
= WREPL_NODE_B
,
1481 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1482 .ips
= addresses_B_1
,
1483 .apply_expected
= true
1487 .type
= WREPL_TYPE_GROUP
,
1488 .state
= WREPL_STATE_ACTIVE
,
1489 .node
= WREPL_NODE_B
,
1491 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1492 .ips
= addresses_A_1
,
1493 .apply_expected
= true
1498 * unique,active vs. group,tombstone
1499 * => should NOT be replaced
1502 .line
= __location__
,
1503 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1506 .type
= WREPL_TYPE_UNIQUE
,
1507 .state
= WREPL_STATE_ACTIVE
,
1508 .node
= WREPL_NODE_B
,
1510 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1511 .ips
= addresses_A_1
,
1512 .apply_expected
= true
1516 .type
= WREPL_TYPE_GROUP
,
1517 .state
= WREPL_STATE_TOMBSTONE
,
1518 .node
= WREPL_NODE_B
,
1520 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1521 .ips
= addresses_A_1
,
1522 .apply_expected
= false
1527 * unique,released vs. group,active
1528 * => should be replaced
1531 .line
= __location__
,
1532 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1535 .type
= WREPL_TYPE_UNIQUE
,
1536 .state
= WREPL_STATE_RELEASED
,
1537 .node
= WREPL_NODE_B
,
1539 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1540 .ips
= addresses_A_1
,
1541 .apply_expected
= false
1545 .type
= WREPL_TYPE_GROUP
,
1546 .state
= WREPL_STATE_ACTIVE
,
1547 .node
= WREPL_NODE_B
,
1549 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1550 .ips
= addresses_B_1
,
1551 .apply_expected
= true
1556 * unique,released vs. group,tombstone
1557 * => should be replaced
1560 .line
= __location__
,
1561 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1564 .type
= WREPL_TYPE_UNIQUE
,
1565 .state
= WREPL_STATE_RELEASED
,
1566 .node
= WREPL_NODE_B
,
1568 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1569 .ips
= addresses_B_1
,
1570 .apply_expected
= false
1574 .type
= WREPL_TYPE_GROUP
,
1575 .state
= WREPL_STATE_TOMBSTONE
,
1576 .node
= WREPL_NODE_B
,
1578 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1579 .ips
= addresses_A_1
,
1580 .apply_expected
= true
1585 * unique,tombstone vs. group,active
1586 * => should be replaced
1589 .line
= __location__
,
1590 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1593 .type
= WREPL_TYPE_UNIQUE
,
1594 .state
= WREPL_STATE_TOMBSTONE
,
1595 .node
= WREPL_NODE_B
,
1597 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1598 .ips
= addresses_A_1
,
1599 .apply_expected
= true
1603 .type
= WREPL_TYPE_GROUP
,
1604 .state
= WREPL_STATE_ACTIVE
,
1605 .node
= WREPL_NODE_B
,
1607 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1608 .ips
= addresses_B_1
,
1609 .apply_expected
= true
1614 * unique,tombstone vs. group,tombstone
1615 * => should be replaced
1618 .line
= __location__
,
1619 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1622 .type
= WREPL_TYPE_UNIQUE
,
1623 .state
= WREPL_STATE_TOMBSTONE
,
1624 .node
= WREPL_NODE_B
,
1626 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1627 .ips
= addresses_B_1
,
1628 .apply_expected
= true
1632 .type
= WREPL_TYPE_GROUP
,
1633 .state
= WREPL_STATE_TOMBSTONE
,
1634 .node
= WREPL_NODE_B
,
1636 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1637 .ips
= addresses_A_1
,
1638 .apply_expected
= true
1643 * unique vs special groups section,
1646 * unique,active vs. sgroup,active
1647 * => should NOT be replaced
1650 .line
= __location__
,
1651 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1654 .type
= WREPL_TYPE_UNIQUE
,
1655 .state
= WREPL_STATE_ACTIVE
,
1656 .node
= WREPL_NODE_B
,
1658 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1659 .ips
= addresses_A_1
,
1660 .apply_expected
= true
1664 .type
= WREPL_TYPE_SGROUP
,
1665 .state
= WREPL_STATE_ACTIVE
,
1666 .node
= WREPL_NODE_B
,
1668 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1669 .ips
= addresses_A_1
,
1670 .apply_expected
= false
1675 * unique,active vs. sgroup,tombstone
1676 * => should NOT be replaced
1679 .line
= __location__
,
1680 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1683 .type
= WREPL_TYPE_UNIQUE
,
1684 .state
= WREPL_STATE_ACTIVE
,
1685 .node
= WREPL_NODE_B
,
1687 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1688 .ips
= addresses_A_1
,
1689 .apply_expected
= true
1693 .type
= WREPL_TYPE_SGROUP
,
1694 .state
= WREPL_STATE_TOMBSTONE
,
1695 .node
= WREPL_NODE_B
,
1697 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1698 .ips
= addresses_A_1
,
1699 .apply_expected
= false
1704 * unique,released vs. sgroup,active
1705 * => should be replaced
1708 .line
= __location__
,
1709 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1712 .type
= WREPL_TYPE_UNIQUE
,
1713 .state
= WREPL_STATE_RELEASED
,
1714 .node
= WREPL_NODE_B
,
1716 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1717 .ips
= addresses_A_1
,
1718 .apply_expected
= false
1722 .type
= WREPL_TYPE_SGROUP
,
1723 .state
= WREPL_STATE_ACTIVE
,
1724 .node
= WREPL_NODE_B
,
1726 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1727 .ips
= addresses_B_3_4
,
1728 .apply_expected
= true
1733 * unique,released vs. sgroup,tombstone
1734 * => should be replaced
1737 .line
= __location__
,
1738 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1741 .type
= WREPL_TYPE_UNIQUE
,
1742 .state
= WREPL_STATE_RELEASED
,
1743 .node
= WREPL_NODE_B
,
1745 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1746 .ips
= addresses_B_1
,
1747 .apply_expected
= false
1751 .type
= WREPL_TYPE_SGROUP
,
1752 .state
= WREPL_STATE_TOMBSTONE
,
1753 .node
= WREPL_NODE_B
,
1755 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1756 .ips
= addresses_A_3_4
,
1757 .apply_expected
= true
1762 * unique,tombstone vs. sgroup,active
1763 * => should be replaced
1766 .line
= __location__
,
1767 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1770 .type
= WREPL_TYPE_UNIQUE
,
1771 .state
= WREPL_STATE_TOMBSTONE
,
1772 .node
= WREPL_NODE_B
,
1774 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1775 .ips
= addresses_A_1
,
1776 .apply_expected
= true
1780 .type
= WREPL_TYPE_SGROUP
,
1781 .state
= WREPL_STATE_ACTIVE
,
1782 .node
= WREPL_NODE_B
,
1784 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1785 .ips
= addresses_B_3_4
,
1786 .apply_expected
= true
1791 * unique,tombstone vs. sgroup,tombstone
1792 * => should be replaced
1795 .line
= __location__
,
1796 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1799 .type
= WREPL_TYPE_UNIQUE
,
1800 .state
= WREPL_STATE_TOMBSTONE
,
1801 .node
= WREPL_NODE_B
,
1803 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1804 .ips
= addresses_B_1
,
1805 .apply_expected
= true
1809 .type
= WREPL_TYPE_SGROUP
,
1810 .state
= WREPL_STATE_TOMBSTONE
,
1811 .node
= WREPL_NODE_B
,
1813 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1814 .ips
= addresses_A_3_4
,
1815 .apply_expected
= true
1820 * unique vs multi homed section,
1823 * unique,active vs. mhomed,active
1824 * => should be replaced
1827 .line
= __location__
,
1828 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1831 .type
= WREPL_TYPE_UNIQUE
,
1832 .state
= WREPL_STATE_ACTIVE
,
1833 .node
= WREPL_NODE_B
,
1835 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1836 .ips
= addresses_A_1
,
1837 .apply_expected
= true
1841 .type
= WREPL_TYPE_MHOMED
,
1842 .state
= WREPL_STATE_ACTIVE
,
1843 .node
= WREPL_NODE_B
,
1845 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1846 .ips
= addresses_B_3_4
,
1847 .apply_expected
= true
1852 * unique,active vs. mhomed,tombstone
1853 * => should NOT be replaced
1856 .line
= __location__
,
1857 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1860 .type
= WREPL_TYPE_UNIQUE
,
1861 .state
= WREPL_STATE_ACTIVE
,
1862 .node
= WREPL_NODE_B
,
1864 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1865 .ips
= addresses_B_3_4
,
1866 .apply_expected
= true
1870 .type
= WREPL_TYPE_MHOMED
,
1871 .state
= WREPL_STATE_TOMBSTONE
,
1872 .node
= WREPL_NODE_B
,
1874 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1875 .ips
= addresses_B_3_4
,
1876 .apply_expected
= false
1881 * unique,released vs. mhomed,active
1882 * => should be replaced
1885 .line
= __location__
,
1886 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1889 .type
= WREPL_TYPE_UNIQUE
,
1890 .state
= WREPL_STATE_RELEASED
,
1891 .node
= WREPL_NODE_B
,
1893 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1894 .ips
= addresses_B_1
,
1895 .apply_expected
= false
1899 .type
= WREPL_TYPE_MHOMED
,
1900 .state
= WREPL_STATE_ACTIVE
,
1901 .node
= WREPL_NODE_B
,
1903 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1904 .ips
= addresses_A_3_4
,
1905 .apply_expected
= true
1910 * unique,released vs. mhomed,tombstone
1911 * => should be replaced
1914 .line
= __location__
,
1915 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1918 .type
= WREPL_TYPE_UNIQUE
,
1919 .state
= WREPL_STATE_RELEASED
,
1920 .node
= WREPL_NODE_B
,
1922 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1923 .ips
= addresses_A_1
,
1924 .apply_expected
= false
1928 .type
= WREPL_TYPE_MHOMED
,
1929 .state
= WREPL_STATE_TOMBSTONE
,
1930 .node
= WREPL_NODE_B
,
1932 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1933 .ips
= addresses_B_3_4
,
1934 .apply_expected
= true
1939 * unique,tombstone vs. mhomed,active
1940 * => should be replaced
1943 .line
= __location__
,
1944 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1947 .type
= WREPL_TYPE_UNIQUE
,
1948 .state
= WREPL_STATE_TOMBSTONE
,
1949 .node
= WREPL_NODE_B
,
1951 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1952 .ips
= addresses_B_1
,
1953 .apply_expected
= true
1957 .type
= WREPL_TYPE_MHOMED
,
1958 .state
= WREPL_STATE_ACTIVE
,
1959 .node
= WREPL_NODE_B
,
1961 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1962 .ips
= addresses_A_3_4
,
1963 .apply_expected
= true
1968 * unique,tombstone vs. mhomed,tombstone
1969 * => should be replaced
1972 .line
= __location__
,
1973 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1976 .type
= WREPL_TYPE_UNIQUE
,
1977 .state
= WREPL_STATE_TOMBSTONE
,
1978 .node
= WREPL_NODE_B
,
1980 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1981 .ips
= addresses_A_1
,
1982 .apply_expected
= true
1986 .type
= WREPL_TYPE_MHOMED
,
1987 .state
= WREPL_STATE_TOMBSTONE
,
1988 .node
= WREPL_NODE_B
,
1990 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1991 .ips
= addresses_B_3_4
,
1992 .apply_expected
= true
1997 * normal groups vs unique section,
2000 * group,active vs. unique,active
2001 * => should NOT be replaced
2004 .line
= __location__
,
2005 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2008 .type
= WREPL_TYPE_GROUP
,
2009 .state
= WREPL_STATE_ACTIVE
,
2010 .node
= WREPL_NODE_B
,
2012 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2013 .ips
= addresses_A_1
,
2014 .apply_expected
= true
2018 .type
= WREPL_TYPE_UNIQUE
,
2019 .state
= WREPL_STATE_ACTIVE
,
2020 .node
= WREPL_NODE_B
,
2022 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2023 .ips
= addresses_A_1
,
2024 .apply_expected
= false
2029 * group,active vs. unique,tombstone
2030 * => should NOT be replaced
2033 .line
= __location__
,
2034 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2037 .type
= WREPL_TYPE_GROUP
,
2038 .state
= WREPL_STATE_ACTIVE
,
2039 .node
= WREPL_NODE_B
,
2041 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2042 .ips
= addresses_A_1
,
2043 .apply_expected
= true
2047 .type
= WREPL_TYPE_UNIQUE
,
2048 .state
= WREPL_STATE_TOMBSTONE
,
2049 .node
= WREPL_NODE_B
,
2051 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2052 .ips
= addresses_A_1
,
2053 .apply_expected
= false
2058 * group,released vs. unique,active
2059 * => should NOT be replaced
2062 .line
= __location__
,
2063 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2066 .type
= WREPL_TYPE_GROUP
,
2067 .state
= WREPL_STATE_RELEASED
,
2068 .node
= WREPL_NODE_B
,
2070 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2071 .ips
= addresses_A_1
,
2072 .apply_expected
= false
2076 .type
= WREPL_TYPE_UNIQUE
,
2077 .state
= WREPL_STATE_ACTIVE
,
2078 .node
= WREPL_NODE_B
,
2080 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2081 .ips
= addresses_A_1
,
2082 .apply_expected
= false
2087 * group,released vs. unique,tombstone
2088 * => should NOT be replaced
2091 .line
= __location__
,
2092 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2095 .type
= WREPL_TYPE_GROUP
,
2096 .state
= WREPL_STATE_RELEASED
,
2097 .node
= WREPL_NODE_B
,
2099 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2100 .ips
= addresses_A_1
,
2101 .apply_expected
= false
2105 .type
= WREPL_TYPE_UNIQUE
,
2106 .state
= WREPL_STATE_TOMBSTONE
,
2107 .node
= WREPL_NODE_B
,
2109 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2110 .ips
= addresses_A_1
,
2111 .apply_expected
= false
2116 * group,tombstone vs. unique,active
2117 * => should NOT be replaced
2120 .line
= __location__
,
2121 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2124 .type
= WREPL_TYPE_GROUP
,
2125 .state
= WREPL_STATE_TOMBSTONE
,
2126 .node
= WREPL_NODE_B
,
2128 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2129 .ips
= addresses_A_1
,
2130 .apply_expected
= true
2134 .type
= WREPL_TYPE_UNIQUE
,
2135 .state
= WREPL_STATE_ACTIVE
,
2136 .node
= WREPL_NODE_B
,
2138 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2139 .ips
= addresses_A_1
,
2140 .apply_expected
= false
2145 * group,tombstone vs. unique,tombstone
2146 * => should NOT be replaced
2149 .line
= __location__
,
2150 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2153 .type
= WREPL_TYPE_GROUP
,
2154 .state
= WREPL_STATE_TOMBSTONE
,
2155 .node
= WREPL_NODE_B
,
2157 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2158 .ips
= addresses_A_1
,
2159 .apply_expected
= true
2163 .type
= WREPL_TYPE_UNIQUE
,
2164 .state
= WREPL_STATE_TOMBSTONE
,
2165 .node
= WREPL_NODE_B
,
2167 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2168 .ips
= addresses_A_1
,
2169 .apply_expected
= false
2174 * normal groups vs normal groups section,
2177 * group,active vs. group,active
2178 * => should NOT be replaced
2181 .line
= __location__
,
2182 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2185 .type
= WREPL_TYPE_GROUP
,
2186 .state
= WREPL_STATE_ACTIVE
,
2187 .node
= WREPL_NODE_B
,
2189 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2190 .ips
= addresses_A_1
,
2191 .apply_expected
= true
2195 .type
= WREPL_TYPE_GROUP
,
2196 .state
= WREPL_STATE_ACTIVE
,
2197 .node
= WREPL_NODE_B
,
2199 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2200 .ips
= addresses_A_1
,
2201 .apply_expected
= false
2206 * group,active vs. group,tombstone
2207 * => should NOT be replaced
2210 .line
= __location__
,
2211 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2214 .type
= WREPL_TYPE_GROUP
,
2215 .state
= WREPL_STATE_ACTIVE
,
2216 .node
= WREPL_NODE_B
,
2218 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2219 .ips
= addresses_A_1
,
2220 .apply_expected
= true
2224 .type
= WREPL_TYPE_GROUP
,
2225 .state
= WREPL_STATE_TOMBSTONE
,
2226 .node
= WREPL_NODE_B
,
2228 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2229 .ips
= addresses_A_1
,
2230 .apply_expected
= false
2235 * group,released vs. group,active
2236 * => should be replaced
2239 .line
= __location__
,
2240 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2243 .type
= WREPL_TYPE_GROUP
,
2244 .state
= WREPL_STATE_RELEASED
,
2245 .node
= WREPL_NODE_B
,
2247 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2248 .ips
= addresses_A_1
,
2249 .apply_expected
= false
2253 .type
= WREPL_TYPE_GROUP
,
2254 .state
= WREPL_STATE_ACTIVE
,
2255 .node
= WREPL_NODE_B
,
2257 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2258 .ips
= addresses_B_1
,
2259 .apply_expected
= true
2264 * group,released vs. group,tombstone
2265 * => should be replaced
2268 .line
= __location__
,
2269 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2272 .type
= WREPL_TYPE_GROUP
,
2273 .state
= WREPL_STATE_RELEASED
,
2274 .node
= WREPL_NODE_B
,
2276 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2277 .ips
= addresses_A_1
,
2278 .apply_expected
= false
2282 .type
= WREPL_TYPE_GROUP
,
2283 .state
= WREPL_STATE_TOMBSTONE
,
2284 .node
= WREPL_NODE_B
,
2286 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2287 .ips
= addresses_B_1
,
2288 .apply_expected
= true
2293 * group,tombstone vs. group,active
2294 * => should be replaced
2297 .line
= __location__
,
2298 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2301 .type
= WREPL_TYPE_GROUP
,
2302 .state
= WREPL_STATE_TOMBSTONE
,
2303 .node
= WREPL_NODE_B
,
2305 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2306 .ips
= addresses_B_1
,
2307 .apply_expected
= true
2311 .type
= WREPL_TYPE_GROUP
,
2312 .state
= WREPL_STATE_ACTIVE
,
2313 .node
= WREPL_NODE_B
,
2315 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2316 .ips
= addresses_A_1
,
2317 .apply_expected
= true
2322 * group,tombstone vs. group,tombstone
2323 * => should be replaced
2326 .line
= __location__
,
2327 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2330 .type
= WREPL_TYPE_GROUP
,
2331 .state
= WREPL_STATE_TOMBSTONE
,
2332 .node
= WREPL_NODE_B
,
2334 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2335 .ips
= addresses_A_1
,
2336 .apply_expected
= true
2340 .type
= WREPL_TYPE_GROUP
,
2341 .state
= WREPL_STATE_TOMBSTONE
,
2342 .node
= WREPL_NODE_B
,
2344 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2345 .ips
= addresses_B_1
,
2346 .apply_expected
= true
2351 * normal groups vs special groups section,
2354 * group,active vs. sgroup,active
2355 * => should NOT be replaced
2358 .line
= __location__
,
2359 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2362 .type
= WREPL_TYPE_GROUP
,
2363 .state
= WREPL_STATE_ACTIVE
,
2364 .node
= WREPL_NODE_B
,
2366 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2367 .ips
= addresses_B_1
,
2368 .apply_expected
= true
2372 .type
= WREPL_TYPE_SGROUP
,
2373 .state
= WREPL_STATE_ACTIVE
,
2374 .node
= WREPL_NODE_B
,
2376 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2377 .ips
= addresses_B_1
,
2378 .apply_expected
= false
2383 * group,active vs. sgroup,tombstone
2384 * => should NOT be replaced
2387 .line
= __location__
,
2388 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2391 .type
= WREPL_TYPE_GROUP
,
2392 .state
= WREPL_STATE_ACTIVE
,
2393 .node
= WREPL_NODE_B
,
2395 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2396 .ips
= addresses_B_1
,
2397 .apply_expected
= true
2401 .type
= WREPL_TYPE_SGROUP
,
2402 .state
= WREPL_STATE_TOMBSTONE
,
2403 .node
= WREPL_NODE_B
,
2405 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2406 .ips
= addresses_B_1
,
2407 .apply_expected
= false
2412 * group,released vs. sgroup,active
2413 * => should be replaced
2416 .line
= __location__
,
2417 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2420 .type
= WREPL_TYPE_GROUP
,
2421 .state
= WREPL_STATE_RELEASED
,
2422 .node
= WREPL_NODE_B
,
2424 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2425 .ips
= addresses_A_1
,
2426 .apply_expected
= false
2430 .type
= WREPL_TYPE_SGROUP
,
2431 .state
= WREPL_STATE_ACTIVE
,
2432 .node
= WREPL_NODE_B
,
2434 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2435 .ips
= addresses_B_1
,
2436 .apply_expected
= true
2441 * group,released vs. sgroup,tombstone
2442 * => should NOT be replaced
2445 .line
= __location__
,
2446 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2449 .type
= WREPL_TYPE_GROUP
,
2450 .state
= WREPL_STATE_RELEASED
,
2451 .node
= WREPL_NODE_B
,
2453 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2454 .ips
= addresses_B_1
,
2455 .apply_expected
= false
2459 .type
= WREPL_TYPE_SGROUP
,
2460 .state
= WREPL_STATE_TOMBSTONE
,
2461 .node
= WREPL_NODE_B
,
2463 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2464 .ips
= addresses_B_1
,
2465 .apply_expected
= false
2470 * group,tombstone vs. sgroup,active
2471 * => should be replaced
2474 .line
= __location__
,
2475 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2478 .type
= WREPL_TYPE_GROUP
,
2479 .state
= WREPL_STATE_TOMBSTONE
,
2480 .node
= WREPL_NODE_B
,
2482 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2483 .ips
= addresses_B_1
,
2484 .apply_expected
= true
2488 .type
= WREPL_TYPE_SGROUP
,
2489 .state
= WREPL_STATE_ACTIVE
,
2490 .node
= WREPL_NODE_B
,
2492 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2493 .ips
= addresses_A_1
,
2494 .apply_expected
= true
2499 * group,tombstone vs. sgroup,tombstone
2500 * => should be replaced
2503 .line
= __location__
,
2504 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2507 .type
= WREPL_TYPE_GROUP
,
2508 .state
= WREPL_STATE_TOMBSTONE
,
2509 .node
= WREPL_NODE_B
,
2511 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2512 .ips
= addresses_A_1
,
2513 .apply_expected
= true
2517 .type
= WREPL_TYPE_SGROUP
,
2518 .state
= WREPL_STATE_TOMBSTONE
,
2519 .node
= WREPL_NODE_B
,
2521 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2522 .ips
= addresses_B_1
,
2523 .apply_expected
= true
2528 * normal groups vs multi homed section,
2531 * group,active vs. mhomed,active
2532 * => should NOT be replaced
2535 .line
= __location__
,
2536 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2539 .type
= WREPL_TYPE_GROUP
,
2540 .state
= WREPL_STATE_ACTIVE
,
2541 .node
= WREPL_NODE_B
,
2543 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2544 .ips
= addresses_B_1
,
2545 .apply_expected
= true
2549 .type
= WREPL_TYPE_MHOMED
,
2550 .state
= WREPL_STATE_ACTIVE
,
2551 .node
= WREPL_NODE_B
,
2553 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2554 .ips
= addresses_B_1
,
2555 .apply_expected
= false
2560 * group,active vs. mhomed,tombstone
2561 * => should NOT be replaced
2564 .line
= __location__
,
2565 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2568 .type
= WREPL_TYPE_GROUP
,
2569 .state
= WREPL_STATE_ACTIVE
,
2570 .node
= WREPL_NODE_B
,
2572 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2573 .ips
= addresses_B_1
,
2574 .apply_expected
= true
2578 .type
= WREPL_TYPE_MHOMED
,
2579 .state
= WREPL_STATE_TOMBSTONE
,
2580 .node
= WREPL_NODE_B
,
2582 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2583 .ips
= addresses_B_1
,
2584 .apply_expected
= false
2589 * group,released vs. mhomed,active
2590 * => should NOT be replaced
2593 .line
= __location__
,
2594 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2597 .type
= WREPL_TYPE_GROUP
,
2598 .state
= WREPL_STATE_RELEASED
,
2599 .node
= WREPL_NODE_B
,
2601 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2602 .ips
= addresses_B_1
,
2603 .apply_expected
= false
2607 .type
= WREPL_TYPE_MHOMED
,
2608 .state
= WREPL_STATE_ACTIVE
,
2609 .node
= WREPL_NODE_B
,
2611 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2612 .ips
= addresses_B_1
,
2613 .apply_expected
= false
2618 * group,released vs. mhomed,tombstone
2619 * => should NOT be replaced
2622 .line
= __location__
,
2623 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2626 .type
= WREPL_TYPE_GROUP
,
2627 .state
= WREPL_STATE_RELEASED
,
2628 .node
= WREPL_NODE_B
,
2630 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2631 .ips
= addresses_B_1
,
2632 .apply_expected
= false
2636 .type
= WREPL_TYPE_MHOMED
,
2637 .state
= WREPL_STATE_TOMBSTONE
,
2638 .node
= WREPL_NODE_B
,
2640 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2641 .ips
= addresses_B_1
,
2642 .apply_expected
= false
2647 * group,tombstone vs. mhomed,active
2648 * => should be replaced
2651 .line
= __location__
,
2652 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2655 .type
= WREPL_TYPE_GROUP
,
2656 .state
= WREPL_STATE_TOMBSTONE
,
2657 .node
= WREPL_NODE_B
,
2659 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2660 .ips
= addresses_B_1
,
2661 .apply_expected
= true
2665 .type
= WREPL_TYPE_MHOMED
,
2666 .state
= WREPL_STATE_ACTIVE
,
2667 .node
= WREPL_NODE_B
,
2669 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2670 .ips
= addresses_A_1
,
2671 .apply_expected
= true
2676 * group,tombstone vs. mhomed,tombstone
2677 * => should be replaced
2680 .line
= __location__
,
2681 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2684 .type
= WREPL_TYPE_GROUP
,
2685 .state
= WREPL_STATE_TOMBSTONE
,
2686 .node
= WREPL_NODE_B
,
2688 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2689 .ips
= addresses_A_1
,
2690 .apply_expected
= true
2694 .type
= WREPL_TYPE_MHOMED
,
2695 .state
= WREPL_STATE_TOMBSTONE
,
2696 .node
= WREPL_NODE_B
,
2698 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2699 .ips
= addresses_B_1
,
2700 .apply_expected
= true
2705 * special groups vs unique section,
2708 * sgroup,active vs. unique,active
2709 * => should NOT be replaced
2712 .line
= __location__
,
2713 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2716 .type
= WREPL_TYPE_SGROUP
,
2717 .state
= WREPL_STATE_ACTIVE
,
2718 .node
= WREPL_NODE_B
,
2720 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2721 .ips
= addresses_B_1
,
2722 .apply_expected
= true
2726 .type
= WREPL_TYPE_UNIQUE
,
2727 .state
= WREPL_STATE_ACTIVE
,
2728 .node
= WREPL_NODE_B
,
2730 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2731 .ips
= addresses_B_1
,
2732 .apply_expected
= false
2737 * sgroup,active vs. unique,tombstone
2738 * => should NOT be replaced
2741 .line
= __location__
,
2742 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2745 .type
= WREPL_TYPE_SGROUP
,
2746 .state
= WREPL_STATE_ACTIVE
,
2747 .node
= WREPL_NODE_B
,
2749 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2750 .ips
= addresses_B_1
,
2751 .apply_expected
= true
2755 .type
= WREPL_TYPE_UNIQUE
,
2756 .state
= WREPL_STATE_TOMBSTONE
,
2757 .node
= WREPL_NODE_B
,
2759 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2760 .ips
= addresses_B_1
,
2761 .apply_expected
= false
2766 * sgroup,released vs. unique,active
2767 * => should be replaced
2770 .line
= __location__
,
2771 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2774 .type
= WREPL_TYPE_SGROUP
,
2775 .state
= WREPL_STATE_RELEASED
,
2776 .node
= WREPL_NODE_B
,
2778 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2779 .ips
= addresses_B_1
,
2780 .apply_expected
= false
2784 .type
= WREPL_TYPE_UNIQUE
,
2785 .state
= WREPL_STATE_ACTIVE
,
2786 .node
= WREPL_NODE_B
,
2788 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2789 .ips
= addresses_A_1
,
2790 .apply_expected
= true
2795 * sgroup,released vs. unique,tombstone
2796 * => should be replaced
2799 .line
= __location__
,
2800 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2803 .type
= WREPL_TYPE_SGROUP
,
2804 .state
= WREPL_STATE_RELEASED
,
2805 .node
= WREPL_NODE_B
,
2807 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2808 .ips
= addresses_A_1
,
2809 .apply_expected
= false
2813 .type
= WREPL_TYPE_UNIQUE
,
2814 .state
= WREPL_STATE_TOMBSTONE
,
2815 .node
= WREPL_NODE_B
,
2817 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2818 .ips
= addresses_B_1
,
2819 .apply_expected
= true
2824 * sgroup,tombstone vs. unique,active
2825 * => should be replaced
2828 .line
= __location__
,
2829 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2832 .type
= WREPL_TYPE_SGROUP
,
2833 .state
= WREPL_STATE_TOMBSTONE
,
2834 .node
= WREPL_NODE_B
,
2836 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2837 .ips
= addresses_A_1
,
2838 .apply_expected
= true
2842 .type
= WREPL_TYPE_UNIQUE
,
2843 .state
= WREPL_STATE_ACTIVE
,
2844 .node
= WREPL_NODE_B
,
2846 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2847 .ips
= addresses_B_1
,
2848 .apply_expected
= true
2853 * sgroup,tombstone vs. unique,tombstone
2854 * => should be replaced
2857 .line
= __location__
,
2858 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2861 .type
= WREPL_TYPE_SGROUP
,
2862 .state
= WREPL_STATE_TOMBSTONE
,
2863 .node
= WREPL_NODE_B
,
2865 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2866 .ips
= addresses_B_1
,
2867 .apply_expected
= true
2871 .type
= WREPL_TYPE_UNIQUE
,
2872 .state
= WREPL_STATE_TOMBSTONE
,
2873 .node
= WREPL_NODE_B
,
2875 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2876 .ips
= addresses_A_1
,
2877 .apply_expected
= true
2882 * special groups vs normal group section,
2885 * sgroup,active vs. group,active
2886 * => should NOT be replaced
2889 .line
= __location__
,
2890 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2893 .type
= WREPL_TYPE_SGROUP
,
2894 .state
= WREPL_STATE_ACTIVE
,
2895 .node
= WREPL_NODE_B
,
2897 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2898 .ips
= addresses_A_1
,
2899 .apply_expected
= true
2903 .type
= WREPL_TYPE_GROUP
,
2904 .state
= WREPL_STATE_ACTIVE
,
2905 .node
= WREPL_NODE_B
,
2907 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2908 .ips
= addresses_A_1
,
2909 .apply_expected
= false
2914 * sgroup,active vs. group,tombstone
2915 * => should NOT be replaced
2918 .line
= __location__
,
2919 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2922 .type
= WREPL_TYPE_SGROUP
,
2923 .state
= WREPL_STATE_ACTIVE
,
2924 .node
= WREPL_NODE_B
,
2926 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2927 .ips
= addresses_A_1
,
2928 .apply_expected
= true
2932 .type
= WREPL_TYPE_GROUP
,
2933 .state
= WREPL_STATE_TOMBSTONE
,
2934 .node
= WREPL_NODE_B
,
2936 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2937 .ips
= addresses_A_1
,
2938 .apply_expected
= false
2943 * sgroup,released vs. group,active
2944 * => should be replaced
2947 .line
= __location__
,
2948 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2951 .type
= WREPL_TYPE_SGROUP
,
2952 .state
= WREPL_STATE_RELEASED
,
2953 .node
= WREPL_NODE_B
,
2955 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2956 .ips
= addresses_A_1
,
2957 .apply_expected
= false
2961 .type
= WREPL_TYPE_GROUP
,
2962 .state
= WREPL_STATE_ACTIVE
,
2963 .node
= WREPL_NODE_B
,
2965 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2966 .ips
= addresses_B_1
,
2967 .apply_expected
= true
2972 * sgroup,released vs. group,tombstone
2973 * => should be replaced
2976 .line
= __location__
,
2977 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2980 .type
= WREPL_TYPE_SGROUP
,
2981 .state
= WREPL_STATE_RELEASED
,
2982 .node
= WREPL_NODE_B
,
2984 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2985 .ips
= addresses_B_1
,
2986 .apply_expected
= false
2990 .type
= WREPL_TYPE_GROUP
,
2991 .state
= WREPL_STATE_TOMBSTONE
,
2992 .node
= WREPL_NODE_B
,
2994 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2995 .ips
= addresses_A_1
,
2996 .apply_expected
= true
3001 * sgroup,tombstone vs. group,active
3002 * => should NOT be replaced
3005 .line
= __location__
,
3006 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3009 .type
= WREPL_TYPE_SGROUP
,
3010 .state
= WREPL_STATE_TOMBSTONE
,
3011 .node
= WREPL_NODE_B
,
3013 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3014 .ips
= addresses_A_1
,
3015 .apply_expected
= true
3019 .type
= WREPL_TYPE_GROUP
,
3020 .state
= WREPL_STATE_ACTIVE
,
3021 .node
= WREPL_NODE_B
,
3023 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3024 .ips
= addresses_B_1
,
3025 .apply_expected
= true
3030 * sgroup,tombstone vs. group,tombstone
3031 * => should NOT be replaced
3034 .line
= __location__
,
3035 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3038 .type
= WREPL_TYPE_SGROUP
,
3039 .state
= WREPL_STATE_TOMBSTONE
,
3040 .node
= WREPL_NODE_B
,
3042 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3043 .ips
= addresses_B_1
,
3044 .apply_expected
= true
3048 .type
= WREPL_TYPE_GROUP
,
3049 .state
= WREPL_STATE_TOMBSTONE
,
3050 .node
= WREPL_NODE_B
,
3052 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3053 .ips
= addresses_A_1
,
3054 .apply_expected
= true
3059 * special groups (not active) vs special group section,
3062 * sgroup,released vs. sgroup,active
3063 * => should be replaced
3066 .line
= __location__
,
3067 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3070 .type
= WREPL_TYPE_SGROUP
,
3071 .state
= WREPL_STATE_RELEASED
,
3072 .node
= WREPL_NODE_B
,
3074 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3075 .ips
= addresses_A_1
,
3076 .apply_expected
= false
3080 .type
= WREPL_TYPE_SGROUP
,
3081 .state
= WREPL_STATE_ACTIVE
,
3082 .node
= WREPL_NODE_B
,
3084 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3085 .ips
= addresses_B_1
,
3086 .apply_expected
= true
3091 * sgroup,released vs. sgroup,tombstone
3092 * => should be replaced
3095 .line
= __location__
,
3096 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3099 .type
= WREPL_TYPE_SGROUP
,
3100 .state
= WREPL_STATE_RELEASED
,
3101 .node
= WREPL_NODE_B
,
3103 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3104 .ips
= addresses_B_1
,
3105 .apply_expected
= false
3109 .type
= WREPL_TYPE_SGROUP
,
3110 .state
= WREPL_STATE_TOMBSTONE
,
3111 .node
= WREPL_NODE_B
,
3113 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3114 .ips
= addresses_A_1
,
3115 .apply_expected
= true
3120 * sgroup,tombstone vs. sgroup,active
3121 * => should NOT be replaced
3124 .line
= __location__
,
3125 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3128 .type
= WREPL_TYPE_SGROUP
,
3129 .state
= WREPL_STATE_TOMBSTONE
,
3130 .node
= WREPL_NODE_B
,
3132 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3133 .ips
= addresses_A_1
,
3134 .apply_expected
= true
3138 .type
= WREPL_TYPE_SGROUP
,
3139 .state
= WREPL_STATE_ACTIVE
,
3140 .node
= WREPL_NODE_B
,
3142 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3143 .ips
= addresses_B_1
,
3144 .apply_expected
= true
3149 * sgroup,tombstone vs. sgroup,tombstone
3150 * => should NOT be replaced
3153 .line
= __location__
,
3154 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3157 .type
= WREPL_TYPE_SGROUP
,
3158 .state
= WREPL_STATE_TOMBSTONE
,
3159 .node
= WREPL_NODE_B
,
3161 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3162 .ips
= addresses_B_1
,
3163 .apply_expected
= true
3167 .type
= WREPL_TYPE_SGROUP
,
3168 .state
= WREPL_STATE_TOMBSTONE
,
3169 .node
= WREPL_NODE_B
,
3171 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3172 .ips
= addresses_A_1
,
3173 .apply_expected
= true
3178 * special groups vs multi homed section,
3181 * sgroup,active vs. mhomed,active
3182 * => should NOT be replaced
3185 .line
= __location__
,
3186 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3189 .type
= WREPL_TYPE_SGROUP
,
3190 .state
= WREPL_STATE_ACTIVE
,
3191 .node
= WREPL_NODE_B
,
3193 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3194 .ips
= addresses_A_1
,
3195 .apply_expected
= true
3199 .type
= WREPL_TYPE_MHOMED
,
3200 .state
= WREPL_STATE_ACTIVE
,
3201 .node
= WREPL_NODE_B
,
3203 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3204 .ips
= addresses_A_1
,
3205 .apply_expected
= false
3210 * sgroup,active vs. mhomed,tombstone
3211 * => should NOT be replaced
3214 .line
= __location__
,
3215 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3218 .type
= WREPL_TYPE_SGROUP
,
3219 .state
= WREPL_STATE_ACTIVE
,
3220 .node
= WREPL_NODE_B
,
3222 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3223 .ips
= addresses_A_1
,
3224 .apply_expected
= true
3228 .type
= WREPL_TYPE_MHOMED
,
3229 .state
= WREPL_STATE_TOMBSTONE
,
3230 .node
= WREPL_NODE_B
,
3232 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3233 .ips
= addresses_A_1
,
3234 .apply_expected
= false
3239 * sgroup,released vs. mhomed,active
3240 * => should be replaced
3243 .line
= __location__
,
3244 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3247 .type
= WREPL_TYPE_SGROUP
,
3248 .state
= WREPL_STATE_RELEASED
,
3249 .node
= WREPL_NODE_B
,
3251 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3252 .ips
= addresses_A_1
,
3253 .apply_expected
= false
3257 .type
= WREPL_TYPE_MHOMED
,
3258 .state
= WREPL_STATE_ACTIVE
,
3259 .node
= WREPL_NODE_B
,
3261 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3262 .ips
= addresses_B_1
,
3263 .apply_expected
= true
3268 * sgroup,released vs. mhomed,tombstone
3269 * => should be replaced
3272 .line
= __location__
,
3273 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3276 .type
= WREPL_TYPE_SGROUP
,
3277 .state
= WREPL_STATE_RELEASED
,
3278 .node
= WREPL_NODE_B
,
3280 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3281 .ips
= addresses_B_1
,
3282 .apply_expected
= false
3286 .type
= WREPL_TYPE_MHOMED
,
3287 .state
= WREPL_STATE_TOMBSTONE
,
3288 .node
= WREPL_NODE_B
,
3290 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3291 .ips
= addresses_A_1
,
3292 .apply_expected
= true
3297 * sgroup,tombstone vs. mhomed,active
3298 * => should be replaced
3301 .line
= __location__
,
3302 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3305 .type
= WREPL_TYPE_SGROUP
,
3306 .state
= WREPL_STATE_TOMBSTONE
,
3307 .node
= WREPL_NODE_B
,
3309 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3310 .ips
= addresses_A_1
,
3311 .apply_expected
= true
3315 .type
= WREPL_TYPE_MHOMED
,
3316 .state
= WREPL_STATE_ACTIVE
,
3317 .node
= WREPL_NODE_B
,
3319 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3320 .ips
= addresses_B_1
,
3321 .apply_expected
= true
3326 * sgroup,tombstone vs. mhomed,tombstone
3327 * => should be replaced
3330 .line
= __location__
,
3331 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3334 .type
= WREPL_TYPE_SGROUP
,
3335 .state
= WREPL_STATE_TOMBSTONE
,
3336 .node
= WREPL_NODE_B
,
3338 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3339 .ips
= addresses_B_1
,
3340 .apply_expected
= true
3344 .type
= WREPL_TYPE_MHOMED
,
3345 .state
= WREPL_STATE_TOMBSTONE
,
3346 .node
= WREPL_NODE_B
,
3348 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3349 .ips
= addresses_A_1
,
3350 .apply_expected
= true
3355 * multi homed vs. unique section,
3358 * mhomed,active vs. unique,active
3359 * => should be replaced
3362 .line
= __location__
,
3363 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3366 .type
= WREPL_TYPE_MHOMED
,
3367 .state
= WREPL_STATE_ACTIVE
,
3368 .node
= WREPL_NODE_B
,
3370 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
3371 .ips
= addresses_A_3_4
,
3372 .apply_expected
= true
3376 .type
= WREPL_TYPE_UNIQUE
,
3377 .state
= WREPL_STATE_ACTIVE
,
3378 .node
= WREPL_NODE_B
,
3380 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3381 .ips
= addresses_B_1
,
3382 .apply_expected
= true
3387 * mhomed,active vs. unique,tombstone
3388 * => should NOT be replaced
3391 .line
= __location__
,
3392 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3395 .type
= WREPL_TYPE_MHOMED
,
3396 .state
= WREPL_STATE_ACTIVE
,
3397 .node
= WREPL_NODE_B
,
3399 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3400 .ips
= addresses_B_1
,
3401 .apply_expected
= true
3405 .type
= WREPL_TYPE_UNIQUE
,
3406 .state
= WREPL_STATE_TOMBSTONE
,
3407 .node
= WREPL_NODE_B
,
3409 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3410 .ips
= addresses_B_1
,
3411 .apply_expected
= false
3416 * mhomed,released vs. unique,active
3417 * => should be replaced
3420 .line
= __location__
,
3421 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3424 .type
= WREPL_TYPE_MHOMED
,
3425 .state
= WREPL_STATE_RELEASED
,
3426 .node
= WREPL_NODE_B
,
3428 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3429 .ips
= addresses_A_1
,
3430 .apply_expected
= false
3434 .type
= WREPL_TYPE_UNIQUE
,
3435 .state
= WREPL_STATE_ACTIVE
,
3436 .node
= WREPL_NODE_B
,
3438 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3439 .ips
= addresses_B_1
,
3440 .apply_expected
= true
3445 * mhomed,released vs. uinique,tombstone
3446 * => should be replaced
3449 .line
= __location__
,
3450 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3453 .type
= WREPL_TYPE_MHOMED
,
3454 .state
= WREPL_STATE_RELEASED
,
3455 .node
= WREPL_NODE_B
,
3457 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3458 .ips
= addresses_B_1
,
3459 .apply_expected
= false
3463 .type
= WREPL_TYPE_UNIQUE
,
3464 .state
= WREPL_STATE_TOMBSTONE
,
3465 .node
= WREPL_NODE_B
,
3467 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3468 .ips
= addresses_A_1
,
3469 .apply_expected
= true
3474 * mhomed,tombstone vs. unique,active
3475 * => should be replaced
3478 .line
= __location__
,
3479 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3482 .type
= WREPL_TYPE_MHOMED
,
3483 .state
= WREPL_STATE_TOMBSTONE
,
3484 .node
= WREPL_NODE_B
,
3486 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3487 .ips
= addresses_A_1
,
3488 .apply_expected
= true
3492 .type
= WREPL_TYPE_UNIQUE
,
3493 .state
= WREPL_STATE_ACTIVE
,
3494 .node
= WREPL_NODE_B
,
3496 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3497 .ips
= addresses_B_1
,
3498 .apply_expected
= true
3503 * mhomed,tombstone vs. uinique,tombstone
3504 * => should be replaced
3507 .line
= __location__
,
3508 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3511 .type
= WREPL_TYPE_MHOMED
,
3512 .state
= WREPL_STATE_TOMBSTONE
,
3513 .node
= WREPL_NODE_B
,
3515 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3516 .ips
= addresses_B_1
,
3517 .apply_expected
= true
3521 .type
= WREPL_TYPE_UNIQUE
,
3522 .state
= WREPL_STATE_TOMBSTONE
,
3523 .node
= WREPL_NODE_B
,
3525 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3526 .ips
= addresses_A_1
,
3527 .apply_expected
= true
3532 * multi homed vs. normal group section,
3535 * mhomed,active vs. group,active
3536 * => should be replaced
3539 .line
= __location__
,
3540 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3543 .type
= WREPL_TYPE_MHOMED
,
3544 .state
= WREPL_STATE_ACTIVE
,
3545 .node
= WREPL_NODE_B
,
3547 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3548 .ips
= addresses_A_1
,
3549 .apply_expected
= true
3553 .type
= WREPL_TYPE_GROUP
,
3554 .state
= WREPL_STATE_ACTIVE
,
3555 .node
= WREPL_NODE_B
,
3557 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3558 .ips
= addresses_B_1
,
3559 .apply_expected
= true
3564 * mhomed,active vs. group,tombstone
3565 * => should NOT be replaced
3568 .line
= __location__
,
3569 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3572 .type
= WREPL_TYPE_MHOMED
,
3573 .state
= WREPL_STATE_ACTIVE
,
3574 .node
= WREPL_NODE_B
,
3576 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3577 .ips
= addresses_B_1
,
3578 .apply_expected
= true
3582 .type
= WREPL_TYPE_GROUP
,
3583 .state
= WREPL_STATE_TOMBSTONE
,
3584 .node
= WREPL_NODE_B
,
3586 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3587 .ips
= addresses_B_1
,
3588 .apply_expected
= false
3593 * mhomed,released vs. group,active
3594 * => should be replaced
3597 .line
= __location__
,
3598 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3601 .type
= WREPL_TYPE_MHOMED
,
3602 .state
= WREPL_STATE_RELEASED
,
3603 .node
= WREPL_NODE_B
,
3605 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3606 .ips
= addresses_B_1
,
3607 .apply_expected
= false
3611 .type
= WREPL_TYPE_GROUP
,
3612 .state
= WREPL_STATE_ACTIVE
,
3613 .node
= WREPL_NODE_B
,
3615 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3616 .ips
= addresses_A_1
,
3617 .apply_expected
= true
3622 * mhomed,released vs. group,tombstone
3623 * => should be replaced
3626 .line
= __location__
,
3627 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3630 .type
= WREPL_TYPE_MHOMED
,
3631 .state
= WREPL_STATE_RELEASED
,
3632 .node
= WREPL_NODE_B
,
3634 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3635 .ips
= addresses_A_1
,
3636 .apply_expected
= false
3640 .type
= WREPL_TYPE_GROUP
,
3641 .state
= WREPL_STATE_TOMBSTONE
,
3642 .node
= WREPL_NODE_B
,
3644 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3645 .ips
= addresses_B_1
,
3646 .apply_expected
= true
3651 * mhomed,tombstone vs. group,active
3652 * => should be replaced
3655 .line
= __location__
,
3656 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3659 .type
= WREPL_TYPE_MHOMED
,
3660 .state
= WREPL_STATE_TOMBSTONE
,
3661 .node
= WREPL_NODE_B
,
3663 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3664 .ips
= addresses_B_1
,
3665 .apply_expected
= true
3669 .type
= WREPL_TYPE_GROUP
,
3670 .state
= WREPL_STATE_ACTIVE
,
3671 .node
= WREPL_NODE_B
,
3673 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3674 .ips
= addresses_A_1
,
3675 .apply_expected
= true
3680 * mhomed,tombstone vs. group,tombstone
3681 * => should be replaced
3684 .line
= __location__
,
3685 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3688 .type
= WREPL_TYPE_MHOMED
,
3689 .state
= WREPL_STATE_TOMBSTONE
,
3690 .node
= WREPL_NODE_B
,
3692 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3693 .ips
= addresses_A_1
,
3694 .apply_expected
= true
3698 .type
= WREPL_TYPE_GROUP
,
3699 .state
= WREPL_STATE_TOMBSTONE
,
3700 .node
= WREPL_NODE_B
,
3702 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3703 .ips
= addresses_B_1
,
3704 .apply_expected
= true
3709 * multi homed vs. special group section,
3712 * mhomed,active vs. sgroup,active
3713 * => should NOT be replaced
3716 .line
= __location__
,
3717 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3720 .type
= WREPL_TYPE_MHOMED
,
3721 .state
= WREPL_STATE_ACTIVE
,
3722 .node
= WREPL_NODE_B
,
3724 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3725 .ips
= addresses_A_1
,
3726 .apply_expected
= true
3730 .type
= WREPL_TYPE_SGROUP
,
3731 .state
= WREPL_STATE_ACTIVE
,
3732 .node
= WREPL_NODE_B
,
3734 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3735 .ips
= addresses_A_1
,
3736 .apply_expected
= false
3741 * mhomed,active vs. sgroup,tombstone
3742 * => should NOT be replaced
3745 .line
= __location__
,
3746 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3749 .type
= WREPL_TYPE_MHOMED
,
3750 .state
= WREPL_STATE_ACTIVE
,
3751 .node
= WREPL_NODE_B
,
3753 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3754 .ips
= addresses_A_1
,
3755 .apply_expected
= true
3759 .type
= WREPL_TYPE_SGROUP
,
3760 .state
= WREPL_STATE_TOMBSTONE
,
3761 .node
= WREPL_NODE_B
,
3763 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3764 .ips
= addresses_A_1
,
3765 .apply_expected
= false
3770 * mhomed,released vs. sgroup,active
3771 * => should be replaced
3774 .line
= __location__
,
3775 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3778 .type
= WREPL_TYPE_MHOMED
,
3779 .state
= WREPL_STATE_RELEASED
,
3780 .node
= WREPL_NODE_B
,
3782 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3783 .ips
= addresses_A_1
,
3784 .apply_expected
= false
3788 .type
= WREPL_TYPE_SGROUP
,
3789 .state
= WREPL_STATE_ACTIVE
,
3790 .node
= WREPL_NODE_B
,
3792 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3793 .ips
= addresses_B_1
,
3794 .apply_expected
= true
3799 * mhomed,released vs. sgroup,tombstone
3800 * => should be replaced
3803 .line
= __location__
,
3804 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3807 .type
= WREPL_TYPE_MHOMED
,
3808 .state
= WREPL_STATE_RELEASED
,
3809 .node
= WREPL_NODE_B
,
3811 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3812 .ips
= addresses_B_1
,
3813 .apply_expected
= false
3817 .type
= WREPL_TYPE_SGROUP
,
3818 .state
= WREPL_STATE_TOMBSTONE
,
3819 .node
= WREPL_NODE_B
,
3821 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3822 .ips
= addresses_A_1
,
3823 .apply_expected
= true
3828 * mhomed,tombstone vs. sgroup,active
3829 * => should be replaced
3832 .line
= __location__
,
3833 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3836 .type
= WREPL_TYPE_MHOMED
,
3837 .state
= WREPL_STATE_TOMBSTONE
,
3838 .node
= WREPL_NODE_B
,
3840 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3841 .ips
= addresses_A_1
,
3842 .apply_expected
= true
3846 .type
= WREPL_TYPE_SGROUP
,
3847 .state
= WREPL_STATE_ACTIVE
,
3848 .node
= WREPL_NODE_B
,
3850 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3851 .ips
= addresses_B_1
,
3852 .apply_expected
= true
3857 * mhomed,tombstone vs. sgroup,tombstone
3858 * => should be replaced
3861 .line
= __location__
,
3862 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3865 .type
= WREPL_TYPE_MHOMED
,
3866 .state
= WREPL_STATE_TOMBSTONE
,
3867 .node
= WREPL_NODE_B
,
3869 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3870 .ips
= addresses_B_1
,
3871 .apply_expected
= true
3875 .type
= WREPL_TYPE_SGROUP
,
3876 .state
= WREPL_STATE_TOMBSTONE
,
3877 .node
= WREPL_NODE_B
,
3879 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3880 .ips
= addresses_A_1
,
3881 .apply_expected
= true
3886 * multi homed vs. mlti homed section,
3889 * mhomed,active vs. mhomed,active
3890 * => should be replaced
3893 .line
= __location__
,
3894 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3897 .type
= WREPL_TYPE_MHOMED
,
3898 .state
= WREPL_STATE_ACTIVE
,
3899 .node
= WREPL_NODE_B
,
3901 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
3902 .ips
= addresses_A_3_4
,
3903 .apply_expected
= true
3907 .type
= WREPL_TYPE_MHOMED
,
3908 .state
= WREPL_STATE_ACTIVE
,
3909 .node
= WREPL_NODE_B
,
3911 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3912 .ips
= addresses_B_3_4
,
3913 .apply_expected
= true
3918 * mhomed,active vs. mhomed,tombstone
3919 * => should NOT be replaced
3922 .line
= __location__
,
3923 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3926 .type
= WREPL_TYPE_MHOMED
,
3927 .state
= WREPL_STATE_ACTIVE
,
3928 .node
= WREPL_NODE_B
,
3930 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3931 .ips
= addresses_B_3_4
,
3932 .apply_expected
= true
3936 .type
= WREPL_TYPE_MHOMED
,
3937 .state
= WREPL_STATE_TOMBSTONE
,
3938 .node
= WREPL_NODE_B
,
3940 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3941 .ips
= addresses_B_3_4
,
3942 .apply_expected
= false
3947 * mhomed,released vs. mhomed,active
3948 * => should be replaced
3951 .line
= __location__
,
3952 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3955 .type
= WREPL_TYPE_MHOMED
,
3956 .state
= WREPL_STATE_RELEASED
,
3957 .node
= WREPL_NODE_B
,
3959 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3960 .ips
= addresses_B_3_4
,
3961 .apply_expected
= false
3965 .type
= WREPL_TYPE_MHOMED
,
3966 .state
= WREPL_STATE_ACTIVE
,
3967 .node
= WREPL_NODE_B
,
3969 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
3970 .ips
= addresses_A_3_4
,
3971 .apply_expected
= true
3976 * mhomed,released vs. mhomed,tombstone
3977 * => should be replaced
3980 .line
= __location__
,
3981 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3984 .type
= WREPL_TYPE_MHOMED
,
3985 .state
= WREPL_STATE_RELEASED
,
3986 .node
= WREPL_NODE_B
,
3988 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
3989 .ips
= addresses_A_3_4
,
3990 .apply_expected
= false
3994 .type
= WREPL_TYPE_MHOMED
,
3995 .state
= WREPL_STATE_TOMBSTONE
,
3996 .node
= WREPL_NODE_B
,
3998 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3999 .ips
= addresses_B_3_4
,
4000 .apply_expected
= true
4005 * mhomed,tombstone vs. mhomed,active
4006 * => should be replaced
4009 .line
= __location__
,
4010 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4013 .type
= WREPL_TYPE_MHOMED
,
4014 .state
= WREPL_STATE_TOMBSTONE
,
4015 .node
= WREPL_NODE_B
,
4017 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4018 .ips
= addresses_B_3_4
,
4019 .apply_expected
= true
4023 .type
= WREPL_TYPE_MHOMED
,
4024 .state
= WREPL_STATE_ACTIVE
,
4025 .node
= WREPL_NODE_B
,
4027 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4028 .ips
= addresses_A_3_4
,
4029 .apply_expected
= true
4034 * mhomed,tombstone vs. mhomed,tombstone
4035 * => should be replaced
4038 .line
= __location__
,
4039 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4042 .type
= WREPL_TYPE_MHOMED
,
4043 .state
= WREPL_STATE_TOMBSTONE
,
4044 .node
= WREPL_NODE_B
,
4046 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4047 .ips
= addresses_A_3_4
,
4048 .apply_expected
= true
4052 .type
= WREPL_TYPE_MHOMED
,
4053 .state
= WREPL_STATE_TOMBSTONE
,
4054 .node
= WREPL_NODE_B
,
4056 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4057 .ips
= addresses_B_3_4
,
4058 .apply_expected
= true
4062 .line
= __location__
,
4063 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4067 .type
= WREPL_TYPE_UNIQUE
,
4068 .state
= WREPL_STATE_TOMBSTONE
,
4069 .node
= WREPL_NODE_B
,
4071 .num_ips
= ARRAY_SIZE(addresses_B_1
),
4072 .ips
= addresses_B_1
,
4073 .apply_expected
= true,
4077 .type
= WREPL_TYPE_UNIQUE
,
4078 .state
= WREPL_STATE_TOMBSTONE
,
4079 .node
= WREPL_NODE_B
,
4081 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4082 .ips
= addresses_A_1
,
4083 .apply_expected
= true,
4087 * special group vs special group section,
4090 * sgroup,active vs. sgroup,active same addresses
4091 * => should be NOT replaced
4094 .line
= __location__
,
4095 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4096 .comment
= "A:A_3_4 vs. B:A_3_4",
4100 .type
= WREPL_TYPE_SGROUP
,
4101 .state
= WREPL_STATE_ACTIVE
,
4102 .node
= WREPL_NODE_B
,
4104 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4105 .ips
= addresses_A_3_4
,
4106 .apply_expected
= true
4110 .type
= WREPL_TYPE_SGROUP
,
4111 .state
= WREPL_STATE_ACTIVE
,
4112 .node
= WREPL_NODE_B
,
4114 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4115 .ips
= addresses_A_3_4
,
4116 .apply_expected
= false,
4117 .sgroup_cleanup
= true
4121 * sgroup,active vs. sgroup,active same addresses
4122 * => should be NOT replaced
4125 .line
= __location__
,
4126 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4127 .comment
= "A:A_3_4 vs. B:NULL",
4131 .type
= WREPL_TYPE_SGROUP
,
4132 .state
= WREPL_STATE_ACTIVE
,
4133 .node
= WREPL_NODE_B
,
4135 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4136 .ips
= addresses_A_3_4
,
4137 .apply_expected
= true
4141 .type
= WREPL_TYPE_SGROUP
,
4142 .state
= WREPL_STATE_ACTIVE
,
4143 .node
= WREPL_NODE_B
,
4147 .apply_expected
= false,
4148 .sgroup_cleanup
= true
4152 * sgroup,active vs. sgroup,active subset addresses, special case...
4153 * => should NOT be replaced
4156 .line
= __location__
,
4157 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4158 .comment
= "A:A_3_4_X_3_4 vs. B:A_3_4",
4162 .type
= WREPL_TYPE_SGROUP
,
4163 .state
= WREPL_STATE_ACTIVE
,
4164 .node
= WREPL_NODE_B
,
4166 .num_ips
= ARRAY_SIZE(addresses_A_3_4_X_3_4
),
4167 .ips
= addresses_A_3_4_X_3_4
,
4168 .apply_expected
= true,
4172 .type
= WREPL_TYPE_SGROUP
,
4173 .state
= WREPL_STATE_ACTIVE
,
4174 .node
= WREPL_NODE_B
,
4176 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4177 .ips
= addresses_A_3_4
,
4178 .apply_expected
= false,
4182 .line
= __location__
,
4183 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4187 .type
= WREPL_TYPE_SGROUP
,
4188 .state
= WREPL_STATE_ACTIVE
,
4189 .node
= WREPL_NODE_B
,
4193 .apply_expected
= false,
4197 .type
= WREPL_TYPE_SGROUP
,
4198 .state
= WREPL_STATE_ACTIVE
,
4199 .node
= WREPL_NODE_B
,
4203 .apply_expected
= false,
4207 * sgroup,active vs. sgroup,active different addresses, but owner changed
4208 * => should be replaced
4211 .line
= __location__
,
4212 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4213 .comment
= "A:B_3_4 vs. B:A_3_4",
4217 .type
= WREPL_TYPE_SGROUP
,
4218 .state
= WREPL_STATE_ACTIVE
,
4219 .node
= WREPL_NODE_B
,
4221 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4222 .ips
= addresses_B_3_4
,
4223 .apply_expected
= true,
4227 .type
= WREPL_TYPE_SGROUP
,
4228 .state
= WREPL_STATE_ACTIVE
,
4229 .node
= WREPL_NODE_B
,
4231 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4232 .ips
= addresses_A_3_4
,
4233 .apply_expected
= true,
4234 .sgroup_cleanup
= true
4238 * sgroup,active vs. sgroup,active different addresses, but owner changed
4239 * => should be replaced
4242 .line
= __location__
,
4243 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4244 .comment
= "A:A_3_4 vs. B:A_3_4_OWNER_B",
4248 .type
= WREPL_TYPE_SGROUP
,
4249 .state
= WREPL_STATE_ACTIVE
,
4250 .node
= WREPL_NODE_B
,
4252 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4253 .ips
= addresses_A_3_4
,
4254 .apply_expected
= true,
4258 .type
= WREPL_TYPE_SGROUP
,
4259 .state
= WREPL_STATE_ACTIVE
,
4260 .node
= WREPL_NODE_B
,
4262 .num_ips
= ARRAY_SIZE(addresses_A_3_4_OWNER_B
),
4263 .ips
= addresses_A_3_4_OWNER_B
,
4264 .apply_expected
= true,
4265 .sgroup_cleanup
= true
4269 * sgroup,active vs. sgroup,active different addresses, but owner changed
4270 * => should be replaced
4273 .line
= __location__
,
4274 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4275 .comment
= "A:A_3_4_OWNER_B vs. B:A_3_4",
4279 .type
= WREPL_TYPE_SGROUP
,
4280 .state
= WREPL_STATE_ACTIVE
,
4281 .node
= WREPL_NODE_B
,
4283 .num_ips
= ARRAY_SIZE(addresses_A_3_4_OWNER_B
),
4284 .ips
= addresses_A_3_4_OWNER_B
,
4285 .apply_expected
= true,
4289 .type
= WREPL_TYPE_SGROUP
,
4290 .state
= WREPL_STATE_ACTIVE
,
4291 .node
= WREPL_NODE_B
,
4293 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4294 .ips
= addresses_A_3_4
,
4295 .apply_expected
= true,
4296 .sgroup_cleanup
= true
4300 * sgroup,active vs. sgroup,active different addresses
4301 * => should be merged
4304 .line
= __location__
,
4305 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4306 .comment
= "A:A_3_4 vs. B:B_3_4 => C:A_3_4_B_3_4",
4310 .type
= WREPL_TYPE_SGROUP
,
4311 .state
= WREPL_STATE_ACTIVE
,
4312 .node
= WREPL_NODE_B
,
4314 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4315 .ips
= addresses_A_3_4
,
4316 .apply_expected
= true,
4320 .type
= WREPL_TYPE_SGROUP
,
4321 .state
= WREPL_STATE_ACTIVE
,
4322 .node
= WREPL_NODE_B
,
4324 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4325 .ips
= addresses_B_3_4
,
4326 .sgroup_merge
= true,
4327 .sgroup_cleanup
= true,
4331 * sgroup,active vs. sgroup,active different addresses, special case...
4332 * => should be merged
4335 .line
= __location__
,
4336 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4337 .comment
= "A:B_3_4_X_3_4 vs. B:A_3_4 => B:A_3_4_X_3_4",
4341 .type
= WREPL_TYPE_SGROUP
,
4342 .state
= WREPL_STATE_ACTIVE
,
4343 .node
= WREPL_NODE_B
,
4345 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4346 .ips
= addresses_B_3_4_X_3_4
,
4347 .apply_expected
= true,
4351 .type
= WREPL_TYPE_SGROUP
,
4352 .state
= WREPL_STATE_ACTIVE
,
4353 .node
= WREPL_NODE_B
,
4355 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4356 .ips
= addresses_A_3_4
,
4357 .sgroup_merge
= true,
4358 .merge_owner
= &ctx
->b
,
4359 .sgroup_cleanup
= false
4363 .line
= __location__
,
4364 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4368 .type
= WREPL_TYPE_SGROUP
,
4369 .state
= WREPL_STATE_ACTIVE
,
4370 .node
= WREPL_NODE_B
,
4372 .num_ips
= ARRAY_SIZE(addresses_A_3_4_X_3_4_OWNER_B
),
4373 .ips
= addresses_A_3_4_X_3_4_OWNER_B
,
4374 .apply_expected
= true,
4378 .type
= WREPL_TYPE_SGROUP
,
4379 .state
= WREPL_STATE_ACTIVE
,
4380 .node
= WREPL_NODE_B
,
4384 .apply_expected
= false,
4388 * sgroup,active vs. sgroup,active different addresses, special case...
4389 * => should be merged
4392 .line
= __location__
,
4393 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4394 .comment
= "A:X_3_4 vs. B:A_3_4 => C:A_3_4_X_3_4",
4398 .type
= WREPL_TYPE_SGROUP
,
4399 .state
= WREPL_STATE_ACTIVE
,
4400 .node
= WREPL_NODE_B
,
4402 .num_ips
= ARRAY_SIZE(addresses_X_3_4
),
4403 .ips
= addresses_X_3_4
,
4404 .apply_expected
= true,
4408 .type
= WREPL_TYPE_SGROUP
,
4409 .state
= WREPL_STATE_ACTIVE
,
4410 .node
= WREPL_NODE_B
,
4412 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4413 .ips
= addresses_A_3_4
,
4414 .sgroup_merge
= true,
4415 .sgroup_cleanup
= false
4419 .line
= __location__
,
4420 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4424 .type
= WREPL_TYPE_SGROUP
,
4425 .state
= WREPL_STATE_ACTIVE
,
4426 .node
= WREPL_NODE_B
,
4430 .apply_expected
= false,
4434 .type
= WREPL_TYPE_SGROUP
,
4435 .state
= WREPL_STATE_ACTIVE
,
4436 .node
= WREPL_NODE_B
,
4440 .apply_expected
= false,
4444 * sgroup,active vs. sgroup,active different addresses, special case...
4445 * => should be merged
4448 .line
= __location__
,
4449 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4450 .comment
= "A:A_3_4_X_3_4 vs. B:A_3_4_OWNER_B => B:A_3_4_OWNER_B_X_3_4",
4454 .type
= WREPL_TYPE_SGROUP
,
4455 .state
= WREPL_STATE_ACTIVE
,
4456 .node
= WREPL_NODE_B
,
4458 .num_ips
= ARRAY_SIZE(addresses_A_3_4_X_3_4
),
4459 .ips
= addresses_A_3_4_X_3_4
,
4460 .apply_expected
= true,
4464 .type
= WREPL_TYPE_SGROUP
,
4465 .state
= WREPL_STATE_ACTIVE
,
4466 .node
= WREPL_NODE_B
,
4468 .num_ips
= ARRAY_SIZE(addresses_A_3_4_OWNER_B
),
4469 .ips
= addresses_A_3_4_OWNER_B
,
4470 .sgroup_merge
= true,
4471 .merge_owner
= &ctx
->b
,
4475 .line
= __location__
,
4476 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4480 .type
= WREPL_TYPE_SGROUP
,
4481 .state
= WREPL_STATE_ACTIVE
,
4482 .node
= WREPL_NODE_B
,
4486 .apply_expected
= false,
4490 .type
= WREPL_TYPE_SGROUP
,
4491 .state
= WREPL_STATE_ACTIVE
,
4492 .node
= WREPL_NODE_B
,
4496 .apply_expected
= false,
4500 * sgroup,active vs. sgroup,active partly different addresses, special case...
4501 * => should be merged
4504 .line
= __location__
,
4505 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4506 .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",
4510 .type
= WREPL_TYPE_SGROUP
,
4511 .state
= WREPL_STATE_ACTIVE
,
4512 .node
= WREPL_NODE_B
,
4514 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4515 .ips
= addresses_B_3_4_X_3_4
,
4516 .apply_expected
= true,
4520 .type
= WREPL_TYPE_SGROUP
,
4521 .state
= WREPL_STATE_ACTIVE
,
4522 .node
= WREPL_NODE_B
,
4524 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_1_2
),
4525 .ips
= addresses_B_3_4_X_1_2
,
4526 .sgroup_merge
= true,
4527 .sgroup_cleanup
= false
4531 .line
= __location__
,
4532 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4536 .type
= WREPL_TYPE_SGROUP
,
4537 .state
= WREPL_STATE_ACTIVE
,
4538 .node
= WREPL_NODE_B
,
4542 .apply_expected
= false,
4546 .type
= WREPL_TYPE_SGROUP
,
4547 .state
= WREPL_STATE_ACTIVE
,
4548 .node
= WREPL_NODE_B
,
4552 .apply_expected
= false,
4556 * sgroup,active vs. sgroup,active different addresses, special case...
4557 * => should be merged
4560 .line
= __location__
,
4561 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4562 .comment
= "A:A_3_4_B_3_4 vs. B:NULL => B:A_3_4",
4566 .type
= WREPL_TYPE_SGROUP
,
4567 .state
= WREPL_STATE_ACTIVE
,
4568 .node
= WREPL_NODE_B
,
4570 .num_ips
= ARRAY_SIZE(addresses_A_3_4_B_3_4
),
4571 .ips
= addresses_A_3_4_B_3_4
,
4572 .apply_expected
= true,
4576 .type
= WREPL_TYPE_SGROUP
,
4577 .state
= WREPL_STATE_ACTIVE
,
4578 .node
= WREPL_NODE_B
,
4582 .sgroup_merge
= true,
4583 .merge_owner
= &ctx
->b
,
4584 .sgroup_cleanup
= true
4588 .line
= __location__
,
4589 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4593 .type
= WREPL_TYPE_SGROUP
,
4594 .state
= WREPL_STATE_ACTIVE
,
4595 .node
= WREPL_NODE_B
,
4599 .apply_expected
= false,
4603 .type
= WREPL_TYPE_UNIQUE
,
4604 .state
= WREPL_STATE_TOMBSTONE
,
4605 .node
= WREPL_NODE_B
,
4607 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4608 .ips
= addresses_A_1
,
4609 .apply_expected
= true,
4613 * sgroup,active vs. sgroup,active different addresses, special case...
4614 * => should be merged
4617 .line
= __location__
,
4618 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4619 .comment
= "A:B_3_4_X_3_4 vs. B:NULL => B:X_3_4",
4623 .type
= WREPL_TYPE_SGROUP
,
4624 .state
= WREPL_STATE_ACTIVE
,
4625 .node
= WREPL_NODE_B
,
4627 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4628 .ips
= addresses_B_3_4_X_3_4
,
4629 .apply_expected
= true,
4633 .type
= WREPL_TYPE_SGROUP
,
4634 .state
= WREPL_STATE_ACTIVE
,
4635 .node
= WREPL_NODE_B
,
4639 .sgroup_merge
= true,
4640 .merge_owner
= &ctx
->b
,
4641 .sgroup_cleanup
= true
4645 .line
= __location__
,
4646 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4650 .type
= WREPL_TYPE_SGROUP
,
4651 .state
= WREPL_STATE_ACTIVE
,
4652 .node
= WREPL_NODE_B
,
4656 .apply_expected
= false,
4660 .type
= WREPL_TYPE_UNIQUE
,
4661 .state
= WREPL_STATE_TOMBSTONE
,
4662 .node
= WREPL_NODE_B
,
4664 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4665 .ips
= addresses_A_1
,
4666 .apply_expected
= true,
4671 * sgroup,active vs. sgroup,tombstone different no addresses, special
4672 * => should be replaced
4675 .line
= __location__
,
4676 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4677 .comment
= "A:B_3_4_X_3_4 vs. B:NULL => B:NULL",
4681 .type
= WREPL_TYPE_SGROUP
,
4682 .state
= WREPL_STATE_ACTIVE
,
4683 .node
= WREPL_NODE_B
,
4685 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4686 .ips
= addresses_B_3_4_X_3_4
,
4687 .apply_expected
= true,
4691 .type
= WREPL_TYPE_SGROUP
,
4692 .state
= WREPL_STATE_TOMBSTONE
,
4693 .node
= WREPL_NODE_B
,
4697 .apply_expected
= true,
4701 * sgroup,active vs. sgroup,tombstone different addresses
4702 * => should be replaced
4705 .line
= __location__
,
4706 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4707 .comment
= "A:B_3_4_X_3_4 vs. B:A_3_4 => B:A_3_4",
4711 .type
= WREPL_TYPE_SGROUP
,
4712 .state
= WREPL_STATE_ACTIVE
,
4713 .node
= WREPL_NODE_B
,
4715 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4716 .ips
= addresses_B_3_4_X_3_4
,
4717 .apply_expected
= true,
4721 .type
= WREPL_TYPE_SGROUP
,
4722 .state
= WREPL_STATE_TOMBSTONE
,
4723 .node
= WREPL_NODE_B
,
4725 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4726 .ips
= addresses_A_3_4
,
4727 .apply_expected
= true,
4731 * sgroup,active vs. sgroup,tombstone subset addresses
4732 * => should be replaced
4735 .line
= __location__
,
4736 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4737 .comment
= "A:B_3_4_X_3_4 vs. B:B_3_4 => B:B_3_4",
4741 .type
= WREPL_TYPE_SGROUP
,
4742 .state
= WREPL_STATE_ACTIVE
,
4743 .node
= WREPL_NODE_B
,
4745 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4746 .ips
= addresses_B_3_4_X_3_4
,
4747 .apply_expected
= true,
4751 .type
= WREPL_TYPE_SGROUP
,
4752 .state
= WREPL_STATE_TOMBSTONE
,
4753 .node
= WREPL_NODE_B
,
4755 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4756 .ips
= addresses_B_3_4
,
4757 .apply_expected
= true,
4761 * sgroup,active vs. sgroup,active same addresses
4762 * => should be replaced
4765 .line
= __location__
,
4766 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4767 .comment
= "A:B_3_4_X_3_4 vs. B:B_3_4_X_3_4 => B:B_3_4_X_3_4",
4771 .type
= WREPL_TYPE_SGROUP
,
4772 .state
= WREPL_STATE_ACTIVE
,
4773 .node
= WREPL_NODE_B
,
4775 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4776 .ips
= addresses_B_3_4_X_3_4
,
4777 .apply_expected
= true,
4781 .type
= WREPL_TYPE_SGROUP
,
4782 .state
= WREPL_STATE_TOMBSTONE
,
4783 .node
= WREPL_NODE_B
,
4785 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4786 .ips
= addresses_B_3_4_X_3_4
,
4787 .apply_expected
= true,
4792 * This should be the last record in this array,
4793 * we need to make sure the we leave a tombstoned unique entry
4797 .line
= __location__
,
4798 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4802 .type
= WREPL_TYPE_UNIQUE
,
4803 .state
= WREPL_STATE_TOMBSTONE
,
4804 .node
= WREPL_NODE_B
,
4806 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4807 .ips
= addresses_A_1
,
4808 .apply_expected
= true
4812 .type
= WREPL_TYPE_UNIQUE
,
4813 .state
= WREPL_STATE_TOMBSTONE
,
4814 .node
= WREPL_NODE_B
,
4816 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4817 .ips
= addresses_A_1
,
4818 .apply_expected
= true
4820 }}; /* do not add entries here, this should be the last record! */
4822 wins_name_r1
= &wins_name1
;
4823 wins_name_r2
= &wins_name2
;
4825 torture_comment(tctx
, "Test Replica Conflicts with different owners\n");
4827 for(i
=0; ret
&& i
< ARRAY_SIZE(records
); i
++) {
4829 if (!records
[i
].extra
&& !records
[i
].cleanup
) {
4830 /* we should test the worst cases */
4831 if (records
[i
].r2
.apply_expected
&& records
[i
].r1
.ips
==records
[i
].r2
.ips
) {
4832 torture_comment(tctx
, "(%s) Programmer error, invalid record[%u]: %s\n",
4833 __location__
, i
, records
[i
].line
);
4835 } else if (!records
[i
].r2
.apply_expected
&& records
[i
].r1
.ips
!=records
[i
].r2
.ips
) {
4836 torture_comment(tctx
, "(%s) Programmer error, invalid record[%u]: %s\n",
4837 __location__
, i
, records
[i
].line
);
4842 if (!records
[i
].cleanup
) {
4843 const char *expected
;
4846 if (records
[i
].r2
.sgroup_merge
) {
4847 expected
= "SGROUP_MERGE";
4848 } else if (records
[i
].r2
.apply_expected
) {
4849 expected
= "REPLACE";
4851 expected
= "NOT REPLACE";
4854 if (!records
[i
].r1
.ips
&& !records
[i
].r2
.ips
) {
4855 ips
= "with no ip(s)";
4856 } else if (records
[i
].r1
.ips
==records
[i
].r2
.ips
) {
4857 ips
= "with same ip(s)";
4859 ips
= "with different ip(s)";
4862 torture_comment(tctx
, "%s,%s%s vs. %s,%s%s %s => %s\n",
4863 wrepl_name_type_string(records
[i
].r1
.type
),
4864 wrepl_name_state_string(records
[i
].r1
.state
),
4865 (records
[i
].r1
.is_static
?",static":""),
4866 wrepl_name_type_string(records
[i
].r2
.type
),
4867 wrepl_name_state_string(records
[i
].r2
.state
),
4868 (records
[i
].r2
.is_static
?",static":""),
4869 (records
[i
].comment
?records
[i
].comment
:ips
),
4876 wins_name_r1
->name
= &records
[i
].name
;
4877 wins_name_r1
->flags
= WREPL_NAME_FLAGS(records
[i
].r1
.type
,
4878 records
[i
].r1
.state
,
4880 records
[i
].r1
.is_static
);
4881 wins_name_r1
->id
= ++records
[i
].r1
.owner
->max_version
;
4882 if (wins_name_r1
->flags
& 2) {
4883 wins_name_r1
->addresses
.addresses
.num_ips
= records
[i
].r1
.num_ips
;
4884 wins_name_r1
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
4887 wins_name_r1
->addresses
.ip
= records
[i
].r1
.ips
[0].ip
;
4889 wins_name_r1
->unknown
= "255.255.255.255";
4892 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r1
.owner
, wins_name_r1
);
4893 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r1
.owner
,
4894 wins_name_r1
, records
[i
].r1
.apply_expected
);
4899 wins_name_r2
->name
= &records
[i
].name
;
4900 wins_name_r2
->flags
= WREPL_NAME_FLAGS(records
[i
].r2
.type
,
4901 records
[i
].r2
.state
,
4903 records
[i
].r2
.is_static
);
4904 wins_name_r2
->id
= ++records
[i
].r2
.owner
->max_version
;
4905 if (wins_name_r2
->flags
& 2) {
4906 wins_name_r2
->addresses
.addresses
.num_ips
= records
[i
].r2
.num_ips
;
4907 wins_name_r2
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
4910 wins_name_r2
->addresses
.ip
= records
[i
].r2
.ips
[0].ip
;
4912 wins_name_r2
->unknown
= "255.255.255.255";
4915 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
);
4916 if (records
[i
].r1
.state
== WREPL_STATE_RELEASED
) {
4917 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r1
.owner
,
4918 wins_name_r1
, false);
4919 } else if (records
[i
].r2
.sgroup_merge
) {
4920 ret
&= test_wrepl_sgroup_merged(tctx
, ctx
, records
[i
].r2
.merge_owner
,
4921 records
[i
].r1
.owner
,
4922 records
[i
].r1
.num_ips
, records
[i
].r1
.ips
,
4923 records
[i
].r2
.owner
,
4924 records
[i
].r2
.num_ips
, records
[i
].r2
.ips
,
4926 } else if (records
[i
].r1
.owner
!= records
[i
].r2
.owner
) {
4928 _expected
= (records
[i
].r1
.apply_expected
&& !records
[i
].r2
.apply_expected
);
4929 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r1
.owner
,
4930 wins_name_r1
, _expected
);
4932 if (records
[i
].r2
.state
== WREPL_STATE_RELEASED
) {
4933 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r2
.owner
,
4934 wins_name_r2
, false);
4935 } else if (!records
[i
].r2
.sgroup_merge
) {
4936 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r2
.owner
,
4937 wins_name_r2
, records
[i
].r2
.apply_expected
);
4940 if (records
[i
].r2
.sgroup_cleanup
) {
4942 torture_comment(tctx
, "failed before sgroup_cleanup record[%u]: %s\n", i
, records
[i
].line
);
4946 /* clean up the SGROUP record */
4947 wins_name_r1
->name
= &records
[i
].name
;
4948 wins_name_r1
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
4950 WREPL_NODE_B
, false);
4951 wins_name_r1
->id
= ++records
[i
].r1
.owner
->max_version
;
4952 wins_name_r1
->addresses
.addresses
.num_ips
= 0;
4953 wins_name_r1
->addresses
.addresses
.ips
= NULL
;
4954 wins_name_r1
->unknown
= "255.255.255.255";
4955 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r1
.owner
, wins_name_r1
);
4957 /* here we test how names from an owner are deleted */
4958 if (records
[i
].r2
.sgroup_merge
&& records
[i
].r2
.num_ips
) {
4959 ret
&= test_wrepl_sgroup_merged(tctx
, ctx
, NULL
,
4960 records
[i
].r2
.owner
,
4961 records
[i
].r2
.num_ips
, records
[i
].r2
.ips
,
4962 records
[i
].r1
.owner
,
4967 /* clean up the SGROUP record */
4968 wins_name_r2
->name
= &records
[i
].name
;
4969 wins_name_r2
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
4971 WREPL_NODE_B
, false);
4972 wins_name_r2
->id
= ++records
[i
].r2
.owner
->max_version
;
4973 wins_name_r2
->addresses
.addresses
.num_ips
= 0;
4974 wins_name_r2
->addresses
.addresses
.ips
= NULL
;
4975 wins_name_r2
->unknown
= "255.255.255.255";
4976 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
);
4978 /* take ownership of the SGROUP record */
4979 wins_name_r2
->name
= &records
[i
].name
;
4980 wins_name_r2
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
4982 WREPL_NODE_B
, false);
4983 wins_name_r2
->id
= ++records
[i
].r2
.owner
->max_version
;
4984 wins_name_r2
->addresses
.addresses
.num_ips
= ARRAY_SIZE(addresses_B_1
);
4985 wins_name_r2
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
4987 wins_name_r2
->unknown
= "255.255.255.255";
4988 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
);
4989 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
, true);
4991 /* overwrite the SGROUP record with unique,tombstone */
4992 wins_name_r2
->name
= &records
[i
].name
;
4993 wins_name_r2
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
4994 WREPL_STATE_TOMBSTONE
,
4995 WREPL_NODE_B
, false);
4996 wins_name_r2
->id
= ++records
[i
].r2
.owner
->max_version
;
4997 wins_name_r2
->addresses
.addresses
.num_ips
= ARRAY_SIZE(addresses_B_1
);
4998 wins_name_r2
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
5000 wins_name_r2
->unknown
= "255.255.255.255";
5001 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
);
5002 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
, true);
5005 torture_comment(tctx
, "failed in sgroup_cleanup record[%u]: %s\n", i
, records
[i
].line
);
5010 /* the first one is a cleanup run */
5011 if (!ret
&& i
== 0) ret
= true;
5014 torture_comment(tctx
, "conflict handled wrong or record[%u]: %s\n", i
, records
[i
].line
);
5022 static bool test_conflict_owned_released_vs_replica(struct torture_context
*tctx
,
5023 struct test_wrepl_conflict_conn
*ctx
)
5027 struct wrepl_wins_name wins_name_
;
5028 struct wrepl_wins_name
*wins_name
= &wins_name_
;
5029 struct nbt_name_register name_register_
;
5030 struct nbt_name_register
*name_register
= &name_register_
;
5031 struct nbt_name_release release_
;
5032 struct nbt_name_release
*release
= &release_
;
5035 const char *line
; /* just better debugging */
5036 struct nbt_name name
;
5041 const struct wrepl_ip
*ips
;
5042 bool apply_expected
;
5045 enum wrepl_name_type type
;
5046 enum wrepl_name_state state
;
5047 enum wrepl_name_node node
;
5050 const struct wrepl_ip
*ips
;
5051 bool apply_expected
;
5055 * unique vs. unique section
5058 * unique,released vs. unique,active with same ip(s)
5061 .line
= __location__
,
5062 .name
= _NBT_NAME("_UR_UA_SI", 0x00, NULL
),
5066 .num_ips
= ctx
->addresses_best_num
,
5067 .ips
= ctx
->addresses_best
,
5068 .apply_expected
= true
5071 .type
= WREPL_TYPE_UNIQUE
,
5072 .state
= WREPL_STATE_ACTIVE
,
5073 .node
= WREPL_NODE_B
,
5075 .num_ips
= ctx
->addresses_best_num
,
5076 .ips
= ctx
->addresses_best
,
5077 .apply_expected
= true
5081 * unique,released vs. unique,active with different ip(s)
5084 .line
= __location__
,
5085 .name
= _NBT_NAME("_UR_UA_DI", 0x00, NULL
),
5089 .num_ips
= ctx
->addresses_best_num
,
5090 .ips
= ctx
->addresses_best
,
5091 .apply_expected
= true
5094 .type
= WREPL_TYPE_UNIQUE
,
5095 .state
= WREPL_STATE_ACTIVE
,
5096 .node
= WREPL_NODE_B
,
5098 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5099 .ips
= addresses_B_1
,
5100 .apply_expected
= true
5104 * unique,released vs. unique,tombstone with same ip(s)
5107 .line
= __location__
,
5108 .name
= _NBT_NAME("_UR_UT_SI", 0x00, NULL
),
5112 .num_ips
= ctx
->addresses_best_num
,
5113 .ips
= ctx
->addresses_best
,
5114 .apply_expected
= true
5117 .type
= WREPL_TYPE_UNIQUE
,
5118 .state
= WREPL_STATE_TOMBSTONE
,
5119 .node
= WREPL_NODE_B
,
5121 .num_ips
= ctx
->addresses_best_num
,
5122 .ips
= ctx
->addresses_best
,
5123 .apply_expected
= true
5127 * unique,released vs. unique,tombstone with different ip(s)
5130 .line
= __location__
,
5131 .name
= _NBT_NAME("_UR_UT_DI", 0x00, NULL
),
5135 .num_ips
= ctx
->addresses_best_num
,
5136 .ips
= ctx
->addresses_best
,
5137 .apply_expected
= true
5140 .type
= WREPL_TYPE_UNIQUE
,
5141 .state
= WREPL_STATE_TOMBSTONE
,
5142 .node
= WREPL_NODE_B
,
5144 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5145 .ips
= addresses_B_1
,
5146 .apply_expected
= true
5150 * unique vs. group section
5153 * unique,released vs. group,active with same ip(s)
5156 .line
= __location__
,
5157 .name
= _NBT_NAME("_UR_GA_SI", 0x00, NULL
),
5161 .num_ips
= ctx
->addresses_best_num
,
5162 .ips
= ctx
->addresses_best
,
5163 .apply_expected
= true
5166 .type
= WREPL_TYPE_GROUP
,
5167 .state
= WREPL_STATE_ACTIVE
,
5168 .node
= WREPL_NODE_B
,
5170 .num_ips
= ctx
->addresses_best_num
,
5171 .ips
= ctx
->addresses_best
,
5172 .apply_expected
= true
5176 * unique,released vs. group,active with different ip(s)
5179 .line
= __location__
,
5180 .name
= _NBT_NAME("_UR_GA_DI", 0x00, NULL
),
5184 .num_ips
= ctx
->addresses_best_num
,
5185 .ips
= ctx
->addresses_best
,
5186 .apply_expected
= true
5189 .type
= WREPL_TYPE_GROUP
,
5190 .state
= WREPL_STATE_ACTIVE
,
5191 .node
= WREPL_NODE_B
,
5193 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5194 .ips
= addresses_B_1
,
5195 .apply_expected
= true
5199 * unique,released vs. group,tombstone with same ip(s)
5202 .line
= __location__
,
5203 .name
= _NBT_NAME("_UR_GT_SI", 0x00, NULL
),
5207 .num_ips
= ctx
->addresses_best_num
,
5208 .ips
= ctx
->addresses_best
,
5209 .apply_expected
= true
5212 .type
= WREPL_TYPE_GROUP
,
5213 .state
= WREPL_STATE_TOMBSTONE
,
5214 .node
= WREPL_NODE_B
,
5216 .num_ips
= ctx
->addresses_best_num
,
5217 .ips
= ctx
->addresses_best
,
5218 .apply_expected
= true
5222 * unique,released vs. group,tombstone with different ip(s)
5225 .line
= __location__
,
5226 .name
= _NBT_NAME("_UR_GT_DI", 0x00, NULL
),
5230 .num_ips
= ctx
->addresses_best_num
,
5231 .ips
= ctx
->addresses_best
,
5232 .apply_expected
= true
5235 .type
= WREPL_TYPE_GROUP
,
5236 .state
= WREPL_STATE_TOMBSTONE
,
5237 .node
= WREPL_NODE_B
,
5239 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5240 .ips
= addresses_B_1
,
5241 .apply_expected
= true
5245 * unique vs. special group section
5248 * unique,released vs. sgroup,active with same ip(s)
5251 .line
= __location__
,
5252 .name
= _NBT_NAME("_UR_SA_SI", 0x00, NULL
),
5256 .num_ips
= ctx
->addresses_best_num
,
5257 .ips
= ctx
->addresses_best
,
5258 .apply_expected
= true
5261 .type
= WREPL_TYPE_SGROUP
,
5262 .state
= WREPL_STATE_ACTIVE
,
5263 .node
= WREPL_NODE_B
,
5265 .num_ips
= ctx
->addresses_best_num
,
5266 .ips
= ctx
->addresses_best
,
5267 .apply_expected
= true
5271 * unique,released vs. sgroup,active with different ip(s)
5274 .line
= __location__
,
5275 .name
= _NBT_NAME("_UR_SA_DI", 0x00, NULL
),
5279 .num_ips
= ctx
->addresses_best_num
,
5280 .ips
= ctx
->addresses_best
,
5281 .apply_expected
= true
5284 .type
= WREPL_TYPE_SGROUP
,
5285 .state
= WREPL_STATE_ACTIVE
,
5286 .node
= WREPL_NODE_B
,
5288 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5289 .ips
= addresses_B_1
,
5290 .apply_expected
= true
5294 * unique,released vs. sgroup,tombstone with same ip(s)
5297 .line
= __location__
,
5298 .name
= _NBT_NAME("_UR_ST_SI", 0x00, NULL
),
5302 .num_ips
= ctx
->addresses_best_num
,
5303 .ips
= ctx
->addresses_best
,
5304 .apply_expected
= true
5307 .type
= WREPL_TYPE_SGROUP
,
5308 .state
= WREPL_STATE_TOMBSTONE
,
5309 .node
= WREPL_NODE_B
,
5311 .num_ips
= ctx
->addresses_best_num
,
5312 .ips
= ctx
->addresses_best
,
5313 .apply_expected
= true
5317 * unique,released vs. sgroup,tombstone with different ip(s)
5320 .line
= __location__
,
5321 .name
= _NBT_NAME("_UR_ST_DI", 0x00, NULL
),
5325 .num_ips
= ctx
->addresses_best_num
,
5326 .ips
= ctx
->addresses_best
,
5327 .apply_expected
= true
5330 .type
= WREPL_TYPE_SGROUP
,
5331 .state
= WREPL_STATE_TOMBSTONE
,
5332 .node
= WREPL_NODE_B
,
5334 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5335 .ips
= addresses_B_1
,
5336 .apply_expected
= true
5340 * unique vs. multi homed section
5343 * unique,released vs. mhomed,active with same ip(s)
5346 .line
= __location__
,
5347 .name
= _NBT_NAME("_UR_MA_SI", 0x00, NULL
),
5351 .num_ips
= ctx
->addresses_best_num
,
5352 .ips
= ctx
->addresses_best
,
5353 .apply_expected
= true
5356 .type
= WREPL_TYPE_MHOMED
,
5357 .state
= WREPL_STATE_ACTIVE
,
5358 .node
= WREPL_NODE_B
,
5360 .num_ips
= ctx
->addresses_best_num
,
5361 .ips
= ctx
->addresses_best
,
5362 .apply_expected
= true
5366 * unique,released vs. mhomed,active with different ip(s)
5369 .line
= __location__
,
5370 .name
= _NBT_NAME("_UR_MA_DI", 0x00, NULL
),
5374 .num_ips
= ctx
->addresses_best_num
,
5375 .ips
= ctx
->addresses_best
,
5376 .apply_expected
= true
5379 .type
= WREPL_TYPE_MHOMED
,
5380 .state
= WREPL_STATE_ACTIVE
,
5381 .node
= WREPL_NODE_B
,
5383 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5384 .ips
= addresses_B_1
,
5385 .apply_expected
= true
5389 * unique,released vs. mhomed,tombstone with same ip(s)
5392 .line
= __location__
,
5393 .name
= _NBT_NAME("_UR_MT_SI", 0x00, NULL
),
5397 .num_ips
= ctx
->addresses_best_num
,
5398 .ips
= ctx
->addresses_best
,
5399 .apply_expected
= true
5402 .type
= WREPL_TYPE_MHOMED
,
5403 .state
= WREPL_STATE_TOMBSTONE
,
5404 .node
= WREPL_NODE_B
,
5406 .num_ips
= ctx
->addresses_best_num
,
5407 .ips
= ctx
->addresses_best
,
5408 .apply_expected
= true
5412 * unique,released vs. mhomed,tombstone with different ip(s)
5415 .line
= __location__
,
5416 .name
= _NBT_NAME("_UR_MT_DI", 0x00, NULL
),
5420 .num_ips
= ctx
->addresses_best_num
,
5421 .ips
= ctx
->addresses_best
,
5422 .apply_expected
= true
5425 .type
= WREPL_TYPE_MHOMED
,
5426 .state
= WREPL_STATE_TOMBSTONE
,
5427 .node
= WREPL_NODE_B
,
5429 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5430 .ips
= addresses_B_1
,
5431 .apply_expected
= true
5435 * group vs. unique section
5438 * group,released vs. unique,active with same ip(s)
5441 .line
= __location__
,
5442 .name
= _NBT_NAME("_GR_UA_SI", 0x00, NULL
),
5444 .nb_flags
= NBT_NM_GROUP
,
5446 .num_ips
= ctx
->addresses_best_num
,
5447 .ips
= ctx
->addresses_best
,
5448 .apply_expected
= true
5451 .type
= WREPL_TYPE_UNIQUE
,
5452 .state
= WREPL_STATE_ACTIVE
,
5453 .node
= WREPL_NODE_B
,
5455 .num_ips
= ctx
->addresses_best_num
,
5456 .ips
= ctx
->addresses_best
,
5457 .apply_expected
= false
5461 * group,released vs. unique,active with different ip(s)
5464 .line
= __location__
,
5465 .name
= _NBT_NAME("_GR_UA_DI", 0x00, NULL
),
5467 .nb_flags
= NBT_NM_GROUP
,
5469 .num_ips
= ctx
->addresses_best_num
,
5470 .ips
= ctx
->addresses_best
,
5471 .apply_expected
= true
5474 .type
= WREPL_TYPE_UNIQUE
,
5475 .state
= WREPL_STATE_ACTIVE
,
5476 .node
= WREPL_NODE_B
,
5478 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5479 .ips
= addresses_B_1
,
5480 .apply_expected
= false
5484 * group,released vs. unique,tombstone with same ip(s)
5487 .line
= __location__
,
5488 .name
= _NBT_NAME("_GR_UT_SI", 0x00, NULL
),
5490 .nb_flags
= NBT_NM_GROUP
,
5492 .num_ips
= ctx
->addresses_best_num
,
5493 .ips
= ctx
->addresses_best
,
5494 .apply_expected
= true
5497 .type
= WREPL_TYPE_UNIQUE
,
5498 .state
= WREPL_STATE_TOMBSTONE
,
5499 .node
= WREPL_NODE_B
,
5501 .num_ips
= ctx
->addresses_best_num
,
5502 .ips
= ctx
->addresses_best
,
5503 .apply_expected
= false
5507 * group,released vs. unique,tombstone with different ip(s)
5510 .line
= __location__
,
5511 .name
= _NBT_NAME("_GR_UT_DI", 0x00, NULL
),
5513 .nb_flags
= NBT_NM_GROUP
,
5515 .num_ips
= ctx
->addresses_best_num
,
5516 .ips
= ctx
->addresses_best
,
5517 .apply_expected
= true
5520 .type
= WREPL_TYPE_UNIQUE
,
5521 .state
= WREPL_STATE_TOMBSTONE
,
5522 .node
= WREPL_NODE_B
,
5524 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5525 .ips
= addresses_B_1
,
5526 .apply_expected
= false
5530 * group vs. group section
5533 * group,released vs. group,active with same ip(s)
5536 .line
= __location__
,
5537 .name
= _NBT_NAME("_GR_GA_SI", 0x00, NULL
),
5539 .nb_flags
= NBT_NM_GROUP
,
5541 .num_ips
= ctx
->addresses_best_num
,
5542 .ips
= ctx
->addresses_best
,
5543 .apply_expected
= true
5546 .type
= WREPL_TYPE_GROUP
,
5547 .state
= WREPL_STATE_ACTIVE
,
5548 .node
= WREPL_NODE_B
,
5550 .num_ips
= ctx
->addresses_best_num
,
5551 .ips
= ctx
->addresses_best
,
5552 .apply_expected
= true
5556 * group,released vs. group,active with different ip(s)
5559 .line
= __location__
,
5560 .name
= _NBT_NAME("_GR_GA_DI", 0x00, NULL
),
5562 .nb_flags
= NBT_NM_GROUP
,
5564 .num_ips
= ctx
->addresses_best_num
,
5565 .ips
= ctx
->addresses_best
,
5566 .apply_expected
= true
5569 .type
= WREPL_TYPE_GROUP
,
5570 .state
= WREPL_STATE_ACTIVE
,
5571 .node
= WREPL_NODE_B
,
5573 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5574 .ips
= addresses_B_1
,
5575 .apply_expected
= true
5579 * group,released vs. group,tombstone with same ip(s)
5582 .line
= __location__
,
5583 .name
= _NBT_NAME("_GR_GT_SI", 0x00, NULL
),
5585 .nb_flags
= NBT_NM_GROUP
,
5587 .num_ips
= ctx
->addresses_best_num
,
5588 .ips
= ctx
->addresses_best
,
5589 .apply_expected
= true
5592 .type
= WREPL_TYPE_GROUP
,
5593 .state
= WREPL_STATE_TOMBSTONE
,
5594 .node
= WREPL_NODE_B
,
5596 .num_ips
= ctx
->addresses_best_num
,
5597 .ips
= ctx
->addresses_best
,
5598 .apply_expected
= true
5602 * group,released vs. group,tombstone with different ip(s)
5605 .line
= __location__
,
5606 .name
= _NBT_NAME("_GR_GT_DI", 0x00, NULL
),
5608 .nb_flags
= NBT_NM_GROUP
,
5610 .num_ips
= ctx
->addresses_best_num
,
5611 .ips
= ctx
->addresses_best
,
5612 .apply_expected
= true
5615 .type
= WREPL_TYPE_GROUP
,
5616 .state
= WREPL_STATE_TOMBSTONE
,
5617 .node
= WREPL_NODE_B
,
5619 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5620 .ips
= addresses_B_1
,
5621 .apply_expected
= true
5625 * group vs. special group section
5628 * group,released vs. sgroup,active with same ip(s)
5631 .line
= __location__
,
5632 .name
= _NBT_NAME("_GR_SA_SI", 0x00, NULL
),
5634 .nb_flags
= NBT_NM_GROUP
,
5636 .num_ips
= ctx
->addresses_best_num
,
5637 .ips
= ctx
->addresses_best
,
5638 .apply_expected
= true
5641 .type
= WREPL_TYPE_SGROUP
,
5642 .state
= WREPL_STATE_ACTIVE
,
5643 .node
= WREPL_NODE_B
,
5645 .num_ips
= ctx
->addresses_best_num
,
5646 .ips
= ctx
->addresses_best
,
5647 .apply_expected
= false
5651 * group,released vs. sgroup,active with different ip(s)
5654 .line
= __location__
,
5655 .name
= _NBT_NAME("_GR_SA_DI", 0x00, NULL
),
5657 .nb_flags
= NBT_NM_GROUP
,
5659 .num_ips
= ctx
->addresses_best_num
,
5660 .ips
= ctx
->addresses_best
,
5661 .apply_expected
= true
5664 .type
= WREPL_TYPE_SGROUP
,
5665 .state
= WREPL_STATE_ACTIVE
,
5666 .node
= WREPL_NODE_B
,
5668 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5669 .ips
= addresses_B_1
,
5670 .apply_expected
= false
5674 * group,released vs. sgroup,tombstone with same ip(s)
5677 .line
= __location__
,
5678 .name
= _NBT_NAME("_GR_ST_SI", 0x00, NULL
),
5680 .nb_flags
= NBT_NM_GROUP
,
5682 .num_ips
= ctx
->addresses_best_num
,
5683 .ips
= ctx
->addresses_best
,
5684 .apply_expected
= true
5687 .type
= WREPL_TYPE_SGROUP
,
5688 .state
= WREPL_STATE_TOMBSTONE
,
5689 .node
= WREPL_NODE_B
,
5691 .num_ips
= ctx
->addresses_best_num
,
5692 .ips
= ctx
->addresses_best
,
5693 .apply_expected
= false
5697 * group,released vs. sgroup,tombstone with different ip(s)
5700 .line
= __location__
,
5701 .name
= _NBT_NAME("_GR_ST_DI", 0x00, NULL
),
5703 .nb_flags
= NBT_NM_GROUP
,
5705 .num_ips
= ctx
->addresses_best_num
,
5706 .ips
= ctx
->addresses_best
,
5707 .apply_expected
= true
5710 .type
= WREPL_TYPE_SGROUP
,
5711 .state
= WREPL_STATE_TOMBSTONE
,
5712 .node
= WREPL_NODE_B
,
5714 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5715 .ips
= addresses_B_1
,
5716 .apply_expected
= false
5720 * group vs. multi homed section
5723 * group,released vs. mhomed,active with same ip(s)
5726 .line
= __location__
,
5727 .name
= _NBT_NAME("_GR_MA_SI", 0x00, NULL
),
5729 .nb_flags
= NBT_NM_GROUP
,
5731 .num_ips
= ctx
->addresses_best_num
,
5732 .ips
= ctx
->addresses_best
,
5733 .apply_expected
= true
5736 .type
= WREPL_TYPE_MHOMED
,
5737 .state
= WREPL_STATE_ACTIVE
,
5738 .node
= WREPL_NODE_B
,
5740 .num_ips
= ctx
->addresses_best_num
,
5741 .ips
= ctx
->addresses_best
,
5742 .apply_expected
= false
5746 * group,released vs. mhomed,active with different ip(s)
5749 .line
= __location__
,
5750 .name
= _NBT_NAME("_GR_MA_DI", 0x00, NULL
),
5752 .nb_flags
= NBT_NM_GROUP
,
5754 .num_ips
= ctx
->addresses_best_num
,
5755 .ips
= ctx
->addresses_best
,
5756 .apply_expected
= true
5759 .type
= WREPL_TYPE_MHOMED
,
5760 .state
= WREPL_STATE_ACTIVE
,
5761 .node
= WREPL_NODE_B
,
5763 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5764 .ips
= addresses_B_1
,
5765 .apply_expected
= false
5769 * group,released vs. mhomed,tombstone with same ip(s)
5772 .line
= __location__
,
5773 .name
= _NBT_NAME("_GR_MT_SI", 0x00, NULL
),
5775 .nb_flags
= NBT_NM_GROUP
,
5777 .num_ips
= ctx
->addresses_best_num
,
5778 .ips
= ctx
->addresses_best
,
5779 .apply_expected
= true
5782 .type
= WREPL_TYPE_MHOMED
,
5783 .state
= WREPL_STATE_TOMBSTONE
,
5784 .node
= WREPL_NODE_B
,
5786 .num_ips
= ctx
->addresses_best_num
,
5787 .ips
= ctx
->addresses_best
,
5788 .apply_expected
= false
5792 * group,released vs. mhomed,tombstone with different ip(s)
5795 .line
= __location__
,
5796 .name
= _NBT_NAME("_GR_MT_DI", 0x00, NULL
),
5798 .nb_flags
= NBT_NM_GROUP
,
5800 .num_ips
= ctx
->addresses_best_num
,
5801 .ips
= ctx
->addresses_best
,
5802 .apply_expected
= true
5805 .type
= WREPL_TYPE_MHOMED
,
5806 .state
= WREPL_STATE_TOMBSTONE
,
5807 .node
= WREPL_NODE_B
,
5809 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5810 .ips
= addresses_B_1
,
5811 .apply_expected
= false
5815 * special group vs. unique section
5818 * sgroup,released vs. unique,active with same ip(s)
5821 .line
= __location__
,
5822 .name
= _NBT_NAME("_SR_UA_SI", 0x1C, NULL
),
5824 .nb_flags
= NBT_NM_GROUP
,
5826 .num_ips
= ctx
->addresses_best_num
,
5827 .ips
= ctx
->addresses_best
,
5828 .apply_expected
= true
5831 .type
= WREPL_TYPE_UNIQUE
,
5832 .state
= WREPL_STATE_ACTIVE
,
5833 .node
= WREPL_NODE_B
,
5835 .num_ips
= ctx
->addresses_best_num
,
5836 .ips
= ctx
->addresses_best
,
5837 .apply_expected
= true
5841 * sgroup,released vs. unique,active with different ip(s)
5844 .line
= __location__
,
5845 .name
= _NBT_NAME("_SR_UA_DI", 0x1C, NULL
),
5847 .nb_flags
= NBT_NM_GROUP
,
5849 .num_ips
= ctx
->addresses_best_num
,
5850 .ips
= ctx
->addresses_best
,
5851 .apply_expected
= true
5854 .type
= WREPL_TYPE_UNIQUE
,
5855 .state
= WREPL_STATE_ACTIVE
,
5856 .node
= WREPL_NODE_B
,
5858 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5859 .ips
= addresses_B_1
,
5860 .apply_expected
= true
5864 * sgroup,released vs. unique,tombstone with same ip(s)
5867 .line
= __location__
,
5868 .name
= _NBT_NAME("_SR_UT_SI", 0x1C, NULL
),
5870 .nb_flags
= NBT_NM_GROUP
,
5872 .num_ips
= ctx
->addresses_best_num
,
5873 .ips
= ctx
->addresses_best
,
5874 .apply_expected
= true
5877 .type
= WREPL_TYPE_UNIQUE
,
5878 .state
= WREPL_STATE_TOMBSTONE
,
5879 .node
= WREPL_NODE_B
,
5881 .num_ips
= ctx
->addresses_best_num
,
5882 .ips
= ctx
->addresses_best
,
5883 .apply_expected
= true
5887 * sgroup,released vs. unique,tombstone with different ip(s)
5890 .line
= __location__
,
5891 .name
= _NBT_NAME("_SR_UT_DI", 0x1C, NULL
),
5893 .nb_flags
= NBT_NM_GROUP
,
5895 .num_ips
= ctx
->addresses_best_num
,
5896 .ips
= ctx
->addresses_best
,
5897 .apply_expected
= true
5900 .type
= WREPL_TYPE_UNIQUE
,
5901 .state
= WREPL_STATE_TOMBSTONE
,
5902 .node
= WREPL_NODE_B
,
5904 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5905 .ips
= addresses_B_1
,
5906 .apply_expected
= true
5910 * special group vs. group section
5913 * sgroup,released vs. group,active with same ip(s)
5916 .line
= __location__
,
5917 .name
= _NBT_NAME("_SR_GA_SI", 0x1C, NULL
),
5919 .nb_flags
= NBT_NM_GROUP
,
5921 .num_ips
= ctx
->addresses_best_num
,
5922 .ips
= ctx
->addresses_best
,
5923 .apply_expected
= true
5926 .type
= WREPL_TYPE_GROUP
,
5927 .state
= WREPL_STATE_ACTIVE
,
5928 .node
= WREPL_NODE_B
,
5930 .num_ips
= ctx
->addresses_best_num
,
5931 .ips
= ctx
->addresses_best
,
5932 .apply_expected
= true
5936 * sgroup,released vs. group,active with different ip(s)
5939 .line
= __location__
,
5940 .name
= _NBT_NAME("_SR_GA_DI", 0x1C, NULL
),
5942 .nb_flags
= NBT_NM_GROUP
,
5944 .num_ips
= ctx
->addresses_best_num
,
5945 .ips
= ctx
->addresses_best
,
5946 .apply_expected
= true
5949 .type
= WREPL_TYPE_GROUP
,
5950 .state
= WREPL_STATE_ACTIVE
,
5951 .node
= WREPL_NODE_B
,
5953 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5954 .ips
= addresses_B_1
,
5955 .apply_expected
= true
5959 * sgroup,released vs. group,tombstone with same ip(s)
5962 .line
= __location__
,
5963 .name
= _NBT_NAME("_SR_GT_SI", 0x1C, NULL
),
5965 .nb_flags
= NBT_NM_GROUP
,
5967 .num_ips
= ctx
->addresses_best_num
,
5968 .ips
= ctx
->addresses_best
,
5969 .apply_expected
= true
5972 .type
= WREPL_TYPE_GROUP
,
5973 .state
= WREPL_STATE_TOMBSTONE
,
5974 .node
= WREPL_NODE_B
,
5976 .num_ips
= ctx
->addresses_best_num
,
5977 .ips
= ctx
->addresses_best
,
5978 .apply_expected
= true
5982 * sgroup,released vs. group,tombstone with different ip(s)
5985 .line
= __location__
,
5986 .name
= _NBT_NAME("_SR_GT_DI", 0x1C, NULL
),
5988 .nb_flags
= NBT_NM_GROUP
,
5990 .num_ips
= ctx
->addresses_best_num
,
5991 .ips
= ctx
->addresses_best
,
5992 .apply_expected
= true
5995 .type
= WREPL_TYPE_GROUP
,
5996 .state
= WREPL_STATE_TOMBSTONE
,
5997 .node
= WREPL_NODE_B
,
5999 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6000 .ips
= addresses_B_1
,
6001 .apply_expected
= true
6005 * special group vs. special group section
6008 * sgroup,released vs. sgroup,active with same ip(s)
6011 .line
= __location__
,
6012 .name
= _NBT_NAME("_SR_SA_SI", 0x1C, NULL
),
6014 .nb_flags
= NBT_NM_GROUP
,
6016 .num_ips
= ctx
->addresses_best_num
,
6017 .ips
= ctx
->addresses_best
,
6018 .apply_expected
= true
6021 .type
= WREPL_TYPE_SGROUP
,
6022 .state
= WREPL_STATE_ACTIVE
,
6023 .node
= WREPL_NODE_B
,
6025 .num_ips
= ctx
->addresses_best_num
,
6026 .ips
= ctx
->addresses_best
,
6027 .apply_expected
= true
6031 * sgroup,released vs. sgroup,active with different ip(s)
6034 .line
= __location__
,
6035 .name
= _NBT_NAME("_SR_SA_DI", 0x1C, NULL
),
6037 .nb_flags
= NBT_NM_GROUP
,
6039 .num_ips
= ctx
->addresses_best_num
,
6040 .ips
= ctx
->addresses_best
,
6041 .apply_expected
= true
6044 .type
= WREPL_TYPE_SGROUP
,
6045 .state
= WREPL_STATE_ACTIVE
,
6046 .node
= WREPL_NODE_B
,
6048 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6049 .ips
= addresses_B_1
,
6050 .apply_expected
= true
6054 * sgroup,released vs. sgroup,tombstone with same ip(s)
6057 .line
= __location__
,
6058 .name
= _NBT_NAME("_SR_ST_SI", 0x1C, NULL
),
6060 .nb_flags
= NBT_NM_GROUP
,
6062 .num_ips
= ctx
->addresses_best_num
,
6063 .ips
= ctx
->addresses_best
,
6064 .apply_expected
= true
6067 .type
= WREPL_TYPE_SGROUP
,
6068 .state
= WREPL_STATE_TOMBSTONE
,
6069 .node
= WREPL_NODE_B
,
6071 .num_ips
= ctx
->addresses_best_num
,
6072 .ips
= ctx
->addresses_best
,
6073 .apply_expected
= true
6077 * sgroup,released vs. sgroup,tombstone with different ip(s)
6080 .line
= __location__
,
6081 .name
= _NBT_NAME("_SR_ST_DI", 0x1C, NULL
),
6083 .nb_flags
= NBT_NM_GROUP
,
6085 .num_ips
= ctx
->addresses_best_num
,
6086 .ips
= ctx
->addresses_best
,
6087 .apply_expected
= true
6090 .type
= WREPL_TYPE_SGROUP
,
6091 .state
= WREPL_STATE_TOMBSTONE
,
6092 .node
= WREPL_NODE_B
,
6094 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6095 .ips
= addresses_B_1
,
6096 .apply_expected
= true
6100 * special group vs. multi homed section
6103 * sgroup,released vs. mhomed,active with same ip(s)
6106 .line
= __location__
,
6107 .name
= _NBT_NAME("_SR_MA_SI", 0x1C, NULL
),
6109 .nb_flags
= NBT_NM_GROUP
,
6111 .num_ips
= ctx
->addresses_best_num
,
6112 .ips
= ctx
->addresses_best
,
6113 .apply_expected
= true
6116 .type
= WREPL_TYPE_MHOMED
,
6117 .state
= WREPL_STATE_ACTIVE
,
6118 .node
= WREPL_NODE_B
,
6120 .num_ips
= ctx
->addresses_best_num
,
6121 .ips
= ctx
->addresses_best
,
6122 .apply_expected
= true
6126 * sgroup,released vs. mhomed,active with different ip(s)
6129 .line
= __location__
,
6130 .name
= _NBT_NAME("_SR_MA_DI", 0x1C, NULL
),
6132 .nb_flags
= NBT_NM_GROUP
,
6134 .num_ips
= ctx
->addresses_best_num
,
6135 .ips
= ctx
->addresses_best
,
6136 .apply_expected
= true
6139 .type
= WREPL_TYPE_MHOMED
,
6140 .state
= WREPL_STATE_ACTIVE
,
6141 .node
= WREPL_NODE_B
,
6143 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6144 .ips
= addresses_B_1
,
6145 .apply_expected
= true
6149 * sgroup,released vs. mhomed,tombstone with same ip(s)
6152 .line
= __location__
,
6153 .name
= _NBT_NAME("_SR_MT_SI", 0x1C, NULL
),
6155 .nb_flags
= NBT_NM_GROUP
,
6157 .num_ips
= ctx
->addresses_best_num
,
6158 .ips
= ctx
->addresses_best
,
6159 .apply_expected
= true
6162 .type
= WREPL_TYPE_MHOMED
,
6163 .state
= WREPL_STATE_TOMBSTONE
,
6164 .node
= WREPL_NODE_B
,
6166 .num_ips
= ctx
->addresses_best_num
,
6167 .ips
= ctx
->addresses_best
,
6168 .apply_expected
= true
6172 * sgroup,released vs. mhomed,tombstone with different ip(s)
6175 .line
= __location__
,
6176 .name
= _NBT_NAME("_SR_MT_DI", 0x1C, NULL
),
6178 .nb_flags
= NBT_NM_GROUP
,
6180 .num_ips
= ctx
->addresses_best_num
,
6181 .ips
= ctx
->addresses_best
,
6182 .apply_expected
= true
6185 .type
= WREPL_TYPE_MHOMED
,
6186 .state
= WREPL_STATE_TOMBSTONE
,
6187 .node
= WREPL_NODE_B
,
6189 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6190 .ips
= addresses_B_1
,
6191 .apply_expected
= true
6195 * multi homed vs. unique section
6198 * mhomed,released vs. unique,active with same ip(s)
6201 .line
= __location__
,
6202 .name
= _NBT_NAME("_MR_UA_SI", 0x00, NULL
),
6206 .num_ips
= ctx
->addresses_best_num
,
6207 .ips
= ctx
->addresses_best
,
6208 .apply_expected
= true
6211 .type
= WREPL_TYPE_UNIQUE
,
6212 .state
= WREPL_STATE_ACTIVE
,
6213 .node
= WREPL_NODE_B
,
6215 .num_ips
= ctx
->addresses_best_num
,
6216 .ips
= ctx
->addresses_best
,
6217 .apply_expected
= true
6221 * mhomed,released vs. unique,active with different ip(s)
6224 .line
= __location__
,
6225 .name
= _NBT_NAME("_MR_UA_DI", 0x00, NULL
),
6229 .num_ips
= ctx
->addresses_best_num
,
6230 .ips
= ctx
->addresses_best
,
6231 .apply_expected
= true
6234 .type
= WREPL_TYPE_UNIQUE
,
6235 .state
= WREPL_STATE_ACTIVE
,
6236 .node
= WREPL_NODE_B
,
6238 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6239 .ips
= addresses_B_1
,
6240 .apply_expected
= true
6244 * mhomed,released vs. unique,tombstone with same ip(s)
6247 .line
= __location__
,
6248 .name
= _NBT_NAME("_MR_UT_SI", 0x00, NULL
),
6252 .num_ips
= ctx
->addresses_best_num
,
6253 .ips
= ctx
->addresses_best
,
6254 .apply_expected
= true
6257 .type
= WREPL_TYPE_UNIQUE
,
6258 .state
= WREPL_STATE_TOMBSTONE
,
6259 .node
= WREPL_NODE_B
,
6261 .num_ips
= ctx
->addresses_best_num
,
6262 .ips
= ctx
->addresses_best
,
6263 .apply_expected
= true
6267 * mhomed,released vs. unique,tombstone with different ip(s)
6270 .line
= __location__
,
6271 .name
= _NBT_NAME("_MR_UT_DI", 0x00, NULL
),
6275 .num_ips
= ctx
->addresses_best_num
,
6276 .ips
= ctx
->addresses_best
,
6277 .apply_expected
= true
6280 .type
= WREPL_TYPE_UNIQUE
,
6281 .state
= WREPL_STATE_TOMBSTONE
,
6282 .node
= WREPL_NODE_B
,
6284 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6285 .ips
= addresses_B_1
,
6286 .apply_expected
= true
6290 * multi homed vs. group section
6293 * mhomed,released vs. group,active with same ip(s)
6296 .line
= __location__
,
6297 .name
= _NBT_NAME("_MR_GA_SI", 0x00, NULL
),
6301 .num_ips
= ctx
->addresses_best_num
,
6302 .ips
= ctx
->addresses_best
,
6303 .apply_expected
= true
6306 .type
= WREPL_TYPE_GROUP
,
6307 .state
= WREPL_STATE_ACTIVE
,
6308 .node
= WREPL_NODE_B
,
6310 .num_ips
= ctx
->addresses_best_num
,
6311 .ips
= ctx
->addresses_best
,
6312 .apply_expected
= true
6316 * mhomed,released vs. group,active with different ip(s)
6319 .line
= __location__
,
6320 .name
= _NBT_NAME("_MR_GA_DI", 0x00, NULL
),
6324 .num_ips
= ctx
->addresses_best_num
,
6325 .ips
= ctx
->addresses_best
,
6326 .apply_expected
= true
6329 .type
= WREPL_TYPE_GROUP
,
6330 .state
= WREPL_STATE_ACTIVE
,
6331 .node
= WREPL_NODE_B
,
6333 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6334 .ips
= addresses_B_1
,
6335 .apply_expected
= true
6339 * mhomed,released vs. group,tombstone with same ip(s)
6342 .line
= __location__
,
6343 .name
= _NBT_NAME("_MR_GT_SI", 0x00, NULL
),
6347 .num_ips
= ctx
->addresses_best_num
,
6348 .ips
= ctx
->addresses_best
,
6349 .apply_expected
= true
6352 .type
= WREPL_TYPE_GROUP
,
6353 .state
= WREPL_STATE_TOMBSTONE
,
6354 .node
= WREPL_NODE_B
,
6356 .num_ips
= ctx
->addresses_best_num
,
6357 .ips
= ctx
->addresses_best
,
6358 .apply_expected
= true
6362 * mhomed,released vs. group,tombstone with different ip(s)
6365 .line
= __location__
,
6366 .name
= _NBT_NAME("_MR_GT_DI", 0x00, NULL
),
6370 .num_ips
= ctx
->addresses_best_num
,
6371 .ips
= ctx
->addresses_best
,
6372 .apply_expected
= true
6375 .type
= WREPL_TYPE_GROUP
,
6376 .state
= WREPL_STATE_TOMBSTONE
,
6377 .node
= WREPL_NODE_B
,
6379 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6380 .ips
= addresses_B_1
,
6381 .apply_expected
= true
6385 * multi homed vs. special group section
6388 * mhomed,released vs. sgroup,active with same ip(s)
6391 .line
= __location__
,
6392 .name
= _NBT_NAME("_MR_SA_SI", 0x00, NULL
),
6396 .num_ips
= ctx
->addresses_best_num
,
6397 .ips
= ctx
->addresses_best
,
6398 .apply_expected
= true
6401 .type
= WREPL_TYPE_SGROUP
,
6402 .state
= WREPL_STATE_ACTIVE
,
6403 .node
= WREPL_NODE_B
,
6405 .num_ips
= ctx
->addresses_best_num
,
6406 .ips
= ctx
->addresses_best
,
6407 .apply_expected
= true
6411 * mhomed,released vs. sgroup,active with different ip(s)
6414 .line
= __location__
,
6415 .name
= _NBT_NAME("_MR_SA_DI", 0x00, NULL
),
6419 .num_ips
= ctx
->addresses_best_num
,
6420 .ips
= ctx
->addresses_best
,
6421 .apply_expected
= true
6424 .type
= WREPL_TYPE_SGROUP
,
6425 .state
= WREPL_STATE_ACTIVE
,
6426 .node
= WREPL_NODE_B
,
6428 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6429 .ips
= addresses_B_1
,
6430 .apply_expected
= true
6434 * mhomed,released vs. sgroup,tombstone with same ip(s)
6437 .line
= __location__
,
6438 .name
= _NBT_NAME("_MR_ST_SI", 0x00, NULL
),
6442 .num_ips
= ctx
->addresses_best_num
,
6443 .ips
= ctx
->addresses_best
,
6444 .apply_expected
= true
6447 .type
= WREPL_TYPE_SGROUP
,
6448 .state
= WREPL_STATE_TOMBSTONE
,
6449 .node
= WREPL_NODE_B
,
6451 .num_ips
= ctx
->addresses_best_num
,
6452 .ips
= ctx
->addresses_best
,
6453 .apply_expected
= true
6457 * mhomed,released vs. sgroup,tombstone with different ip(s)
6460 .line
= __location__
,
6461 .name
= _NBT_NAME("_MR_ST_DI", 0x00, NULL
),
6465 .num_ips
= ctx
->addresses_best_num
,
6466 .ips
= ctx
->addresses_best
,
6467 .apply_expected
= true
6470 .type
= WREPL_TYPE_SGROUP
,
6471 .state
= WREPL_STATE_TOMBSTONE
,
6472 .node
= WREPL_NODE_B
,
6474 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6475 .ips
= addresses_B_1
,
6476 .apply_expected
= true
6480 * multi homed vs. multi homed section
6483 * mhomed,released vs. mhomed,active with same ip(s)
6486 .line
= __location__
,
6487 .name
= _NBT_NAME("_MR_MA_SI", 0x00, NULL
),
6491 .num_ips
= ctx
->addresses_best_num
,
6492 .ips
= ctx
->addresses_best
,
6493 .apply_expected
= true
6496 .type
= WREPL_TYPE_MHOMED
,
6497 .state
= WREPL_STATE_ACTIVE
,
6498 .node
= WREPL_NODE_B
,
6500 .num_ips
= ctx
->addresses_best_num
,
6501 .ips
= ctx
->addresses_best
,
6502 .apply_expected
= true
6506 * mhomed,released vs. mhomed,active with different ip(s)
6509 .line
= __location__
,
6510 .name
= _NBT_NAME("_MR_MA_DI", 0x00, NULL
),
6514 .num_ips
= ctx
->addresses_best_num
,
6515 .ips
= ctx
->addresses_best
,
6516 .apply_expected
= true
6519 .type
= WREPL_TYPE_MHOMED
,
6520 .state
= WREPL_STATE_ACTIVE
,
6521 .node
= WREPL_NODE_B
,
6523 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6524 .ips
= addresses_B_1
,
6525 .apply_expected
= true
6529 * mhomed,released vs. mhomed,tombstone with same ip(s)
6532 .line
= __location__
,
6533 .name
= _NBT_NAME("_MR_MT_SI", 0x00, NULL
),
6537 .num_ips
= ctx
->addresses_best_num
,
6538 .ips
= ctx
->addresses_best
,
6539 .apply_expected
= true
6542 .type
= WREPL_TYPE_MHOMED
,
6543 .state
= WREPL_STATE_TOMBSTONE
,
6544 .node
= WREPL_NODE_B
,
6546 .num_ips
= ctx
->addresses_best_num
,
6547 .ips
= ctx
->addresses_best
,
6548 .apply_expected
= true
6552 * mhomed,released vs. mhomed,tombstone with different ip(s)
6555 .line
= __location__
,
6556 .name
= _NBT_NAME("_MR_MT_DI", 0x00, NULL
),
6560 .num_ips
= ctx
->addresses_best_num
,
6561 .ips
= ctx
->addresses_best
,
6562 .apply_expected
= true
6565 .type
= WREPL_TYPE_MHOMED
,
6566 .state
= WREPL_STATE_TOMBSTONE
,
6567 .node
= WREPL_NODE_B
,
6569 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6570 .ips
= addresses_B_1
,
6571 .apply_expected
= true
6576 torture_comment(tctx
, "Test Replica records vs. owned released records\n");
6578 for(i
=0; ret
&& i
< ARRAY_SIZE(records
); i
++) {
6579 torture_comment(tctx
, "%s => %s\n", nbt_name_string(ctx
, &records
[i
].name
),
6580 (records
[i
].replica
.apply_expected
?"REPLACE":"NOT REPLACE"));
6585 name_register
->in
.name
= records
[i
].name
;
6586 name_register
->in
.dest_addr
= ctx
->address
;
6587 name_register
->in
.dest_port
= lp_nbt_port(tctx
->lp_ctx
);
6588 name_register
->in
.address
= records
[i
].wins
.ips
[0].ip
;
6589 name_register
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
6590 name_register
->in
.register_demand
= false;
6591 name_register
->in
.broadcast
= false;
6592 name_register
->in
.multi_homed
= records
[i
].wins
.mhomed
;
6593 name_register
->in
.ttl
= 300000;
6594 name_register
->in
.timeout
= 70;
6595 name_register
->in
.retries
= 0;
6597 status
= nbt_name_register(ctx
->nbtsock
, ctx
, name_register
);
6598 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
6599 torture_comment(tctx
, "No response from %s for name register\n", ctx
->address
);
6602 if (!NT_STATUS_IS_OK(status
)) {
6603 torture_comment(tctx
, "Bad response from %s for name register - %s\n",
6604 ctx
->address
, nt_errstr(status
));
6607 CHECK_VALUE(tctx
, name_register
->out
.rcode
, 0);
6608 CHECK_VALUE_STRING(tctx
, name_register
->out
.reply_from
, ctx
->address
);
6609 CHECK_VALUE(tctx
, name_register
->out
.name
.type
, records
[i
].name
.type
);
6610 CHECK_VALUE_STRING(tctx
, name_register
->out
.name
.name
, records
[i
].name
.name
);
6611 CHECK_VALUE_STRING(tctx
, name_register
->out
.name
.scope
, records
[i
].name
.scope
);
6612 CHECK_VALUE_STRING(tctx
, name_register
->out
.reply_addr
, records
[i
].wins
.ips
[0].ip
);
6614 /* release the record */
6615 release
->in
.name
= records
[i
].name
;
6616 release
->in
.dest_port
= lp_nbt_port(tctx
->lp_ctx
);
6617 release
->in
.dest_addr
= ctx
->address
;
6618 release
->in
.address
= records
[i
].wins
.ips
[0].ip
;
6619 release
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
6620 release
->in
.broadcast
= false;
6621 release
->in
.timeout
= 30;
6622 release
->in
.retries
= 0;
6624 status
= nbt_name_release(ctx
->nbtsock
, ctx
, release
);
6625 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
6626 torture_comment(tctx
, "No response from %s for name release\n", ctx
->address
);
6629 if (!NT_STATUS_IS_OK(status
)) {
6630 torture_comment(tctx
, "Bad response from %s for name query - %s\n",
6631 ctx
->address
, nt_errstr(status
));
6634 CHECK_VALUE(tctx
, release
->out
.rcode
, 0);
6639 wins_name
->name
= &records
[i
].name
;
6640 wins_name
->flags
= WREPL_NAME_FLAGS(records
[i
].replica
.type
,
6641 records
[i
].replica
.state
,
6642 records
[i
].replica
.node
,
6643 records
[i
].replica
.is_static
);
6644 wins_name
->id
= ++ctx
->b
.max_version
;
6645 if (wins_name
->flags
& 2) {
6646 wins_name
->addresses
.addresses
.num_ips
= records
[i
].replica
.num_ips
;
6647 wins_name
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
6648 records
[i
].replica
.ips
);
6650 wins_name
->addresses
.ip
= records
[i
].replica
.ips
[0].ip
;
6652 wins_name
->unknown
= "255.255.255.255";
6654 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
6655 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
,
6656 records
[i
].replica
.apply_expected
);
6658 if (records
[i
].replica
.apply_expected
) {
6659 wins_name
->name
= &records
[i
].name
;
6660 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE
,
6661 WREPL_STATE_TOMBSTONE
,
6662 WREPL_NODE_B
, false);
6663 wins_name
->id
= ++ctx
->b
.max_version
;
6664 wins_name
->addresses
.ip
= addresses_B_1
[0].ip
;
6665 wins_name
->unknown
= "255.255.255.255";
6667 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
6668 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
, true);
6670 release
->in
.name
= records
[i
].name
;
6671 release
->in
.dest_addr
= ctx
->address
;
6672 release
->in
.dest_port
= lp_nbt_port(tctx
->lp_ctx
);
6673 release
->in
.address
= records
[i
].wins
.ips
[0].ip
;
6674 release
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
6675 release
->in
.broadcast
= false;
6676 release
->in
.timeout
= 30;
6677 release
->in
.retries
= 0;
6679 status
= nbt_name_release(ctx
->nbtsock
, ctx
, release
);
6680 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
6681 torture_comment(tctx
, "No response from %s for name release\n", ctx
->address
);
6684 if (!NT_STATUS_IS_OK(status
)) {
6685 torture_comment(tctx
, "Bad response from %s for name query - %s\n",
6686 ctx
->address
, nt_errstr(status
));
6689 CHECK_VALUE(tctx
, release
->out
.rcode
, 0);
6692 torture_comment(tctx
, "conflict handled wrong or record[%u]: %s\n", i
, records
[i
].line
);
6700 struct test_conflict_owned_active_vs_replica_struct
{
6701 const char *line
; /* just better debugging */
6702 const char *section
; /* just better debugging */
6703 struct nbt_name name
;
6704 const char *comment
;
6710 const struct wrepl_ip
*ips
;
6711 bool apply_expected
;
6716 bool expect_release
;
6719 /* when num_ips == 0, then .wins.ips are used */
6721 const struct wrepl_ip
*ips
;
6724 enum wrepl_name_type type
;
6725 enum wrepl_name_state state
;
6726 enum wrepl_name_node node
;
6729 const struct wrepl_ip
*ips
;
6730 bool apply_expected
;
6736 static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket
*nbtsock
,
6737 struct nbt_name_packet
*req_packet
,
6738 struct socket_address
*src
);
6740 static bool test_conflict_owned_active_vs_replica(struct torture_context
*tctx
,
6741 struct test_wrepl_conflict_conn
*ctx
)
6745 struct wrepl_wins_name wins_name_
;
6746 struct wrepl_wins_name
*wins_name
= &wins_name_
;
6747 struct nbt_name_register name_register_
;
6748 struct nbt_name_register
*name_register
= &name_register_
;
6749 struct nbt_name_release release_
;
6750 struct nbt_name_release
*release
= &release_
;
6752 struct test_conflict_owned_active_vs_replica_struct records
[] = {
6754 * unique vs. unique section
6757 * unique,active vs. unique,active with same ip(s), unchecked
6760 .line
= __location__
,
6761 .name
= _NBT_NAME("_UA_UA_SI_U", 0x00, NULL
),
6765 .num_ips
= ctx
->addresses_best_num
,
6766 .ips
= ctx
->addresses_best
,
6767 .apply_expected
= true
6773 .type
= WREPL_TYPE_UNIQUE
,
6774 .state
= WREPL_STATE_ACTIVE
,
6775 .node
= WREPL_NODE_B
,
6777 .num_ips
= ctx
->addresses_best_num
,
6778 .ips
= ctx
->addresses_best
,
6779 .apply_expected
= true
6783 * unique,active vs. unique,active with different ip(s), positive response
6786 .line
= __location__
,
6787 .name
= _NBT_NAME("_UA_UA_DI_P", 0x00, NULL
),
6791 .num_ips
= ctx
->addresses_best_num
,
6792 .ips
= ctx
->addresses_best
,
6793 .apply_expected
= true
6800 .type
= WREPL_TYPE_UNIQUE
,
6801 .state
= WREPL_STATE_ACTIVE
,
6802 .node
= WREPL_NODE_B
,
6804 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6805 .ips
= addresses_B_1
,
6806 .apply_expected
= false
6810 * unique,active vs. unique,active with different ip(s), positive response other ips
6813 .line
= __location__
,
6814 .name
= _NBT_NAME("_UA_UA_DI_O", 0x00, NULL
),
6818 .num_ips
= ctx
->addresses_best_num
,
6819 .ips
= ctx
->addresses_best
,
6820 .apply_expected
= true
6825 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
6826 .ips
= addresses_A_3_4
,
6829 .type
= WREPL_TYPE_UNIQUE
,
6830 .state
= WREPL_STATE_ACTIVE
,
6831 .node
= WREPL_NODE_B
,
6833 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6834 .ips
= addresses_B_1
,
6835 .apply_expected
= false
6839 * unique,active vs. unique,active with different ip(s), negative response
6842 .line
= __location__
,
6843 .name
= _NBT_NAME("_UA_UA_DI_N", 0x00, NULL
),
6847 .num_ips
= ctx
->addresses_best_num
,
6848 .ips
= ctx
->addresses_best
,
6849 .apply_expected
= true
6856 .type
= WREPL_TYPE_UNIQUE
,
6857 .state
= WREPL_STATE_ACTIVE
,
6858 .node
= WREPL_NODE_B
,
6860 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6861 .ips
= addresses_B_1
,
6862 .apply_expected
= true
6866 * unique,active vs. unique,tombstone with same ip(s), unchecked
6869 .line
= __location__
,
6870 .name
= _NBT_NAME("_UA_UT_SI_U", 0x00, NULL
),
6874 .num_ips
= ctx
->addresses_best_num
,
6875 .ips
= ctx
->addresses_best
,
6876 .apply_expected
= true
6882 .type
= WREPL_TYPE_UNIQUE
,
6883 .state
= WREPL_STATE_TOMBSTONE
,
6884 .node
= WREPL_NODE_B
,
6886 .num_ips
= ctx
->addresses_best_num
,
6887 .ips
= ctx
->addresses_best
,
6888 .apply_expected
= false
6892 * unique,active vs. unique,tombstone with different ip(s), unchecked
6895 .line
= __location__
,
6896 .name
= _NBT_NAME("_UA_UT_DI_U", 0x00, NULL
),
6900 .num_ips
= ctx
->addresses_best_num
,
6901 .ips
= ctx
->addresses_best
,
6902 .apply_expected
= true
6908 .type
= WREPL_TYPE_UNIQUE
,
6909 .state
= WREPL_STATE_TOMBSTONE
,
6910 .node
= WREPL_NODE_B
,
6912 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6913 .ips
= addresses_B_1
,
6914 .apply_expected
= false
6918 * unique vs. group section
6921 * unique,active vs. group,active with same ip(s), release expected
6924 .line
= __location__
,
6925 .name
= _NBT_NAME("_UA_GA_SI_R", 0x00, NULL
),
6929 .num_ips
= ctx
->addresses_best_num
,
6930 .ips
= ctx
->addresses_best
,
6931 .apply_expected
= true
6935 .expect_release
= true,
6938 .type
= WREPL_TYPE_GROUP
,
6939 .state
= WREPL_STATE_ACTIVE
,
6940 .node
= WREPL_NODE_B
,
6942 .num_ips
= ctx
->addresses_best_num
,
6943 .ips
= ctx
->addresses_best
,
6944 .apply_expected
= true
6948 * unique,active vs. group,active with different ip(s), release expected
6951 .line
= __location__
,
6952 .name
= _NBT_NAME("_UA_GA_DI_R", 0x00, NULL
),
6956 .num_ips
= ctx
->addresses_best_num
,
6957 .ips
= ctx
->addresses_best
,
6958 .apply_expected
= true
6962 .expect_release
= true,
6965 .type
= WREPL_TYPE_GROUP
,
6966 .state
= WREPL_STATE_ACTIVE
,
6967 .node
= WREPL_NODE_B
,
6969 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6970 .ips
= addresses_B_1
,
6971 .apply_expected
= true
6975 * unique,active vs. group,tombstone with same ip(s), unchecked
6978 .line
= __location__
,
6979 .name
= _NBT_NAME("_UA_GT_SI_U", 0x00, NULL
),
6983 .num_ips
= ctx
->addresses_best_num
,
6984 .ips
= ctx
->addresses_best
,
6985 .apply_expected
= true
6991 .type
= WREPL_TYPE_GROUP
,
6992 .state
= WREPL_STATE_TOMBSTONE
,
6993 .node
= WREPL_NODE_B
,
6995 .num_ips
= ctx
->addresses_best_num
,
6996 .ips
= ctx
->addresses_best
,
6997 .apply_expected
= false
7001 * unique,active vs. group,tombstone with different ip(s), unchecked
7004 .line
= __location__
,
7005 .name
= _NBT_NAME("_UA_GT_DI_U", 0x00, NULL
),
7009 .num_ips
= ctx
->addresses_best_num
,
7010 .ips
= ctx
->addresses_best
,
7011 .apply_expected
= true
7017 .type
= WREPL_TYPE_GROUP
,
7018 .state
= WREPL_STATE_TOMBSTONE
,
7019 .node
= WREPL_NODE_B
,
7021 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7022 .ips
= addresses_B_1
,
7023 .apply_expected
= false
7027 * unique vs. special group section
7030 * unique,active vs. sgroup,active with same ip(s), release expected
7033 .line
= __location__
,
7034 .name
= _NBT_NAME("_UA_SA_SI_R", 0x00, NULL
),
7038 .num_ips
= ctx
->addresses_best_num
,
7039 .ips
= ctx
->addresses_best
,
7040 .apply_expected
= true
7044 .expect_release
= true,
7047 .type
= WREPL_TYPE_SGROUP
,
7048 .state
= WREPL_STATE_ACTIVE
,
7049 .node
= WREPL_NODE_B
,
7051 .num_ips
= ctx
->addresses_best_num
,
7052 .ips
= ctx
->addresses_best
,
7053 .apply_expected
= true
7057 * unique,active vs. group,active with different ip(s), release expected
7060 .line
= __location__
,
7061 .name
= _NBT_NAME("_UA_SA_DI_R", 0x00, NULL
),
7065 .num_ips
= ctx
->addresses_best_num
,
7066 .ips
= ctx
->addresses_best
,
7067 .apply_expected
= true
7071 .expect_release
= true,
7074 .type
= WREPL_TYPE_SGROUP
,
7075 .state
= WREPL_STATE_ACTIVE
,
7076 .node
= WREPL_NODE_B
,
7078 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7079 .ips
= addresses_B_1
,
7080 .apply_expected
= true
7084 * unique,active vs. sgroup,tombstone with same ip(s), unchecked
7087 .line
= __location__
,
7088 .name
= _NBT_NAME("_UA_ST_SI_U", 0x00, NULL
),
7092 .num_ips
= ctx
->addresses_best_num
,
7093 .ips
= ctx
->addresses_best
,
7094 .apply_expected
= true
7100 .type
= WREPL_TYPE_SGROUP
,
7101 .state
= WREPL_STATE_TOMBSTONE
,
7102 .node
= WREPL_NODE_B
,
7104 .num_ips
= ctx
->addresses_best_num
,
7105 .ips
= ctx
->addresses_best
,
7106 .apply_expected
= false
7110 * unique,active vs. sgroup,tombstone with different ip(s), unchecked
7113 .line
= __location__
,
7114 .name
= _NBT_NAME("_UA_ST_DI_U", 0x00, NULL
),
7118 .num_ips
= ctx
->addresses_best_num
,
7119 .ips
= ctx
->addresses_best
,
7120 .apply_expected
= true
7126 .type
= WREPL_TYPE_SGROUP
,
7127 .state
= WREPL_STATE_TOMBSTONE
,
7128 .node
= WREPL_NODE_B
,
7130 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7131 .ips
= addresses_B_1
,
7132 .apply_expected
= false
7136 * unique vs. multi homed section
7139 * unique,active vs. mhomed,active with same ip(s), unchecked
7142 .line
= __location__
,
7143 .name
= _NBT_NAME("_UA_MA_SI_U", 0x00, NULL
),
7147 .num_ips
= ctx
->addresses_best_num
,
7148 .ips
= ctx
->addresses_best
,
7149 .apply_expected
= true
7155 .type
= WREPL_TYPE_MHOMED
,
7156 .state
= WREPL_STATE_ACTIVE
,
7157 .node
= WREPL_NODE_B
,
7159 .num_ips
= ctx
->addresses_best_num
,
7160 .ips
= ctx
->addresses_best
,
7161 .apply_expected
= true
7165 * unique,active vs. mhomed,active with superset ip(s), unchecked
7168 .line
= __location__
,
7169 .name
= _NBT_NAME("_UA_MA_SP_U", 0x00, NULL
),
7173 .num_ips
= ctx
->addresses_best_num
,
7174 .ips
= ctx
->addresses_best
,
7175 .apply_expected
= true
7181 .type
= WREPL_TYPE_MHOMED
,
7182 .state
= WREPL_STATE_ACTIVE
,
7183 .node
= WREPL_NODE_B
,
7185 .num_ips
= ctx
->addresses_all_num
,
7186 .ips
= ctx
->addresses_all
,
7187 .apply_expected
= true
7191 * unique,active vs. mhomed,active with different ip(s), positive response
7194 .line
= __location__
,
7195 .name
= _NBT_NAME("_UA_MA_DI_P", 0x00, NULL
),
7199 .num_ips
= ctx
->addresses_best_num
,
7200 .ips
= ctx
->addresses_best
,
7201 .apply_expected
= true
7208 .type
= WREPL_TYPE_MHOMED
,
7209 .state
= WREPL_STATE_ACTIVE
,
7210 .node
= WREPL_NODE_B
,
7212 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7213 .ips
= addresses_B_3_4
,
7214 .apply_expected
= false
7218 * unique,active vs. mhomed,active with different ip(s), positive response other ips
7221 .line
= __location__
,
7222 .name
= _NBT_NAME("_UA_MA_DI_O", 0x00, NULL
),
7226 .num_ips
= ctx
->addresses_best_num
,
7227 .ips
= ctx
->addresses_best
,
7228 .apply_expected
= true
7233 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
7234 .ips
= addresses_A_3_4
,
7237 .type
= WREPL_TYPE_MHOMED
,
7238 .state
= WREPL_STATE_ACTIVE
,
7239 .node
= WREPL_NODE_B
,
7241 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7242 .ips
= addresses_B_3_4
,
7243 .apply_expected
= false
7247 * unique,active vs. mhomed,active with different ip(s), negative response
7250 .line
= __location__
,
7251 .name
= _NBT_NAME("_UA_MA_DI_N", 0x00, NULL
),
7255 .num_ips
= ctx
->addresses_best_num
,
7256 .ips
= ctx
->addresses_best
,
7257 .apply_expected
= true
7264 .type
= WREPL_TYPE_MHOMED
,
7265 .state
= WREPL_STATE_ACTIVE
,
7266 .node
= WREPL_NODE_B
,
7268 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7269 .ips
= addresses_B_3_4
,
7270 .apply_expected
= true
7274 * unique,active vs. mhomed,tombstone with same ip(s), unchecked
7277 .line
= __location__
,
7278 .name
= _NBT_NAME("_UA_MT_SI_U", 0x00, NULL
),
7282 .num_ips
= ctx
->addresses_best_num
,
7283 .ips
= ctx
->addresses_best
,
7284 .apply_expected
= true
7290 .type
= WREPL_TYPE_MHOMED
,
7291 .state
= WREPL_STATE_TOMBSTONE
,
7292 .node
= WREPL_NODE_B
,
7294 .num_ips
= ctx
->addresses_best_num
,
7295 .ips
= ctx
->addresses_best
,
7296 .apply_expected
= false
7300 * unique,active vs. mhomed,tombstone with different ip(s), unchecked
7303 .line
= __location__
,
7304 .name
= _NBT_NAME("_UA_MT_DI_U", 0x00, NULL
),
7308 .num_ips
= ctx
->addresses_best_num
,
7309 .ips
= ctx
->addresses_best
,
7310 .apply_expected
= true
7316 .type
= WREPL_TYPE_MHOMED
,
7317 .state
= WREPL_STATE_TOMBSTONE
,
7318 .node
= WREPL_NODE_B
,
7320 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7321 .ips
= addresses_B_3_4
,
7322 .apply_expected
= false
7326 * normal group vs. unique section
7329 * group,active vs. unique,active with same ip(s), unchecked
7332 .line
= __location__
,
7333 .name
= _NBT_NAME("_GA_UA_SI_U", 0x00, NULL
),
7335 .nb_flags
= NBT_NM_GROUP
,
7337 .num_ips
= ctx
->addresses_best_num
,
7338 .ips
= ctx
->addresses_best
,
7339 .apply_expected
= true
7345 .type
= WREPL_TYPE_UNIQUE
,
7346 .state
= WREPL_STATE_ACTIVE
,
7347 .node
= WREPL_NODE_B
,
7349 .num_ips
= ctx
->addresses_best_num
,
7350 .ips
= ctx
->addresses_best
,
7351 .apply_expected
= false
7355 * group,active vs. unique,active with different ip(s), unchecked
7358 .line
= __location__
,
7359 .name
= _NBT_NAME("_GA_UA_DI_U", 0x00, NULL
),
7361 .nb_flags
= NBT_NM_GROUP
,
7363 .num_ips
= ctx
->addresses_best_num
,
7364 .ips
= ctx
->addresses_best
,
7365 .apply_expected
= true
7371 .type
= WREPL_TYPE_UNIQUE
,
7372 .state
= WREPL_STATE_ACTIVE
,
7373 .node
= WREPL_NODE_B
,
7375 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7376 .ips
= addresses_B_1
,
7377 .apply_expected
= false
7381 * group,active vs. unique,tombstone with same ip(s), unchecked
7384 .line
= __location__
,
7385 .name
= _NBT_NAME("_GA_UT_SI_U", 0x00, NULL
),
7387 .nb_flags
= NBT_NM_GROUP
,
7389 .num_ips
= ctx
->addresses_best_num
,
7390 .ips
= ctx
->addresses_best
,
7391 .apply_expected
= true
7397 .type
= WREPL_TYPE_UNIQUE
,
7398 .state
= WREPL_STATE_TOMBSTONE
,
7399 .node
= WREPL_NODE_B
,
7401 .num_ips
= ctx
->addresses_best_num
,
7402 .ips
= ctx
->addresses_best
,
7403 .apply_expected
= false
7407 * group,active vs. unique,tombstone with different ip(s), unchecked
7410 .line
= __location__
,
7411 .name
= _NBT_NAME("_GA_UT_DI_U", 0x00, NULL
),
7413 .nb_flags
= NBT_NM_GROUP
,
7415 .num_ips
= ctx
->addresses_best_num
,
7416 .ips
= ctx
->addresses_best
,
7417 .apply_expected
= true
7423 .type
= WREPL_TYPE_UNIQUE
,
7424 .state
= WREPL_STATE_TOMBSTONE
,
7425 .node
= WREPL_NODE_B
,
7427 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7428 .ips
= addresses_B_1
,
7429 .apply_expected
= false
7433 * normal group vs. normal group section
7436 * group,active vs. group,active with same ip(s), unchecked
7439 .line
= __location__
,
7440 .name
= _NBT_NAME("_GA_GA_SI_U", 0x00, NULL
),
7442 .nb_flags
= NBT_NM_GROUP
,
7444 .num_ips
= ctx
->addresses_best_num
,
7445 .ips
= ctx
->addresses_best
,
7446 .apply_expected
= true
7452 .type
= WREPL_TYPE_GROUP
,
7453 .state
= WREPL_STATE_ACTIVE
,
7454 .node
= WREPL_NODE_B
,
7456 .num_ips
= ctx
->addresses_best_num
,
7457 .ips
= ctx
->addresses_best
,
7458 .apply_expected
= true
7462 * group,active vs. group,active with different ip(s), unchecked
7465 .line
= __location__
,
7466 .name
= _NBT_NAME("_GA_GA_DI_U", 0x00, NULL
),
7468 .nb_flags
= NBT_NM_GROUP
,
7470 .num_ips
= ctx
->addresses_best_num
,
7471 .ips
= ctx
->addresses_best
,
7472 .apply_expected
= true
7478 .type
= WREPL_TYPE_GROUP
,
7479 .state
= WREPL_STATE_ACTIVE
,
7480 .node
= WREPL_NODE_B
,
7482 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7483 .ips
= addresses_B_1
,
7484 .apply_expected
= true
7488 * group,active vs. group,tombstone with same ip(s), unchecked
7491 .line
= __location__
,
7492 .name
= _NBT_NAME("_GA_GT_SI_U", 0x00, NULL
),
7494 .nb_flags
= NBT_NM_GROUP
,
7496 .num_ips
= ctx
->addresses_best_num
,
7497 .ips
= ctx
->addresses_best
,
7498 .apply_expected
= true
7504 .type
= WREPL_TYPE_GROUP
,
7505 .state
= WREPL_STATE_TOMBSTONE
,
7506 .node
= WREPL_NODE_B
,
7508 .num_ips
= ctx
->addresses_best_num
,
7509 .ips
= ctx
->addresses_best
,
7510 .apply_expected
= false
7514 * group,active vs. group,tombstone with different ip(s), unchecked
7517 .line
= __location__
,
7518 .name
= _NBT_NAME("_GA_GT_DI_U", 0x00, NULL
),
7520 .nb_flags
= NBT_NM_GROUP
,
7522 .num_ips
= ctx
->addresses_best_num
,
7523 .ips
= ctx
->addresses_best
,
7524 .apply_expected
= true
7530 .type
= WREPL_TYPE_GROUP
,
7531 .state
= WREPL_STATE_TOMBSTONE
,
7532 .node
= WREPL_NODE_B
,
7534 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7535 .ips
= addresses_B_1
,
7536 .apply_expected
= false
7540 * normal group vs. special group section
7543 * group,active vs. sgroup,active with same ip(s), unchecked
7546 .line
= __location__
,
7547 .name
= _NBT_NAME("_GA_SA_SI_U", 0x00, NULL
),
7549 .nb_flags
= NBT_NM_GROUP
,
7551 .num_ips
= ctx
->addresses_best_num
,
7552 .ips
= ctx
->addresses_best
,
7553 .apply_expected
= true
7559 .type
= WREPL_TYPE_SGROUP
,
7560 .state
= WREPL_STATE_ACTIVE
,
7561 .node
= WREPL_NODE_B
,
7563 .num_ips
= ctx
->addresses_best_num
,
7564 .ips
= ctx
->addresses_best
,
7565 .apply_expected
= false
7569 * group,active vs. sgroup,active with different ip(s), unchecked
7572 .line
= __location__
,
7573 .name
= _NBT_NAME("_GA_SA_DI_U", 0x00, NULL
),
7575 .nb_flags
= NBT_NM_GROUP
,
7577 .num_ips
= ctx
->addresses_best_num
,
7578 .ips
= ctx
->addresses_best
,
7579 .apply_expected
= true
7585 .type
= WREPL_TYPE_SGROUP
,
7586 .state
= WREPL_STATE_ACTIVE
,
7587 .node
= WREPL_NODE_B
,
7589 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7590 .ips
= addresses_B_3_4
,
7591 .apply_expected
= false
7595 * group,active vs. sgroup,tombstone with same ip(s), unchecked
7598 .line
= __location__
,
7599 .name
= _NBT_NAME("_GA_ST_SI_U", 0x00, NULL
),
7601 .nb_flags
= NBT_NM_GROUP
,
7603 .num_ips
= ctx
->addresses_best_num
,
7604 .ips
= ctx
->addresses_best
,
7605 .apply_expected
= true
7611 .type
= WREPL_TYPE_SGROUP
,
7612 .state
= WREPL_STATE_TOMBSTONE
,
7613 .node
= WREPL_NODE_B
,
7615 .num_ips
= ctx
->addresses_best_num
,
7616 .ips
= ctx
->addresses_best
,
7617 .apply_expected
= false
7621 * group,active vs. sgroup,tombstone with different ip(s), unchecked
7624 .line
= __location__
,
7625 .name
= _NBT_NAME("_GA_ST_DI_U", 0x00, NULL
),
7627 .nb_flags
= NBT_NM_GROUP
,
7629 .num_ips
= ctx
->addresses_best_num
,
7630 .ips
= ctx
->addresses_best
,
7631 .apply_expected
= true
7637 .type
= WREPL_TYPE_SGROUP
,
7638 .state
= WREPL_STATE_TOMBSTONE
,
7639 .node
= WREPL_NODE_B
,
7641 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7642 .ips
= addresses_B_3_4
,
7643 .apply_expected
= false
7647 * normal group vs. multi homed section
7650 * group,active vs. mhomed,active with same ip(s), unchecked
7653 .line
= __location__
,
7654 .name
= _NBT_NAME("_GA_MA_SI_U", 0x00, NULL
),
7656 .nb_flags
= NBT_NM_GROUP
,
7658 .num_ips
= ctx
->addresses_best_num
,
7659 .ips
= ctx
->addresses_best
,
7660 .apply_expected
= true
7666 .type
= WREPL_TYPE_MHOMED
,
7667 .state
= WREPL_STATE_ACTIVE
,
7668 .node
= WREPL_NODE_B
,
7670 .num_ips
= ctx
->addresses_best_num
,
7671 .ips
= ctx
->addresses_best
,
7672 .apply_expected
= false
7676 * group,active vs. mhomed,active with different ip(s), unchecked
7679 .line
= __location__
,
7680 .name
= _NBT_NAME("_GA_MA_DI_U", 0x00, NULL
),
7682 .nb_flags
= NBT_NM_GROUP
,
7684 .num_ips
= ctx
->addresses_best_num
,
7685 .ips
= ctx
->addresses_best
,
7686 .apply_expected
= true
7692 .type
= WREPL_TYPE_MHOMED
,
7693 .state
= WREPL_STATE_ACTIVE
,
7694 .node
= WREPL_NODE_B
,
7696 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7697 .ips
= addresses_B_3_4
,
7698 .apply_expected
= false
7702 * group,active vs. mhomed,tombstone with same ip(s), unchecked
7705 .line
= __location__
,
7706 .name
= _NBT_NAME("_GA_MT_SI_U", 0x00, NULL
),
7708 .nb_flags
= NBT_NM_GROUP
,
7710 .num_ips
= ctx
->addresses_best_num
,
7711 .ips
= ctx
->addresses_best
,
7712 .apply_expected
= true
7718 .type
= WREPL_TYPE_MHOMED
,
7719 .state
= WREPL_STATE_TOMBSTONE
,
7720 .node
= WREPL_NODE_B
,
7722 .num_ips
= ctx
->addresses_best_num
,
7723 .ips
= ctx
->addresses_best
,
7724 .apply_expected
= false
7728 * group,active vs. mhomed,tombstone with different ip(s), unchecked
7731 .line
= __location__
,
7732 .name
= _NBT_NAME("_GA_MT_DI_U", 0x00, NULL
),
7734 .nb_flags
= NBT_NM_GROUP
,
7736 .num_ips
= ctx
->addresses_best_num
,
7737 .ips
= ctx
->addresses_best
,
7738 .apply_expected
= true
7744 .type
= WREPL_TYPE_MHOMED
,
7745 .state
= WREPL_STATE_TOMBSTONE
,
7746 .node
= WREPL_NODE_B
,
7748 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7749 .ips
= addresses_B_3_4
,
7750 .apply_expected
= false
7754 * special group vs. unique section
7757 * sgroup,active vs. unique,active with same ip(s), unchecked
7760 .line
= __location__
,
7761 .name
= _NBT_NAME("_SA_UA_SI_U", 0x1C, NULL
),
7763 .nb_flags
= NBT_NM_GROUP
,
7765 .num_ips
= ctx
->addresses_best_num
,
7766 .ips
= ctx
->addresses_best
,
7767 .apply_expected
= true
7773 .type
= WREPL_TYPE_UNIQUE
,
7774 .state
= WREPL_STATE_ACTIVE
,
7775 .node
= WREPL_NODE_B
,
7777 .num_ips
= ctx
->addresses_best_num
,
7778 .ips
= ctx
->addresses_best
,
7779 .apply_expected
= false
7783 * sgroup,active vs. unique,active with different ip(s), unchecked
7786 .line
= __location__
,
7787 .name
= _NBT_NAME("_SA_UA_DI_U", 0x1C, NULL
),
7789 .nb_flags
= NBT_NM_GROUP
,
7791 .num_ips
= ctx
->addresses_best_num
,
7792 .ips
= ctx
->addresses_best
,
7793 .apply_expected
= true
7799 .type
= WREPL_TYPE_UNIQUE
,
7800 .state
= WREPL_STATE_ACTIVE
,
7801 .node
= WREPL_NODE_B
,
7803 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7804 .ips
= addresses_B_1
,
7805 .apply_expected
= false
7809 * sgroup,active vs. unique,tombstone with same ip(s), unchecked
7812 .line
= __location__
,
7813 .name
= _NBT_NAME("_SA_UT_SI_U", 0x1C, NULL
),
7815 .nb_flags
= NBT_NM_GROUP
,
7817 .num_ips
= ctx
->addresses_best_num
,
7818 .ips
= ctx
->addresses_best
,
7819 .apply_expected
= true
7825 .type
= WREPL_TYPE_UNIQUE
,
7826 .state
= WREPL_STATE_TOMBSTONE
,
7827 .node
= WREPL_NODE_B
,
7829 .num_ips
= ctx
->addresses_best_num
,
7830 .ips
= ctx
->addresses_best
,
7831 .apply_expected
= false
7835 * sgroup,active vs. unique,tombstone with different ip(s), unchecked
7838 .line
= __location__
,
7839 .name
= _NBT_NAME("_SA_UT_DI_U", 0x1C, NULL
),
7841 .nb_flags
= NBT_NM_GROUP
,
7843 .num_ips
= ctx
->addresses_best_num
,
7844 .ips
= ctx
->addresses_best
,
7845 .apply_expected
= true
7851 .type
= WREPL_TYPE_UNIQUE
,
7852 .state
= WREPL_STATE_TOMBSTONE
,
7853 .node
= WREPL_NODE_B
,
7855 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7856 .ips
= addresses_B_1
,
7857 .apply_expected
= false
7861 * special group vs. normal group section
7864 * sgroup,active vs. group,active with same ip(s), unchecked
7867 .line
= __location__
,
7868 .name
= _NBT_NAME("_SA_GA_SI_U", 0x1C, NULL
),
7870 .nb_flags
= NBT_NM_GROUP
,
7872 .num_ips
= ctx
->addresses_best_num
,
7873 .ips
= ctx
->addresses_best
,
7874 .apply_expected
= true
7880 .type
= WREPL_TYPE_GROUP
,
7881 .state
= WREPL_STATE_ACTIVE
,
7882 .node
= WREPL_NODE_B
,
7884 .num_ips
= ctx
->addresses_best_num
,
7885 .ips
= ctx
->addresses_best
,
7886 .apply_expected
= false
7890 * sgroup,active vs. group,active with different ip(s), unchecked
7893 .line
= __location__
,
7894 .name
= _NBT_NAME("_SA_GA_DI_U", 0x1C, NULL
),
7896 .nb_flags
= NBT_NM_GROUP
,
7898 .num_ips
= ctx
->addresses_best_num
,
7899 .ips
= ctx
->addresses_best
,
7900 .apply_expected
= true
7906 .type
= WREPL_TYPE_GROUP
,
7907 .state
= WREPL_STATE_ACTIVE
,
7908 .node
= WREPL_NODE_B
,
7910 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7911 .ips
= addresses_B_1
,
7912 .apply_expected
= false
7916 * sgroup,active vs. group,tombstone with same ip(s), unchecked
7919 .line
= __location__
,
7920 .name
= _NBT_NAME("_SA_GT_SI_U", 0x1C, NULL
),
7922 .nb_flags
= NBT_NM_GROUP
,
7924 .num_ips
= ctx
->addresses_best_num
,
7925 .ips
= ctx
->addresses_best
,
7926 .apply_expected
= true
7932 .type
= WREPL_TYPE_GROUP
,
7933 .state
= WREPL_STATE_TOMBSTONE
,
7934 .node
= WREPL_NODE_B
,
7936 .num_ips
= ctx
->addresses_best_num
,
7937 .ips
= ctx
->addresses_best
,
7938 .apply_expected
= false
7942 * sgroup,active vs. group,tombstone with different ip(s), unchecked
7945 .line
= __location__
,
7946 .name
= _NBT_NAME("_SA_GT_DI_U", 0x1C, NULL
),
7948 .nb_flags
= NBT_NM_GROUP
,
7950 .num_ips
= ctx
->addresses_best_num
,
7951 .ips
= ctx
->addresses_best
,
7952 .apply_expected
= true
7958 .type
= WREPL_TYPE_GROUP
,
7959 .state
= WREPL_STATE_TOMBSTONE
,
7960 .node
= WREPL_NODE_B
,
7962 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7963 .ips
= addresses_B_1
,
7964 .apply_expected
= false
7968 * special group vs. multi homed section
7971 * sgroup,active vs. mhomed,active with same ip(s), unchecked
7974 .line
= __location__
,
7975 .name
= _NBT_NAME("_SA_MA_SI_U", 0x1C, NULL
),
7977 .nb_flags
= NBT_NM_GROUP
,
7979 .num_ips
= ctx
->addresses_best_num
,
7980 .ips
= ctx
->addresses_best
,
7981 .apply_expected
= true
7987 .type
= WREPL_TYPE_MHOMED
,
7988 .state
= WREPL_STATE_ACTIVE
,
7989 .node
= WREPL_NODE_B
,
7991 .num_ips
= ctx
->addresses_best_num
,
7992 .ips
= ctx
->addresses_best
,
7993 .apply_expected
= false
7997 * sgroup,active vs. mhomed,active with different ip(s), unchecked
8000 .line
= __location__
,
8001 .name
= _NBT_NAME("_SA_MA_DI_U", 0x1C, NULL
),
8003 .nb_flags
= NBT_NM_GROUP
,
8005 .num_ips
= ctx
->addresses_best_num
,
8006 .ips
= ctx
->addresses_best
,
8007 .apply_expected
= true
8013 .type
= WREPL_TYPE_MHOMED
,
8014 .state
= WREPL_STATE_ACTIVE
,
8015 .node
= WREPL_NODE_B
,
8017 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8018 .ips
= addresses_B_1
,
8019 .apply_expected
= false
8023 * sgroup,active vs. mhomed,tombstone with same ip(s), unchecked
8026 .line
= __location__
,
8027 .name
= _NBT_NAME("_SA_MT_SI_U", 0x1C, NULL
),
8029 .nb_flags
= NBT_NM_GROUP
,
8031 .num_ips
= ctx
->addresses_best_num
,
8032 .ips
= ctx
->addresses_best
,
8033 .apply_expected
= true
8039 .type
= WREPL_TYPE_MHOMED
,
8040 .state
= WREPL_STATE_TOMBSTONE
,
8041 .node
= WREPL_NODE_B
,
8043 .num_ips
= ctx
->addresses_best_num
,
8044 .ips
= ctx
->addresses_best
,
8045 .apply_expected
= false
8049 * sgroup,active vs. mhomed,tombstone with different ip(s), unchecked
8052 .line
= __location__
,
8053 .name
= _NBT_NAME("_SA_MT_DI_U", 0x1C, NULL
),
8055 .nb_flags
= NBT_NM_GROUP
,
8057 .num_ips
= ctx
->addresses_best_num
,
8058 .ips
= ctx
->addresses_best
,
8059 .apply_expected
= true
8065 .type
= WREPL_TYPE_MHOMED
,
8066 .state
= WREPL_STATE_TOMBSTONE
,
8067 .node
= WREPL_NODE_B
,
8069 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8070 .ips
= addresses_B_1
,
8071 .apply_expected
= false
8075 * multi homed vs. unique section
8078 * mhomed,active vs. unique,active with same ip(s), unchecked
8081 .line
= __location__
,
8082 .name
= _NBT_NAME("_MA_UA_SI_U", 0x00, NULL
),
8086 .num_ips
= ctx
->addresses_best_num
,
8087 .ips
= ctx
->addresses_best
,
8088 .apply_expected
= true
8094 .type
= WREPL_TYPE_UNIQUE
,
8095 .state
= WREPL_STATE_ACTIVE
,
8096 .node
= WREPL_NODE_B
,
8098 .num_ips
= ctx
->addresses_best_num
,
8099 .ips
= ctx
->addresses_best
,
8100 .apply_expected
= true
8104 * mhomed,active vs. unique,active with different ip(s), positive response
8107 .line
= __location__
,
8108 .name
= _NBT_NAME("_MA_UA_DI_P", 0x00, NULL
),
8112 .num_ips
= ctx
->addresses_best_num
,
8113 .ips
= ctx
->addresses_best
,
8114 .apply_expected
= true
8121 .type
= WREPL_TYPE_UNIQUE
,
8122 .state
= WREPL_STATE_ACTIVE
,
8123 .node
= WREPL_NODE_B
,
8125 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8126 .ips
= addresses_B_1
,
8127 .apply_expected
= false
8131 * mhomed,active vs. unique,active with different ip(s), positive response other ips
8134 .line
= __location__
,
8135 .name
= _NBT_NAME("_MA_UA_DI_O", 0x00, NULL
),
8139 .num_ips
= ctx
->addresses_best_num
,
8140 .ips
= ctx
->addresses_best
,
8141 .apply_expected
= true
8146 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
8147 .ips
= addresses_A_3_4
,
8150 .type
= WREPL_TYPE_UNIQUE
,
8151 .state
= WREPL_STATE_ACTIVE
,
8152 .node
= WREPL_NODE_B
,
8154 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8155 .ips
= addresses_B_1
,
8156 .apply_expected
= false
8160 * mhomed,active vs. unique,active with different ip(s), negative response
8163 .line
= __location__
,
8164 .name
= _NBT_NAME("_MA_UA_DI_N", 0x00, NULL
),
8168 .num_ips
= ctx
->addresses_best_num
,
8169 .ips
= ctx
->addresses_best
,
8170 .apply_expected
= true
8177 .type
= WREPL_TYPE_UNIQUE
,
8178 .state
= WREPL_STATE_ACTIVE
,
8179 .node
= WREPL_NODE_B
,
8181 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8182 .ips
= addresses_B_1
,
8183 .apply_expected
= true
8187 * mhomed,active vs. unique,tombstone with same ip(s), unchecked
8190 .line
= __location__
,
8191 .name
= _NBT_NAME("_MA_UT_SI_U", 0x00, NULL
),
8195 .num_ips
= ctx
->addresses_best_num
,
8196 .ips
= ctx
->addresses_best
,
8197 .apply_expected
= true
8203 .type
= WREPL_TYPE_UNIQUE
,
8204 .state
= WREPL_STATE_TOMBSTONE
,
8205 .node
= WREPL_NODE_B
,
8207 .num_ips
= ctx
->addresses_best_num
,
8208 .ips
= ctx
->addresses_best
,
8209 .apply_expected
= false
8213 * mhomed,active vs. unique,tombstone with different ip(s), unchecked
8216 .line
= __location__
,
8217 .name
= _NBT_NAME("_MA_UT_DI_U", 0x00, NULL
),
8221 .num_ips
= ctx
->addresses_best_num
,
8222 .ips
= ctx
->addresses_best
,
8223 .apply_expected
= true
8229 .type
= WREPL_TYPE_UNIQUE
,
8230 .state
= WREPL_STATE_TOMBSTONE
,
8231 .node
= WREPL_NODE_B
,
8233 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8234 .ips
= addresses_B_1
,
8235 .apply_expected
= false
8239 * multi homed vs. normal group section
8242 * mhomed,active vs. group,active with same ip(s), release expected
8245 .line
= __location__
,
8246 .name
= _NBT_NAME("_MA_GA_SI_R", 0x00, NULL
),
8250 .num_ips
= ctx
->addresses_best_num
,
8251 .ips
= ctx
->addresses_best
,
8252 .apply_expected
= true
8256 .expect_release
= true,
8259 .type
= WREPL_TYPE_GROUP
,
8260 .state
= WREPL_STATE_ACTIVE
,
8261 .node
= WREPL_NODE_B
,
8263 .num_ips
= ctx
->addresses_best_num
,
8264 .ips
= ctx
->addresses_best
,
8265 .apply_expected
= true
8269 * mhomed,active vs. group,active with different ip(s), release expected
8272 .line
= __location__
,
8273 .name
= _NBT_NAME("_MA_GA_DI_R", 0x00, NULL
),
8277 .num_ips
= ctx
->addresses_best_num
,
8278 .ips
= ctx
->addresses_best
,
8279 .apply_expected
= true
8283 .expect_release
= true,
8286 .type
= WREPL_TYPE_GROUP
,
8287 .state
= WREPL_STATE_ACTIVE
,
8288 .node
= WREPL_NODE_B
,
8290 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8291 .ips
= addresses_B_1
,
8292 .apply_expected
= true
8296 * mhomed,active vs. group,tombstone with same ip(s), unchecked
8299 .line
= __location__
,
8300 .name
= _NBT_NAME("_MA_GT_SI_U", 0x00, NULL
),
8304 .num_ips
= ctx
->addresses_best_num
,
8305 .ips
= ctx
->addresses_best
,
8306 .apply_expected
= true
8312 .type
= WREPL_TYPE_GROUP
,
8313 .state
= WREPL_STATE_TOMBSTONE
,
8314 .node
= WREPL_NODE_B
,
8316 .num_ips
= ctx
->addresses_best_num
,
8317 .ips
= ctx
->addresses_best
,
8318 .apply_expected
= false
8322 * mhomed,active vs. group,tombstone with different ip(s), unchecked
8325 .line
= __location__
,
8326 .name
= _NBT_NAME("_MA_GT_DI_U", 0x00, NULL
),
8330 .num_ips
= ctx
->addresses_best_num
,
8331 .ips
= ctx
->addresses_best
,
8332 .apply_expected
= true
8338 .type
= WREPL_TYPE_GROUP
,
8339 .state
= WREPL_STATE_TOMBSTONE
,
8340 .node
= WREPL_NODE_B
,
8342 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8343 .ips
= addresses_B_1
,
8344 .apply_expected
= false
8348 * multi homed vs. special group section
8351 * mhomed,active vs. sgroup,active with same ip(s), release expected
8354 .line
= __location__
,
8355 .name
= _NBT_NAME("_MA_SA_SI_R", 0x00, NULL
),
8359 .num_ips
= ctx
->addresses_best_num
,
8360 .ips
= ctx
->addresses_best
,
8361 .apply_expected
= true
8365 .expect_release
= true,
8368 .type
= WREPL_TYPE_SGROUP
,
8369 .state
= WREPL_STATE_ACTIVE
,
8370 .node
= WREPL_NODE_B
,
8372 .num_ips
= ctx
->addresses_best_num
,
8373 .ips
= ctx
->addresses_best
,
8374 .apply_expected
= true
8378 * mhomed,active vs. group,active with different ip(s), release expected
8381 .line
= __location__
,
8382 .name
= _NBT_NAME("_MA_SA_DI_R", 0x00, NULL
),
8386 .num_ips
= ctx
->addresses_best_num
,
8387 .ips
= ctx
->addresses_best
,
8388 .apply_expected
= true
8392 .expect_release
= true,
8395 .type
= WREPL_TYPE_SGROUP
,
8396 .state
= WREPL_STATE_ACTIVE
,
8397 .node
= WREPL_NODE_B
,
8399 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8400 .ips
= addresses_B_1
,
8401 .apply_expected
= true
8405 * mhomed,active vs. sgroup,tombstone with same ip(s), unchecked
8408 .line
= __location__
,
8409 .name
= _NBT_NAME("_MA_ST_SI_U", 0x00, NULL
),
8413 .num_ips
= ctx
->addresses_best_num
,
8414 .ips
= ctx
->addresses_best
,
8415 .apply_expected
= true
8421 .type
= WREPL_TYPE_SGROUP
,
8422 .state
= WREPL_STATE_TOMBSTONE
,
8423 .node
= WREPL_NODE_B
,
8425 .num_ips
= ctx
->addresses_best_num
,
8426 .ips
= ctx
->addresses_best
,
8427 .apply_expected
= false
8431 * mhomed,active vs. sgroup,tombstone with different ip(s), unchecked
8434 .line
= __location__
,
8435 .name
= _NBT_NAME("_MA_ST_DI_U", 0x00, NULL
),
8439 .num_ips
= ctx
->addresses_best_num
,
8440 .ips
= ctx
->addresses_best
,
8441 .apply_expected
= true
8447 .type
= WREPL_TYPE_SGROUP
,
8448 .state
= WREPL_STATE_TOMBSTONE
,
8449 .node
= WREPL_NODE_B
,
8451 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8452 .ips
= addresses_B_1
,
8453 .apply_expected
= false
8457 * multi homed vs. multi homed section
8460 * mhomed,active vs. mhomed,active with same ip(s), unchecked
8463 .line
= __location__
,
8464 .name
= _NBT_NAME("_MA_MA_SI_U", 0x00, NULL
),
8468 .num_ips
= ctx
->addresses_best_num
,
8469 .ips
= ctx
->addresses_best
,
8470 .apply_expected
= true
8476 .type
= WREPL_TYPE_MHOMED
,
8477 .state
= WREPL_STATE_ACTIVE
,
8478 .node
= WREPL_NODE_B
,
8480 .num_ips
= ctx
->addresses_best_num
,
8481 .ips
= ctx
->addresses_best
,
8482 .apply_expected
= true
8486 * mhomed,active vs. mhomed,active with superset ip(s), unchecked
8489 .line
= __location__
,
8490 .name
= _NBT_NAME("_MA_MA_SP_U", 0x00, NULL
),
8494 .num_ips
= ctx
->addresses_best_num
,
8495 .ips
= ctx
->addresses_best
,
8496 .apply_expected
= true
8502 .type
= WREPL_TYPE_MHOMED
,
8503 .state
= WREPL_STATE_ACTIVE
,
8504 .node
= WREPL_NODE_B
,
8506 .num_ips
= ctx
->addresses_all_num
,
8507 .ips
= ctx
->addresses_all
,
8508 .apply_expected
= true
8512 * mhomed,active vs. mhomed,active with different ip(s), positive response
8515 .line
= __location__
,
8516 .name
= _NBT_NAME("_MA_MA_DI_P", 0x00, NULL
),
8520 .num_ips
= ctx
->addresses_best_num
,
8521 .ips
= ctx
->addresses_best
,
8522 .apply_expected
= true
8529 .type
= WREPL_TYPE_MHOMED
,
8530 .state
= WREPL_STATE_ACTIVE
,
8531 .node
= WREPL_NODE_B
,
8533 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8534 .ips
= addresses_B_3_4
,
8535 .apply_expected
= false
8539 * mhomed,active vs. mhomed,active with different ip(s), positive response other ips
8542 .line
= __location__
,
8543 .name
= _NBT_NAME("_MA_MA_DI_O", 0x00, NULL
),
8547 .num_ips
= ctx
->addresses_best_num
,
8548 .ips
= ctx
->addresses_best
,
8549 .apply_expected
= true
8554 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
8555 .ips
= addresses_A_3_4
,
8558 .type
= WREPL_TYPE_MHOMED
,
8559 .state
= WREPL_STATE_ACTIVE
,
8560 .node
= WREPL_NODE_B
,
8562 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8563 .ips
= addresses_B_3_4
,
8564 .apply_expected
= false
8568 * mhomed,active vs. mhomed,active with different ip(s), negative response
8571 .line
= __location__
,
8572 .name
= _NBT_NAME("_MA_MA_DI_N", 0x00, NULL
),
8576 .num_ips
= ctx
->addresses_best_num
,
8577 .ips
= ctx
->addresses_best
,
8578 .apply_expected
= true
8585 .type
= WREPL_TYPE_MHOMED
,
8586 .state
= WREPL_STATE_ACTIVE
,
8587 .node
= WREPL_NODE_B
,
8589 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8590 .ips
= addresses_B_3_4
,
8591 .apply_expected
= true
8595 * mhomed,active vs. mhomed,tombstone with same ip(s), unchecked
8598 .line
= __location__
,
8599 .name
= _NBT_NAME("_MA_MT_SI_U", 0x00, NULL
),
8603 .num_ips
= ctx
->addresses_best_num
,
8604 .ips
= ctx
->addresses_best
,
8605 .apply_expected
= true
8611 .type
= WREPL_TYPE_MHOMED
,
8612 .state
= WREPL_STATE_TOMBSTONE
,
8613 .node
= WREPL_NODE_B
,
8615 .num_ips
= ctx
->addresses_best_num
,
8616 .ips
= ctx
->addresses_best
,
8617 .apply_expected
= false
8621 * mhomed,active vs. mhomed,tombstone with different ip(s), unchecked
8624 .line
= __location__
,
8625 .name
= _NBT_NAME("_MA_MT_DI_U", 0x00, NULL
),
8629 .num_ips
= ctx
->addresses_best_num
,
8630 .ips
= ctx
->addresses_best
,
8631 .apply_expected
= true
8637 .type
= WREPL_TYPE_MHOMED
,
8638 .state
= WREPL_STATE_TOMBSTONE
,
8639 .node
= WREPL_NODE_B
,
8641 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8642 .ips
= addresses_B_3_4
,
8643 .apply_expected
= false
8647 * some more multi homed test, including merging
8650 * mhomed,active vs. mhomed,active with superset ip(s), unchecked
8653 .line
= __location__
,
8654 .section
= "Test Replica vs. owned active: some more MHOMED combinations",
8655 .name
= _NBT_NAME("_MA_MA_SP_U", 0x00, NULL
),
8656 .comment
= "C:MHOMED vs. B:ALL => B:ALL",
8657 .skip
= (ctx
->addresses_all_num
< 3),
8661 .num_ips
= ctx
->addresses_mhomed_num
,
8662 .ips
= ctx
->addresses_mhomed
,
8663 .apply_expected
= true
8669 .type
= WREPL_TYPE_MHOMED
,
8670 .state
= WREPL_STATE_ACTIVE
,
8671 .node
= WREPL_NODE_B
,
8673 .num_ips
= ctx
->addresses_all_num
,
8674 .ips
= ctx
->addresses_all
,
8675 .apply_expected
= true
8679 * mhomed,active vs. mhomed,active with same ips, unchecked
8682 .line
= __location__
,
8683 .name
= _NBT_NAME("_MA_MA_SM_U", 0x00, NULL
),
8684 .comment
= "C:MHOMED vs. B:MHOMED => B:MHOMED",
8685 .skip
= (ctx
->addresses_mhomed_num
< 2),
8689 .num_ips
= ctx
->addresses_mhomed_num
,
8690 .ips
= ctx
->addresses_mhomed
,
8691 .apply_expected
= true
8697 .type
= WREPL_TYPE_MHOMED
,
8698 .state
= WREPL_STATE_ACTIVE
,
8699 .node
= WREPL_NODE_B
,
8701 .num_ips
= ctx
->addresses_mhomed_num
,
8702 .ips
= ctx
->addresses_mhomed
,
8703 .apply_expected
= true
8707 * mhomed,active vs. mhomed,active with subset ip(s), positive response
8710 .line
= __location__
,
8711 .name
= _NBT_NAME("_MA_MA_SB_P", 0x00, NULL
),
8712 .comment
= "C:MHOMED vs. B:BEST (C:MHOMED) => B:MHOMED",
8713 .skip
= (ctx
->addresses_mhomed_num
< 2),
8717 .num_ips
= ctx
->addresses_mhomed_num
,
8718 .ips
= ctx
->addresses_mhomed
,
8719 .apply_expected
= true
8726 .type
= WREPL_TYPE_MHOMED
,
8727 .state
= WREPL_STATE_ACTIVE
,
8728 .node
= WREPL_NODE_B
,
8730 .num_ips
= ctx
->addresses_best_num
,
8731 .ips
= ctx
->addresses_best
,
8732 .mhomed_merge
= true
8736 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with all addresses
8739 .line
= __location__
,
8740 .name
= _NBT_NAME("_MA_MA_SB_A", 0x00, NULL
),
8741 .comment
= "C:MHOMED vs. B:BEST (C:ALL) => B:MHOMED",
8742 .skip
= (ctx
->addresses_all_num
< 3),
8746 .num_ips
= ctx
->addresses_mhomed_num
,
8747 .ips
= ctx
->addresses_mhomed
,
8748 .apply_expected
= true
8753 .num_ips
= ctx
->addresses_all_num
,
8754 .ips
= ctx
->addresses_all
,
8757 .type
= WREPL_TYPE_MHOMED
,
8758 .state
= WREPL_STATE_ACTIVE
,
8759 .node
= WREPL_NODE_B
,
8761 .num_ips
= ctx
->addresses_best_num
,
8762 .ips
= ctx
->addresses_best
,
8763 .mhomed_merge
= true
8767 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with replicas addresses
8768 * TODO: check why the server sends a name release demand for one address?
8769 * the release demand has no effect to the database record...
8772 .line
= __location__
,
8773 .name
= _NBT_NAME("_MA_MA_SB_PRA", 0x00, NULL
),
8774 .comment
= "C:MHOMED vs. B:BEST (C:BEST) => C:MHOMED",
8775 .skip
= (ctx
->addresses_all_num
< 2),
8779 .num_ips
= ctx
->addresses_mhomed_num
,
8780 .ips
= ctx
->addresses_mhomed
,
8781 .apply_expected
= true
8786 .num_ips
= ctx
->addresses_best_num
,
8787 .ips
= ctx
->addresses_best
,
8788 .late_release
= true
8791 .type
= WREPL_TYPE_MHOMED
,
8792 .state
= WREPL_STATE_ACTIVE
,
8793 .node
= WREPL_NODE_B
,
8795 .num_ips
= ctx
->addresses_best_num
,
8796 .ips
= ctx
->addresses_best
,
8797 .apply_expected
= false
8801 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with other addresses
8804 .line
= __location__
,
8805 .name
= _NBT_NAME("_MA_MA_SB_O", 0x00, NULL
),
8806 .comment
= "C:MHOMED vs. B:BEST (B:B_3_4) =>C:MHOMED",
8807 .skip
= (ctx
->addresses_all_num
< 2),
8811 .num_ips
= ctx
->addresses_mhomed_num
,
8812 .ips
= ctx
->addresses_mhomed
,
8813 .apply_expected
= true
8818 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8819 .ips
= addresses_B_3_4
,
8822 .type
= WREPL_TYPE_MHOMED
,
8823 .state
= WREPL_STATE_ACTIVE
,
8824 .node
= WREPL_NODE_B
,
8826 .num_ips
= ctx
->addresses_best_num
,
8827 .ips
= ctx
->addresses_best
,
8828 .apply_expected
= false
8832 * mhomed,active vs. mhomed,active with subset ip(s), negative response
8835 .line
= __location__
,
8836 .name
= _NBT_NAME("_MA_MA_SB_N", 0x00, NULL
),
8837 .comment
= "C:MHOMED vs. B:BEST (NEGATIVE) => B:BEST",
8838 .skip
= (ctx
->addresses_mhomed_num
< 2),
8842 .num_ips
= ctx
->addresses_mhomed_num
,
8843 .ips
= ctx
->addresses_mhomed
,
8844 .apply_expected
= true
8851 .type
= WREPL_TYPE_MHOMED
,
8852 .state
= WREPL_STATE_ACTIVE
,
8853 .node
= WREPL_NODE_B
,
8855 .num_ips
= ctx
->addresses_best_num
,
8856 .ips
= ctx
->addresses_best
,
8857 .apply_expected
= true
8861 * some more multi homed and unique test, including merging
8864 * mhomed,active vs. unique,active with subset ip(s), positive response
8867 .line
= __location__
,
8868 .section
= "Test Replica vs. owned active: some more UNIQUE,MHOMED combinations",
8869 .name
= _NBT_NAME("_MA_UA_SB_P", 0x00, NULL
),
8870 .comment
= "C:MHOMED vs. B:UNIQUE,BEST (C:MHOMED) => B:MHOMED",
8871 .skip
= (ctx
->addresses_all_num
< 2),
8875 .num_ips
= ctx
->addresses_mhomed_num
,
8876 .ips
= ctx
->addresses_mhomed
,
8877 .apply_expected
= true
8884 .type
= WREPL_TYPE_UNIQUE
,
8885 .state
= WREPL_STATE_ACTIVE
,
8886 .node
= WREPL_NODE_B
,
8888 .num_ips
= ctx
->addresses_best_num
,
8889 .ips
= ctx
->addresses_best
,
8890 .mhomed_merge
= true
8894 * unique,active vs. unique,active with different ip(s), positive response, with replicas address
8895 * TODO: check why the server sends a name release demand for one address?
8896 * the release demand has no effect to the database record...
8899 .line
= __location__
,
8900 .name
= _NBT_NAME("_UA_UA_DI_PRA", 0x00, NULL
),
8901 .comment
= "C:BEST vs. B:BEST2 (C:BEST2,LR:BEST2) => C:BEST",
8902 .skip
= (ctx
->addresses_all_num
< 2),
8906 .num_ips
= ctx
->addresses_best_num
,
8907 .ips
= ctx
->addresses_best
,
8908 .apply_expected
= true
8913 .num_ips
= ctx
->addresses_best2_num
,
8914 .ips
= ctx
->addresses_best2
,
8915 .late_release
= true
8918 .type
= WREPL_TYPE_UNIQUE
,
8919 .state
= WREPL_STATE_ACTIVE
,
8920 .node
= WREPL_NODE_B
,
8922 .num_ips
= ctx
->addresses_best2_num
,
8923 .ips
= ctx
->addresses_best2
,
8924 .apply_expected
= false,
8928 * unique,active vs. unique,active with different ip(s), positive response, with all addresses
8931 .line
= __location__
,
8932 .name
= _NBT_NAME("_UA_UA_DI_A", 0x00, NULL
),
8933 .comment
= "C:BEST vs. B:BEST2 (C:ALL) => B:MHOMED",
8934 .skip
= (ctx
->addresses_all_num
< 3),
8938 .num_ips
= ctx
->addresses_best_num
,
8939 .ips
= ctx
->addresses_best
,
8940 .apply_expected
= true
8945 .num_ips
= ctx
->addresses_all_num
,
8946 .ips
= ctx
->addresses_all
,
8949 .type
= WREPL_TYPE_UNIQUE
,
8950 .state
= WREPL_STATE_ACTIVE
,
8951 .node
= WREPL_NODE_B
,
8953 .num_ips
= ctx
->addresses_best2_num
,
8954 .ips
= ctx
->addresses_best2
,
8955 .mhomed_merge
= true,
8959 * unique,active vs. mhomed,active with different ip(s), positive response, with all addresses
8962 .line
= __location__
,
8963 .name
= _NBT_NAME("_UA_MA_DI_A", 0x00, NULL
),
8964 .comment
= "C:BEST vs. B:BEST2 (C:ALL) => B:MHOMED",
8965 .skip
= (ctx
->addresses_all_num
< 3),
8969 .num_ips
= ctx
->addresses_best_num
,
8970 .ips
= ctx
->addresses_best
,
8971 .apply_expected
= true
8976 .num_ips
= ctx
->addresses_all_num
,
8977 .ips
= ctx
->addresses_all
,
8980 .type
= WREPL_TYPE_MHOMED
,
8981 .state
= WREPL_STATE_ACTIVE
,
8982 .node
= WREPL_NODE_B
,
8984 .num_ips
= ctx
->addresses_best2_num
,
8985 .ips
= ctx
->addresses_best2
,
8986 .mhomed_merge
= true,
8990 * special group vs. special group merging section
8993 * sgroup,active vs. sgroup,active with different ip(s)
8996 .line
= __location__
,
8997 .section
= "Test Replica vs. owned active: SGROUP vs. SGROUP tests",
8998 .name
= _NBT_NAME("_SA_SA_DI_U", 0x1C, NULL
),
8999 .skip
= (ctx
->addresses_all_num
< 3),
9001 .nb_flags
= NBT_NM_GROUP
,
9003 .num_ips
= ctx
->addresses_mhomed_num
,
9004 .ips
= ctx
->addresses_mhomed
,
9005 .apply_expected
= true
9011 .type
= WREPL_TYPE_SGROUP
,
9012 .state
= WREPL_STATE_ACTIVE
,
9013 .node
= WREPL_NODE_B
,
9015 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
9016 .ips
= addresses_B_3_4
,
9017 .sgroup_merge
= true
9021 * sgroup,active vs. sgroup,active with same ip(s)
9024 .line
= __location__
,
9025 .name
= _NBT_NAME("_SA_SA_SI_U", 0x1C, NULL
),
9026 .skip
= (ctx
->addresses_all_num
< 3),
9028 .nb_flags
= NBT_NM_GROUP
,
9030 .num_ips
= ctx
->addresses_mhomed_num
,
9031 .ips
= ctx
->addresses_mhomed
,
9032 .apply_expected
= true
9038 .type
= WREPL_TYPE_SGROUP
,
9039 .state
= WREPL_STATE_ACTIVE
,
9040 .node
= WREPL_NODE_B
,
9042 .num_ips
= ctx
->addresses_mhomed_num
,
9043 .ips
= ctx
->addresses_mhomed
,
9044 .sgroup_merge
= true
9048 * sgroup,active vs. sgroup,active with superset ip(s)
9051 .line
= __location__
,
9052 .name
= _NBT_NAME("_SA_SA_SP_U", 0x1C, NULL
),
9053 .skip
= (ctx
->addresses_all_num
< 3),
9055 .nb_flags
= NBT_NM_GROUP
,
9057 .num_ips
= ctx
->addresses_mhomed_num
,
9058 .ips
= ctx
->addresses_mhomed
,
9059 .apply_expected
= true
9065 .type
= WREPL_TYPE_SGROUP
,
9066 .state
= WREPL_STATE_ACTIVE
,
9067 .node
= WREPL_NODE_B
,
9069 .num_ips
= ctx
->addresses_all_num
,
9070 .ips
= ctx
->addresses_all
,
9071 .sgroup_merge
= true
9075 * sgroup,active vs. sgroup,active with subset ip(s)
9078 .line
= __location__
,
9079 .name
= _NBT_NAME("_SA_SA_SB_U", 0x1C, NULL
),
9080 .skip
= (ctx
->addresses_all_num
< 3),
9082 .nb_flags
= NBT_NM_GROUP
,
9084 .num_ips
= ctx
->addresses_mhomed_num
,
9085 .ips
= ctx
->addresses_mhomed
,
9086 .apply_expected
= true
9092 .type
= WREPL_TYPE_SGROUP
,
9093 .state
= WREPL_STATE_ACTIVE
,
9094 .node
= WREPL_NODE_B
,
9096 .num_ips
= ctx
->addresses_best_num
,
9097 .ips
= ctx
->addresses_best
,
9098 .sgroup_merge
= true
9102 * sgroup,active vs. sgroup,tombstone with different ip(s)
9105 .line
= __location__
,
9106 .name
= _NBT_NAME("_SA_ST_DI_U", 0x1C, NULL
),
9107 .skip
= (ctx
->addresses_all_num
< 3),
9109 .nb_flags
= NBT_NM_GROUP
,
9111 .num_ips
= ctx
->addresses_mhomed_num
,
9112 .ips
= ctx
->addresses_mhomed
,
9113 .apply_expected
= true
9119 .type
= WREPL_TYPE_SGROUP
,
9120 .state
= WREPL_STATE_TOMBSTONE
,
9121 .node
= WREPL_NODE_B
,
9123 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
9124 .ips
= addresses_B_3_4
,
9125 .apply_expected
= false
9129 * sgroup,active vs. sgroup,tombstone with same ip(s)
9132 .line
= __location__
,
9133 .name
= _NBT_NAME("_SA_ST_SI_U", 0x1C, NULL
),
9134 .skip
= (ctx
->addresses_all_num
< 3),
9136 .nb_flags
= NBT_NM_GROUP
,
9138 .num_ips
= ctx
->addresses_mhomed_num
,
9139 .ips
= ctx
->addresses_mhomed
,
9140 .apply_expected
= true
9146 .type
= WREPL_TYPE_SGROUP
,
9147 .state
= WREPL_STATE_TOMBSTONE
,
9148 .node
= WREPL_NODE_B
,
9150 .num_ips
= ctx
->addresses_mhomed_num
,
9151 .ips
= ctx
->addresses_mhomed
,
9152 .apply_expected
= false
9156 * sgroup,active vs. sgroup,tombstone with superset ip(s)
9159 .line
= __location__
,
9160 .name
= _NBT_NAME("_SA_ST_SP_U", 0x1C, NULL
),
9161 .skip
= (ctx
->addresses_all_num
< 3),
9163 .nb_flags
= NBT_NM_GROUP
,
9165 .num_ips
= ctx
->addresses_mhomed_num
,
9166 .ips
= ctx
->addresses_mhomed
,
9167 .apply_expected
= true
9173 .type
= WREPL_TYPE_SGROUP
,
9174 .state
= WREPL_STATE_TOMBSTONE
,
9175 .node
= WREPL_NODE_B
,
9177 .num_ips
= ctx
->addresses_all_num
,
9178 .ips
= ctx
->addresses_all
,
9179 .apply_expected
= false
9183 * sgroup,active vs. sgroup,tombstone with subset ip(s)
9186 .line
= __location__
,
9187 .name
= _NBT_NAME("_SA_ST_SB_U", 0x1C, NULL
),
9188 .skip
= (ctx
->addresses_all_num
< 3),
9190 .nb_flags
= NBT_NM_GROUP
,
9192 .num_ips
= ctx
->addresses_mhomed_num
,
9193 .ips
= ctx
->addresses_mhomed
,
9194 .apply_expected
= true
9200 .type
= WREPL_TYPE_SGROUP
,
9201 .state
= WREPL_STATE_TOMBSTONE
,
9202 .node
= WREPL_NODE_B
,
9204 .num_ips
= ctx
->addresses_best_num
,
9205 .ips
= ctx
->addresses_best
,
9206 .apply_expected
= false
9211 if (!ctx
->nbtsock_srv
) {
9212 torture_comment(tctx
, "SKIP: Test Replica records vs. owned active records: not bound to port[%d]\n",
9213 lp_nbt_port(tctx
->lp_ctx
));
9217 torture_comment(tctx
, "Test Replica records vs. owned active records\n");
9219 for(i
=0; ret
&& i
< ARRAY_SIZE(records
); i
++) {
9221 struct test_conflict_owned_active_vs_replica_struct record
= records
[i
];
9222 uint32_t j
, count
= 1;
9225 if (records
[i
].wins
.mhomed
|| records
[i
].name
.type
== 0x1C) {
9226 count
= records
[i
].wins
.num_ips
;
9229 if (records
[i
].section
) {
9230 torture_comment(tctx
, "%s\n", records
[i
].section
);
9233 if (records
[i
].skip
) {
9234 torture_comment(tctx
, "%s => SKIPPED\n", nbt_name_string(ctx
, &records
[i
].name
));
9238 if (records
[i
].replica
.mhomed_merge
) {
9239 action
= "MHOMED_MERGE";
9240 } else if (records
[i
].replica
.sgroup_merge
) {
9241 action
= "SGROUP_MERGE";
9242 } else if (records
[i
].replica
.apply_expected
) {
9245 action
= "NOT REPLACE";
9248 torture_comment(tctx
, "%s%s%s => %s\n",
9249 nbt_name_string(ctx
, &records
[i
].name
),
9250 (records
[i
].comment
?": ":""),
9251 (records
[i
].comment
?records
[i
].comment
:""),
9254 /* Prepare for multi homed registration */
9255 ZERO_STRUCT(records
[i
].defend
);
9256 records
[i
].defend
.timeout
= 10;
9257 records
[i
].defend
.positive
= true;
9258 nbt_set_incoming_handler(ctx
->nbtsock_srv
,
9259 test_conflict_owned_active_vs_replica_handler
,
9261 if (ctx
->nbtsock_srv2
) {
9262 nbt_set_incoming_handler(ctx
->nbtsock_srv2
,
9263 test_conflict_owned_active_vs_replica_handler
,
9270 for (j
=0; j
< count
; j
++) {
9271 struct nbt_name_request
*req
;
9273 name_register
->in
.name
= records
[i
].name
;
9274 name_register
->in
.dest_addr
= ctx
->address
;
9275 name_register
->in
.dest_port
= lp_nbt_port(tctx
->lp_ctx
);
9276 name_register
->in
.address
= records
[i
].wins
.ips
[j
].ip
;
9277 name_register
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
9278 name_register
->in
.register_demand
= false;
9279 name_register
->in
.broadcast
= false;
9280 name_register
->in
.multi_homed
= records
[i
].wins
.mhomed
;
9281 name_register
->in
.ttl
= 300000;
9282 name_register
->in
.timeout
= 70;
9283 name_register
->in
.retries
= 0;
9285 req
= nbt_name_register_send(ctx
->nbtsock
, name_register
);
9287 /* push the request on the wire */
9288 event_loop_once(ctx
->nbtsock
->event_ctx
);
9291 * if we register multiple addresses,
9292 * the server will do name queries to see if the old addresses
9295 if (records
[i
].wins
.mhomed
&& j
> 0) {
9296 end
= timeval_current_ofs(records
[i
].defend
.timeout
,0);
9297 records
[i
].defend
.ret
= true;
9298 while (records
[i
].defend
.timeout
> 0) {
9299 event_loop_once(ctx
->nbtsock_srv
->event_ctx
);
9300 if (timeval_expired(&end
)) break;
9302 ret
&= records
[i
].defend
.ret
;
9305 status
= nbt_name_register_recv(req
, ctx
, name_register
);
9306 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
9307 torture_comment(tctx
, "No response from %s for name register\n", ctx
->address
);
9310 if (!NT_STATUS_IS_OK(status
)) {
9311 torture_comment(tctx
, "Bad response from %s for name register - %s\n",
9312 ctx
->address
, nt_errstr(status
));
9315 CHECK_VALUE(tctx
, name_register
->out
.rcode
, 0);
9316 CHECK_VALUE_STRING(tctx
, name_register
->out
.reply_from
, ctx
->address
);
9317 CHECK_VALUE(tctx
, name_register
->out
.name
.type
, records
[i
].name
.type
);
9318 CHECK_VALUE_STRING(tctx
, name_register
->out
.name
.name
, records
[i
].name
.name
);
9319 CHECK_VALUE_STRING(tctx
, name_register
->out
.name
.scope
, records
[i
].name
.scope
);
9320 CHECK_VALUE_STRING(tctx
, name_register
->out
.reply_addr
, records
[i
].wins
.ips
[j
].ip
);
9323 /* Prepare for the current test */
9324 records
[i
].defend
= record
.defend
;
9325 nbt_set_incoming_handler(ctx
->nbtsock_srv
,
9326 test_conflict_owned_active_vs_replica_handler
,
9328 if (ctx
->nbtsock_srv2
) {
9329 nbt_set_incoming_handler(ctx
->nbtsock_srv2
,
9330 test_conflict_owned_active_vs_replica_handler
,
9337 wins_name
->name
= &records
[i
].name
;
9338 wins_name
->flags
= WREPL_NAME_FLAGS(records
[i
].replica
.type
,
9339 records
[i
].replica
.state
,
9340 records
[i
].replica
.node
,
9341 records
[i
].replica
.is_static
);
9342 wins_name
->id
= ++ctx
->b
.max_version
;
9343 if (wins_name
->flags
& 2) {
9344 wins_name
->addresses
.addresses
.num_ips
= records
[i
].replica
.num_ips
;
9345 wins_name
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
9346 records
[i
].replica
.ips
);
9348 wins_name
->addresses
.ip
= records
[i
].replica
.ips
[0].ip
;
9350 wins_name
->unknown
= "255.255.255.255";
9352 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9355 * wait for the name query, which is handled in
9356 * test_conflict_owned_active_vs_replica_handler()
9358 end
= timeval_current_ofs(records
[i
].defend
.timeout
,0);
9359 records
[i
].defend
.ret
= true;
9360 while (records
[i
].defend
.timeout
> 0) {
9361 event_loop_once(ctx
->nbtsock_srv
->event_ctx
);
9362 if (timeval_expired(&end
)) break;
9364 ret
&= records
[i
].defend
.ret
;
9366 if (records
[i
].defend
.late_release
) {
9367 records
[i
].defend
= record
.defend
;
9368 records
[i
].defend
.expect_release
= true;
9370 * wait for the name release demand, which is handled in
9371 * test_conflict_owned_active_vs_replica_handler()
9373 end
= timeval_current_ofs(records
[i
].defend
.timeout
,0);
9374 records
[i
].defend
.ret
= true;
9375 while (records
[i
].defend
.timeout
> 0) {
9376 event_loop_once(ctx
->nbtsock_srv
->event_ctx
);
9377 if (timeval_expired(&end
)) break;
9379 ret
&= records
[i
].defend
.ret
;
9382 if (records
[i
].replica
.mhomed_merge
) {
9383 ret
&= test_wrepl_mhomed_merged(tctx
, ctx
, &ctx
->c
,
9384 records
[i
].wins
.num_ips
, records
[i
].wins
.ips
,
9386 records
[i
].replica
.num_ips
, records
[i
].replica
.ips
,
9388 } else if (records
[i
].replica
.sgroup_merge
) {
9389 ret
&= test_wrepl_sgroup_merged(tctx
, ctx
, NULL
,
9391 records
[i
].wins
.num_ips
, records
[i
].wins
.ips
,
9393 records
[i
].replica
.num_ips
, records
[i
].replica
.ips
,
9396 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
,
9397 records
[i
].replica
.apply_expected
);
9400 if (records
[i
].replica
.apply_expected
||
9401 records
[i
].replica
.mhomed_merge
) {
9402 wins_name
->name
= &records
[i
].name
;
9403 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE
,
9404 WREPL_STATE_TOMBSTONE
,
9405 WREPL_NODE_B
, false);
9406 wins_name
->id
= ++ctx
->b
.max_version
;
9407 wins_name
->addresses
.ip
= addresses_B_1
[0].ip
;
9408 wins_name
->unknown
= "255.255.255.255";
9410 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9411 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
, true);
9413 for (j
=0; j
< count
; j
++) {
9414 struct nbt_name_socket
*nbtsock
= ctx
->nbtsock
;
9416 if (ctx
->myaddr2
&& strcmp(records
[i
].wins
.ips
[j
].ip
, ctx
->myaddr2
->addr
) == 0) {
9417 nbtsock
= ctx
->nbtsock2
;
9420 release
->in
.name
= records
[i
].name
;
9421 release
->in
.dest_addr
= ctx
->address
;
9422 release
->in
.dest_port
= lp_nbt_port(tctx
->lp_ctx
);
9423 release
->in
.address
= records
[i
].wins
.ips
[j
].ip
;
9424 release
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
9425 release
->in
.broadcast
= false;
9426 release
->in
.timeout
= 30;
9427 release
->in
.retries
= 0;
9429 status
= nbt_name_release(nbtsock
, ctx
, release
);
9430 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
9431 torture_comment(tctx
, "No response from %s for name release\n", ctx
->address
);
9434 if (!NT_STATUS_IS_OK(status
)) {
9435 torture_comment(tctx
, "Bad response from %s for name query - %s\n",
9436 ctx
->address
, nt_errstr(status
));
9439 CHECK_VALUE(tctx
, release
->out
.rcode
, 0);
9442 if (records
[i
].replica
.sgroup_merge
) {
9443 /* clean up the SGROUP record */
9444 wins_name
->name
= &records
[i
].name
;
9445 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
9447 WREPL_NODE_B
, false);
9448 wins_name
->id
= ++ctx
->b
.max_version
;
9449 wins_name
->addresses
.addresses
.num_ips
= 0;
9450 wins_name
->addresses
.addresses
.ips
= NULL
;
9451 wins_name
->unknown
= "255.255.255.255";
9452 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9454 /* take ownership of the SGROUP record */
9455 wins_name
->name
= &records
[i
].name
;
9456 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
9458 WREPL_NODE_B
, false);
9459 wins_name
->id
= ++ctx
->b
.max_version
;
9460 wins_name
->addresses
.addresses
.num_ips
= ARRAY_SIZE(addresses_B_1
);
9461 wins_name
->addresses
.addresses
.ips
= discard_const_p(struct wrepl_ip
,
9463 wins_name
->unknown
= "255.255.255.255";
9464 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9465 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
, true);
9467 /* overwrite the SGROUP record with unique,tombstone */
9468 wins_name
->name
= &records
[i
].name
;
9469 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE
,
9470 WREPL_STATE_TOMBSTONE
,
9471 WREPL_NODE_B
, false);
9472 wins_name
->id
= ++ctx
->b
.max_version
;
9473 wins_name
->addresses
.ip
= addresses_A_1
[0].ip
;
9474 wins_name
->unknown
= "255.255.255.255";
9475 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9476 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
, true);
9481 torture_comment(tctx
, "conflict handled wrong or record[%u]: %s\n", i
, records
[i
].line
);
9489 #define _NBT_ASSERT(v, correct) do { \
9490 if ((v) != (correct)) { \
9491 printf("(%s) Incorrect value %s=%d - should be %s (%d)\n", \
9492 __location__, #v, v, #correct, correct); \
9497 #define _NBT_ASSERT_STRING(v, correct) do { \
9498 if ( ((!v) && (correct)) || \
9499 ((v) && (!correct)) || \
9500 ((v) && (correct) && strcmp(v,correct) != 0)) { \
9501 printf("(%s) Incorrect value %s=%s - should be %s\n", \
9502 __location__, #v, v, correct); \
9507 static void test_conflict_owned_active_vs_replica_handler_query(struct nbt_name_socket
*nbtsock
,
9508 struct nbt_name_packet
*req_packet
,
9509 struct socket_address
*src
)
9511 struct nbt_name
*name
;
9512 struct nbt_name_packet
*rep_packet
;
9513 struct test_conflict_owned_active_vs_replica_struct
*rec
=
9514 (struct test_conflict_owned_active_vs_replica_struct
*)nbtsock
->incoming
.private_data
;
9516 _NBT_ASSERT(req_packet
->qdcount
, 1);
9517 _NBT_ASSERT(req_packet
->questions
[0].question_type
, NBT_QTYPE_NETBIOS
);
9518 _NBT_ASSERT(req_packet
->questions
[0].question_class
, NBT_QCLASS_IP
);
9520 name
= &req_packet
->questions
[0].name
;
9522 _NBT_ASSERT(name
->type
, rec
->name
.type
);
9523 _NBT_ASSERT_STRING(name
->name
, rec
->name
.name
);
9524 _NBT_ASSERT_STRING(name
->scope
, rec
->name
.scope
);
9526 _NBT_ASSERT(rec
->defend
.expect_release
, false);
9528 rep_packet
= talloc_zero(nbtsock
, struct nbt_name_packet
);
9529 if (rep_packet
== NULL
) return;
9531 rep_packet
->name_trn_id
= req_packet
->name_trn_id
;
9532 rep_packet
->ancount
= 1;
9534 rep_packet
->answers
= talloc_array(rep_packet
, struct nbt_res_rec
, 1);
9535 if (rep_packet
->answers
== NULL
) return;
9537 rep_packet
->answers
[0].name
= *name
;
9538 rep_packet
->answers
[0].rr_class
= NBT_QCLASS_IP
;
9539 rep_packet
->answers
[0].ttl
= 0;
9541 if (rec
->defend
.positive
) {
9542 uint32_t i
, num_ips
;
9543 const struct wrepl_ip
*ips
;
9545 if (rec
->defend
.num_ips
> 0) {
9546 num_ips
= rec
->defend
.num_ips
;
9547 ips
= rec
->defend
.ips
;
9549 num_ips
= rec
->wins
.num_ips
;
9550 ips
= rec
->wins
.ips
;
9553 /* send a positive reply */
9554 rep_packet
->operation
=
9557 NBT_FLAG_AUTHORITIVE
|
9558 NBT_FLAG_RECURSION_DESIRED
|
9559 NBT_FLAG_RECURSION_AVAIL
;
9561 rep_packet
->answers
[0].rr_type
= NBT_QTYPE_NETBIOS
;
9563 rep_packet
->answers
[0].rdata
.netbios
.length
= num_ips
*6;
9564 rep_packet
->answers
[0].rdata
.netbios
.addresses
=
9565 talloc_array(rep_packet
->answers
, struct nbt_rdata_address
, num_ips
);
9566 if (rep_packet
->answers
[0].rdata
.netbios
.addresses
== NULL
) return;
9568 for (i
=0; i
< num_ips
; i
++) {
9569 struct nbt_rdata_address
*addr
=
9570 &rep_packet
->answers
[0].rdata
.netbios
.addresses
[i
];
9571 addr
->nb_flags
= rec
->wins
.nb_flags
;
9572 addr
->ipaddr
= ips
[i
].ip
;
9574 DEBUG(2,("Sending positive name query reply for %s to %s:%d\n",
9575 nbt_name_string(rep_packet
, name
), src
->addr
, src
->port
));
9577 /* send a negative reply */
9578 rep_packet
->operation
=
9581 NBT_FLAG_AUTHORITIVE
|
9584 rep_packet
->answers
[0].rr_type
= NBT_QTYPE_NULL
;
9586 ZERO_STRUCT(rep_packet
->answers
[0].rdata
);
9588 DEBUG(2,("Sending negative name query reply for %s to %s:%d\n",
9589 nbt_name_string(rep_packet
, name
), src
->addr
, src
->port
));
9592 nbt_name_reply_send(nbtsock
, src
, rep_packet
);
9593 talloc_free(rep_packet
);
9595 /* make sure we push the reply to the wire */
9596 while (nbtsock
->send_queue
) {
9597 event_loop_once(nbtsock
->event_ctx
);
9601 rec
->defend
.timeout
= 0;
9602 rec
->defend
.ret
= true;
9605 static void test_conflict_owned_active_vs_replica_handler_release(
9606 struct nbt_name_socket
*nbtsock
,
9607 struct nbt_name_packet
*req_packet
,
9608 struct socket_address
*src
)
9610 struct nbt_name
*name
;
9611 struct nbt_name_packet
*rep_packet
;
9612 struct test_conflict_owned_active_vs_replica_struct
*rec
=
9613 (struct test_conflict_owned_active_vs_replica_struct
*)nbtsock
->incoming
.private_data
;
9615 _NBT_ASSERT(req_packet
->qdcount
, 1);
9616 _NBT_ASSERT(req_packet
->questions
[0].question_type
, NBT_QTYPE_NETBIOS
);
9617 _NBT_ASSERT(req_packet
->questions
[0].question_class
, NBT_QCLASS_IP
);
9619 name
= &req_packet
->questions
[0].name
;
9621 _NBT_ASSERT(name
->type
, rec
->name
.type
);
9622 _NBT_ASSERT_STRING(name
->name
, rec
->name
.name
);
9623 _NBT_ASSERT_STRING(name
->scope
, rec
->name
.scope
);
9625 _NBT_ASSERT(rec
->defend
.expect_release
, true);
9627 rep_packet
= talloc_zero(nbtsock
, struct nbt_name_packet
);
9628 if (rep_packet
== NULL
) return;
9630 rep_packet
->name_trn_id
= req_packet
->name_trn_id
;
9631 rep_packet
->ancount
= 1;
9632 rep_packet
->operation
=
9634 NBT_OPCODE_RELEASE
|
9635 NBT_FLAG_AUTHORITIVE
;
9637 rep_packet
->answers
= talloc_array(rep_packet
, struct nbt_res_rec
, 1);
9638 if (rep_packet
->answers
== NULL
) return;
9640 rep_packet
->answers
[0].name
= *name
;
9641 rep_packet
->answers
[0].rr_type
= NBT_QTYPE_NETBIOS
;
9642 rep_packet
->answers
[0].rr_class
= NBT_QCLASS_IP
;
9643 rep_packet
->answers
[0].ttl
= req_packet
->additional
[0].ttl
;
9644 rep_packet
->answers
[0].rdata
= req_packet
->additional
[0].rdata
;
9646 DEBUG(2,("Sending name release reply for %s to %s:%d\n",
9647 nbt_name_string(rep_packet
, name
), src
->addr
, src
->port
));
9649 nbt_name_reply_send(nbtsock
, src
, rep_packet
);
9650 talloc_free(rep_packet
);
9652 /* make sure we push the reply to the wire */
9653 while (nbtsock
->send_queue
) {
9654 event_loop_once(nbtsock
->event_ctx
);
9658 rec
->defend
.timeout
= 0;
9659 rec
->defend
.ret
= true;
9662 static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket
*nbtsock
,
9663 struct nbt_name_packet
*req_packet
,
9664 struct socket_address
*src
)
9666 struct test_conflict_owned_active_vs_replica_struct
*rec
=
9667 (struct test_conflict_owned_active_vs_replica_struct
*)nbtsock
->incoming
.private_data
;
9669 rec
->defend
.ret
= false;
9671 switch (req_packet
->operation
& NBT_OPCODE
) {
9672 case NBT_OPCODE_QUERY
:
9673 test_conflict_owned_active_vs_replica_handler_query(nbtsock
, req_packet
, src
);
9675 case NBT_OPCODE_RELEASE
:
9676 test_conflict_owned_active_vs_replica_handler_release(nbtsock
, req_packet
, src
);
9679 printf("%s: unexpected incoming packet\n", __location__
);
9685 test WINS replication replica conflicts operations
9687 static bool torture_nbt_winsreplication_replica(struct torture_context
*tctx
)
9690 struct test_wrepl_conflict_conn
*ctx
;
9692 const char *address
;
9693 struct nbt_name name
;
9695 if (!torture_nbt_get_name(tctx
, &name
, &address
))
9698 ctx
= test_create_conflict_ctx(tctx
, address
);
9699 if (!ctx
) return false;
9701 ret
&= test_conflict_same_owner(tctx
, ctx
);
9702 ret
&= test_conflict_different_owner(tctx
, ctx
);
9708 test WINS replication owned conflicts operations
9710 static bool torture_nbt_winsreplication_owned(struct torture_context
*tctx
)
9712 const char *address
;
9713 struct nbt_name name
;
9715 struct test_wrepl_conflict_conn
*ctx
;
9717 if (torture_setting_bool(tctx
, "quick", false))
9719 "skip NBT-WINSREPLICATION-OWNED test in quick test mode\n");
9721 if (!torture_nbt_get_name(tctx
, &name
, &address
))
9724 ctx
= test_create_conflict_ctx(tctx
, address
);
9725 torture_assert(tctx
, ctx
!= NULL
, "Creating context failed");
9727 ret
&= test_conflict_owned_released_vs_replica(tctx
, ctx
);
9728 ret
&= test_conflict_owned_active_vs_replica(tctx
, ctx
);
9734 test simple WINS replication operations
9736 struct torture_suite
*torture_nbt_winsreplication(TALLOC_CTX
*mem_ctx
)
9738 struct torture_suite
*suite
= torture_suite_create(
9739 mem_ctx
, "WINSREPLICATION");
9740 struct torture_tcase
*tcase
;
9742 tcase
= torture_suite_add_simple_test(suite
, "assoc_ctx1",
9744 tcase
->tests
->dangerous
= true;
9746 torture_suite_add_simple_test(suite
, "assoc_ctx2",
9749 torture_suite_add_simple_test(suite
, "wins_replication",
9750 test_wins_replication
);
9752 torture_suite_add_simple_test(suite
, "replica",
9753 torture_nbt_winsreplication_replica
);
9755 torture_suite_add_simple_test(suite
, "owned",
9756 torture_nbt_winsreplication_owned
);