2 Unix SMB/CIFS implementation.
4 WINS replication testing
6 Copyright (C) Andrew Tridgell 2005
7 Copyright (C) Stefan Metzmacher 2005
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>.
24 #include "libcli/wrepl/winsrepl.h"
25 #include "lib/events/events.h"
26 #include "lib/socket/socket.h"
27 #include "system/network.h"
28 #include "lib/socket/netif.h"
29 #include "librpc/gen_ndr/ndr_nbt.h"
30 #include "torture/torture.h"
31 #include "torture/nbt/proto.h"
32 #include "param/param.h"
34 #define CHECK_STATUS(tctx, status, correct) \
35 torture_assert_ntstatus_equal(tctx, status, correct, \
38 #define CHECK_VALUE(tctx, v, correct) \
39 torture_assert(tctx, (v) == (correct), \
40 talloc_asprintf(tctx, "Incorrect value %s=%d - should be %d\n", \
43 #define CHECK_VALUE_UINT64(tctx, v, correct) \
44 torture_assert(tctx, (v) == (correct), \
45 talloc_asprintf(tctx, "Incorrect value %s=%llu - should be %llu\n", \
46 #v, (long long)v, (long long)correct))
48 #define CHECK_VALUE_STRING(tctx, v, correct) \
49 torture_assert_str_equal(tctx, v, correct, "Invalid value")
51 #define _NBT_NAME(n,t,s) {\
57 static const char *wrepl_name_type_string(enum wrepl_name_type type
)
60 case WREPL_TYPE_UNIQUE
: return "UNIQUE";
61 case WREPL_TYPE_GROUP
: return "GROUP";
62 case WREPL_TYPE_SGROUP
: return "SGROUP";
63 case WREPL_TYPE_MHOMED
: return "MHOMED";
65 return "UNKNOWN_TYPE";
68 static const char *wrepl_name_state_string(enum wrepl_name_state state
)
71 case WREPL_STATE_ACTIVE
: return "ACTIVE";
72 case WREPL_STATE_RELEASED
: return "RELEASED";
73 case WREPL_STATE_TOMBSTONE
: return "TOMBSTONE";
74 case WREPL_STATE_RESERVED
: return "RESERVED";
76 return "UNKNOWN_STATE";
80 test how assoc_ctx's are only usable on the connection
83 static bool test_assoc_ctx1(struct torture_context
*tctx
)
86 struct wrepl_request
*req
;
87 struct wrepl_socket
*wrepl_socket1
;
88 struct wrepl_associate associate1
;
89 struct wrepl_socket
*wrepl_socket2
;
90 struct wrepl_associate associate2
;
91 struct wrepl_pull_table pull_table
;
92 struct wrepl_packet packet
;
93 struct wrepl_send_ctrl ctrl
;
94 struct wrepl_packet
*rep_packet
;
95 struct wrepl_associate_stop assoc_stop
;
100 if (!torture_nbt_get_name(tctx
, &name
, &address
))
103 torture_comment(tctx
, "Test if assoc_ctx is only valid on the conection it was created on\n");
105 wrepl_socket1
= wrepl_socket_init(tctx
, tctx
->ev
, lp_iconv_convenience(tctx
->lp_ctx
));
106 wrepl_socket2
= wrepl_socket_init(tctx
, tctx
->ev
, lp_iconv_convenience(tctx
->lp_ctx
));
108 torture_comment(tctx
, "Setup 2 wrepl connections\n");
109 status
= wrepl_connect(wrepl_socket1
, wrepl_best_ip(tctx
->lp_ctx
, address
), address
);
110 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
112 status
= wrepl_connect(wrepl_socket2
, wrepl_best_ip(tctx
->lp_ctx
, address
), address
);
113 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
115 torture_comment(tctx
, "Send a start association request (conn1)\n");
116 status
= wrepl_associate(wrepl_socket1
, &associate1
);
117 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
119 torture_comment(tctx
, "association context (conn1): 0x%x\n", associate1
.out
.assoc_ctx
);
121 torture_comment(tctx
, "Send a start association request (conn2)\n");
122 status
= wrepl_associate(wrepl_socket2
, &associate2
);
123 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
125 torture_comment(tctx
, "association context (conn2): 0x%x\n", associate2
.out
.assoc_ctx
);
127 torture_comment(tctx
, "Send a replication table query, with assoc 1 (conn2), the anwser should be on conn1\n");
129 packet
.opcode
= WREPL_OPCODE_BITS
;
130 packet
.assoc_ctx
= associate1
.out
.assoc_ctx
;
131 packet
.mess_type
= WREPL_REPLICATION
;
132 packet
.message
.replication
.command
= WREPL_REPL_TABLE_QUERY
;
134 ctrl
.send_only
= true;
135 req
= wrepl_request_send(wrepl_socket2
, &packet
, &ctrl
);
136 status
= wrepl_request_recv(req
, tctx
, &rep_packet
);
137 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
139 torture_comment(tctx
, "Send a association request (conn2), to make sure the last request was ignored\n");
140 status
= wrepl_associate(wrepl_socket2
, &associate2
);
141 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
143 torture_comment(tctx
, "Send a replication table query, with invalid assoc (conn1), receive answer from conn2\n");
144 pull_table
.in
.assoc_ctx
= 0;
145 req
= wrepl_pull_table_send(wrepl_socket1
, &pull_table
);
146 status
= wrepl_request_recv(req
, tctx
, &rep_packet
);
147 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
149 torture_comment(tctx
, "Send a association request (conn1), to make sure the last request was handled correct\n");
150 status
= wrepl_associate(wrepl_socket1
, &associate2
);
151 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
153 assoc_stop
.in
.assoc_ctx
= associate1
.out
.assoc_ctx
;
154 assoc_stop
.in
.reason
= 4;
155 torture_comment(tctx
, "Send a association stop request (conn1), reson: %u\n", assoc_stop
.in
.reason
);
156 status
= wrepl_associate_stop(wrepl_socket1
, &assoc_stop
);
157 CHECK_STATUS(tctx
, status
, NT_STATUS_END_OF_FILE
);
159 assoc_stop
.in
.assoc_ctx
= associate2
.out
.assoc_ctx
;
160 assoc_stop
.in
.reason
= 0;
161 torture_comment(tctx
, "Send a association stop request (conn2), reson: %u\n", assoc_stop
.in
.reason
);
162 status
= wrepl_associate_stop(wrepl_socket2
, &assoc_stop
);
163 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
165 torture_comment(tctx
, "Close 2 wrepl connections\n");
166 talloc_free(wrepl_socket1
);
167 talloc_free(wrepl_socket2
);
172 test if we always get back the same assoc_ctx
174 static bool test_assoc_ctx2(struct torture_context
*tctx
)
176 struct wrepl_socket
*wrepl_socket
;
177 struct wrepl_associate associate
;
179 struct nbt_name name
;
183 if (!torture_nbt_get_name(tctx
, &name
, &address
))
186 torture_comment(tctx
, "Test if we always get back the same assoc_ctx\n");
188 wrepl_socket
= wrepl_socket_init(tctx
, tctx
->ev
, lp_iconv_convenience(tctx
->lp_ctx
));
190 torture_comment(tctx
, "Setup wrepl connections\n");
191 status
= wrepl_connect(wrepl_socket
, wrepl_best_ip(tctx
->lp_ctx
, address
), address
);
192 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
194 torture_comment(tctx
, "Send 1st start association request\n");
195 status
= wrepl_associate(wrepl_socket
, &associate
);
196 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
197 assoc_ctx1
= associate
.out
.assoc_ctx
;
198 torture_comment(tctx
, "1st association context: 0x%x\n", associate
.out
.assoc_ctx
);
200 torture_comment(tctx
, "Send 2nd start association request\n");
201 status
= wrepl_associate(wrepl_socket
, &associate
);
202 torture_assert_ntstatus_ok(tctx
, status
, "2nd start association failed");
203 torture_assert(tctx
, associate
.out
.assoc_ctx
== assoc_ctx1
,
204 "Different context returned");
205 torture_comment(tctx
, "2nd association context: 0x%x\n", associate
.out
.assoc_ctx
);
207 torture_comment(tctx
, "Send 3rd start association request\n");
208 status
= wrepl_associate(wrepl_socket
, &associate
);
209 torture_assert(tctx
, associate
.out
.assoc_ctx
== assoc_ctx1
,
210 "Different context returned");
211 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
212 torture_comment(tctx
, "3rd association context: 0x%x\n", associate
.out
.assoc_ctx
);
214 torture_comment(tctx
, "Close wrepl connections\n");
215 talloc_free(wrepl_socket
);
221 display a replication entry
223 static void display_entry(struct torture_context
*tctx
, struct wrepl_name
*name
)
227 torture_comment(tctx
, "%s\n", nbt_name_string(tctx
, &name
->name
));
228 torture_comment(tctx
, "\tTYPE:%u STATE:%u NODE:%u STATIC:%u VERSION_ID: %llu\n",
229 name
->type
, name
->state
, name
->node
, name
->is_static
, (long long)name
->version_id
);
230 torture_comment(tctx
, "\tRAW_FLAGS: 0x%08X OWNER: %-15s\n",
231 name
->raw_flags
, name
->owner
);
232 for (i
=0;i
<name
->num_addresses
;i
++) {
233 torture_comment(tctx
, "\tADDR: %-15s OWNER: %-15s\n",
234 name
->addresses
[i
].address
, name
->addresses
[i
].owner
);
239 test a full replication dump from a WINS server
241 static bool test_wins_replication(struct torture_context
*tctx
)
243 struct wrepl_socket
*wrepl_socket
;
246 struct wrepl_associate associate
;
247 struct wrepl_pull_table pull_table
;
248 struct wrepl_pull_names pull_names
;
249 struct nbt_name name
;
252 if (!torture_nbt_get_name(tctx
, &name
, &address
))
255 torture_comment(tctx
, "Test one pull replication cycle\n");
257 wrepl_socket
= wrepl_socket_init(tctx
, tctx
->ev
, lp_iconv_convenience(tctx
->lp_ctx
));
259 torture_comment(tctx
, "Setup wrepl connections\n");
260 status
= wrepl_connect(wrepl_socket
, wrepl_best_ip(tctx
->lp_ctx
, address
), address
);
261 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
263 torture_comment(tctx
, "Send a start association request\n");
265 status
= wrepl_associate(wrepl_socket
, &associate
);
266 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
268 torture_comment(tctx
, "association context: 0x%x\n", associate
.out
.assoc_ctx
);
270 torture_comment(tctx
, "Send a replication table query\n");
271 pull_table
.in
.assoc_ctx
= associate
.out
.assoc_ctx
;
273 status
= wrepl_pull_table(wrepl_socket
, tctx
, &pull_table
);
274 if (NT_STATUS_EQUAL(NT_STATUS_NETWORK_ACCESS_DENIED
,status
)) {
275 struct wrepl_packet packet
;
276 struct wrepl_request
*req
;
279 packet
.opcode
= WREPL_OPCODE_BITS
;
280 packet
.assoc_ctx
= associate
.out
.assoc_ctx
;
281 packet
.mess_type
= WREPL_STOP_ASSOCIATION
;
282 packet
.message
.stop
.reason
= 0;
284 req
= wrepl_request_send(wrepl_socket
, &packet
, NULL
);
287 torture_fail(tctx
, "We are not a valid pull partner for the server");
289 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
291 torture_comment(tctx
, "Found %d replication partners\n", pull_table
.out
.num_partners
);
293 for (i
=0;i
<pull_table
.out
.num_partners
;i
++) {
294 struct wrepl_wins_owner
*partner
= &pull_table
.out
.partners
[i
];
295 torture_comment(tctx
, "%s max_version=%6llu min_version=%6llu type=%d\n",
297 (long long)partner
->max_version
,
298 (long long)partner
->min_version
,
301 pull_names
.in
.assoc_ctx
= associate
.out
.assoc_ctx
;
302 pull_names
.in
.partner
= *partner
;
304 status
= wrepl_pull_names(wrepl_socket
, tctx
, &pull_names
);
305 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
307 torture_comment(tctx
, "Received %d names\n", pull_names
.out
.num_names
);
309 for (j
=0;j
<pull_names
.out
.num_names
;j
++) {
310 display_entry(tctx
, &pull_names
.out
.names
[j
]);
314 torture_comment(tctx
, "Close wrepl connections\n");
315 talloc_free(wrepl_socket
);
319 struct test_wrepl_conflict_conn
{
321 struct wrepl_socket
*pull
;
324 #define TEST_OWNER_A_ADDRESS "127.65.65.1"
325 #define TEST_ADDRESS_A_PREFIX "127.0.65"
326 #define TEST_OWNER_B_ADDRESS "127.66.66.1"
327 #define TEST_ADDRESS_B_PREFIX "127.0.66"
328 #define TEST_OWNER_X_ADDRESS "127.88.88.1"
329 #define TEST_ADDRESS_X_PREFIX "127.0.88"
331 struct wrepl_wins_owner a
, b
, c
, x
;
333 struct socket_address
*myaddr
;
334 struct socket_address
*myaddr2
;
335 struct nbt_name_socket
*nbtsock
;
336 struct nbt_name_socket
*nbtsock2
;
338 struct nbt_name_socket
*nbtsock_srv
;
339 struct nbt_name_socket
*nbtsock_srv2
;
341 uint32_t addresses_best_num
;
342 struct wrepl_ip
*addresses_best
;
344 uint32_t addresses_best2_num
;
345 struct wrepl_ip
*addresses_best2
;
347 uint32_t addresses_all_num
;
348 struct wrepl_ip
*addresses_all
;
350 uint32_t addresses_mhomed_num
;
351 struct wrepl_ip
*addresses_mhomed
;
354 static const struct wrepl_ip addresses_A_1
[] = {
356 .owner
= TEST_OWNER_A_ADDRESS
,
357 .ip
= TEST_ADDRESS_A_PREFIX
".1"
360 static const struct wrepl_ip addresses_A_2
[] = {
362 .owner
= TEST_OWNER_A_ADDRESS
,
363 .ip
= TEST_ADDRESS_A_PREFIX
".2"
366 static const struct wrepl_ip addresses_A_3_4
[] = {
368 .owner
= TEST_OWNER_A_ADDRESS
,
369 .ip
= TEST_ADDRESS_A_PREFIX
".3"
372 .owner
= TEST_OWNER_A_ADDRESS
,
373 .ip
= TEST_ADDRESS_A_PREFIX
".4"
376 static const struct wrepl_ip addresses_A_3_4_X_3_4
[] = {
378 .owner
= TEST_OWNER_A_ADDRESS
,
379 .ip
= TEST_ADDRESS_A_PREFIX
".3"
382 .owner
= TEST_OWNER_A_ADDRESS
,
383 .ip
= TEST_ADDRESS_A_PREFIX
".4"
386 .owner
= TEST_OWNER_X_ADDRESS
,
387 .ip
= TEST_ADDRESS_X_PREFIX
".3"
390 .owner
= TEST_OWNER_X_ADDRESS
,
391 .ip
= TEST_ADDRESS_X_PREFIX
".4"
394 static const struct wrepl_ip addresses_A_3_4_B_3_4
[] = {
396 .owner
= TEST_OWNER_A_ADDRESS
,
397 .ip
= TEST_ADDRESS_A_PREFIX
".3"
400 .owner
= TEST_OWNER_A_ADDRESS
,
401 .ip
= TEST_ADDRESS_A_PREFIX
".4"
404 .owner
= TEST_OWNER_B_ADDRESS
,
405 .ip
= TEST_ADDRESS_B_PREFIX
".3"
408 .owner
= TEST_OWNER_B_ADDRESS
,
409 .ip
= TEST_ADDRESS_B_PREFIX
".4"
412 static const struct wrepl_ip addresses_A_3_4_OWNER_B
[] = {
414 .owner
= TEST_OWNER_B_ADDRESS
,
415 .ip
= TEST_ADDRESS_A_PREFIX
".3"
418 .owner
= TEST_OWNER_B_ADDRESS
,
419 .ip
= TEST_ADDRESS_A_PREFIX
".4"
422 static const struct wrepl_ip addresses_A_3_4_X_3_4_OWNER_B
[] = {
424 .owner
= TEST_OWNER_B_ADDRESS
,
425 .ip
= TEST_ADDRESS_A_PREFIX
".3"
428 .owner
= TEST_OWNER_B_ADDRESS
,
429 .ip
= TEST_ADDRESS_A_PREFIX
".4"
432 .owner
= TEST_OWNER_B_ADDRESS
,
433 .ip
= TEST_ADDRESS_X_PREFIX
".3"
436 .owner
= TEST_OWNER_B_ADDRESS
,
437 .ip
= TEST_ADDRESS_X_PREFIX
".4"
441 static const struct wrepl_ip addresses_A_3_4_X_1_2
[] = {
443 .owner
= TEST_OWNER_A_ADDRESS
,
444 .ip
= TEST_ADDRESS_A_PREFIX
".3"
447 .owner
= TEST_OWNER_A_ADDRESS
,
448 .ip
= TEST_ADDRESS_A_PREFIX
".4"
451 .owner
= TEST_OWNER_X_ADDRESS
,
452 .ip
= TEST_ADDRESS_X_PREFIX
".1"
455 .owner
= TEST_OWNER_X_ADDRESS
,
456 .ip
= TEST_ADDRESS_X_PREFIX
".2"
460 static const struct wrepl_ip addresses_B_1
[] = {
462 .owner
= TEST_OWNER_B_ADDRESS
,
463 .ip
= TEST_ADDRESS_B_PREFIX
".1"
466 static const struct wrepl_ip addresses_B_2
[] = {
468 .owner
= TEST_OWNER_B_ADDRESS
,
469 .ip
= TEST_ADDRESS_B_PREFIX
".2"
472 static const struct wrepl_ip addresses_B_3_4
[] = {
474 .owner
= TEST_OWNER_B_ADDRESS
,
475 .ip
= TEST_ADDRESS_B_PREFIX
".3"
478 .owner
= TEST_OWNER_B_ADDRESS
,
479 .ip
= TEST_ADDRESS_B_PREFIX
".4"
482 static const struct wrepl_ip addresses_B_3_4_X_3_4
[] = {
484 .owner
= TEST_OWNER_B_ADDRESS
,
485 .ip
= TEST_ADDRESS_B_PREFIX
".3"
488 .owner
= TEST_OWNER_B_ADDRESS
,
489 .ip
= TEST_ADDRESS_B_PREFIX
".4"
492 .owner
= TEST_OWNER_X_ADDRESS
,
493 .ip
= TEST_ADDRESS_X_PREFIX
".3"
496 .owner
= TEST_OWNER_X_ADDRESS
,
497 .ip
= TEST_ADDRESS_X_PREFIX
".4"
500 static const struct wrepl_ip addresses_B_3_4_X_1_2
[] = {
502 .owner
= TEST_OWNER_B_ADDRESS
,
503 .ip
= TEST_ADDRESS_B_PREFIX
".3"
506 .owner
= TEST_OWNER_B_ADDRESS
,
507 .ip
= TEST_ADDRESS_B_PREFIX
".4"
510 .owner
= TEST_OWNER_X_ADDRESS
,
511 .ip
= TEST_ADDRESS_X_PREFIX
".1"
514 .owner
= TEST_OWNER_X_ADDRESS
,
515 .ip
= TEST_ADDRESS_X_PREFIX
".2"
519 static const struct wrepl_ip addresses_X_1_2
[] = {
521 .owner
= TEST_OWNER_X_ADDRESS
,
522 .ip
= TEST_ADDRESS_X_PREFIX
".1"
525 .owner
= TEST_OWNER_X_ADDRESS
,
526 .ip
= TEST_ADDRESS_X_PREFIX
".2"
529 static const struct wrepl_ip addresses_X_3_4
[] = {
531 .owner
= TEST_OWNER_X_ADDRESS
,
532 .ip
= TEST_ADDRESS_X_PREFIX
".3"
535 .owner
= TEST_OWNER_X_ADDRESS
,
536 .ip
= TEST_ADDRESS_X_PREFIX
".4"
540 static struct test_wrepl_conflict_conn
*test_create_conflict_ctx(
541 struct torture_context
*tctx
, const char *address
)
543 struct test_wrepl_conflict_conn
*ctx
;
544 struct wrepl_associate associate
;
545 struct wrepl_pull_table pull_table
;
546 struct socket_address
*nbt_srv_addr
;
549 struct interface
*ifaces
;
551 ctx
= talloc_zero(tctx
, struct test_wrepl_conflict_conn
);
552 if (!ctx
) return NULL
;
554 ctx
->address
= address
;
555 ctx
->pull
= wrepl_socket_init(ctx
, tctx
->ev
, lp_iconv_convenience(tctx
->lp_ctx
));
556 if (!ctx
->pull
) return NULL
;
558 torture_comment(tctx
, "Setup wrepl conflict pull connection\n");
559 status
= wrepl_connect(ctx
->pull
, wrepl_best_ip(tctx
->lp_ctx
, ctx
->address
), ctx
->address
);
560 if (!NT_STATUS_IS_OK(status
)) return NULL
;
562 status
= wrepl_associate(ctx
->pull
, &associate
);
563 if (!NT_STATUS_IS_OK(status
)) return NULL
;
565 ctx
->pull_assoc
= associate
.out
.assoc_ctx
;
567 ctx
->a
.address
= TEST_OWNER_A_ADDRESS
;
568 ctx
->a
.max_version
= 0;
569 ctx
->a
.min_version
= 0;
572 ctx
->b
.address
= TEST_OWNER_B_ADDRESS
;
573 ctx
->b
.max_version
= 0;
574 ctx
->b
.min_version
= 0;
577 ctx
->x
.address
= TEST_OWNER_X_ADDRESS
;
578 ctx
->x
.max_version
= 0;
579 ctx
->x
.min_version
= 0;
582 ctx
->c
.address
= address
;
583 ctx
->c
.max_version
= 0;
584 ctx
->c
.min_version
= 0;
587 pull_table
.in
.assoc_ctx
= ctx
->pull_assoc
;
588 status
= wrepl_pull_table(ctx
->pull
, ctx
->pull
, &pull_table
);
589 if (!NT_STATUS_IS_OK(status
)) return NULL
;
591 for (i
=0; i
< pull_table
.out
.num_partners
; i
++) {
592 if (strcmp(TEST_OWNER_A_ADDRESS
,pull_table
.out
.partners
[i
].address
)==0) {
593 ctx
->a
.max_version
= pull_table
.out
.partners
[i
].max_version
;
594 ctx
->a
.min_version
= pull_table
.out
.partners
[i
].min_version
;
596 if (strcmp(TEST_OWNER_B_ADDRESS
,pull_table
.out
.partners
[i
].address
)==0) {
597 ctx
->b
.max_version
= pull_table
.out
.partners
[i
].max_version
;
598 ctx
->b
.min_version
= pull_table
.out
.partners
[i
].min_version
;
600 if (strcmp(TEST_OWNER_X_ADDRESS
,pull_table
.out
.partners
[i
].address
)==0) {
601 ctx
->x
.max_version
= pull_table
.out
.partners
[i
].max_version
;
602 ctx
->x
.min_version
= pull_table
.out
.partners
[i
].min_version
;
604 if (strcmp(address
,pull_table
.out
.partners
[i
].address
)==0) {
605 ctx
->c
.max_version
= pull_table
.out
.partners
[i
].max_version
;
606 ctx
->c
.min_version
= pull_table
.out
.partners
[i
].min_version
;
610 talloc_free(pull_table
.out
.partners
);
612 ctx
->nbtsock
= nbt_name_socket_init(ctx
, tctx
->ev
, lp_iconv_convenience(tctx
->lp_ctx
));
613 if (!ctx
->nbtsock
) return NULL
;
615 load_interfaces(tctx
, lp_interfaces(tctx
->lp_ctx
), &ifaces
);
617 ctx
->myaddr
= socket_address_from_strings(tctx
, ctx
->nbtsock
->sock
->backend_name
, iface_best_ip(ifaces
, address
), 0);
618 if (!ctx
->myaddr
) return NULL
;
620 for (i
= 0; i
< iface_count(ifaces
); i
++) {
621 if (strcmp(ctx
->myaddr
->addr
, iface_n_ip(ifaces
, i
)) == 0) continue;
622 ctx
->myaddr2
= socket_address_from_strings(tctx
, ctx
->nbtsock
->sock
->backend_name
, iface_n_ip(ifaces
, i
), 0);
623 if (!ctx
->myaddr2
) return NULL
;
627 status
= socket_listen(ctx
->nbtsock
->sock
, ctx
->myaddr
, 0, 0);
628 if (!NT_STATUS_IS_OK(status
)) return NULL
;
630 ctx
->nbtsock_srv
= nbt_name_socket_init(ctx
, tctx
->ev
, lp_iconv_convenience(tctx
->lp_ctx
));
631 if (!ctx
->nbtsock_srv
) return NULL
;
633 /* Make a port 137 version of ctx->myaddr */
634 nbt_srv_addr
= socket_address_from_strings(tctx
, ctx
->nbtsock_srv
->sock
->backend_name
, ctx
->myaddr
->addr
, lp_nbt_port(tctx
->lp_ctx
));
635 if (!nbt_srv_addr
) return NULL
;
637 /* And if possible, bind to it. This won't work unless we are root or in sockewrapper */
638 status
= socket_listen(ctx
->nbtsock_srv
->sock
, nbt_srv_addr
, 0, 0);
639 talloc_free(nbt_srv_addr
);
640 if (!NT_STATUS_IS_OK(status
)) {
641 /* this isn't fatal */
642 talloc_free(ctx
->nbtsock_srv
);
643 ctx
->nbtsock_srv
= NULL
;
646 if (ctx
->myaddr2
&& ctx
->nbtsock_srv
) {
647 ctx
->nbtsock2
= nbt_name_socket_init(ctx
, tctx
->ev
, lp_iconv_convenience(tctx
->lp_ctx
));
648 if (!ctx
->nbtsock2
) return NULL
;
650 status
= socket_listen(ctx
->nbtsock2
->sock
, ctx
->myaddr2
, 0, 0);
651 if (!NT_STATUS_IS_OK(status
)) return NULL
;
653 ctx
->nbtsock_srv2
= nbt_name_socket_init(ctx
, ctx
->nbtsock_srv
->event_ctx
, lp_iconv_convenience(tctx
->lp_ctx
));
654 if (!ctx
->nbtsock_srv2
) return NULL
;
656 /* Make a port 137 version of ctx->myaddr2 */
657 nbt_srv_addr
= socket_address_from_strings(tctx
,
658 ctx
->nbtsock_srv
->sock
->backend_name
,
660 lp_nbt_port(tctx
->lp_ctx
));
661 if (!nbt_srv_addr
) return NULL
;
663 /* And if possible, bind to it. This won't work unless we are root or in sockewrapper */
664 status
= socket_listen(ctx
->nbtsock_srv2
->sock
, ctx
->myaddr2
, 0, 0);
665 talloc_free(nbt_srv_addr
);
666 if (!NT_STATUS_IS_OK(status
)) {
667 /* this isn't fatal */
668 talloc_free(ctx
->nbtsock_srv2
);
669 ctx
->nbtsock_srv2
= NULL
;
673 ctx
->addresses_best_num
= 1;
674 ctx
->addresses_best
= talloc_array(ctx
, struct wrepl_ip
, ctx
->addresses_best_num
);
675 if (!ctx
->addresses_best
) return NULL
;
676 ctx
->addresses_best
[0].owner
= ctx
->b
.address
;
677 ctx
->addresses_best
[0].ip
= ctx
->myaddr
->addr
;
679 ctx
->addresses_all_num
= iface_count(ifaces
);
680 ctx
->addresses_all
= talloc_array(ctx
, struct wrepl_ip
, ctx
->addresses_all_num
);
681 if (!ctx
->addresses_all
) return NULL
;
682 for (i
=0; i
< ctx
->addresses_all_num
; i
++) {
683 ctx
->addresses_all
[i
].owner
= ctx
->b
.address
;
684 ctx
->addresses_all
[i
].ip
= talloc_strdup(ctx
->addresses_all
, iface_n_ip(ifaces
, i
));
685 if (!ctx
->addresses_all
[i
].ip
) return NULL
;
688 if (ctx
->nbtsock_srv2
) {
689 ctx
->addresses_best2_num
= 1;
690 ctx
->addresses_best2
= talloc_array(ctx
, struct wrepl_ip
, ctx
->addresses_best2_num
);
691 if (!ctx
->addresses_best2
) return NULL
;
692 ctx
->addresses_best2
[0].owner
= ctx
->b
.address
;
693 ctx
->addresses_best2
[0].ip
= ctx
->myaddr2
->addr
;
695 ctx
->addresses_mhomed_num
= 2;
696 ctx
->addresses_mhomed
= talloc_array(ctx
, struct wrepl_ip
, ctx
->addresses_mhomed_num
);
697 if (!ctx
->addresses_mhomed
) return NULL
;
698 ctx
->addresses_mhomed
[0].owner
= ctx
->b
.address
;
699 ctx
->addresses_mhomed
[0].ip
= ctx
->myaddr
->addr
;
700 ctx
->addresses_mhomed
[1].owner
= ctx
->b
.address
;
701 ctx
->addresses_mhomed
[1].ip
= ctx
->myaddr2
->addr
;
707 static bool test_wrepl_update_one(struct torture_context
*tctx
,
708 struct test_wrepl_conflict_conn
*ctx
,
709 const struct wrepl_wins_owner
*owner
,
710 const struct wrepl_wins_name
*name
)
712 struct wrepl_socket
*wrepl_socket
;
713 struct wrepl_associate associate
;
714 struct wrepl_packet update_packet
, repl_send
;
715 struct wrepl_table
*update
;
716 struct wrepl_wins_owner wrepl_wins_owners
[1];
717 struct wrepl_packet
*repl_recv
;
718 struct wrepl_wins_owner
*send_request
;
719 struct wrepl_send_reply
*send_reply
;
720 struct wrepl_wins_name wrepl_wins_names
[1];
724 wrepl_socket
= wrepl_socket_init(ctx
, tctx
->ev
, lp_iconv_convenience(tctx
->lp_ctx
));
726 status
= wrepl_connect(wrepl_socket
, wrepl_best_ip(tctx
->lp_ctx
, ctx
->address
), ctx
->address
);
727 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
729 status
= wrepl_associate(wrepl_socket
, &associate
);
730 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
731 assoc_ctx
= associate
.out
.assoc_ctx
;
733 /* now send a WREPL_REPL_UPDATE message */
734 ZERO_STRUCT(update_packet
);
735 update_packet
.opcode
= WREPL_OPCODE_BITS
;
736 update_packet
.assoc_ctx
= assoc_ctx
;
737 update_packet
.mess_type
= WREPL_REPLICATION
;
738 update_packet
.message
.replication
.command
= WREPL_REPL_UPDATE
;
739 update
= &update_packet
.message
.replication
.info
.table
;
741 update
->partner_count
= ARRAY_SIZE(wrepl_wins_owners
);
742 update
->partners
= wrepl_wins_owners
;
743 update
->initiator
= "0.0.0.0";
745 wrepl_wins_owners
[0] = *owner
;
747 status
= wrepl_request(wrepl_socket
, wrepl_socket
,
748 &update_packet
, &repl_recv
);
749 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
750 CHECK_VALUE(tctx
, repl_recv
->mess_type
, WREPL_REPLICATION
);
751 CHECK_VALUE(tctx
, repl_recv
->message
.replication
.command
, WREPL_REPL_SEND_REQUEST
);
752 send_request
= &repl_recv
->message
.replication
.info
.owner
;
754 ZERO_STRUCT(repl_send
);
755 repl_send
.opcode
= WREPL_OPCODE_BITS
;
756 repl_send
.assoc_ctx
= assoc_ctx
;
757 repl_send
.mess_type
= WREPL_REPLICATION
;
758 repl_send
.message
.replication
.command
= WREPL_REPL_SEND_REPLY
;
759 send_reply
= &repl_send
.message
.replication
.info
.reply
;
761 send_reply
->num_names
= ARRAY_SIZE(wrepl_wins_names
);
762 send_reply
->names
= wrepl_wins_names
;
764 wrepl_wins_names
[0] = *name
;
766 status
= wrepl_request(wrepl_socket
, wrepl_socket
,
767 &repl_send
, &repl_recv
);
768 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
769 CHECK_VALUE(tctx
, repl_recv
->mess_type
, WREPL_STOP_ASSOCIATION
);
770 CHECK_VALUE(tctx
, repl_recv
->message
.stop
.reason
, 0);
772 talloc_free(wrepl_socket
);
776 static bool test_wrepl_is_applied(struct torture_context
*tctx
,
777 struct test_wrepl_conflict_conn
*ctx
,
778 const struct wrepl_wins_owner
*owner
,
779 const struct wrepl_wins_name
*name
,
783 struct wrepl_pull_names pull_names
;
784 struct wrepl_name
*names
;
786 pull_names
.in
.assoc_ctx
= ctx
->pull_assoc
;
787 pull_names
.in
.partner
= *owner
;
788 pull_names
.in
.partner
.min_version
= pull_names
.in
.partner
.max_version
;
790 status
= wrepl_pull_names(ctx
->pull
, ctx
->pull
, &pull_names
);
791 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
792 torture_assert(tctx
, pull_names
.out
.num_names
== (expected
?1:0),
793 talloc_asprintf(tctx
, "Invalid number of records returned - expected %d got %d", expected
, pull_names
.out
.num_names
));
795 names
= pull_names
.out
.names
;
798 uint32_t flags
= WREPL_NAME_FLAGS(names
[0].type
,
802 CHECK_VALUE(tctx
, names
[0].name
.type
, name
->name
->type
);
803 CHECK_VALUE_STRING(tctx
, names
[0].name
.name
, name
->name
->name
);
804 CHECK_VALUE_STRING(tctx
, names
[0].name
.scope
, name
->name
->scope
);
805 CHECK_VALUE(tctx
, flags
, name
->flags
);
806 CHECK_VALUE_UINT64(tctx
, names
[0].version_id
, name
->id
);
809 CHECK_VALUE(tctx
, names
[0].num_addresses
,
810 name
->addresses
.addresses
.num_ips
);
812 CHECK_VALUE(tctx
, names
[0].num_addresses
, 1);
813 CHECK_VALUE_STRING(tctx
, names
[0].addresses
[0].address
,
817 talloc_free(pull_names
.out
.names
);
821 static bool test_wrepl_mhomed_merged(struct torture_context
*tctx
,
822 struct test_wrepl_conflict_conn
*ctx
,
823 const struct wrepl_wins_owner
*owner1
,
824 uint32_t num_ips1
, const struct wrepl_ip
*ips1
,
825 const struct wrepl_wins_owner
*owner2
,
826 uint32_t num_ips2
, const struct wrepl_ip
*ips2
,
827 const struct wrepl_wins_name
*name2
)
830 struct wrepl_pull_names pull_names
;
831 struct wrepl_name
*names
;
834 uint32_t num_ips
= num_ips1
+ num_ips2
;
836 for (i
= 0; i
< num_ips2
; i
++) {
837 for (j
= 0; j
< num_ips1
; j
++) {
838 if (strcmp(ips2
[i
].ip
,ips1
[j
].ip
) == 0) {
845 pull_names
.in
.assoc_ctx
= ctx
->pull_assoc
;
846 pull_names
.in
.partner
= *owner2
;
847 pull_names
.in
.partner
.min_version
= pull_names
.in
.partner
.max_version
;
849 status
= wrepl_pull_names(ctx
->pull
, ctx
->pull
, &pull_names
);
850 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
851 CHECK_VALUE(tctx
, pull_names
.out
.num_names
, 1);
853 names
= pull_names
.out
.names
;
855 flags
= WREPL_NAME_FLAGS(names
[0].type
,
859 CHECK_VALUE(tctx
, names
[0].name
.type
, name2
->name
->type
);
860 CHECK_VALUE_STRING(tctx
, names
[0].name
.name
, name2
->name
->name
);
861 CHECK_VALUE_STRING(tctx
, names
[0].name
.scope
, name2
->name
->scope
);
862 CHECK_VALUE(tctx
, flags
, name2
->flags
| WREPL_TYPE_MHOMED
);
863 CHECK_VALUE_UINT64(tctx
, names
[0].version_id
, name2
->id
);
865 CHECK_VALUE(tctx
, names
[0].num_addresses
, num_ips
);
867 for (i
= 0; i
< names
[0].num_addresses
; i
++) {
868 const char *addr
= names
[0].addresses
[i
].address
;
869 const char *owner
= names
[0].addresses
[i
].owner
;
872 for (j
= 0; j
< num_ips2
; j
++) {
873 if (strcmp(addr
, ips2
[j
].ip
) == 0) {
875 CHECK_VALUE_STRING(tctx
, owner
, owner2
->address
);
882 for (j
= 0; j
< num_ips1
; j
++) {
883 if (strcmp(addr
, ips1
[j
].ip
) == 0) {
885 CHECK_VALUE_STRING(tctx
, owner
, owner1
->address
);
892 CHECK_VALUE_STRING(tctx
, addr
, "not found in address list");
894 talloc_free(pull_names
.out
.names
);
898 static bool test_wrepl_sgroup_merged(struct torture_context
*tctx
,
899 struct test_wrepl_conflict_conn
*ctx
,
900 struct wrepl_wins_owner
*merge_owner
,
901 struct wrepl_wins_owner
*owner1
,
902 uint32_t num_ips1
, const struct wrepl_ip
*ips1
,
903 struct wrepl_wins_owner
*owner2
,
904 uint32_t num_ips2
, const struct wrepl_ip
*ips2
,
905 const struct wrepl_wins_name
*name2
)
908 struct wrepl_pull_names pull_names
;
909 struct wrepl_name
*names
;
910 struct wrepl_name
*name
= NULL
;
913 uint32_t num_ips
= num_ips1
+ num_ips2
;
916 merge_owner
= &ctx
->c
;
919 for (i
= 0; i
< num_ips1
; i
++) {
920 if (owner1
!= &ctx
->c
&& strcmp(ips1
[i
].owner
,owner2
->address
) == 0) {
924 for (j
= 0; j
< num_ips2
; j
++) {
925 if (strcmp(ips1
[i
].ip
,ips2
[j
].ip
) == 0) {
933 pull_names
.in
.assoc_ctx
= ctx
->pull_assoc
;
934 pull_names
.in
.partner
= *merge_owner
;
935 pull_names
.in
.partner
.min_version
= pull_names
.in
.partner
.max_version
;
936 pull_names
.in
.partner
.max_version
= 0;
938 status
= wrepl_pull_names(ctx
->pull
, ctx
->pull
, &pull_names
);
939 CHECK_STATUS(tctx
, status
, NT_STATUS_OK
);
941 names
= pull_names
.out
.names
;
943 for (i
= 0; i
< pull_names
.out
.num_names
; i
++) {
944 if (names
[i
].name
.type
!= name2
->name
->type
) continue;
945 if (!names
[i
].name
.name
) continue;
946 if (strcmp(names
[i
].name
.name
, name2
->name
->name
) != 0) continue;
947 if (names
[i
].name
.scope
) continue;
952 if (pull_names
.out
.num_names
> 0) {
953 merge_owner
->max_version
= names
[pull_names
.out
.num_names
-1].version_id
;
957 torture_comment(tctx
, "%s: Name '%s' not found\n", __location__
, nbt_name_string(ctx
, name2
->name
));
961 flags
= WREPL_NAME_FLAGS(name
->type
,
965 CHECK_VALUE(tctx
, name
->name
.type
, name2
->name
->type
);
966 CHECK_VALUE_STRING(tctx
, name
->name
.name
, name2
->name
->name
);
967 CHECK_VALUE_STRING(tctx
, name
->name
.scope
, name2
->name
->scope
);
968 CHECK_VALUE(tctx
, flags
, name2
->flags
);
970 CHECK_VALUE(tctx
, name
->num_addresses
, num_ips
);
972 for (i
= 0; i
< name
->num_addresses
; i
++) {
973 const char *addr
= name
->addresses
[i
].address
;
974 const char *owner
= name
->addresses
[i
].owner
;
977 for (j
= 0; j
< num_ips2
; j
++) {
978 if (strcmp(addr
, ips2
[j
].ip
) == 0) {
980 CHECK_VALUE_STRING(tctx
, owner
, ips2
[j
].owner
);
987 for (j
= 0; j
< num_ips1
; j
++) {
988 if (strcmp(addr
, ips1
[j
].ip
) == 0) {
990 if (owner1
== &ctx
->c
) {
991 CHECK_VALUE_STRING(tctx
, owner
, owner1
->address
);
993 CHECK_VALUE_STRING(tctx
, owner
, ips1
[j
].owner
);
1001 CHECK_VALUE_STRING(tctx
, addr
, "not found in address list");
1003 talloc_free(pull_names
.out
.names
);
1007 static bool test_conflict_same_owner(struct torture_context
*tctx
,
1008 struct test_wrepl_conflict_conn
*ctx
)
1010 static bool ret
= true;
1011 struct wrepl_wins_name wins_name1
;
1012 struct wrepl_wins_name wins_name2
;
1013 struct wrepl_wins_name
*wins_name_tmp
;
1014 struct wrepl_wins_name
*wins_name_last
;
1015 struct wrepl_wins_name
*wins_name_cur
;
1017 struct nbt_name names
[] = {
1018 _NBT_NAME("_SAME_OWNER_A", 0x00, NULL
),
1019 _NBT_NAME("_SAME_OWNER_A", 0x1C, NULL
),
1022 enum wrepl_name_type type
;
1023 enum wrepl_name_state state
;
1024 enum wrepl_name_node node
;
1027 const struct wrepl_ip
*ips
;
1030 .type
= WREPL_TYPE_GROUP
,
1031 .state
= WREPL_STATE_ACTIVE
,
1032 .node
= WREPL_NODE_B
,
1034 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1035 .ips
= addresses_A_1
,
1037 .type
= WREPL_TYPE_UNIQUE
,
1038 .state
= WREPL_STATE_ACTIVE
,
1039 .node
= WREPL_NODE_B
,
1041 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1042 .ips
= addresses_A_1
,
1044 .type
= WREPL_TYPE_UNIQUE
,
1045 .state
= WREPL_STATE_ACTIVE
,
1046 .node
= WREPL_NODE_B
,
1048 .num_ips
= ARRAY_SIZE(addresses_A_2
),
1049 .ips
= addresses_A_2
,
1051 .type
= WREPL_TYPE_UNIQUE
,
1052 .state
= WREPL_STATE_ACTIVE
,
1053 .node
= WREPL_NODE_B
,
1055 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1056 .ips
= addresses_A_1
,
1058 .type
= WREPL_TYPE_UNIQUE
,
1059 .state
= WREPL_STATE_ACTIVE
,
1060 .node
= WREPL_NODE_B
,
1062 .num_ips
= ARRAY_SIZE(addresses_A_2
),
1063 .ips
= addresses_A_2
,
1065 .type
= WREPL_TYPE_SGROUP
,
1066 .state
= WREPL_STATE_TOMBSTONE
,
1067 .node
= WREPL_NODE_B
,
1069 .num_ips
= ARRAY_SIZE(addresses_A_2
),
1070 .ips
= addresses_A_2
,
1072 .type
= WREPL_TYPE_MHOMED
,
1073 .state
= WREPL_STATE_TOMBSTONE
,
1074 .node
= WREPL_NODE_B
,
1076 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1077 .ips
= addresses_A_1
,
1079 .type
= WREPL_TYPE_MHOMED
,
1080 .state
= WREPL_STATE_RELEASED
,
1081 .node
= WREPL_NODE_B
,
1083 .num_ips
= ARRAY_SIZE(addresses_A_2
),
1084 .ips
= addresses_A_2
,
1086 .type
= WREPL_TYPE_SGROUP
,
1087 .state
= WREPL_STATE_ACTIVE
,
1088 .node
= WREPL_NODE_B
,
1090 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1091 .ips
= addresses_A_1
,
1093 .type
= WREPL_TYPE_SGROUP
,
1094 .state
= WREPL_STATE_ACTIVE
,
1095 .node
= WREPL_NODE_B
,
1097 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1098 .ips
= addresses_A_3_4
,
1100 .type
= WREPL_TYPE_SGROUP
,
1101 .state
= WREPL_STATE_TOMBSTONE
,
1102 .node
= WREPL_NODE_B
,
1104 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1105 .ips
= addresses_B_3_4
,
1107 /* the last one should always be a unique,tomstone record! */
1108 .type
= WREPL_TYPE_UNIQUE
,
1109 .state
= WREPL_STATE_TOMBSTONE
,
1110 .node
= WREPL_NODE_B
,
1112 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1113 .ips
= addresses_A_1
,
1117 wins_name_tmp
= NULL
;
1118 wins_name_last
= &wins_name2
;
1119 wins_name_cur
= &wins_name1
;
1121 for (j
=0; ret
&& j
< ARRAY_SIZE(names
); j
++) {
1122 torture_comment(tctx
, "Test Replica Conflicts with same owner[%s] for %s\n",
1123 nbt_name_string(ctx
, &names
[j
]), ctx
->a
.address
);
1125 for(i
=0; ret
&& i
< ARRAY_SIZE(records
); i
++) {
1126 wins_name_tmp
= wins_name_last
;
1127 wins_name_last
= wins_name_cur
;
1128 wins_name_cur
= wins_name_tmp
;
1131 torture_comment(tctx
, "%s,%s%s vs. %s,%s%s with %s ip(s) => %s\n",
1132 wrepl_name_type_string(records
[i
-1].type
),
1133 wrepl_name_state_string(records
[i
-1].state
),
1134 (records
[i
-1].is_static
?",static":""),
1135 wrepl_name_type_string(records
[i
].type
),
1136 wrepl_name_state_string(records
[i
].state
),
1137 (records
[i
].is_static
?",static":""),
1138 (records
[i
-1].ips
==records
[i
].ips
?"same":"different"),
1142 wins_name_cur
->name
= &names
[j
];
1143 wins_name_cur
->flags
= WREPL_NAME_FLAGS(records
[i
].type
,
1146 records
[i
].is_static
);
1147 wins_name_cur
->id
= ++ctx
->a
.max_version
;
1148 if (wins_name_cur
->flags
& 2) {
1149 wins_name_cur
->addresses
.addresses
.num_ips
= records
[i
].num_ips
;
1150 wins_name_cur
->addresses
.addresses
.ips
= discard_const(records
[i
].ips
);
1152 wins_name_cur
->addresses
.ip
= records
[i
].ips
[0].ip
;
1154 wins_name_cur
->unknown
= "255.255.255.255";
1156 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->a
,wins_name_cur
);
1157 if (records
[i
].state
== WREPL_STATE_RELEASED
) {
1158 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->a
, wins_name_last
, false);
1159 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->a
, wins_name_cur
, false);
1161 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->a
, wins_name_cur
, true);
1164 /* the first one is a cleanup run */
1165 if (!ret
&& i
== 0) ret
= true;
1168 torture_comment(tctx
, "conflict handled wrong or record[%u]: %s\n", i
, __location__
);
1176 static bool test_conflict_different_owner(struct torture_context
*tctx
,
1177 struct test_wrepl_conflict_conn
*ctx
)
1180 struct wrepl_wins_name wins_name1
;
1181 struct wrepl_wins_name wins_name2
;
1182 struct wrepl_wins_name
*wins_name_r1
;
1183 struct wrepl_wins_name
*wins_name_r2
;
1186 const char *line
; /* just better debugging */
1187 struct nbt_name name
;
1188 const char *comment
;
1189 bool extra
; /* not the worst case, this is an extra test */
1192 struct wrepl_wins_owner
*owner
;
1193 enum wrepl_name_type type
;
1194 enum wrepl_name_state state
;
1195 enum wrepl_name_node node
;
1198 const struct wrepl_ip
*ips
;
1199 bool apply_expected
;
1201 struct wrepl_wins_owner
*merge_owner
;
1202 bool sgroup_cleanup
;
1206 * NOTE: the first record and the last applied one
1207 * needs to be from the same owner,
1208 * to not conflict in the next smbtorture run!!!
1211 .line
= __location__
,
1212 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1216 .type
= WREPL_TYPE_UNIQUE
,
1217 .state
= WREPL_STATE_TOMBSTONE
,
1218 .node
= WREPL_NODE_B
,
1220 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1221 .ips
= addresses_B_1
,
1222 .apply_expected
= true /* ignored */
1226 .type
= WREPL_TYPE_UNIQUE
,
1227 .state
= WREPL_STATE_TOMBSTONE
,
1228 .node
= WREPL_NODE_B
,
1230 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1231 .ips
= addresses_A_1
,
1232 .apply_expected
= true /* ignored */
1237 * unique vs unique section
1240 * unique,active vs. unique,active
1241 * => should be replaced
1244 .line
= __location__
,
1245 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1248 .type
= WREPL_TYPE_UNIQUE
,
1249 .state
= WREPL_STATE_ACTIVE
,
1250 .node
= WREPL_NODE_B
,
1252 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1253 .ips
= addresses_A_1
,
1254 .apply_expected
= true
1258 .type
= WREPL_TYPE_UNIQUE
,
1259 .state
= WREPL_STATE_ACTIVE
,
1260 .node
= WREPL_NODE_B
,
1262 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1263 .ips
= addresses_B_1
,
1264 .apply_expected
= true
1269 * unique,active vs. unique,tombstone
1270 * => should NOT be replaced
1273 .line
= __location__
,
1274 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1277 .type
= WREPL_TYPE_UNIQUE
,
1278 .state
= WREPL_STATE_ACTIVE
,
1279 .node
= WREPL_NODE_B
,
1281 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1282 .ips
= addresses_B_1
,
1283 .apply_expected
= true
1287 .type
= WREPL_TYPE_UNIQUE
,
1288 .state
= WREPL_STATE_TOMBSTONE
,
1289 .node
= WREPL_NODE_B
,
1291 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1292 .ips
= addresses_B_1
,
1293 .apply_expected
= false
1298 * unique,released vs. unique,active
1299 * => should be replaced
1302 .line
= __location__
,
1303 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1306 .type
= WREPL_TYPE_UNIQUE
,
1307 .state
= WREPL_STATE_RELEASED
,
1308 .node
= WREPL_NODE_B
,
1310 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1311 .ips
= addresses_B_1
,
1312 .apply_expected
= false
1316 .type
= WREPL_TYPE_UNIQUE
,
1317 .state
= WREPL_STATE_ACTIVE
,
1318 .node
= WREPL_NODE_B
,
1320 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1321 .ips
= addresses_A_1
,
1322 .apply_expected
= true
1327 * unique,released vs. unique,tombstone
1328 * => should be replaced
1331 .line
= __location__
,
1332 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1335 .type
= WREPL_TYPE_UNIQUE
,
1336 .state
= WREPL_STATE_RELEASED
,
1337 .node
= WREPL_NODE_B
,
1339 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1340 .ips
= addresses_A_1
,
1341 .apply_expected
= false
1345 .type
= WREPL_TYPE_UNIQUE
,
1346 .state
= WREPL_STATE_TOMBSTONE
,
1347 .node
= WREPL_NODE_B
,
1349 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1350 .ips
= addresses_B_1
,
1351 .apply_expected
= true
1356 * unique,tombstone vs. unique,active
1357 * => should be replaced
1360 .line
= __location__
,
1361 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1364 .type
= WREPL_TYPE_UNIQUE
,
1365 .state
= WREPL_STATE_TOMBSTONE
,
1366 .node
= WREPL_NODE_B
,
1368 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1369 .ips
= addresses_B_1
,
1370 .apply_expected
= true
1374 .type
= WREPL_TYPE_UNIQUE
,
1375 .state
= WREPL_STATE_ACTIVE
,
1376 .node
= WREPL_NODE_B
,
1378 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1379 .ips
= addresses_A_1
,
1380 .apply_expected
= true
1385 * unique,tombstone vs. unique,tombstone
1386 * => should be replaced
1389 .line
= __location__
,
1390 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1393 .type
= WREPL_TYPE_UNIQUE
,
1394 .state
= WREPL_STATE_TOMBSTONE
,
1395 .node
= WREPL_NODE_B
,
1397 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1398 .ips
= addresses_A_1
,
1399 .apply_expected
= true
1403 .type
= WREPL_TYPE_UNIQUE
,
1404 .state
= WREPL_STATE_TOMBSTONE
,
1405 .node
= WREPL_NODE_B
,
1407 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1408 .ips
= addresses_B_1
,
1409 .apply_expected
= true
1415 * unique vs normal groups section,
1418 * unique,active vs. group,active
1419 * => should be replaced
1422 .line
= __location__
,
1423 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1426 .type
= WREPL_TYPE_UNIQUE
,
1427 .state
= WREPL_STATE_ACTIVE
,
1428 .node
= WREPL_NODE_B
,
1430 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1431 .ips
= addresses_B_1
,
1432 .apply_expected
= true
1436 .type
= WREPL_TYPE_GROUP
,
1437 .state
= WREPL_STATE_ACTIVE
,
1438 .node
= WREPL_NODE_B
,
1440 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1441 .ips
= addresses_A_1
,
1442 .apply_expected
= true
1447 * unique,active vs. group,tombstone
1448 * => should NOT be replaced
1451 .line
= __location__
,
1452 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1455 .type
= WREPL_TYPE_UNIQUE
,
1456 .state
= WREPL_STATE_ACTIVE
,
1457 .node
= WREPL_NODE_B
,
1459 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1460 .ips
= addresses_A_1
,
1461 .apply_expected
= true
1465 .type
= WREPL_TYPE_GROUP
,
1466 .state
= WREPL_STATE_TOMBSTONE
,
1467 .node
= WREPL_NODE_B
,
1469 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1470 .ips
= addresses_A_1
,
1471 .apply_expected
= false
1476 * unique,released vs. group,active
1477 * => should be replaced
1480 .line
= __location__
,
1481 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1484 .type
= WREPL_TYPE_UNIQUE
,
1485 .state
= WREPL_STATE_RELEASED
,
1486 .node
= WREPL_NODE_B
,
1488 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1489 .ips
= addresses_A_1
,
1490 .apply_expected
= false
1494 .type
= WREPL_TYPE_GROUP
,
1495 .state
= WREPL_STATE_ACTIVE
,
1496 .node
= WREPL_NODE_B
,
1498 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1499 .ips
= addresses_B_1
,
1500 .apply_expected
= true
1505 * unique,released vs. group,tombstone
1506 * => should be replaced
1509 .line
= __location__
,
1510 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1513 .type
= WREPL_TYPE_UNIQUE
,
1514 .state
= WREPL_STATE_RELEASED
,
1515 .node
= WREPL_NODE_B
,
1517 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1518 .ips
= addresses_B_1
,
1519 .apply_expected
= false
1523 .type
= WREPL_TYPE_GROUP
,
1524 .state
= WREPL_STATE_TOMBSTONE
,
1525 .node
= WREPL_NODE_B
,
1527 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1528 .ips
= addresses_A_1
,
1529 .apply_expected
= true
1534 * unique,tombstone vs. group,active
1535 * => should be replaced
1538 .line
= __location__
,
1539 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1542 .type
= WREPL_TYPE_UNIQUE
,
1543 .state
= WREPL_STATE_TOMBSTONE
,
1544 .node
= WREPL_NODE_B
,
1546 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1547 .ips
= addresses_A_1
,
1548 .apply_expected
= true
1552 .type
= WREPL_TYPE_GROUP
,
1553 .state
= WREPL_STATE_ACTIVE
,
1554 .node
= WREPL_NODE_B
,
1556 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1557 .ips
= addresses_B_1
,
1558 .apply_expected
= true
1563 * unique,tombstone vs. group,tombstone
1564 * => should be replaced
1567 .line
= __location__
,
1568 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1571 .type
= WREPL_TYPE_UNIQUE
,
1572 .state
= WREPL_STATE_TOMBSTONE
,
1573 .node
= WREPL_NODE_B
,
1575 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1576 .ips
= addresses_B_1
,
1577 .apply_expected
= true
1581 .type
= WREPL_TYPE_GROUP
,
1582 .state
= WREPL_STATE_TOMBSTONE
,
1583 .node
= WREPL_NODE_B
,
1585 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1586 .ips
= addresses_A_1
,
1587 .apply_expected
= true
1592 * unique vs special groups section,
1595 * unique,active vs. sgroup,active
1596 * => should NOT be replaced
1599 .line
= __location__
,
1600 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1603 .type
= WREPL_TYPE_UNIQUE
,
1604 .state
= WREPL_STATE_ACTIVE
,
1605 .node
= WREPL_NODE_B
,
1607 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1608 .ips
= addresses_A_1
,
1609 .apply_expected
= true
1613 .type
= WREPL_TYPE_SGROUP
,
1614 .state
= WREPL_STATE_ACTIVE
,
1615 .node
= WREPL_NODE_B
,
1617 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1618 .ips
= addresses_A_1
,
1619 .apply_expected
= false
1624 * unique,active vs. sgroup,tombstone
1625 * => should NOT be replaced
1628 .line
= __location__
,
1629 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1632 .type
= WREPL_TYPE_UNIQUE
,
1633 .state
= WREPL_STATE_ACTIVE
,
1634 .node
= WREPL_NODE_B
,
1636 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1637 .ips
= addresses_A_1
,
1638 .apply_expected
= true
1642 .type
= WREPL_TYPE_SGROUP
,
1643 .state
= WREPL_STATE_TOMBSTONE
,
1644 .node
= WREPL_NODE_B
,
1646 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1647 .ips
= addresses_A_1
,
1648 .apply_expected
= false
1653 * unique,released vs. sgroup,active
1654 * => should be replaced
1657 .line
= __location__
,
1658 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1661 .type
= WREPL_TYPE_UNIQUE
,
1662 .state
= WREPL_STATE_RELEASED
,
1663 .node
= WREPL_NODE_B
,
1665 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1666 .ips
= addresses_A_1
,
1667 .apply_expected
= false
1671 .type
= WREPL_TYPE_SGROUP
,
1672 .state
= WREPL_STATE_ACTIVE
,
1673 .node
= WREPL_NODE_B
,
1675 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1676 .ips
= addresses_B_3_4
,
1677 .apply_expected
= true
1682 * unique,released vs. sgroup,tombstone
1683 * => should be replaced
1686 .line
= __location__
,
1687 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1690 .type
= WREPL_TYPE_UNIQUE
,
1691 .state
= WREPL_STATE_RELEASED
,
1692 .node
= WREPL_NODE_B
,
1694 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1695 .ips
= addresses_B_1
,
1696 .apply_expected
= false
1700 .type
= WREPL_TYPE_SGROUP
,
1701 .state
= WREPL_STATE_TOMBSTONE
,
1702 .node
= WREPL_NODE_B
,
1704 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1705 .ips
= addresses_A_3_4
,
1706 .apply_expected
= true
1711 * unique,tombstone vs. sgroup,active
1712 * => should be replaced
1715 .line
= __location__
,
1716 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1719 .type
= WREPL_TYPE_UNIQUE
,
1720 .state
= WREPL_STATE_TOMBSTONE
,
1721 .node
= WREPL_NODE_B
,
1723 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1724 .ips
= addresses_A_1
,
1725 .apply_expected
= true
1729 .type
= WREPL_TYPE_SGROUP
,
1730 .state
= WREPL_STATE_ACTIVE
,
1731 .node
= WREPL_NODE_B
,
1733 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1734 .ips
= addresses_B_3_4
,
1735 .apply_expected
= true
1740 * unique,tombstone vs. sgroup,tombstone
1741 * => should be replaced
1744 .line
= __location__
,
1745 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1748 .type
= WREPL_TYPE_UNIQUE
,
1749 .state
= WREPL_STATE_TOMBSTONE
,
1750 .node
= WREPL_NODE_B
,
1752 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1753 .ips
= addresses_B_1
,
1754 .apply_expected
= true
1758 .type
= WREPL_TYPE_SGROUP
,
1759 .state
= WREPL_STATE_TOMBSTONE
,
1760 .node
= WREPL_NODE_B
,
1762 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1763 .ips
= addresses_A_3_4
,
1764 .apply_expected
= true
1769 * unique vs multi homed section,
1772 * unique,active vs. mhomed,active
1773 * => should be replaced
1776 .line
= __location__
,
1777 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1780 .type
= WREPL_TYPE_UNIQUE
,
1781 .state
= WREPL_STATE_ACTIVE
,
1782 .node
= WREPL_NODE_B
,
1784 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1785 .ips
= addresses_A_1
,
1786 .apply_expected
= true
1790 .type
= WREPL_TYPE_MHOMED
,
1791 .state
= WREPL_STATE_ACTIVE
,
1792 .node
= WREPL_NODE_B
,
1794 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1795 .ips
= addresses_B_3_4
,
1796 .apply_expected
= true
1801 * unique,active vs. mhomed,tombstone
1802 * => should NOT be replaced
1805 .line
= __location__
,
1806 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1809 .type
= WREPL_TYPE_UNIQUE
,
1810 .state
= WREPL_STATE_ACTIVE
,
1811 .node
= WREPL_NODE_B
,
1813 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1814 .ips
= addresses_B_3_4
,
1815 .apply_expected
= true
1819 .type
= WREPL_TYPE_MHOMED
,
1820 .state
= WREPL_STATE_TOMBSTONE
,
1821 .node
= WREPL_NODE_B
,
1823 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1824 .ips
= addresses_B_3_4
,
1825 .apply_expected
= false
1830 * unique,released vs. mhomed,active
1831 * => should be replaced
1834 .line
= __location__
,
1835 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1838 .type
= WREPL_TYPE_UNIQUE
,
1839 .state
= WREPL_STATE_RELEASED
,
1840 .node
= WREPL_NODE_B
,
1842 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1843 .ips
= addresses_B_1
,
1844 .apply_expected
= false
1848 .type
= WREPL_TYPE_MHOMED
,
1849 .state
= WREPL_STATE_ACTIVE
,
1850 .node
= WREPL_NODE_B
,
1852 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1853 .ips
= addresses_A_3_4
,
1854 .apply_expected
= true
1859 * unique,released vs. mhomed,tombstone
1860 * => should be replaced
1863 .line
= __location__
,
1864 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1867 .type
= WREPL_TYPE_UNIQUE
,
1868 .state
= WREPL_STATE_RELEASED
,
1869 .node
= WREPL_NODE_B
,
1871 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1872 .ips
= addresses_A_1
,
1873 .apply_expected
= false
1877 .type
= WREPL_TYPE_MHOMED
,
1878 .state
= WREPL_STATE_TOMBSTONE
,
1879 .node
= WREPL_NODE_B
,
1881 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1882 .ips
= addresses_B_3_4
,
1883 .apply_expected
= true
1888 * unique,tombstone vs. mhomed,active
1889 * => should be replaced
1892 .line
= __location__
,
1893 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1896 .type
= WREPL_TYPE_UNIQUE
,
1897 .state
= WREPL_STATE_TOMBSTONE
,
1898 .node
= WREPL_NODE_B
,
1900 .num_ips
= ARRAY_SIZE(addresses_B_1
),
1901 .ips
= addresses_B_1
,
1902 .apply_expected
= true
1906 .type
= WREPL_TYPE_MHOMED
,
1907 .state
= WREPL_STATE_ACTIVE
,
1908 .node
= WREPL_NODE_B
,
1910 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
1911 .ips
= addresses_A_3_4
,
1912 .apply_expected
= true
1917 * unique,tombstone vs. mhomed,tombstone
1918 * => should be replaced
1921 .line
= __location__
,
1922 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1925 .type
= WREPL_TYPE_UNIQUE
,
1926 .state
= WREPL_STATE_TOMBSTONE
,
1927 .node
= WREPL_NODE_B
,
1929 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1930 .ips
= addresses_A_1
,
1931 .apply_expected
= true
1935 .type
= WREPL_TYPE_MHOMED
,
1936 .state
= WREPL_STATE_TOMBSTONE
,
1937 .node
= WREPL_NODE_B
,
1939 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
1940 .ips
= addresses_B_3_4
,
1941 .apply_expected
= true
1946 * normal groups vs unique section,
1949 * group,active vs. unique,active
1950 * => should NOT be replaced
1953 .line
= __location__
,
1954 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1957 .type
= WREPL_TYPE_GROUP
,
1958 .state
= WREPL_STATE_ACTIVE
,
1959 .node
= WREPL_NODE_B
,
1961 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1962 .ips
= addresses_A_1
,
1963 .apply_expected
= true
1967 .type
= WREPL_TYPE_UNIQUE
,
1968 .state
= WREPL_STATE_ACTIVE
,
1969 .node
= WREPL_NODE_B
,
1971 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1972 .ips
= addresses_A_1
,
1973 .apply_expected
= false
1978 * group,active vs. unique,tombstone
1979 * => should NOT be replaced
1982 .line
= __location__
,
1983 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
1986 .type
= WREPL_TYPE_GROUP
,
1987 .state
= WREPL_STATE_ACTIVE
,
1988 .node
= WREPL_NODE_B
,
1990 .num_ips
= ARRAY_SIZE(addresses_A_1
),
1991 .ips
= addresses_A_1
,
1992 .apply_expected
= true
1996 .type
= WREPL_TYPE_UNIQUE
,
1997 .state
= WREPL_STATE_TOMBSTONE
,
1998 .node
= WREPL_NODE_B
,
2000 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2001 .ips
= addresses_A_1
,
2002 .apply_expected
= false
2007 * group,released vs. unique,active
2008 * => should NOT be replaced
2011 .line
= __location__
,
2012 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2015 .type
= WREPL_TYPE_GROUP
,
2016 .state
= WREPL_STATE_RELEASED
,
2017 .node
= WREPL_NODE_B
,
2019 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2020 .ips
= addresses_A_1
,
2021 .apply_expected
= false
2025 .type
= WREPL_TYPE_UNIQUE
,
2026 .state
= WREPL_STATE_ACTIVE
,
2027 .node
= WREPL_NODE_B
,
2029 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2030 .ips
= addresses_A_1
,
2031 .apply_expected
= false
2036 * group,released vs. unique,tombstone
2037 * => should NOT be replaced
2040 .line
= __location__
,
2041 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2044 .type
= WREPL_TYPE_GROUP
,
2045 .state
= WREPL_STATE_RELEASED
,
2046 .node
= WREPL_NODE_B
,
2048 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2049 .ips
= addresses_A_1
,
2050 .apply_expected
= false
2054 .type
= WREPL_TYPE_UNIQUE
,
2055 .state
= WREPL_STATE_TOMBSTONE
,
2056 .node
= WREPL_NODE_B
,
2058 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2059 .ips
= addresses_A_1
,
2060 .apply_expected
= false
2065 * group,tombstone vs. unique,active
2066 * => should NOT be replaced
2069 .line
= __location__
,
2070 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2073 .type
= WREPL_TYPE_GROUP
,
2074 .state
= WREPL_STATE_TOMBSTONE
,
2075 .node
= WREPL_NODE_B
,
2077 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2078 .ips
= addresses_A_1
,
2079 .apply_expected
= true
2083 .type
= WREPL_TYPE_UNIQUE
,
2084 .state
= WREPL_STATE_ACTIVE
,
2085 .node
= WREPL_NODE_B
,
2087 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2088 .ips
= addresses_A_1
,
2089 .apply_expected
= false
2094 * group,tombstone vs. unique,tombstone
2095 * => should NOT be replaced
2098 .line
= __location__
,
2099 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2102 .type
= WREPL_TYPE_GROUP
,
2103 .state
= WREPL_STATE_TOMBSTONE
,
2104 .node
= WREPL_NODE_B
,
2106 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2107 .ips
= addresses_A_1
,
2108 .apply_expected
= true
2112 .type
= WREPL_TYPE_UNIQUE
,
2113 .state
= WREPL_STATE_TOMBSTONE
,
2114 .node
= WREPL_NODE_B
,
2116 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2117 .ips
= addresses_A_1
,
2118 .apply_expected
= false
2123 * normal groups vs normal groups section,
2126 * group,active vs. group,active
2127 * => should NOT be replaced
2130 .line
= __location__
,
2131 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2134 .type
= WREPL_TYPE_GROUP
,
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
= true
2144 .type
= WREPL_TYPE_GROUP
,
2145 .state
= WREPL_STATE_ACTIVE
,
2146 .node
= WREPL_NODE_B
,
2148 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2149 .ips
= addresses_A_1
,
2150 .apply_expected
= false
2155 * group,active vs. group,tombstone
2156 * => should NOT be replaced
2159 .line
= __location__
,
2160 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2163 .type
= WREPL_TYPE_GROUP
,
2164 .state
= WREPL_STATE_ACTIVE
,
2165 .node
= WREPL_NODE_B
,
2167 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2168 .ips
= addresses_A_1
,
2169 .apply_expected
= true
2173 .type
= WREPL_TYPE_GROUP
,
2174 .state
= WREPL_STATE_TOMBSTONE
,
2175 .node
= WREPL_NODE_B
,
2177 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2178 .ips
= addresses_A_1
,
2179 .apply_expected
= false
2184 * group,released vs. group,active
2185 * => should be replaced
2188 .line
= __location__
,
2189 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2192 .type
= WREPL_TYPE_GROUP
,
2193 .state
= WREPL_STATE_RELEASED
,
2194 .node
= WREPL_NODE_B
,
2196 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2197 .ips
= addresses_A_1
,
2198 .apply_expected
= false
2202 .type
= WREPL_TYPE_GROUP
,
2203 .state
= WREPL_STATE_ACTIVE
,
2204 .node
= WREPL_NODE_B
,
2206 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2207 .ips
= addresses_B_1
,
2208 .apply_expected
= true
2213 * group,released vs. group,tombstone
2214 * => should be replaced
2217 .line
= __location__
,
2218 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2221 .type
= WREPL_TYPE_GROUP
,
2222 .state
= WREPL_STATE_RELEASED
,
2223 .node
= WREPL_NODE_B
,
2225 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2226 .ips
= addresses_A_1
,
2227 .apply_expected
= false
2231 .type
= WREPL_TYPE_GROUP
,
2232 .state
= WREPL_STATE_TOMBSTONE
,
2233 .node
= WREPL_NODE_B
,
2235 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2236 .ips
= addresses_B_1
,
2237 .apply_expected
= true
2242 * group,tombstone vs. group,active
2243 * => should be replaced
2246 .line
= __location__
,
2247 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2250 .type
= WREPL_TYPE_GROUP
,
2251 .state
= WREPL_STATE_TOMBSTONE
,
2252 .node
= WREPL_NODE_B
,
2254 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2255 .ips
= addresses_B_1
,
2256 .apply_expected
= true
2260 .type
= WREPL_TYPE_GROUP
,
2261 .state
= WREPL_STATE_ACTIVE
,
2262 .node
= WREPL_NODE_B
,
2264 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2265 .ips
= addresses_A_1
,
2266 .apply_expected
= true
2271 * group,tombstone vs. group,tombstone
2272 * => should be replaced
2275 .line
= __location__
,
2276 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2279 .type
= WREPL_TYPE_GROUP
,
2280 .state
= WREPL_STATE_TOMBSTONE
,
2281 .node
= WREPL_NODE_B
,
2283 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2284 .ips
= addresses_A_1
,
2285 .apply_expected
= true
2289 .type
= WREPL_TYPE_GROUP
,
2290 .state
= WREPL_STATE_TOMBSTONE
,
2291 .node
= WREPL_NODE_B
,
2293 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2294 .ips
= addresses_B_1
,
2295 .apply_expected
= true
2300 * normal groups vs special groups section,
2303 * group,active vs. sgroup,active
2304 * => should NOT be replaced
2307 .line
= __location__
,
2308 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2311 .type
= WREPL_TYPE_GROUP
,
2312 .state
= WREPL_STATE_ACTIVE
,
2313 .node
= WREPL_NODE_B
,
2315 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2316 .ips
= addresses_B_1
,
2317 .apply_expected
= true
2321 .type
= WREPL_TYPE_SGROUP
,
2322 .state
= WREPL_STATE_ACTIVE
,
2323 .node
= WREPL_NODE_B
,
2325 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2326 .ips
= addresses_B_1
,
2327 .apply_expected
= false
2332 * group,active vs. sgroup,tombstone
2333 * => should NOT be replaced
2336 .line
= __location__
,
2337 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2340 .type
= WREPL_TYPE_GROUP
,
2341 .state
= WREPL_STATE_ACTIVE
,
2342 .node
= WREPL_NODE_B
,
2344 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2345 .ips
= addresses_B_1
,
2346 .apply_expected
= true
2350 .type
= WREPL_TYPE_SGROUP
,
2351 .state
= WREPL_STATE_TOMBSTONE
,
2352 .node
= WREPL_NODE_B
,
2354 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2355 .ips
= addresses_B_1
,
2356 .apply_expected
= false
2361 * group,released vs. sgroup,active
2362 * => should be replaced
2365 .line
= __location__
,
2366 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2369 .type
= WREPL_TYPE_GROUP
,
2370 .state
= WREPL_STATE_RELEASED
,
2371 .node
= WREPL_NODE_B
,
2373 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2374 .ips
= addresses_A_1
,
2375 .apply_expected
= false
2379 .type
= WREPL_TYPE_SGROUP
,
2380 .state
= WREPL_STATE_ACTIVE
,
2381 .node
= WREPL_NODE_B
,
2383 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2384 .ips
= addresses_B_1
,
2385 .apply_expected
= true
2390 * group,released vs. sgroup,tombstone
2391 * => should NOT be replaced
2394 .line
= __location__
,
2395 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2398 .type
= WREPL_TYPE_GROUP
,
2399 .state
= WREPL_STATE_RELEASED
,
2400 .node
= WREPL_NODE_B
,
2402 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2403 .ips
= addresses_B_1
,
2404 .apply_expected
= false
2408 .type
= WREPL_TYPE_SGROUP
,
2409 .state
= WREPL_STATE_TOMBSTONE
,
2410 .node
= WREPL_NODE_B
,
2412 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2413 .ips
= addresses_B_1
,
2414 .apply_expected
= false
2419 * group,tombstone vs. sgroup,active
2420 * => should be replaced
2423 .line
= __location__
,
2424 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2427 .type
= WREPL_TYPE_GROUP
,
2428 .state
= WREPL_STATE_TOMBSTONE
,
2429 .node
= WREPL_NODE_B
,
2431 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2432 .ips
= addresses_B_1
,
2433 .apply_expected
= true
2437 .type
= WREPL_TYPE_SGROUP
,
2438 .state
= WREPL_STATE_ACTIVE
,
2439 .node
= WREPL_NODE_B
,
2441 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2442 .ips
= addresses_A_1
,
2443 .apply_expected
= true
2448 * group,tombstone vs. sgroup,tombstone
2449 * => should be replaced
2452 .line
= __location__
,
2453 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2456 .type
= WREPL_TYPE_GROUP
,
2457 .state
= WREPL_STATE_TOMBSTONE
,
2458 .node
= WREPL_NODE_B
,
2460 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2461 .ips
= addresses_A_1
,
2462 .apply_expected
= true
2466 .type
= WREPL_TYPE_SGROUP
,
2467 .state
= WREPL_STATE_TOMBSTONE
,
2468 .node
= WREPL_NODE_B
,
2470 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2471 .ips
= addresses_B_1
,
2472 .apply_expected
= true
2477 * normal groups vs multi homed section,
2480 * group,active vs. mhomed,active
2481 * => should NOT be replaced
2484 .line
= __location__
,
2485 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2488 .type
= WREPL_TYPE_GROUP
,
2489 .state
= WREPL_STATE_ACTIVE
,
2490 .node
= WREPL_NODE_B
,
2492 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2493 .ips
= addresses_B_1
,
2494 .apply_expected
= true
2498 .type
= WREPL_TYPE_MHOMED
,
2499 .state
= WREPL_STATE_ACTIVE
,
2500 .node
= WREPL_NODE_B
,
2502 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2503 .ips
= addresses_B_1
,
2504 .apply_expected
= false
2509 * group,active vs. mhomed,tombstone
2510 * => should NOT be replaced
2513 .line
= __location__
,
2514 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2517 .type
= WREPL_TYPE_GROUP
,
2518 .state
= WREPL_STATE_ACTIVE
,
2519 .node
= WREPL_NODE_B
,
2521 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2522 .ips
= addresses_B_1
,
2523 .apply_expected
= true
2527 .type
= WREPL_TYPE_MHOMED
,
2528 .state
= WREPL_STATE_TOMBSTONE
,
2529 .node
= WREPL_NODE_B
,
2531 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2532 .ips
= addresses_B_1
,
2533 .apply_expected
= false
2538 * group,released vs. mhomed,active
2539 * => should NOT be replaced
2542 .line
= __location__
,
2543 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2546 .type
= WREPL_TYPE_GROUP
,
2547 .state
= WREPL_STATE_RELEASED
,
2548 .node
= WREPL_NODE_B
,
2550 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2551 .ips
= addresses_B_1
,
2552 .apply_expected
= false
2556 .type
= WREPL_TYPE_MHOMED
,
2557 .state
= WREPL_STATE_ACTIVE
,
2558 .node
= WREPL_NODE_B
,
2560 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2561 .ips
= addresses_B_1
,
2562 .apply_expected
= false
2567 * group,released vs. mhomed,tombstone
2568 * => should NOT be replaced
2571 .line
= __location__
,
2572 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2575 .type
= WREPL_TYPE_GROUP
,
2576 .state
= WREPL_STATE_RELEASED
,
2577 .node
= WREPL_NODE_B
,
2579 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2580 .ips
= addresses_B_1
,
2581 .apply_expected
= false
2585 .type
= WREPL_TYPE_MHOMED
,
2586 .state
= WREPL_STATE_TOMBSTONE
,
2587 .node
= WREPL_NODE_B
,
2589 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2590 .ips
= addresses_B_1
,
2591 .apply_expected
= false
2596 * group,tombstone vs. mhomed,active
2597 * => should be replaced
2600 .line
= __location__
,
2601 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2604 .type
= WREPL_TYPE_GROUP
,
2605 .state
= WREPL_STATE_TOMBSTONE
,
2606 .node
= WREPL_NODE_B
,
2608 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2609 .ips
= addresses_B_1
,
2610 .apply_expected
= true
2614 .type
= WREPL_TYPE_MHOMED
,
2615 .state
= WREPL_STATE_ACTIVE
,
2616 .node
= WREPL_NODE_B
,
2618 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2619 .ips
= addresses_A_1
,
2620 .apply_expected
= true
2625 * group,tombstone vs. mhomed,tombstone
2626 * => should be replaced
2629 .line
= __location__
,
2630 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2633 .type
= WREPL_TYPE_GROUP
,
2634 .state
= WREPL_STATE_TOMBSTONE
,
2635 .node
= WREPL_NODE_B
,
2637 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2638 .ips
= addresses_A_1
,
2639 .apply_expected
= true
2643 .type
= WREPL_TYPE_MHOMED
,
2644 .state
= WREPL_STATE_TOMBSTONE
,
2645 .node
= WREPL_NODE_B
,
2647 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2648 .ips
= addresses_B_1
,
2649 .apply_expected
= true
2654 * special groups vs unique section,
2657 * sgroup,active vs. unique,active
2658 * => should NOT be replaced
2661 .line
= __location__
,
2662 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2665 .type
= WREPL_TYPE_SGROUP
,
2666 .state
= WREPL_STATE_ACTIVE
,
2667 .node
= WREPL_NODE_B
,
2669 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2670 .ips
= addresses_B_1
,
2671 .apply_expected
= true
2675 .type
= WREPL_TYPE_UNIQUE
,
2676 .state
= WREPL_STATE_ACTIVE
,
2677 .node
= WREPL_NODE_B
,
2679 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2680 .ips
= addresses_B_1
,
2681 .apply_expected
= false
2686 * sgroup,active vs. unique,tombstone
2687 * => should NOT be replaced
2690 .line
= __location__
,
2691 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2694 .type
= WREPL_TYPE_SGROUP
,
2695 .state
= WREPL_STATE_ACTIVE
,
2696 .node
= WREPL_NODE_B
,
2698 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2699 .ips
= addresses_B_1
,
2700 .apply_expected
= true
2704 .type
= WREPL_TYPE_UNIQUE
,
2705 .state
= WREPL_STATE_TOMBSTONE
,
2706 .node
= WREPL_NODE_B
,
2708 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2709 .ips
= addresses_B_1
,
2710 .apply_expected
= false
2715 * sgroup,released vs. unique,active
2716 * => should be replaced
2719 .line
= __location__
,
2720 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2723 .type
= WREPL_TYPE_SGROUP
,
2724 .state
= WREPL_STATE_RELEASED
,
2725 .node
= WREPL_NODE_B
,
2727 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2728 .ips
= addresses_B_1
,
2729 .apply_expected
= false
2733 .type
= WREPL_TYPE_UNIQUE
,
2734 .state
= WREPL_STATE_ACTIVE
,
2735 .node
= WREPL_NODE_B
,
2737 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2738 .ips
= addresses_A_1
,
2739 .apply_expected
= true
2744 * sgroup,released vs. unique,tombstone
2745 * => should be replaced
2748 .line
= __location__
,
2749 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2752 .type
= WREPL_TYPE_SGROUP
,
2753 .state
= WREPL_STATE_RELEASED
,
2754 .node
= WREPL_NODE_B
,
2756 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2757 .ips
= addresses_A_1
,
2758 .apply_expected
= false
2762 .type
= WREPL_TYPE_UNIQUE
,
2763 .state
= WREPL_STATE_TOMBSTONE
,
2764 .node
= WREPL_NODE_B
,
2766 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2767 .ips
= addresses_B_1
,
2768 .apply_expected
= true
2773 * sgroup,tombstone vs. unique,active
2774 * => should be replaced
2777 .line
= __location__
,
2778 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2781 .type
= WREPL_TYPE_SGROUP
,
2782 .state
= WREPL_STATE_TOMBSTONE
,
2783 .node
= WREPL_NODE_B
,
2785 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2786 .ips
= addresses_A_1
,
2787 .apply_expected
= true
2791 .type
= WREPL_TYPE_UNIQUE
,
2792 .state
= WREPL_STATE_ACTIVE
,
2793 .node
= WREPL_NODE_B
,
2795 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2796 .ips
= addresses_B_1
,
2797 .apply_expected
= true
2802 * sgroup,tombstone vs. unique,tombstone
2803 * => should be replaced
2806 .line
= __location__
,
2807 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2810 .type
= WREPL_TYPE_SGROUP
,
2811 .state
= WREPL_STATE_TOMBSTONE
,
2812 .node
= WREPL_NODE_B
,
2814 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2815 .ips
= addresses_B_1
,
2816 .apply_expected
= true
2820 .type
= WREPL_TYPE_UNIQUE
,
2821 .state
= WREPL_STATE_TOMBSTONE
,
2822 .node
= WREPL_NODE_B
,
2824 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2825 .ips
= addresses_A_1
,
2826 .apply_expected
= true
2831 * special groups vs normal group section,
2834 * sgroup,active vs. group,active
2835 * => should NOT be replaced
2838 .line
= __location__
,
2839 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2842 .type
= WREPL_TYPE_SGROUP
,
2843 .state
= WREPL_STATE_ACTIVE
,
2844 .node
= WREPL_NODE_B
,
2846 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2847 .ips
= addresses_A_1
,
2848 .apply_expected
= true
2852 .type
= WREPL_TYPE_GROUP
,
2853 .state
= WREPL_STATE_ACTIVE
,
2854 .node
= WREPL_NODE_B
,
2856 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2857 .ips
= addresses_A_1
,
2858 .apply_expected
= false
2863 * sgroup,active vs. group,tombstone
2864 * => should NOT be replaced
2867 .line
= __location__
,
2868 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2871 .type
= WREPL_TYPE_SGROUP
,
2872 .state
= WREPL_STATE_ACTIVE
,
2873 .node
= WREPL_NODE_B
,
2875 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2876 .ips
= addresses_A_1
,
2877 .apply_expected
= true
2881 .type
= WREPL_TYPE_GROUP
,
2882 .state
= WREPL_STATE_TOMBSTONE
,
2883 .node
= WREPL_NODE_B
,
2885 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2886 .ips
= addresses_A_1
,
2887 .apply_expected
= false
2892 * sgroup,released vs. group,active
2893 * => should be replaced
2896 .line
= __location__
,
2897 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2900 .type
= WREPL_TYPE_SGROUP
,
2901 .state
= WREPL_STATE_RELEASED
,
2902 .node
= WREPL_NODE_B
,
2904 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2905 .ips
= addresses_A_1
,
2906 .apply_expected
= false
2910 .type
= WREPL_TYPE_GROUP
,
2911 .state
= WREPL_STATE_ACTIVE
,
2912 .node
= WREPL_NODE_B
,
2914 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2915 .ips
= addresses_B_1
,
2916 .apply_expected
= true
2921 * sgroup,released vs. group,tombstone
2922 * => should be replaced
2925 .line
= __location__
,
2926 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2929 .type
= WREPL_TYPE_SGROUP
,
2930 .state
= WREPL_STATE_RELEASED
,
2931 .node
= WREPL_NODE_B
,
2933 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2934 .ips
= addresses_B_1
,
2935 .apply_expected
= false
2939 .type
= WREPL_TYPE_GROUP
,
2940 .state
= WREPL_STATE_TOMBSTONE
,
2941 .node
= WREPL_NODE_B
,
2943 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2944 .ips
= addresses_A_1
,
2945 .apply_expected
= true
2950 * sgroup,tombstone vs. group,active
2951 * => should NOT be replaced
2954 .line
= __location__
,
2955 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2958 .type
= WREPL_TYPE_SGROUP
,
2959 .state
= WREPL_STATE_TOMBSTONE
,
2960 .node
= WREPL_NODE_B
,
2962 .num_ips
= ARRAY_SIZE(addresses_A_1
),
2963 .ips
= addresses_A_1
,
2964 .apply_expected
= true
2968 .type
= WREPL_TYPE_GROUP
,
2969 .state
= WREPL_STATE_ACTIVE
,
2970 .node
= WREPL_NODE_B
,
2972 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2973 .ips
= addresses_B_1
,
2974 .apply_expected
= true
2979 * sgroup,tombstone vs. group,tombstone
2980 * => should NOT be replaced
2983 .line
= __location__
,
2984 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
2987 .type
= WREPL_TYPE_SGROUP
,
2988 .state
= WREPL_STATE_TOMBSTONE
,
2989 .node
= WREPL_NODE_B
,
2991 .num_ips
= ARRAY_SIZE(addresses_B_1
),
2992 .ips
= addresses_B_1
,
2993 .apply_expected
= true
2997 .type
= WREPL_TYPE_GROUP
,
2998 .state
= WREPL_STATE_TOMBSTONE
,
2999 .node
= WREPL_NODE_B
,
3001 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3002 .ips
= addresses_A_1
,
3003 .apply_expected
= true
3008 * special groups (not active) vs special group section,
3011 * sgroup,released vs. sgroup,active
3012 * => should be replaced
3015 .line
= __location__
,
3016 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3019 .type
= WREPL_TYPE_SGROUP
,
3020 .state
= WREPL_STATE_RELEASED
,
3021 .node
= WREPL_NODE_B
,
3023 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3024 .ips
= addresses_A_1
,
3025 .apply_expected
= false
3029 .type
= WREPL_TYPE_SGROUP
,
3030 .state
= WREPL_STATE_ACTIVE
,
3031 .node
= WREPL_NODE_B
,
3033 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3034 .ips
= addresses_B_1
,
3035 .apply_expected
= true
3040 * sgroup,released vs. sgroup,tombstone
3041 * => should be replaced
3044 .line
= __location__
,
3045 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3048 .type
= WREPL_TYPE_SGROUP
,
3049 .state
= WREPL_STATE_RELEASED
,
3050 .node
= WREPL_NODE_B
,
3052 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3053 .ips
= addresses_B_1
,
3054 .apply_expected
= false
3058 .type
= WREPL_TYPE_SGROUP
,
3059 .state
= WREPL_STATE_TOMBSTONE
,
3060 .node
= WREPL_NODE_B
,
3062 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3063 .ips
= addresses_A_1
,
3064 .apply_expected
= true
3069 * sgroup,tombstone vs. sgroup,active
3070 * => should NOT be replaced
3073 .line
= __location__
,
3074 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3077 .type
= WREPL_TYPE_SGROUP
,
3078 .state
= WREPL_STATE_TOMBSTONE
,
3079 .node
= WREPL_NODE_B
,
3081 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3082 .ips
= addresses_A_1
,
3083 .apply_expected
= true
3087 .type
= WREPL_TYPE_SGROUP
,
3088 .state
= WREPL_STATE_ACTIVE
,
3089 .node
= WREPL_NODE_B
,
3091 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3092 .ips
= addresses_B_1
,
3093 .apply_expected
= true
3098 * sgroup,tombstone vs. sgroup,tombstone
3099 * => should NOT be replaced
3102 .line
= __location__
,
3103 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3106 .type
= WREPL_TYPE_SGROUP
,
3107 .state
= WREPL_STATE_TOMBSTONE
,
3108 .node
= WREPL_NODE_B
,
3110 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3111 .ips
= addresses_B_1
,
3112 .apply_expected
= true
3116 .type
= WREPL_TYPE_SGROUP
,
3117 .state
= WREPL_STATE_TOMBSTONE
,
3118 .node
= WREPL_NODE_B
,
3120 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3121 .ips
= addresses_A_1
,
3122 .apply_expected
= true
3127 * special groups vs multi homed section,
3130 * sgroup,active vs. mhomed,active
3131 * => should NOT be replaced
3134 .line
= __location__
,
3135 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3138 .type
= WREPL_TYPE_SGROUP
,
3139 .state
= WREPL_STATE_ACTIVE
,
3140 .node
= WREPL_NODE_B
,
3142 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3143 .ips
= addresses_A_1
,
3144 .apply_expected
= true
3148 .type
= WREPL_TYPE_MHOMED
,
3149 .state
= WREPL_STATE_ACTIVE
,
3150 .node
= WREPL_NODE_B
,
3152 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3153 .ips
= addresses_A_1
,
3154 .apply_expected
= false
3159 * sgroup,active vs. mhomed,tombstone
3160 * => should NOT be replaced
3163 .line
= __location__
,
3164 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3167 .type
= WREPL_TYPE_SGROUP
,
3168 .state
= WREPL_STATE_ACTIVE
,
3169 .node
= WREPL_NODE_B
,
3171 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3172 .ips
= addresses_A_1
,
3173 .apply_expected
= true
3177 .type
= WREPL_TYPE_MHOMED
,
3178 .state
= WREPL_STATE_TOMBSTONE
,
3179 .node
= WREPL_NODE_B
,
3181 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3182 .ips
= addresses_A_1
,
3183 .apply_expected
= false
3188 * sgroup,released vs. mhomed,active
3189 * => should be replaced
3192 .line
= __location__
,
3193 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3196 .type
= WREPL_TYPE_SGROUP
,
3197 .state
= WREPL_STATE_RELEASED
,
3198 .node
= WREPL_NODE_B
,
3200 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3201 .ips
= addresses_A_1
,
3202 .apply_expected
= false
3206 .type
= WREPL_TYPE_MHOMED
,
3207 .state
= WREPL_STATE_ACTIVE
,
3208 .node
= WREPL_NODE_B
,
3210 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3211 .ips
= addresses_B_1
,
3212 .apply_expected
= true
3217 * sgroup,released vs. mhomed,tombstone
3218 * => should be replaced
3221 .line
= __location__
,
3222 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3225 .type
= WREPL_TYPE_SGROUP
,
3226 .state
= WREPL_STATE_RELEASED
,
3227 .node
= WREPL_NODE_B
,
3229 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3230 .ips
= addresses_B_1
,
3231 .apply_expected
= false
3235 .type
= WREPL_TYPE_MHOMED
,
3236 .state
= WREPL_STATE_TOMBSTONE
,
3237 .node
= WREPL_NODE_B
,
3239 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3240 .ips
= addresses_A_1
,
3241 .apply_expected
= true
3246 * sgroup,tombstone vs. mhomed,active
3247 * => should be replaced
3250 .line
= __location__
,
3251 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3254 .type
= WREPL_TYPE_SGROUP
,
3255 .state
= WREPL_STATE_TOMBSTONE
,
3256 .node
= WREPL_NODE_B
,
3258 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3259 .ips
= addresses_A_1
,
3260 .apply_expected
= true
3264 .type
= WREPL_TYPE_MHOMED
,
3265 .state
= WREPL_STATE_ACTIVE
,
3266 .node
= WREPL_NODE_B
,
3268 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3269 .ips
= addresses_B_1
,
3270 .apply_expected
= true
3275 * sgroup,tombstone vs. mhomed,tombstone
3276 * => should be replaced
3279 .line
= __location__
,
3280 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3283 .type
= WREPL_TYPE_SGROUP
,
3284 .state
= WREPL_STATE_TOMBSTONE
,
3285 .node
= WREPL_NODE_B
,
3287 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3288 .ips
= addresses_B_1
,
3289 .apply_expected
= true
3293 .type
= WREPL_TYPE_MHOMED
,
3294 .state
= WREPL_STATE_TOMBSTONE
,
3295 .node
= WREPL_NODE_B
,
3297 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3298 .ips
= addresses_A_1
,
3299 .apply_expected
= true
3304 * multi homed vs. unique section,
3307 * mhomed,active vs. unique,active
3308 * => should be replaced
3311 .line
= __location__
,
3312 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3315 .type
= WREPL_TYPE_MHOMED
,
3316 .state
= WREPL_STATE_ACTIVE
,
3317 .node
= WREPL_NODE_B
,
3319 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
3320 .ips
= addresses_A_3_4
,
3321 .apply_expected
= true
3325 .type
= WREPL_TYPE_UNIQUE
,
3326 .state
= WREPL_STATE_ACTIVE
,
3327 .node
= WREPL_NODE_B
,
3329 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3330 .ips
= addresses_B_1
,
3331 .apply_expected
= true
3336 * mhomed,active vs. unique,tombstone
3337 * => should NOT be replaced
3340 .line
= __location__
,
3341 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3344 .type
= WREPL_TYPE_MHOMED
,
3345 .state
= WREPL_STATE_ACTIVE
,
3346 .node
= WREPL_NODE_B
,
3348 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3349 .ips
= addresses_B_1
,
3350 .apply_expected
= true
3354 .type
= WREPL_TYPE_UNIQUE
,
3355 .state
= WREPL_STATE_TOMBSTONE
,
3356 .node
= WREPL_NODE_B
,
3358 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3359 .ips
= addresses_B_1
,
3360 .apply_expected
= false
3365 * mhomed,released vs. unique,active
3366 * => should be replaced
3369 .line
= __location__
,
3370 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3373 .type
= WREPL_TYPE_MHOMED
,
3374 .state
= WREPL_STATE_RELEASED
,
3375 .node
= WREPL_NODE_B
,
3377 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3378 .ips
= addresses_A_1
,
3379 .apply_expected
= false
3383 .type
= WREPL_TYPE_UNIQUE
,
3384 .state
= WREPL_STATE_ACTIVE
,
3385 .node
= WREPL_NODE_B
,
3387 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3388 .ips
= addresses_B_1
,
3389 .apply_expected
= true
3394 * mhomed,released vs. uinique,tombstone
3395 * => should be replaced
3398 .line
= __location__
,
3399 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3402 .type
= WREPL_TYPE_MHOMED
,
3403 .state
= WREPL_STATE_RELEASED
,
3404 .node
= WREPL_NODE_B
,
3406 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3407 .ips
= addresses_B_1
,
3408 .apply_expected
= false
3412 .type
= WREPL_TYPE_UNIQUE
,
3413 .state
= WREPL_STATE_TOMBSTONE
,
3414 .node
= WREPL_NODE_B
,
3416 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3417 .ips
= addresses_A_1
,
3418 .apply_expected
= true
3423 * mhomed,tombstone vs. unique,active
3424 * => should be replaced
3427 .line
= __location__
,
3428 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3431 .type
= WREPL_TYPE_MHOMED
,
3432 .state
= WREPL_STATE_TOMBSTONE
,
3433 .node
= WREPL_NODE_B
,
3435 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3436 .ips
= addresses_A_1
,
3437 .apply_expected
= true
3441 .type
= WREPL_TYPE_UNIQUE
,
3442 .state
= WREPL_STATE_ACTIVE
,
3443 .node
= WREPL_NODE_B
,
3445 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3446 .ips
= addresses_B_1
,
3447 .apply_expected
= true
3452 * mhomed,tombstone vs. uinique,tombstone
3453 * => should be replaced
3456 .line
= __location__
,
3457 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3460 .type
= WREPL_TYPE_MHOMED
,
3461 .state
= WREPL_STATE_TOMBSTONE
,
3462 .node
= WREPL_NODE_B
,
3464 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3465 .ips
= addresses_B_1
,
3466 .apply_expected
= true
3470 .type
= WREPL_TYPE_UNIQUE
,
3471 .state
= WREPL_STATE_TOMBSTONE
,
3472 .node
= WREPL_NODE_B
,
3474 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3475 .ips
= addresses_A_1
,
3476 .apply_expected
= true
3481 * multi homed vs. normal group section,
3484 * mhomed,active vs. group,active
3485 * => should be replaced
3488 .line
= __location__
,
3489 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3492 .type
= WREPL_TYPE_MHOMED
,
3493 .state
= WREPL_STATE_ACTIVE
,
3494 .node
= WREPL_NODE_B
,
3496 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3497 .ips
= addresses_A_1
,
3498 .apply_expected
= true
3502 .type
= WREPL_TYPE_GROUP
,
3503 .state
= WREPL_STATE_ACTIVE
,
3504 .node
= WREPL_NODE_B
,
3506 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3507 .ips
= addresses_B_1
,
3508 .apply_expected
= true
3513 * mhomed,active vs. group,tombstone
3514 * => should NOT be replaced
3517 .line
= __location__
,
3518 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3521 .type
= WREPL_TYPE_MHOMED
,
3522 .state
= WREPL_STATE_ACTIVE
,
3523 .node
= WREPL_NODE_B
,
3525 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3526 .ips
= addresses_B_1
,
3527 .apply_expected
= true
3531 .type
= WREPL_TYPE_GROUP
,
3532 .state
= WREPL_STATE_TOMBSTONE
,
3533 .node
= WREPL_NODE_B
,
3535 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3536 .ips
= addresses_B_1
,
3537 .apply_expected
= false
3542 * mhomed,released vs. group,active
3543 * => should be replaced
3546 .line
= __location__
,
3547 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3550 .type
= WREPL_TYPE_MHOMED
,
3551 .state
= WREPL_STATE_RELEASED
,
3552 .node
= WREPL_NODE_B
,
3554 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3555 .ips
= addresses_B_1
,
3556 .apply_expected
= false
3560 .type
= WREPL_TYPE_GROUP
,
3561 .state
= WREPL_STATE_ACTIVE
,
3562 .node
= WREPL_NODE_B
,
3564 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3565 .ips
= addresses_A_1
,
3566 .apply_expected
= true
3571 * mhomed,released vs. group,tombstone
3572 * => should be replaced
3575 .line
= __location__
,
3576 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3579 .type
= WREPL_TYPE_MHOMED
,
3580 .state
= WREPL_STATE_RELEASED
,
3581 .node
= WREPL_NODE_B
,
3583 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3584 .ips
= addresses_A_1
,
3585 .apply_expected
= false
3589 .type
= WREPL_TYPE_GROUP
,
3590 .state
= WREPL_STATE_TOMBSTONE
,
3591 .node
= WREPL_NODE_B
,
3593 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3594 .ips
= addresses_B_1
,
3595 .apply_expected
= true
3600 * mhomed,tombstone vs. group,active
3601 * => should be replaced
3604 .line
= __location__
,
3605 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3608 .type
= WREPL_TYPE_MHOMED
,
3609 .state
= WREPL_STATE_TOMBSTONE
,
3610 .node
= WREPL_NODE_B
,
3612 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3613 .ips
= addresses_B_1
,
3614 .apply_expected
= true
3618 .type
= WREPL_TYPE_GROUP
,
3619 .state
= WREPL_STATE_ACTIVE
,
3620 .node
= WREPL_NODE_B
,
3622 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3623 .ips
= addresses_A_1
,
3624 .apply_expected
= true
3629 * mhomed,tombstone vs. group,tombstone
3630 * => should be replaced
3633 .line
= __location__
,
3634 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3637 .type
= WREPL_TYPE_MHOMED
,
3638 .state
= WREPL_STATE_TOMBSTONE
,
3639 .node
= WREPL_NODE_B
,
3641 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3642 .ips
= addresses_A_1
,
3643 .apply_expected
= true
3647 .type
= WREPL_TYPE_GROUP
,
3648 .state
= WREPL_STATE_TOMBSTONE
,
3649 .node
= WREPL_NODE_B
,
3651 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3652 .ips
= addresses_B_1
,
3653 .apply_expected
= true
3658 * multi homed vs. special group section,
3661 * mhomed,active vs. sgroup,active
3662 * => should NOT be replaced
3665 .line
= __location__
,
3666 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3669 .type
= WREPL_TYPE_MHOMED
,
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
3679 .type
= WREPL_TYPE_SGROUP
,
3680 .state
= WREPL_STATE_ACTIVE
,
3681 .node
= WREPL_NODE_B
,
3683 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3684 .ips
= addresses_A_1
,
3685 .apply_expected
= false
3690 * mhomed,active vs. sgroup,tombstone
3691 * => should NOT be replaced
3694 .line
= __location__
,
3695 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3698 .type
= WREPL_TYPE_MHOMED
,
3699 .state
= WREPL_STATE_ACTIVE
,
3700 .node
= WREPL_NODE_B
,
3702 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3703 .ips
= addresses_A_1
,
3704 .apply_expected
= true
3708 .type
= WREPL_TYPE_SGROUP
,
3709 .state
= WREPL_STATE_TOMBSTONE
,
3710 .node
= WREPL_NODE_B
,
3712 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3713 .ips
= addresses_A_1
,
3714 .apply_expected
= false
3719 * mhomed,released vs. sgroup,active
3720 * => should be replaced
3723 .line
= __location__
,
3724 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3727 .type
= WREPL_TYPE_MHOMED
,
3728 .state
= WREPL_STATE_RELEASED
,
3729 .node
= WREPL_NODE_B
,
3731 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3732 .ips
= addresses_A_1
,
3733 .apply_expected
= false
3737 .type
= WREPL_TYPE_SGROUP
,
3738 .state
= WREPL_STATE_ACTIVE
,
3739 .node
= WREPL_NODE_B
,
3741 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3742 .ips
= addresses_B_1
,
3743 .apply_expected
= true
3748 * mhomed,released vs. sgroup,tombstone
3749 * => should be replaced
3752 .line
= __location__
,
3753 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3756 .type
= WREPL_TYPE_MHOMED
,
3757 .state
= WREPL_STATE_RELEASED
,
3758 .node
= WREPL_NODE_B
,
3760 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3761 .ips
= addresses_B_1
,
3762 .apply_expected
= false
3766 .type
= WREPL_TYPE_SGROUP
,
3767 .state
= WREPL_STATE_TOMBSTONE
,
3768 .node
= WREPL_NODE_B
,
3770 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3771 .ips
= addresses_A_1
,
3772 .apply_expected
= true
3777 * mhomed,tombstone vs. sgroup,active
3778 * => should be replaced
3781 .line
= __location__
,
3782 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3785 .type
= WREPL_TYPE_MHOMED
,
3786 .state
= WREPL_STATE_TOMBSTONE
,
3787 .node
= WREPL_NODE_B
,
3789 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3790 .ips
= addresses_A_1
,
3791 .apply_expected
= true
3795 .type
= WREPL_TYPE_SGROUP
,
3796 .state
= WREPL_STATE_ACTIVE
,
3797 .node
= WREPL_NODE_B
,
3799 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3800 .ips
= addresses_B_1
,
3801 .apply_expected
= true
3806 * mhomed,tombstone vs. sgroup,tombstone
3807 * => should be replaced
3810 .line
= __location__
,
3811 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3814 .type
= WREPL_TYPE_MHOMED
,
3815 .state
= WREPL_STATE_TOMBSTONE
,
3816 .node
= WREPL_NODE_B
,
3818 .num_ips
= ARRAY_SIZE(addresses_B_1
),
3819 .ips
= addresses_B_1
,
3820 .apply_expected
= true
3824 .type
= WREPL_TYPE_SGROUP
,
3825 .state
= WREPL_STATE_TOMBSTONE
,
3826 .node
= WREPL_NODE_B
,
3828 .num_ips
= ARRAY_SIZE(addresses_A_1
),
3829 .ips
= addresses_A_1
,
3830 .apply_expected
= true
3835 * multi homed vs. mlti homed section,
3838 * mhomed,active vs. mhomed,active
3839 * => should be replaced
3842 .line
= __location__
,
3843 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3846 .type
= WREPL_TYPE_MHOMED
,
3847 .state
= WREPL_STATE_ACTIVE
,
3848 .node
= WREPL_NODE_B
,
3850 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
3851 .ips
= addresses_A_3_4
,
3852 .apply_expected
= true
3856 .type
= WREPL_TYPE_MHOMED
,
3857 .state
= WREPL_STATE_ACTIVE
,
3858 .node
= WREPL_NODE_B
,
3860 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3861 .ips
= addresses_B_3_4
,
3862 .apply_expected
= true
3867 * mhomed,active vs. mhomed,tombstone
3868 * => should NOT be replaced
3871 .line
= __location__
,
3872 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3875 .type
= WREPL_TYPE_MHOMED
,
3876 .state
= WREPL_STATE_ACTIVE
,
3877 .node
= WREPL_NODE_B
,
3879 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3880 .ips
= addresses_B_3_4
,
3881 .apply_expected
= true
3885 .type
= WREPL_TYPE_MHOMED
,
3886 .state
= WREPL_STATE_TOMBSTONE
,
3887 .node
= WREPL_NODE_B
,
3889 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3890 .ips
= addresses_B_3_4
,
3891 .apply_expected
= false
3896 * mhomed,released vs. mhomed,active
3897 * => should be replaced
3900 .line
= __location__
,
3901 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3904 .type
= WREPL_TYPE_MHOMED
,
3905 .state
= WREPL_STATE_RELEASED
,
3906 .node
= WREPL_NODE_B
,
3908 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3909 .ips
= addresses_B_3_4
,
3910 .apply_expected
= false
3914 .type
= WREPL_TYPE_MHOMED
,
3915 .state
= WREPL_STATE_ACTIVE
,
3916 .node
= WREPL_NODE_B
,
3918 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
3919 .ips
= addresses_A_3_4
,
3920 .apply_expected
= true
3925 * mhomed,released vs. mhomed,tombstone
3926 * => should be replaced
3929 .line
= __location__
,
3930 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3933 .type
= WREPL_TYPE_MHOMED
,
3934 .state
= WREPL_STATE_RELEASED
,
3935 .node
= WREPL_NODE_B
,
3937 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
3938 .ips
= addresses_A_3_4
,
3939 .apply_expected
= false
3943 .type
= WREPL_TYPE_MHOMED
,
3944 .state
= WREPL_STATE_TOMBSTONE
,
3945 .node
= WREPL_NODE_B
,
3947 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3948 .ips
= addresses_B_3_4
,
3949 .apply_expected
= true
3954 * mhomed,tombstone vs. mhomed,active
3955 * => should be replaced
3958 .line
= __location__
,
3959 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3962 .type
= WREPL_TYPE_MHOMED
,
3963 .state
= WREPL_STATE_TOMBSTONE
,
3964 .node
= WREPL_NODE_B
,
3966 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
3967 .ips
= addresses_B_3_4
,
3968 .apply_expected
= true
3972 .type
= WREPL_TYPE_MHOMED
,
3973 .state
= WREPL_STATE_ACTIVE
,
3974 .node
= WREPL_NODE_B
,
3976 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
3977 .ips
= addresses_A_3_4
,
3978 .apply_expected
= true
3983 * mhomed,tombstone vs. mhomed,tombstone
3984 * => should be replaced
3987 .line
= __location__
,
3988 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
3991 .type
= WREPL_TYPE_MHOMED
,
3992 .state
= WREPL_STATE_TOMBSTONE
,
3993 .node
= WREPL_NODE_B
,
3995 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
3996 .ips
= addresses_A_3_4
,
3997 .apply_expected
= true
4001 .type
= WREPL_TYPE_MHOMED
,
4002 .state
= WREPL_STATE_TOMBSTONE
,
4003 .node
= WREPL_NODE_B
,
4005 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4006 .ips
= addresses_B_3_4
,
4007 .apply_expected
= true
4011 .line
= __location__
,
4012 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4016 .type
= WREPL_TYPE_UNIQUE
,
4017 .state
= WREPL_STATE_TOMBSTONE
,
4018 .node
= WREPL_NODE_B
,
4020 .num_ips
= ARRAY_SIZE(addresses_B_1
),
4021 .ips
= addresses_B_1
,
4022 .apply_expected
= true,
4026 .type
= WREPL_TYPE_UNIQUE
,
4027 .state
= WREPL_STATE_TOMBSTONE
,
4028 .node
= WREPL_NODE_B
,
4030 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4031 .ips
= addresses_A_1
,
4032 .apply_expected
= true,
4036 * special group vs special group section,
4039 * sgroup,active vs. sgroup,active same addresses
4040 * => should be NOT replaced
4043 .line
= __location__
,
4044 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4045 .comment
= "A:A_3_4 vs. B:A_3_4",
4049 .type
= WREPL_TYPE_SGROUP
,
4050 .state
= WREPL_STATE_ACTIVE
,
4051 .node
= WREPL_NODE_B
,
4053 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4054 .ips
= addresses_A_3_4
,
4055 .apply_expected
= true
4059 .type
= WREPL_TYPE_SGROUP
,
4060 .state
= WREPL_STATE_ACTIVE
,
4061 .node
= WREPL_NODE_B
,
4063 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4064 .ips
= addresses_A_3_4
,
4065 .apply_expected
= false,
4066 .sgroup_cleanup
= true
4070 * sgroup,active vs. sgroup,active same addresses
4071 * => should be NOT replaced
4074 .line
= __location__
,
4075 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4076 .comment
= "A:A_3_4 vs. B:NULL",
4080 .type
= WREPL_TYPE_SGROUP
,
4081 .state
= WREPL_STATE_ACTIVE
,
4082 .node
= WREPL_NODE_B
,
4084 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4085 .ips
= addresses_A_3_4
,
4086 .apply_expected
= true
4090 .type
= WREPL_TYPE_SGROUP
,
4091 .state
= WREPL_STATE_ACTIVE
,
4092 .node
= WREPL_NODE_B
,
4096 .apply_expected
= false,
4097 .sgroup_cleanup
= true
4101 * sgroup,active vs. sgroup,active subset addresses, special case...
4102 * => should NOT be replaced
4105 .line
= __location__
,
4106 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4107 .comment
= "A:A_3_4_X_3_4 vs. B:A_3_4",
4111 .type
= WREPL_TYPE_SGROUP
,
4112 .state
= WREPL_STATE_ACTIVE
,
4113 .node
= WREPL_NODE_B
,
4115 .num_ips
= ARRAY_SIZE(addresses_A_3_4_X_3_4
),
4116 .ips
= addresses_A_3_4_X_3_4
,
4117 .apply_expected
= true,
4121 .type
= WREPL_TYPE_SGROUP
,
4122 .state
= WREPL_STATE_ACTIVE
,
4123 .node
= WREPL_NODE_B
,
4125 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4126 .ips
= addresses_A_3_4
,
4127 .apply_expected
= false,
4131 .line
= __location__
,
4132 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4136 .type
= WREPL_TYPE_SGROUP
,
4137 .state
= WREPL_STATE_ACTIVE
,
4138 .node
= WREPL_NODE_B
,
4142 .apply_expected
= false,
4146 .type
= WREPL_TYPE_SGROUP
,
4147 .state
= WREPL_STATE_ACTIVE
,
4148 .node
= WREPL_NODE_B
,
4152 .apply_expected
= false,
4156 * sgroup,active vs. sgroup,active different addresses, but owner changed
4157 * => should be replaced
4160 .line
= __location__
,
4161 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4162 .comment
= "A:B_3_4 vs. B:A_3_4",
4166 .type
= WREPL_TYPE_SGROUP
,
4167 .state
= WREPL_STATE_ACTIVE
,
4168 .node
= WREPL_NODE_B
,
4170 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4171 .ips
= addresses_B_3_4
,
4172 .apply_expected
= true,
4176 .type
= WREPL_TYPE_SGROUP
,
4177 .state
= WREPL_STATE_ACTIVE
,
4178 .node
= WREPL_NODE_B
,
4180 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4181 .ips
= addresses_A_3_4
,
4182 .apply_expected
= true,
4183 .sgroup_cleanup
= true
4187 * sgroup,active vs. sgroup,active different addresses, but owner changed
4188 * => should be replaced
4191 .line
= __location__
,
4192 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4193 .comment
= "A:A_3_4 vs. B:A_3_4_OWNER_B",
4197 .type
= WREPL_TYPE_SGROUP
,
4198 .state
= WREPL_STATE_ACTIVE
,
4199 .node
= WREPL_NODE_B
,
4201 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4202 .ips
= addresses_A_3_4
,
4203 .apply_expected
= true,
4207 .type
= WREPL_TYPE_SGROUP
,
4208 .state
= WREPL_STATE_ACTIVE
,
4209 .node
= WREPL_NODE_B
,
4211 .num_ips
= ARRAY_SIZE(addresses_A_3_4_OWNER_B
),
4212 .ips
= addresses_A_3_4_OWNER_B
,
4213 .apply_expected
= true,
4214 .sgroup_cleanup
= true
4218 * sgroup,active vs. sgroup,active different addresses, but owner changed
4219 * => should be replaced
4222 .line
= __location__
,
4223 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4224 .comment
= "A:A_3_4_OWNER_B vs. B:A_3_4",
4228 .type
= WREPL_TYPE_SGROUP
,
4229 .state
= WREPL_STATE_ACTIVE
,
4230 .node
= WREPL_NODE_B
,
4232 .num_ips
= ARRAY_SIZE(addresses_A_3_4_OWNER_B
),
4233 .ips
= addresses_A_3_4_OWNER_B
,
4234 .apply_expected
= true,
4238 .type
= WREPL_TYPE_SGROUP
,
4239 .state
= WREPL_STATE_ACTIVE
,
4240 .node
= WREPL_NODE_B
,
4242 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4243 .ips
= addresses_A_3_4
,
4244 .apply_expected
= true,
4245 .sgroup_cleanup
= true
4249 * sgroup,active vs. sgroup,active different addresses
4250 * => should be merged
4253 .line
= __location__
,
4254 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4255 .comment
= "A:A_3_4 vs. B:B_3_4 => C:A_3_4_B_3_4",
4259 .type
= WREPL_TYPE_SGROUP
,
4260 .state
= WREPL_STATE_ACTIVE
,
4261 .node
= WREPL_NODE_B
,
4263 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4264 .ips
= addresses_A_3_4
,
4265 .apply_expected
= true,
4269 .type
= WREPL_TYPE_SGROUP
,
4270 .state
= WREPL_STATE_ACTIVE
,
4271 .node
= WREPL_NODE_B
,
4273 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4274 .ips
= addresses_B_3_4
,
4275 .sgroup_merge
= true,
4276 .sgroup_cleanup
= true,
4280 * sgroup,active vs. sgroup,active different addresses, special case...
4281 * => should be merged
4284 .line
= __location__
,
4285 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4286 .comment
= "A:B_3_4_X_3_4 vs. B:A_3_4 => B:A_3_4_X_3_4",
4290 .type
= WREPL_TYPE_SGROUP
,
4291 .state
= WREPL_STATE_ACTIVE
,
4292 .node
= WREPL_NODE_B
,
4294 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4295 .ips
= addresses_B_3_4_X_3_4
,
4296 .apply_expected
= true,
4300 .type
= WREPL_TYPE_SGROUP
,
4301 .state
= WREPL_STATE_ACTIVE
,
4302 .node
= WREPL_NODE_B
,
4304 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4305 .ips
= addresses_A_3_4
,
4306 .sgroup_merge
= true,
4307 .merge_owner
= &ctx
->b
,
4308 .sgroup_cleanup
= false
4312 .line
= __location__
,
4313 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4317 .type
= WREPL_TYPE_SGROUP
,
4318 .state
= WREPL_STATE_ACTIVE
,
4319 .node
= WREPL_NODE_B
,
4321 .num_ips
= ARRAY_SIZE(addresses_A_3_4_X_3_4_OWNER_B
),
4322 .ips
= addresses_A_3_4_X_3_4_OWNER_B
,
4323 .apply_expected
= true,
4327 .type
= WREPL_TYPE_SGROUP
,
4328 .state
= WREPL_STATE_ACTIVE
,
4329 .node
= WREPL_NODE_B
,
4333 .apply_expected
= false,
4337 * sgroup,active vs. sgroup,active different addresses, special case...
4338 * => should be merged
4341 .line
= __location__
,
4342 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4343 .comment
= "A:X_3_4 vs. B:A_3_4 => C:A_3_4_X_3_4",
4347 .type
= WREPL_TYPE_SGROUP
,
4348 .state
= WREPL_STATE_ACTIVE
,
4349 .node
= WREPL_NODE_B
,
4351 .num_ips
= ARRAY_SIZE(addresses_X_3_4
),
4352 .ips
= addresses_X_3_4
,
4353 .apply_expected
= true,
4357 .type
= WREPL_TYPE_SGROUP
,
4358 .state
= WREPL_STATE_ACTIVE
,
4359 .node
= WREPL_NODE_B
,
4361 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4362 .ips
= addresses_A_3_4
,
4363 .sgroup_merge
= true,
4364 .sgroup_cleanup
= false
4368 .line
= __location__
,
4369 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4373 .type
= WREPL_TYPE_SGROUP
,
4374 .state
= WREPL_STATE_ACTIVE
,
4375 .node
= WREPL_NODE_B
,
4379 .apply_expected
= false,
4383 .type
= WREPL_TYPE_SGROUP
,
4384 .state
= WREPL_STATE_ACTIVE
,
4385 .node
= WREPL_NODE_B
,
4389 .apply_expected
= false,
4393 * sgroup,active vs. sgroup,active different addresses, special case...
4394 * => should be merged
4397 .line
= __location__
,
4398 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4399 .comment
= "A:A_3_4_X_3_4 vs. B:A_3_4_OWNER_B => B:A_3_4_OWNER_B_X_3_4",
4403 .type
= WREPL_TYPE_SGROUP
,
4404 .state
= WREPL_STATE_ACTIVE
,
4405 .node
= WREPL_NODE_B
,
4407 .num_ips
= ARRAY_SIZE(addresses_A_3_4_X_3_4
),
4408 .ips
= addresses_A_3_4_X_3_4
,
4409 .apply_expected
= true,
4413 .type
= WREPL_TYPE_SGROUP
,
4414 .state
= WREPL_STATE_ACTIVE
,
4415 .node
= WREPL_NODE_B
,
4417 .num_ips
= ARRAY_SIZE(addresses_A_3_4_OWNER_B
),
4418 .ips
= addresses_A_3_4_OWNER_B
,
4419 .sgroup_merge
= true,
4420 .merge_owner
= &ctx
->b
,
4424 .line
= __location__
,
4425 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4429 .type
= WREPL_TYPE_SGROUP
,
4430 .state
= WREPL_STATE_ACTIVE
,
4431 .node
= WREPL_NODE_B
,
4435 .apply_expected
= false,
4439 .type
= WREPL_TYPE_SGROUP
,
4440 .state
= WREPL_STATE_ACTIVE
,
4441 .node
= WREPL_NODE_B
,
4445 .apply_expected
= false,
4449 * sgroup,active vs. sgroup,active partly different addresses, special case...
4450 * => should be merged
4453 .line
= __location__
,
4454 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4455 .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",
4459 .type
= WREPL_TYPE_SGROUP
,
4460 .state
= WREPL_STATE_ACTIVE
,
4461 .node
= WREPL_NODE_B
,
4463 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4464 .ips
= addresses_B_3_4_X_3_4
,
4465 .apply_expected
= true,
4469 .type
= WREPL_TYPE_SGROUP
,
4470 .state
= WREPL_STATE_ACTIVE
,
4471 .node
= WREPL_NODE_B
,
4473 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_1_2
),
4474 .ips
= addresses_B_3_4_X_1_2
,
4475 .sgroup_merge
= true,
4476 .sgroup_cleanup
= false
4480 .line
= __location__
,
4481 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4485 .type
= WREPL_TYPE_SGROUP
,
4486 .state
= WREPL_STATE_ACTIVE
,
4487 .node
= WREPL_NODE_B
,
4491 .apply_expected
= false,
4495 .type
= WREPL_TYPE_SGROUP
,
4496 .state
= WREPL_STATE_ACTIVE
,
4497 .node
= WREPL_NODE_B
,
4501 .apply_expected
= false,
4505 * sgroup,active vs. sgroup,active different addresses, special case...
4506 * => should be merged
4509 .line
= __location__
,
4510 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4511 .comment
= "A:A_3_4_B_3_4 vs. B:NULL => B:A_3_4",
4515 .type
= WREPL_TYPE_SGROUP
,
4516 .state
= WREPL_STATE_ACTIVE
,
4517 .node
= WREPL_NODE_B
,
4519 .num_ips
= ARRAY_SIZE(addresses_A_3_4_B_3_4
),
4520 .ips
= addresses_A_3_4_B_3_4
,
4521 .apply_expected
= true,
4525 .type
= WREPL_TYPE_SGROUP
,
4526 .state
= WREPL_STATE_ACTIVE
,
4527 .node
= WREPL_NODE_B
,
4531 .sgroup_merge
= true,
4532 .merge_owner
= &ctx
->b
,
4533 .sgroup_cleanup
= true
4537 .line
= __location__
,
4538 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4542 .type
= WREPL_TYPE_SGROUP
,
4543 .state
= WREPL_STATE_ACTIVE
,
4544 .node
= WREPL_NODE_B
,
4548 .apply_expected
= false,
4552 .type
= WREPL_TYPE_UNIQUE
,
4553 .state
= WREPL_STATE_TOMBSTONE
,
4554 .node
= WREPL_NODE_B
,
4556 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4557 .ips
= addresses_A_1
,
4558 .apply_expected
= true,
4562 * sgroup,active vs. sgroup,active different addresses, special case...
4563 * => should be merged
4566 .line
= __location__
,
4567 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4568 .comment
= "A:B_3_4_X_3_4 vs. B:NULL => B:X_3_4",
4572 .type
= WREPL_TYPE_SGROUP
,
4573 .state
= WREPL_STATE_ACTIVE
,
4574 .node
= WREPL_NODE_B
,
4576 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4577 .ips
= addresses_B_3_4_X_3_4
,
4578 .apply_expected
= true,
4582 .type
= WREPL_TYPE_SGROUP
,
4583 .state
= WREPL_STATE_ACTIVE
,
4584 .node
= WREPL_NODE_B
,
4588 .sgroup_merge
= true,
4589 .merge_owner
= &ctx
->b
,
4590 .sgroup_cleanup
= true
4594 .line
= __location__
,
4595 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4599 .type
= WREPL_TYPE_SGROUP
,
4600 .state
= WREPL_STATE_ACTIVE
,
4601 .node
= WREPL_NODE_B
,
4605 .apply_expected
= false,
4609 .type
= WREPL_TYPE_UNIQUE
,
4610 .state
= WREPL_STATE_TOMBSTONE
,
4611 .node
= WREPL_NODE_B
,
4613 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4614 .ips
= addresses_A_1
,
4615 .apply_expected
= true,
4620 * sgroup,active vs. sgroup,tombstone different no addresses, special
4621 * => should be replaced
4624 .line
= __location__
,
4625 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4626 .comment
= "A:B_3_4_X_3_4 vs. B:NULL => B:NULL",
4630 .type
= WREPL_TYPE_SGROUP
,
4631 .state
= WREPL_STATE_ACTIVE
,
4632 .node
= WREPL_NODE_B
,
4634 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4635 .ips
= addresses_B_3_4_X_3_4
,
4636 .apply_expected
= true,
4640 .type
= WREPL_TYPE_SGROUP
,
4641 .state
= WREPL_STATE_TOMBSTONE
,
4642 .node
= WREPL_NODE_B
,
4646 .apply_expected
= true,
4650 * sgroup,active vs. sgroup,tombstone different addresses
4651 * => should be replaced
4654 .line
= __location__
,
4655 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4656 .comment
= "A:B_3_4_X_3_4 vs. B:A_3_4 => B:A_3_4",
4660 .type
= WREPL_TYPE_SGROUP
,
4661 .state
= WREPL_STATE_ACTIVE
,
4662 .node
= WREPL_NODE_B
,
4664 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4665 .ips
= addresses_B_3_4_X_3_4
,
4666 .apply_expected
= true,
4670 .type
= WREPL_TYPE_SGROUP
,
4671 .state
= WREPL_STATE_TOMBSTONE
,
4672 .node
= WREPL_NODE_B
,
4674 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
4675 .ips
= addresses_A_3_4
,
4676 .apply_expected
= true,
4680 * sgroup,active vs. sgroup,tombstone subset addresses
4681 * => should be replaced
4684 .line
= __location__
,
4685 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4686 .comment
= "A:B_3_4_X_3_4 vs. B:B_3_4 => B:B_3_4",
4690 .type
= WREPL_TYPE_SGROUP
,
4691 .state
= WREPL_STATE_ACTIVE
,
4692 .node
= WREPL_NODE_B
,
4694 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4695 .ips
= addresses_B_3_4_X_3_4
,
4696 .apply_expected
= true,
4700 .type
= WREPL_TYPE_SGROUP
,
4701 .state
= WREPL_STATE_TOMBSTONE
,
4702 .node
= WREPL_NODE_B
,
4704 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
4705 .ips
= addresses_B_3_4
,
4706 .apply_expected
= true,
4710 * sgroup,active vs. sgroup,active same addresses
4711 * => should be replaced
4714 .line
= __location__
,
4715 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4716 .comment
= "A:B_3_4_X_3_4 vs. B:B_3_4_X_3_4 => B:B_3_4_X_3_4",
4720 .type
= WREPL_TYPE_SGROUP
,
4721 .state
= WREPL_STATE_ACTIVE
,
4722 .node
= WREPL_NODE_B
,
4724 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4725 .ips
= addresses_B_3_4_X_3_4
,
4726 .apply_expected
= true,
4730 .type
= WREPL_TYPE_SGROUP
,
4731 .state
= WREPL_STATE_TOMBSTONE
,
4732 .node
= WREPL_NODE_B
,
4734 .num_ips
= ARRAY_SIZE(addresses_B_3_4_X_3_4
),
4735 .ips
= addresses_B_3_4_X_3_4
,
4736 .apply_expected
= true,
4741 * This should be the last record in this array,
4742 * we need to make sure the we leave a tombstoned unique entry
4746 .line
= __location__
,
4747 .name
= _NBT_NAME("_DIFF_OWNER", 0x00, NULL
),
4751 .type
= WREPL_TYPE_UNIQUE
,
4752 .state
= WREPL_STATE_TOMBSTONE
,
4753 .node
= WREPL_NODE_B
,
4755 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4756 .ips
= addresses_A_1
,
4757 .apply_expected
= true
4761 .type
= WREPL_TYPE_UNIQUE
,
4762 .state
= WREPL_STATE_TOMBSTONE
,
4763 .node
= WREPL_NODE_B
,
4765 .num_ips
= ARRAY_SIZE(addresses_A_1
),
4766 .ips
= addresses_A_1
,
4767 .apply_expected
= true
4769 }}; /* do not add entries here, this should be the last record! */
4771 wins_name_r1
= &wins_name1
;
4772 wins_name_r2
= &wins_name2
;
4774 torture_comment(tctx
, "Test Replica Conflicts with different owners\n");
4776 for(i
=0; ret
&& i
< ARRAY_SIZE(records
); i
++) {
4778 if (!records
[i
].extra
&& !records
[i
].cleanup
) {
4779 /* we should test the worst cases */
4780 if (records
[i
].r2
.apply_expected
&& records
[i
].r1
.ips
==records
[i
].r2
.ips
) {
4781 torture_comment(tctx
, "(%s) Programmer error, invalid record[%u]: %s\n",
4782 __location__
, i
, records
[i
].line
);
4784 } else if (!records
[i
].r2
.apply_expected
&& records
[i
].r1
.ips
!=records
[i
].r2
.ips
) {
4785 torture_comment(tctx
, "(%s) Programmer error, invalid record[%u]: %s\n",
4786 __location__
, i
, records
[i
].line
);
4791 if (!records
[i
].cleanup
) {
4792 const char *expected
;
4795 if (records
[i
].r2
.sgroup_merge
) {
4796 expected
= "SGROUP_MERGE";
4797 } else if (records
[i
].r2
.apply_expected
) {
4798 expected
= "REPLACE";
4800 expected
= "NOT REPLACE";
4803 if (!records
[i
].r1
.ips
&& !records
[i
].r2
.ips
) {
4804 ips
= "with no ip(s)";
4805 } else if (records
[i
].r1
.ips
==records
[i
].r2
.ips
) {
4806 ips
= "with same ip(s)";
4808 ips
= "with different ip(s)";
4811 torture_comment(tctx
, "%s,%s%s vs. %s,%s%s %s => %s\n",
4812 wrepl_name_type_string(records
[i
].r1
.type
),
4813 wrepl_name_state_string(records
[i
].r1
.state
),
4814 (records
[i
].r1
.is_static
?",static":""),
4815 wrepl_name_type_string(records
[i
].r2
.type
),
4816 wrepl_name_state_string(records
[i
].r2
.state
),
4817 (records
[i
].r2
.is_static
?",static":""),
4818 (records
[i
].comment
?records
[i
].comment
:ips
),
4825 wins_name_r1
->name
= &records
[i
].name
;
4826 wins_name_r1
->flags
= WREPL_NAME_FLAGS(records
[i
].r1
.type
,
4827 records
[i
].r1
.state
,
4829 records
[i
].r1
.is_static
);
4830 wins_name_r1
->id
= ++records
[i
].r1
.owner
->max_version
;
4831 if (wins_name_r1
->flags
& 2) {
4832 wins_name_r1
->addresses
.addresses
.num_ips
= records
[i
].r1
.num_ips
;
4833 wins_name_r1
->addresses
.addresses
.ips
= discard_const(records
[i
].r1
.ips
);
4835 wins_name_r1
->addresses
.ip
= records
[i
].r1
.ips
[0].ip
;
4837 wins_name_r1
->unknown
= "255.255.255.255";
4840 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r1
.owner
, wins_name_r1
);
4841 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r1
.owner
,
4842 wins_name_r1
, records
[i
].r1
.apply_expected
);
4847 wins_name_r2
->name
= &records
[i
].name
;
4848 wins_name_r2
->flags
= WREPL_NAME_FLAGS(records
[i
].r2
.type
,
4849 records
[i
].r2
.state
,
4851 records
[i
].r2
.is_static
);
4852 wins_name_r2
->id
= ++records
[i
].r2
.owner
->max_version
;
4853 if (wins_name_r2
->flags
& 2) {
4854 wins_name_r2
->addresses
.addresses
.num_ips
= records
[i
].r2
.num_ips
;
4855 wins_name_r2
->addresses
.addresses
.ips
= discard_const(records
[i
].r2
.ips
);
4857 wins_name_r2
->addresses
.ip
= records
[i
].r2
.ips
[0].ip
;
4859 wins_name_r2
->unknown
= "255.255.255.255";
4862 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
);
4863 if (records
[i
].r1
.state
== WREPL_STATE_RELEASED
) {
4864 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r1
.owner
,
4865 wins_name_r1
, false);
4866 } else if (records
[i
].r2
.sgroup_merge
) {
4867 ret
&= test_wrepl_sgroup_merged(tctx
, ctx
, records
[i
].r2
.merge_owner
,
4868 records
[i
].r1
.owner
,
4869 records
[i
].r1
.num_ips
, records
[i
].r1
.ips
,
4870 records
[i
].r2
.owner
,
4871 records
[i
].r2
.num_ips
, records
[i
].r2
.ips
,
4873 } else if (records
[i
].r1
.owner
!= records
[i
].r2
.owner
) {
4875 _expected
= (records
[i
].r1
.apply_expected
&& !records
[i
].r2
.apply_expected
);
4876 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r1
.owner
,
4877 wins_name_r1
, _expected
);
4879 if (records
[i
].r2
.state
== WREPL_STATE_RELEASED
) {
4880 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r2
.owner
,
4881 wins_name_r2
, false);
4882 } else if (!records
[i
].r2
.sgroup_merge
) {
4883 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r2
.owner
,
4884 wins_name_r2
, records
[i
].r2
.apply_expected
);
4887 if (records
[i
].r2
.sgroup_cleanup
) {
4889 torture_comment(tctx
, "failed before sgroup_cleanup record[%u]: %s\n", i
, records
[i
].line
);
4893 /* clean up the SGROUP record */
4894 wins_name_r1
->name
= &records
[i
].name
;
4895 wins_name_r1
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
4897 WREPL_NODE_B
, false);
4898 wins_name_r1
->id
= ++records
[i
].r1
.owner
->max_version
;
4899 wins_name_r1
->addresses
.addresses
.num_ips
= 0;
4900 wins_name_r1
->addresses
.addresses
.ips
= NULL
;
4901 wins_name_r1
->unknown
= "255.255.255.255";
4902 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r1
.owner
, wins_name_r1
);
4904 /* here we test how names from an owner are deleted */
4905 if (records
[i
].r2
.sgroup_merge
&& records
[i
].r2
.num_ips
) {
4906 ret
&= test_wrepl_sgroup_merged(tctx
, ctx
, NULL
,
4907 records
[i
].r2
.owner
,
4908 records
[i
].r2
.num_ips
, records
[i
].r2
.ips
,
4909 records
[i
].r1
.owner
,
4914 /* clean up the SGROUP record */
4915 wins_name_r2
->name
= &records
[i
].name
;
4916 wins_name_r2
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
4918 WREPL_NODE_B
, false);
4919 wins_name_r2
->id
= ++records
[i
].r2
.owner
->max_version
;
4920 wins_name_r2
->addresses
.addresses
.num_ips
= 0;
4921 wins_name_r2
->addresses
.addresses
.ips
= NULL
;
4922 wins_name_r2
->unknown
= "255.255.255.255";
4923 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
);
4925 /* take ownership of the SGROUP record */
4926 wins_name_r2
->name
= &records
[i
].name
;
4927 wins_name_r2
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
4929 WREPL_NODE_B
, false);
4930 wins_name_r2
->id
= ++records
[i
].r2
.owner
->max_version
;
4931 wins_name_r2
->addresses
.addresses
.num_ips
= ARRAY_SIZE(addresses_B_1
);
4932 wins_name_r2
->addresses
.addresses
.ips
= discard_const(addresses_B_1
);
4933 wins_name_r2
->unknown
= "255.255.255.255";
4934 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
);
4935 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
, true);
4937 /* overwrite the SGROUP record with unique,tombstone */
4938 wins_name_r2
->name
= &records
[i
].name
;
4939 wins_name_r2
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
4940 WREPL_STATE_TOMBSTONE
,
4941 WREPL_NODE_B
, false);
4942 wins_name_r2
->id
= ++records
[i
].r2
.owner
->max_version
;
4943 wins_name_r2
->addresses
.addresses
.num_ips
= ARRAY_SIZE(addresses_B_1
);
4944 wins_name_r2
->addresses
.addresses
.ips
= discard_const(addresses_B_1
);
4945 wins_name_r2
->unknown
= "255.255.255.255";
4946 ret
&= test_wrepl_update_one(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
);
4947 ret
&= test_wrepl_is_applied(tctx
, ctx
, records
[i
].r2
.owner
, wins_name_r2
, true);
4950 torture_comment(tctx
, "failed in sgroup_cleanup record[%u]: %s\n", i
, records
[i
].line
);
4955 /* the first one is a cleanup run */
4956 if (!ret
&& i
== 0) ret
= true;
4959 torture_comment(tctx
, "conflict handled wrong or record[%u]: %s\n", i
, records
[i
].line
);
4967 static bool test_conflict_owned_released_vs_replica(struct torture_context
*tctx
,
4968 struct test_wrepl_conflict_conn
*ctx
)
4972 struct wrepl_wins_name wins_name_
;
4973 struct wrepl_wins_name
*wins_name
= &wins_name_
;
4974 struct nbt_name_register name_register_
;
4975 struct nbt_name_register
*name_register
= &name_register_
;
4976 struct nbt_name_release release_
;
4977 struct nbt_name_release
*release
= &release_
;
4980 const char *line
; /* just better debugging */
4981 struct nbt_name name
;
4986 const struct wrepl_ip
*ips
;
4987 bool apply_expected
;
4990 enum wrepl_name_type type
;
4991 enum wrepl_name_state state
;
4992 enum wrepl_name_node node
;
4995 const struct wrepl_ip
*ips
;
4996 bool apply_expected
;
5000 * unique vs. unique section
5003 * unique,released vs. unique,active with same ip(s)
5006 .line
= __location__
,
5007 .name
= _NBT_NAME("_UR_UA_SI", 0x00, NULL
),
5011 .num_ips
= ctx
->addresses_best_num
,
5012 .ips
= ctx
->addresses_best
,
5013 .apply_expected
= true
5016 .type
= WREPL_TYPE_UNIQUE
,
5017 .state
= WREPL_STATE_ACTIVE
,
5018 .node
= WREPL_NODE_B
,
5020 .num_ips
= ctx
->addresses_best_num
,
5021 .ips
= ctx
->addresses_best
,
5022 .apply_expected
= true
5026 * unique,released vs. unique,active with different ip(s)
5029 .line
= __location__
,
5030 .name
= _NBT_NAME("_UR_UA_DI", 0x00, NULL
),
5034 .num_ips
= ctx
->addresses_best_num
,
5035 .ips
= ctx
->addresses_best
,
5036 .apply_expected
= true
5039 .type
= WREPL_TYPE_UNIQUE
,
5040 .state
= WREPL_STATE_ACTIVE
,
5041 .node
= WREPL_NODE_B
,
5043 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5044 .ips
= addresses_B_1
,
5045 .apply_expected
= true
5049 * unique,released vs. unique,tombstone with same ip(s)
5052 .line
= __location__
,
5053 .name
= _NBT_NAME("_UR_UT_SI", 0x00, NULL
),
5057 .num_ips
= ctx
->addresses_best_num
,
5058 .ips
= ctx
->addresses_best
,
5059 .apply_expected
= true
5062 .type
= WREPL_TYPE_UNIQUE
,
5063 .state
= WREPL_STATE_TOMBSTONE
,
5064 .node
= WREPL_NODE_B
,
5066 .num_ips
= ctx
->addresses_best_num
,
5067 .ips
= ctx
->addresses_best
,
5068 .apply_expected
= true
5072 * unique,released vs. unique,tombstone with different ip(s)
5075 .line
= __location__
,
5076 .name
= _NBT_NAME("_UR_UT_DI", 0x00, NULL
),
5080 .num_ips
= ctx
->addresses_best_num
,
5081 .ips
= ctx
->addresses_best
,
5082 .apply_expected
= true
5085 .type
= WREPL_TYPE_UNIQUE
,
5086 .state
= WREPL_STATE_TOMBSTONE
,
5087 .node
= WREPL_NODE_B
,
5089 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5090 .ips
= addresses_B_1
,
5091 .apply_expected
= true
5095 * unique vs. group section
5098 * unique,released vs. group,active with same ip(s)
5101 .line
= __location__
,
5102 .name
= _NBT_NAME("_UR_GA_SI", 0x00, NULL
),
5106 .num_ips
= ctx
->addresses_best_num
,
5107 .ips
= ctx
->addresses_best
,
5108 .apply_expected
= true
5111 .type
= WREPL_TYPE_GROUP
,
5112 .state
= WREPL_STATE_ACTIVE
,
5113 .node
= WREPL_NODE_B
,
5115 .num_ips
= ctx
->addresses_best_num
,
5116 .ips
= ctx
->addresses_best
,
5117 .apply_expected
= true
5121 * unique,released vs. group,active with different ip(s)
5124 .line
= __location__
,
5125 .name
= _NBT_NAME("_UR_GA_DI", 0x00, NULL
),
5129 .num_ips
= ctx
->addresses_best_num
,
5130 .ips
= ctx
->addresses_best
,
5131 .apply_expected
= true
5134 .type
= WREPL_TYPE_GROUP
,
5135 .state
= WREPL_STATE_ACTIVE
,
5136 .node
= WREPL_NODE_B
,
5138 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5139 .ips
= addresses_B_1
,
5140 .apply_expected
= true
5144 * unique,released vs. group,tombstone with same ip(s)
5147 .line
= __location__
,
5148 .name
= _NBT_NAME("_UR_GT_SI", 0x00, NULL
),
5152 .num_ips
= ctx
->addresses_best_num
,
5153 .ips
= ctx
->addresses_best
,
5154 .apply_expected
= true
5157 .type
= WREPL_TYPE_GROUP
,
5158 .state
= WREPL_STATE_TOMBSTONE
,
5159 .node
= WREPL_NODE_B
,
5161 .num_ips
= ctx
->addresses_best_num
,
5162 .ips
= ctx
->addresses_best
,
5163 .apply_expected
= true
5167 * unique,released vs. group,tombstone with different ip(s)
5170 .line
= __location__
,
5171 .name
= _NBT_NAME("_UR_GT_DI", 0x00, NULL
),
5175 .num_ips
= ctx
->addresses_best_num
,
5176 .ips
= ctx
->addresses_best
,
5177 .apply_expected
= true
5180 .type
= WREPL_TYPE_GROUP
,
5181 .state
= WREPL_STATE_TOMBSTONE
,
5182 .node
= WREPL_NODE_B
,
5184 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5185 .ips
= addresses_B_1
,
5186 .apply_expected
= true
5190 * unique vs. special group section
5193 * unique,released vs. sgroup,active with same ip(s)
5196 .line
= __location__
,
5197 .name
= _NBT_NAME("_UR_SA_SI", 0x00, NULL
),
5201 .num_ips
= ctx
->addresses_best_num
,
5202 .ips
= ctx
->addresses_best
,
5203 .apply_expected
= true
5206 .type
= WREPL_TYPE_SGROUP
,
5207 .state
= WREPL_STATE_ACTIVE
,
5208 .node
= WREPL_NODE_B
,
5210 .num_ips
= ctx
->addresses_best_num
,
5211 .ips
= ctx
->addresses_best
,
5212 .apply_expected
= true
5216 * unique,released vs. sgroup,active with different ip(s)
5219 .line
= __location__
,
5220 .name
= _NBT_NAME("_UR_SA_DI", 0x00, NULL
),
5224 .num_ips
= ctx
->addresses_best_num
,
5225 .ips
= ctx
->addresses_best
,
5226 .apply_expected
= true
5229 .type
= WREPL_TYPE_SGROUP
,
5230 .state
= WREPL_STATE_ACTIVE
,
5231 .node
= WREPL_NODE_B
,
5233 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5234 .ips
= addresses_B_1
,
5235 .apply_expected
= true
5239 * unique,released vs. sgroup,tombstone with same ip(s)
5242 .line
= __location__
,
5243 .name
= _NBT_NAME("_UR_ST_SI", 0x00, NULL
),
5247 .num_ips
= ctx
->addresses_best_num
,
5248 .ips
= ctx
->addresses_best
,
5249 .apply_expected
= true
5252 .type
= WREPL_TYPE_SGROUP
,
5253 .state
= WREPL_STATE_TOMBSTONE
,
5254 .node
= WREPL_NODE_B
,
5256 .num_ips
= ctx
->addresses_best_num
,
5257 .ips
= ctx
->addresses_best
,
5258 .apply_expected
= true
5262 * unique,released vs. sgroup,tombstone with different ip(s)
5265 .line
= __location__
,
5266 .name
= _NBT_NAME("_UR_ST_DI", 0x00, NULL
),
5270 .num_ips
= ctx
->addresses_best_num
,
5271 .ips
= ctx
->addresses_best
,
5272 .apply_expected
= true
5275 .type
= WREPL_TYPE_SGROUP
,
5276 .state
= WREPL_STATE_TOMBSTONE
,
5277 .node
= WREPL_NODE_B
,
5279 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5280 .ips
= addresses_B_1
,
5281 .apply_expected
= true
5285 * unique vs. multi homed section
5288 * unique,released vs. mhomed,active with same ip(s)
5291 .line
= __location__
,
5292 .name
= _NBT_NAME("_UR_MA_SI", 0x00, NULL
),
5296 .num_ips
= ctx
->addresses_best_num
,
5297 .ips
= ctx
->addresses_best
,
5298 .apply_expected
= true
5301 .type
= WREPL_TYPE_MHOMED
,
5302 .state
= WREPL_STATE_ACTIVE
,
5303 .node
= WREPL_NODE_B
,
5305 .num_ips
= ctx
->addresses_best_num
,
5306 .ips
= ctx
->addresses_best
,
5307 .apply_expected
= true
5311 * unique,released vs. mhomed,active with different ip(s)
5314 .line
= __location__
,
5315 .name
= _NBT_NAME("_UR_MA_DI", 0x00, NULL
),
5319 .num_ips
= ctx
->addresses_best_num
,
5320 .ips
= ctx
->addresses_best
,
5321 .apply_expected
= true
5324 .type
= WREPL_TYPE_MHOMED
,
5325 .state
= WREPL_STATE_ACTIVE
,
5326 .node
= WREPL_NODE_B
,
5328 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5329 .ips
= addresses_B_1
,
5330 .apply_expected
= true
5334 * unique,released vs. mhomed,tombstone with same ip(s)
5337 .line
= __location__
,
5338 .name
= _NBT_NAME("_UR_MT_SI", 0x00, NULL
),
5342 .num_ips
= ctx
->addresses_best_num
,
5343 .ips
= ctx
->addresses_best
,
5344 .apply_expected
= true
5347 .type
= WREPL_TYPE_MHOMED
,
5348 .state
= WREPL_STATE_TOMBSTONE
,
5349 .node
= WREPL_NODE_B
,
5351 .num_ips
= ctx
->addresses_best_num
,
5352 .ips
= ctx
->addresses_best
,
5353 .apply_expected
= true
5357 * unique,released vs. mhomed,tombstone with different ip(s)
5360 .line
= __location__
,
5361 .name
= _NBT_NAME("_UR_MT_DI", 0x00, NULL
),
5365 .num_ips
= ctx
->addresses_best_num
,
5366 .ips
= ctx
->addresses_best
,
5367 .apply_expected
= true
5370 .type
= WREPL_TYPE_MHOMED
,
5371 .state
= WREPL_STATE_TOMBSTONE
,
5372 .node
= WREPL_NODE_B
,
5374 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5375 .ips
= addresses_B_1
,
5376 .apply_expected
= true
5380 * group vs. unique section
5383 * group,released vs. unique,active with same ip(s)
5386 .line
= __location__
,
5387 .name
= _NBT_NAME("_GR_UA_SI", 0x00, NULL
),
5389 .nb_flags
= NBT_NM_GROUP
,
5391 .num_ips
= ctx
->addresses_best_num
,
5392 .ips
= ctx
->addresses_best
,
5393 .apply_expected
= true
5396 .type
= WREPL_TYPE_UNIQUE
,
5397 .state
= WREPL_STATE_ACTIVE
,
5398 .node
= WREPL_NODE_B
,
5400 .num_ips
= ctx
->addresses_best_num
,
5401 .ips
= ctx
->addresses_best
,
5402 .apply_expected
= false
5406 * group,released vs. unique,active with different ip(s)
5409 .line
= __location__
,
5410 .name
= _NBT_NAME("_GR_UA_DI", 0x00, NULL
),
5412 .nb_flags
= NBT_NM_GROUP
,
5414 .num_ips
= ctx
->addresses_best_num
,
5415 .ips
= ctx
->addresses_best
,
5416 .apply_expected
= true
5419 .type
= WREPL_TYPE_UNIQUE
,
5420 .state
= WREPL_STATE_ACTIVE
,
5421 .node
= WREPL_NODE_B
,
5423 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5424 .ips
= addresses_B_1
,
5425 .apply_expected
= false
5429 * group,released vs. unique,tombstone with same ip(s)
5432 .line
= __location__
,
5433 .name
= _NBT_NAME("_GR_UT_SI", 0x00, NULL
),
5435 .nb_flags
= NBT_NM_GROUP
,
5437 .num_ips
= ctx
->addresses_best_num
,
5438 .ips
= ctx
->addresses_best
,
5439 .apply_expected
= true
5442 .type
= WREPL_TYPE_UNIQUE
,
5443 .state
= WREPL_STATE_TOMBSTONE
,
5444 .node
= WREPL_NODE_B
,
5446 .num_ips
= ctx
->addresses_best_num
,
5447 .ips
= ctx
->addresses_best
,
5448 .apply_expected
= false
5452 * group,released vs. unique,tombstone with different ip(s)
5455 .line
= __location__
,
5456 .name
= _NBT_NAME("_GR_UT_DI", 0x00, NULL
),
5458 .nb_flags
= NBT_NM_GROUP
,
5460 .num_ips
= ctx
->addresses_best_num
,
5461 .ips
= ctx
->addresses_best
,
5462 .apply_expected
= true
5465 .type
= WREPL_TYPE_UNIQUE
,
5466 .state
= WREPL_STATE_TOMBSTONE
,
5467 .node
= WREPL_NODE_B
,
5469 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5470 .ips
= addresses_B_1
,
5471 .apply_expected
= false
5475 * group vs. group section
5478 * group,released vs. group,active with same ip(s)
5481 .line
= __location__
,
5482 .name
= _NBT_NAME("_GR_GA_SI", 0x00, NULL
),
5484 .nb_flags
= NBT_NM_GROUP
,
5486 .num_ips
= ctx
->addresses_best_num
,
5487 .ips
= ctx
->addresses_best
,
5488 .apply_expected
= true
5491 .type
= WREPL_TYPE_GROUP
,
5492 .state
= WREPL_STATE_ACTIVE
,
5493 .node
= WREPL_NODE_B
,
5495 .num_ips
= ctx
->addresses_best_num
,
5496 .ips
= ctx
->addresses_best
,
5497 .apply_expected
= true
5501 * group,released vs. group,active with different ip(s)
5504 .line
= __location__
,
5505 .name
= _NBT_NAME("_GR_GA_DI", 0x00, NULL
),
5507 .nb_flags
= NBT_NM_GROUP
,
5509 .num_ips
= ctx
->addresses_best_num
,
5510 .ips
= ctx
->addresses_best
,
5511 .apply_expected
= true
5514 .type
= WREPL_TYPE_GROUP
,
5515 .state
= WREPL_STATE_ACTIVE
,
5516 .node
= WREPL_NODE_B
,
5518 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5519 .ips
= addresses_B_1
,
5520 .apply_expected
= true
5524 * group,released vs. group,tombstone with same ip(s)
5527 .line
= __location__
,
5528 .name
= _NBT_NAME("_GR_GT_SI", 0x00, NULL
),
5530 .nb_flags
= NBT_NM_GROUP
,
5532 .num_ips
= ctx
->addresses_best_num
,
5533 .ips
= ctx
->addresses_best
,
5534 .apply_expected
= true
5537 .type
= WREPL_TYPE_GROUP
,
5538 .state
= WREPL_STATE_TOMBSTONE
,
5539 .node
= WREPL_NODE_B
,
5541 .num_ips
= ctx
->addresses_best_num
,
5542 .ips
= ctx
->addresses_best
,
5543 .apply_expected
= true
5547 * group,released vs. group,tombstone with different ip(s)
5550 .line
= __location__
,
5551 .name
= _NBT_NAME("_GR_GT_DI", 0x00, NULL
),
5553 .nb_flags
= NBT_NM_GROUP
,
5555 .num_ips
= ctx
->addresses_best_num
,
5556 .ips
= ctx
->addresses_best
,
5557 .apply_expected
= true
5560 .type
= WREPL_TYPE_GROUP
,
5561 .state
= WREPL_STATE_TOMBSTONE
,
5562 .node
= WREPL_NODE_B
,
5564 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5565 .ips
= addresses_B_1
,
5566 .apply_expected
= true
5570 * group vs. special group section
5573 * group,released vs. sgroup,active with same ip(s)
5576 .line
= __location__
,
5577 .name
= _NBT_NAME("_GR_SA_SI", 0x00, NULL
),
5579 .nb_flags
= NBT_NM_GROUP
,
5581 .num_ips
= ctx
->addresses_best_num
,
5582 .ips
= ctx
->addresses_best
,
5583 .apply_expected
= true
5586 .type
= WREPL_TYPE_SGROUP
,
5587 .state
= WREPL_STATE_ACTIVE
,
5588 .node
= WREPL_NODE_B
,
5590 .num_ips
= ctx
->addresses_best_num
,
5591 .ips
= ctx
->addresses_best
,
5592 .apply_expected
= false
5596 * group,released vs. sgroup,active with different ip(s)
5599 .line
= __location__
,
5600 .name
= _NBT_NAME("_GR_SA_DI", 0x00, NULL
),
5602 .nb_flags
= NBT_NM_GROUP
,
5604 .num_ips
= ctx
->addresses_best_num
,
5605 .ips
= ctx
->addresses_best
,
5606 .apply_expected
= true
5609 .type
= WREPL_TYPE_SGROUP
,
5610 .state
= WREPL_STATE_ACTIVE
,
5611 .node
= WREPL_NODE_B
,
5613 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5614 .ips
= addresses_B_1
,
5615 .apply_expected
= false
5619 * group,released vs. sgroup,tombstone with same ip(s)
5622 .line
= __location__
,
5623 .name
= _NBT_NAME("_GR_ST_SI", 0x00, NULL
),
5625 .nb_flags
= NBT_NM_GROUP
,
5627 .num_ips
= ctx
->addresses_best_num
,
5628 .ips
= ctx
->addresses_best
,
5629 .apply_expected
= true
5632 .type
= WREPL_TYPE_SGROUP
,
5633 .state
= WREPL_STATE_TOMBSTONE
,
5634 .node
= WREPL_NODE_B
,
5636 .num_ips
= ctx
->addresses_best_num
,
5637 .ips
= ctx
->addresses_best
,
5638 .apply_expected
= false
5642 * group,released vs. sgroup,tombstone with different ip(s)
5645 .line
= __location__
,
5646 .name
= _NBT_NAME("_GR_ST_DI", 0x00, NULL
),
5648 .nb_flags
= NBT_NM_GROUP
,
5650 .num_ips
= ctx
->addresses_best_num
,
5651 .ips
= ctx
->addresses_best
,
5652 .apply_expected
= true
5655 .type
= WREPL_TYPE_SGROUP
,
5656 .state
= WREPL_STATE_TOMBSTONE
,
5657 .node
= WREPL_NODE_B
,
5659 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5660 .ips
= addresses_B_1
,
5661 .apply_expected
= false
5665 * group vs. multi homed section
5668 * group,released vs. mhomed,active with same ip(s)
5671 .line
= __location__
,
5672 .name
= _NBT_NAME("_GR_MA_SI", 0x00, NULL
),
5674 .nb_flags
= NBT_NM_GROUP
,
5676 .num_ips
= ctx
->addresses_best_num
,
5677 .ips
= ctx
->addresses_best
,
5678 .apply_expected
= true
5681 .type
= WREPL_TYPE_MHOMED
,
5682 .state
= WREPL_STATE_ACTIVE
,
5683 .node
= WREPL_NODE_B
,
5685 .num_ips
= ctx
->addresses_best_num
,
5686 .ips
= ctx
->addresses_best
,
5687 .apply_expected
= false
5691 * group,released vs. mhomed,active with different ip(s)
5694 .line
= __location__
,
5695 .name
= _NBT_NAME("_GR_MA_DI", 0x00, NULL
),
5697 .nb_flags
= NBT_NM_GROUP
,
5699 .num_ips
= ctx
->addresses_best_num
,
5700 .ips
= ctx
->addresses_best
,
5701 .apply_expected
= true
5704 .type
= WREPL_TYPE_MHOMED
,
5705 .state
= WREPL_STATE_ACTIVE
,
5706 .node
= WREPL_NODE_B
,
5708 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5709 .ips
= addresses_B_1
,
5710 .apply_expected
= false
5714 * group,released vs. mhomed,tombstone with same ip(s)
5717 .line
= __location__
,
5718 .name
= _NBT_NAME("_GR_MT_SI", 0x00, NULL
),
5720 .nb_flags
= NBT_NM_GROUP
,
5722 .num_ips
= ctx
->addresses_best_num
,
5723 .ips
= ctx
->addresses_best
,
5724 .apply_expected
= true
5727 .type
= WREPL_TYPE_MHOMED
,
5728 .state
= WREPL_STATE_TOMBSTONE
,
5729 .node
= WREPL_NODE_B
,
5731 .num_ips
= ctx
->addresses_best_num
,
5732 .ips
= ctx
->addresses_best
,
5733 .apply_expected
= false
5737 * group,released vs. mhomed,tombstone with different ip(s)
5740 .line
= __location__
,
5741 .name
= _NBT_NAME("_GR_MT_DI", 0x00, NULL
),
5743 .nb_flags
= NBT_NM_GROUP
,
5745 .num_ips
= ctx
->addresses_best_num
,
5746 .ips
= ctx
->addresses_best
,
5747 .apply_expected
= true
5750 .type
= WREPL_TYPE_MHOMED
,
5751 .state
= WREPL_STATE_TOMBSTONE
,
5752 .node
= WREPL_NODE_B
,
5754 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5755 .ips
= addresses_B_1
,
5756 .apply_expected
= false
5760 * special group vs. unique section
5763 * sgroup,released vs. unique,active with same ip(s)
5766 .line
= __location__
,
5767 .name
= _NBT_NAME("_SR_UA_SI", 0x1C, NULL
),
5769 .nb_flags
= NBT_NM_GROUP
,
5771 .num_ips
= ctx
->addresses_best_num
,
5772 .ips
= ctx
->addresses_best
,
5773 .apply_expected
= true
5776 .type
= WREPL_TYPE_UNIQUE
,
5777 .state
= WREPL_STATE_ACTIVE
,
5778 .node
= WREPL_NODE_B
,
5780 .num_ips
= ctx
->addresses_best_num
,
5781 .ips
= ctx
->addresses_best
,
5782 .apply_expected
= true
5786 * sgroup,released vs. unique,active with different ip(s)
5789 .line
= __location__
,
5790 .name
= _NBT_NAME("_SR_UA_DI", 0x1C, NULL
),
5792 .nb_flags
= NBT_NM_GROUP
,
5794 .num_ips
= ctx
->addresses_best_num
,
5795 .ips
= ctx
->addresses_best
,
5796 .apply_expected
= true
5799 .type
= WREPL_TYPE_UNIQUE
,
5800 .state
= WREPL_STATE_ACTIVE
,
5801 .node
= WREPL_NODE_B
,
5803 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5804 .ips
= addresses_B_1
,
5805 .apply_expected
= true
5809 * sgroup,released vs. unique,tombstone with same ip(s)
5812 .line
= __location__
,
5813 .name
= _NBT_NAME("_SR_UT_SI", 0x1C, NULL
),
5815 .nb_flags
= NBT_NM_GROUP
,
5817 .num_ips
= ctx
->addresses_best_num
,
5818 .ips
= ctx
->addresses_best
,
5819 .apply_expected
= true
5822 .type
= WREPL_TYPE_UNIQUE
,
5823 .state
= WREPL_STATE_TOMBSTONE
,
5824 .node
= WREPL_NODE_B
,
5826 .num_ips
= ctx
->addresses_best_num
,
5827 .ips
= ctx
->addresses_best
,
5828 .apply_expected
= true
5832 * sgroup,released vs. unique,tombstone with different ip(s)
5835 .line
= __location__
,
5836 .name
= _NBT_NAME("_SR_UT_DI", 0x1C, NULL
),
5838 .nb_flags
= NBT_NM_GROUP
,
5840 .num_ips
= ctx
->addresses_best_num
,
5841 .ips
= ctx
->addresses_best
,
5842 .apply_expected
= true
5845 .type
= WREPL_TYPE_UNIQUE
,
5846 .state
= WREPL_STATE_TOMBSTONE
,
5847 .node
= WREPL_NODE_B
,
5849 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5850 .ips
= addresses_B_1
,
5851 .apply_expected
= true
5855 * special group vs. group section
5858 * sgroup,released vs. group,active with same ip(s)
5861 .line
= __location__
,
5862 .name
= _NBT_NAME("_SR_GA_SI", 0x1C, NULL
),
5864 .nb_flags
= NBT_NM_GROUP
,
5866 .num_ips
= ctx
->addresses_best_num
,
5867 .ips
= ctx
->addresses_best
,
5868 .apply_expected
= true
5871 .type
= WREPL_TYPE_GROUP
,
5872 .state
= WREPL_STATE_ACTIVE
,
5873 .node
= WREPL_NODE_B
,
5875 .num_ips
= ctx
->addresses_best_num
,
5876 .ips
= ctx
->addresses_best
,
5877 .apply_expected
= true
5881 * sgroup,released vs. group,active with different ip(s)
5884 .line
= __location__
,
5885 .name
= _NBT_NAME("_SR_GA_DI", 0x1C, NULL
),
5887 .nb_flags
= NBT_NM_GROUP
,
5889 .num_ips
= ctx
->addresses_best_num
,
5890 .ips
= ctx
->addresses_best
,
5891 .apply_expected
= true
5894 .type
= WREPL_TYPE_GROUP
,
5895 .state
= WREPL_STATE_ACTIVE
,
5896 .node
= WREPL_NODE_B
,
5898 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5899 .ips
= addresses_B_1
,
5900 .apply_expected
= true
5904 * sgroup,released vs. group,tombstone with same ip(s)
5907 .line
= __location__
,
5908 .name
= _NBT_NAME("_SR_GT_SI", 0x1C, NULL
),
5910 .nb_flags
= NBT_NM_GROUP
,
5912 .num_ips
= ctx
->addresses_best_num
,
5913 .ips
= ctx
->addresses_best
,
5914 .apply_expected
= true
5917 .type
= WREPL_TYPE_GROUP
,
5918 .state
= WREPL_STATE_TOMBSTONE
,
5919 .node
= WREPL_NODE_B
,
5921 .num_ips
= ctx
->addresses_best_num
,
5922 .ips
= ctx
->addresses_best
,
5923 .apply_expected
= true
5927 * sgroup,released vs. group,tombstone with different ip(s)
5930 .line
= __location__
,
5931 .name
= _NBT_NAME("_SR_GT_DI", 0x1C, NULL
),
5933 .nb_flags
= NBT_NM_GROUP
,
5935 .num_ips
= ctx
->addresses_best_num
,
5936 .ips
= ctx
->addresses_best
,
5937 .apply_expected
= true
5940 .type
= WREPL_TYPE_GROUP
,
5941 .state
= WREPL_STATE_TOMBSTONE
,
5942 .node
= WREPL_NODE_B
,
5944 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5945 .ips
= addresses_B_1
,
5946 .apply_expected
= true
5950 * special group vs. special group section
5953 * sgroup,released vs. sgroup,active with same ip(s)
5956 .line
= __location__
,
5957 .name
= _NBT_NAME("_SR_SA_SI", 0x1C, NULL
),
5959 .nb_flags
= NBT_NM_GROUP
,
5961 .num_ips
= ctx
->addresses_best_num
,
5962 .ips
= ctx
->addresses_best
,
5963 .apply_expected
= true
5966 .type
= WREPL_TYPE_SGROUP
,
5967 .state
= WREPL_STATE_ACTIVE
,
5968 .node
= WREPL_NODE_B
,
5970 .num_ips
= ctx
->addresses_best_num
,
5971 .ips
= ctx
->addresses_best
,
5972 .apply_expected
= true
5976 * sgroup,released vs. sgroup,active with different ip(s)
5979 .line
= __location__
,
5980 .name
= _NBT_NAME("_SR_SA_DI", 0x1C, NULL
),
5982 .nb_flags
= NBT_NM_GROUP
,
5984 .num_ips
= ctx
->addresses_best_num
,
5985 .ips
= ctx
->addresses_best
,
5986 .apply_expected
= true
5989 .type
= WREPL_TYPE_SGROUP
,
5990 .state
= WREPL_STATE_ACTIVE
,
5991 .node
= WREPL_NODE_B
,
5993 .num_ips
= ARRAY_SIZE(addresses_B_1
),
5994 .ips
= addresses_B_1
,
5995 .apply_expected
= true
5999 * sgroup,released vs. sgroup,tombstone with same ip(s)
6002 .line
= __location__
,
6003 .name
= _NBT_NAME("_SR_ST_SI", 0x1C, NULL
),
6005 .nb_flags
= NBT_NM_GROUP
,
6007 .num_ips
= ctx
->addresses_best_num
,
6008 .ips
= ctx
->addresses_best
,
6009 .apply_expected
= true
6012 .type
= WREPL_TYPE_SGROUP
,
6013 .state
= WREPL_STATE_TOMBSTONE
,
6014 .node
= WREPL_NODE_B
,
6016 .num_ips
= ctx
->addresses_best_num
,
6017 .ips
= ctx
->addresses_best
,
6018 .apply_expected
= true
6022 * sgroup,released vs. sgroup,tombstone with different ip(s)
6025 .line
= __location__
,
6026 .name
= _NBT_NAME("_SR_ST_DI", 0x1C, NULL
),
6028 .nb_flags
= NBT_NM_GROUP
,
6030 .num_ips
= ctx
->addresses_best_num
,
6031 .ips
= ctx
->addresses_best
,
6032 .apply_expected
= true
6035 .type
= WREPL_TYPE_SGROUP
,
6036 .state
= WREPL_STATE_TOMBSTONE
,
6037 .node
= WREPL_NODE_B
,
6039 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6040 .ips
= addresses_B_1
,
6041 .apply_expected
= true
6045 * special group vs. multi homed section
6048 * sgroup,released vs. mhomed,active with same ip(s)
6051 .line
= __location__
,
6052 .name
= _NBT_NAME("_SR_MA_SI", 0x1C, NULL
),
6054 .nb_flags
= NBT_NM_GROUP
,
6056 .num_ips
= ctx
->addresses_best_num
,
6057 .ips
= ctx
->addresses_best
,
6058 .apply_expected
= true
6061 .type
= WREPL_TYPE_MHOMED
,
6062 .state
= WREPL_STATE_ACTIVE
,
6063 .node
= WREPL_NODE_B
,
6065 .num_ips
= ctx
->addresses_best_num
,
6066 .ips
= ctx
->addresses_best
,
6067 .apply_expected
= true
6071 * sgroup,released vs. mhomed,active with different ip(s)
6074 .line
= __location__
,
6075 .name
= _NBT_NAME("_SR_MA_DI", 0x1C, NULL
),
6077 .nb_flags
= NBT_NM_GROUP
,
6079 .num_ips
= ctx
->addresses_best_num
,
6080 .ips
= ctx
->addresses_best
,
6081 .apply_expected
= true
6084 .type
= WREPL_TYPE_MHOMED
,
6085 .state
= WREPL_STATE_ACTIVE
,
6086 .node
= WREPL_NODE_B
,
6088 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6089 .ips
= addresses_B_1
,
6090 .apply_expected
= true
6094 * sgroup,released vs. mhomed,tombstone with same ip(s)
6097 .line
= __location__
,
6098 .name
= _NBT_NAME("_SR_MT_SI", 0x1C, NULL
),
6100 .nb_flags
= NBT_NM_GROUP
,
6102 .num_ips
= ctx
->addresses_best_num
,
6103 .ips
= ctx
->addresses_best
,
6104 .apply_expected
= true
6107 .type
= WREPL_TYPE_MHOMED
,
6108 .state
= WREPL_STATE_TOMBSTONE
,
6109 .node
= WREPL_NODE_B
,
6111 .num_ips
= ctx
->addresses_best_num
,
6112 .ips
= ctx
->addresses_best
,
6113 .apply_expected
= true
6117 * sgroup,released vs. mhomed,tombstone with different ip(s)
6120 .line
= __location__
,
6121 .name
= _NBT_NAME("_SR_MT_DI", 0x1C, NULL
),
6123 .nb_flags
= NBT_NM_GROUP
,
6125 .num_ips
= ctx
->addresses_best_num
,
6126 .ips
= ctx
->addresses_best
,
6127 .apply_expected
= true
6130 .type
= WREPL_TYPE_MHOMED
,
6131 .state
= WREPL_STATE_TOMBSTONE
,
6132 .node
= WREPL_NODE_B
,
6134 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6135 .ips
= addresses_B_1
,
6136 .apply_expected
= true
6140 * multi homed vs. unique section
6143 * mhomed,released vs. unique,active with same ip(s)
6146 .line
= __location__
,
6147 .name
= _NBT_NAME("_MR_UA_SI", 0x00, NULL
),
6151 .num_ips
= ctx
->addresses_best_num
,
6152 .ips
= ctx
->addresses_best
,
6153 .apply_expected
= true
6156 .type
= WREPL_TYPE_UNIQUE
,
6157 .state
= WREPL_STATE_ACTIVE
,
6158 .node
= WREPL_NODE_B
,
6160 .num_ips
= ctx
->addresses_best_num
,
6161 .ips
= ctx
->addresses_best
,
6162 .apply_expected
= true
6166 * mhomed,released vs. unique,active with different ip(s)
6169 .line
= __location__
,
6170 .name
= _NBT_NAME("_MR_UA_DI", 0x00, NULL
),
6174 .num_ips
= ctx
->addresses_best_num
,
6175 .ips
= ctx
->addresses_best
,
6176 .apply_expected
= true
6179 .type
= WREPL_TYPE_UNIQUE
,
6180 .state
= WREPL_STATE_ACTIVE
,
6181 .node
= WREPL_NODE_B
,
6183 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6184 .ips
= addresses_B_1
,
6185 .apply_expected
= true
6189 * mhomed,released vs. unique,tombstone with same ip(s)
6192 .line
= __location__
,
6193 .name
= _NBT_NAME("_MR_UT_SI", 0x00, NULL
),
6197 .num_ips
= ctx
->addresses_best_num
,
6198 .ips
= ctx
->addresses_best
,
6199 .apply_expected
= true
6202 .type
= WREPL_TYPE_UNIQUE
,
6203 .state
= WREPL_STATE_TOMBSTONE
,
6204 .node
= WREPL_NODE_B
,
6206 .num_ips
= ctx
->addresses_best_num
,
6207 .ips
= ctx
->addresses_best
,
6208 .apply_expected
= true
6212 * mhomed,released vs. unique,tombstone with different ip(s)
6215 .line
= __location__
,
6216 .name
= _NBT_NAME("_MR_UT_DI", 0x00, NULL
),
6220 .num_ips
= ctx
->addresses_best_num
,
6221 .ips
= ctx
->addresses_best
,
6222 .apply_expected
= true
6225 .type
= WREPL_TYPE_UNIQUE
,
6226 .state
= WREPL_STATE_TOMBSTONE
,
6227 .node
= WREPL_NODE_B
,
6229 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6230 .ips
= addresses_B_1
,
6231 .apply_expected
= true
6235 * multi homed vs. group section
6238 * mhomed,released vs. group,active with same ip(s)
6241 .line
= __location__
,
6242 .name
= _NBT_NAME("_MR_GA_SI", 0x00, NULL
),
6246 .num_ips
= ctx
->addresses_best_num
,
6247 .ips
= ctx
->addresses_best
,
6248 .apply_expected
= true
6251 .type
= WREPL_TYPE_GROUP
,
6252 .state
= WREPL_STATE_ACTIVE
,
6253 .node
= WREPL_NODE_B
,
6255 .num_ips
= ctx
->addresses_best_num
,
6256 .ips
= ctx
->addresses_best
,
6257 .apply_expected
= true
6261 * mhomed,released vs. group,active with different ip(s)
6264 .line
= __location__
,
6265 .name
= _NBT_NAME("_MR_GA_DI", 0x00, NULL
),
6269 .num_ips
= ctx
->addresses_best_num
,
6270 .ips
= ctx
->addresses_best
,
6271 .apply_expected
= true
6274 .type
= WREPL_TYPE_GROUP
,
6275 .state
= WREPL_STATE_ACTIVE
,
6276 .node
= WREPL_NODE_B
,
6278 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6279 .ips
= addresses_B_1
,
6280 .apply_expected
= true
6284 * mhomed,released vs. group,tombstone with same ip(s)
6287 .line
= __location__
,
6288 .name
= _NBT_NAME("_MR_GT_SI", 0x00, NULL
),
6292 .num_ips
= ctx
->addresses_best_num
,
6293 .ips
= ctx
->addresses_best
,
6294 .apply_expected
= true
6297 .type
= WREPL_TYPE_GROUP
,
6298 .state
= WREPL_STATE_TOMBSTONE
,
6299 .node
= WREPL_NODE_B
,
6301 .num_ips
= ctx
->addresses_best_num
,
6302 .ips
= ctx
->addresses_best
,
6303 .apply_expected
= true
6307 * mhomed,released vs. group,tombstone with different ip(s)
6310 .line
= __location__
,
6311 .name
= _NBT_NAME("_MR_GT_DI", 0x00, NULL
),
6315 .num_ips
= ctx
->addresses_best_num
,
6316 .ips
= ctx
->addresses_best
,
6317 .apply_expected
= true
6320 .type
= WREPL_TYPE_GROUP
,
6321 .state
= WREPL_STATE_TOMBSTONE
,
6322 .node
= WREPL_NODE_B
,
6324 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6325 .ips
= addresses_B_1
,
6326 .apply_expected
= true
6330 * multi homed vs. special group section
6333 * mhomed,released vs. sgroup,active with same ip(s)
6336 .line
= __location__
,
6337 .name
= _NBT_NAME("_MR_SA_SI", 0x00, NULL
),
6341 .num_ips
= ctx
->addresses_best_num
,
6342 .ips
= ctx
->addresses_best
,
6343 .apply_expected
= true
6346 .type
= WREPL_TYPE_SGROUP
,
6347 .state
= WREPL_STATE_ACTIVE
,
6348 .node
= WREPL_NODE_B
,
6350 .num_ips
= ctx
->addresses_best_num
,
6351 .ips
= ctx
->addresses_best
,
6352 .apply_expected
= true
6356 * mhomed,released vs. sgroup,active with different ip(s)
6359 .line
= __location__
,
6360 .name
= _NBT_NAME("_MR_SA_DI", 0x00, NULL
),
6364 .num_ips
= ctx
->addresses_best_num
,
6365 .ips
= ctx
->addresses_best
,
6366 .apply_expected
= true
6369 .type
= WREPL_TYPE_SGROUP
,
6370 .state
= WREPL_STATE_ACTIVE
,
6371 .node
= WREPL_NODE_B
,
6373 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6374 .ips
= addresses_B_1
,
6375 .apply_expected
= true
6379 * mhomed,released vs. sgroup,tombstone with same ip(s)
6382 .line
= __location__
,
6383 .name
= _NBT_NAME("_MR_ST_SI", 0x00, NULL
),
6387 .num_ips
= ctx
->addresses_best_num
,
6388 .ips
= ctx
->addresses_best
,
6389 .apply_expected
= true
6392 .type
= WREPL_TYPE_SGROUP
,
6393 .state
= WREPL_STATE_TOMBSTONE
,
6394 .node
= WREPL_NODE_B
,
6396 .num_ips
= ctx
->addresses_best_num
,
6397 .ips
= ctx
->addresses_best
,
6398 .apply_expected
= true
6402 * mhomed,released vs. sgroup,tombstone with different ip(s)
6405 .line
= __location__
,
6406 .name
= _NBT_NAME("_MR_ST_DI", 0x00, NULL
),
6410 .num_ips
= ctx
->addresses_best_num
,
6411 .ips
= ctx
->addresses_best
,
6412 .apply_expected
= true
6415 .type
= WREPL_TYPE_SGROUP
,
6416 .state
= WREPL_STATE_TOMBSTONE
,
6417 .node
= WREPL_NODE_B
,
6419 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6420 .ips
= addresses_B_1
,
6421 .apply_expected
= true
6425 * multi homed vs. multi homed section
6428 * mhomed,released vs. mhomed,active with same ip(s)
6431 .line
= __location__
,
6432 .name
= _NBT_NAME("_MR_MA_SI", 0x00, NULL
),
6436 .num_ips
= ctx
->addresses_best_num
,
6437 .ips
= ctx
->addresses_best
,
6438 .apply_expected
= true
6441 .type
= WREPL_TYPE_MHOMED
,
6442 .state
= WREPL_STATE_ACTIVE
,
6443 .node
= WREPL_NODE_B
,
6445 .num_ips
= ctx
->addresses_best_num
,
6446 .ips
= ctx
->addresses_best
,
6447 .apply_expected
= true
6451 * mhomed,released vs. mhomed,active with different ip(s)
6454 .line
= __location__
,
6455 .name
= _NBT_NAME("_MR_MA_DI", 0x00, NULL
),
6459 .num_ips
= ctx
->addresses_best_num
,
6460 .ips
= ctx
->addresses_best
,
6461 .apply_expected
= true
6464 .type
= WREPL_TYPE_MHOMED
,
6465 .state
= WREPL_STATE_ACTIVE
,
6466 .node
= WREPL_NODE_B
,
6468 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6469 .ips
= addresses_B_1
,
6470 .apply_expected
= true
6474 * mhomed,released vs. mhomed,tombstone with same ip(s)
6477 .line
= __location__
,
6478 .name
= _NBT_NAME("_MR_MT_SI", 0x00, NULL
),
6482 .num_ips
= ctx
->addresses_best_num
,
6483 .ips
= ctx
->addresses_best
,
6484 .apply_expected
= true
6487 .type
= WREPL_TYPE_MHOMED
,
6488 .state
= WREPL_STATE_TOMBSTONE
,
6489 .node
= WREPL_NODE_B
,
6491 .num_ips
= ctx
->addresses_best_num
,
6492 .ips
= ctx
->addresses_best
,
6493 .apply_expected
= true
6497 * mhomed,released vs. mhomed,tombstone with different ip(s)
6500 .line
= __location__
,
6501 .name
= _NBT_NAME("_MR_MT_DI", 0x00, NULL
),
6505 .num_ips
= ctx
->addresses_best_num
,
6506 .ips
= ctx
->addresses_best
,
6507 .apply_expected
= true
6510 .type
= WREPL_TYPE_MHOMED
,
6511 .state
= WREPL_STATE_TOMBSTONE
,
6512 .node
= WREPL_NODE_B
,
6514 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6515 .ips
= addresses_B_1
,
6516 .apply_expected
= true
6521 torture_comment(tctx
, "Test Replica records vs. owned released records\n");
6523 for(i
=0; ret
&& i
< ARRAY_SIZE(records
); i
++) {
6524 torture_comment(tctx
, "%s => %s\n", nbt_name_string(ctx
, &records
[i
].name
),
6525 (records
[i
].replica
.apply_expected
?"REPLACE":"NOT REPLACE"));
6530 name_register
->in
.name
= records
[i
].name
;
6531 name_register
->in
.dest_addr
= ctx
->address
;
6532 name_register
->in
.dest_port
= lp_nbt_port(tctx
->lp_ctx
);
6533 name_register
->in
.address
= records
[i
].wins
.ips
[0].ip
;
6534 name_register
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
6535 name_register
->in
.register_demand
= false;
6536 name_register
->in
.broadcast
= false;
6537 name_register
->in
.multi_homed
= records
[i
].wins
.mhomed
;
6538 name_register
->in
.ttl
= 300000;
6539 name_register
->in
.timeout
= 70;
6540 name_register
->in
.retries
= 0;
6542 status
= nbt_name_register(ctx
->nbtsock
, ctx
, name_register
);
6543 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
6544 torture_comment(tctx
, "No response from %s for name register\n", ctx
->address
);
6547 if (!NT_STATUS_IS_OK(status
)) {
6548 torture_comment(tctx
, "Bad response from %s for name register - %s\n",
6549 ctx
->address
, nt_errstr(status
));
6552 CHECK_VALUE(tctx
, name_register
->out
.rcode
, 0);
6553 CHECK_VALUE_STRING(tctx
, name_register
->out
.reply_from
, ctx
->address
);
6554 CHECK_VALUE(tctx
, name_register
->out
.name
.type
, records
[i
].name
.type
);
6555 CHECK_VALUE_STRING(tctx
, name_register
->out
.name
.name
, records
[i
].name
.name
);
6556 CHECK_VALUE_STRING(tctx
, name_register
->out
.name
.scope
, records
[i
].name
.scope
);
6557 CHECK_VALUE_STRING(tctx
, name_register
->out
.reply_addr
, records
[i
].wins
.ips
[0].ip
);
6559 /* release the record */
6560 release
->in
.name
= records
[i
].name
;
6561 release
->in
.dest_port
= lp_nbt_port(tctx
->lp_ctx
);
6562 release
->in
.dest_addr
= ctx
->address
;
6563 release
->in
.address
= records
[i
].wins
.ips
[0].ip
;
6564 release
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
6565 release
->in
.broadcast
= false;
6566 release
->in
.timeout
= 30;
6567 release
->in
.retries
= 0;
6569 status
= nbt_name_release(ctx
->nbtsock
, ctx
, release
);
6570 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
6571 torture_comment(tctx
, "No response from %s for name release\n", ctx
->address
);
6574 if (!NT_STATUS_IS_OK(status
)) {
6575 torture_comment(tctx
, "Bad response from %s for name query - %s\n",
6576 ctx
->address
, nt_errstr(status
));
6579 CHECK_VALUE(tctx
, release
->out
.rcode
, 0);
6584 wins_name
->name
= &records
[i
].name
;
6585 wins_name
->flags
= WREPL_NAME_FLAGS(records
[i
].replica
.type
,
6586 records
[i
].replica
.state
,
6587 records
[i
].replica
.node
,
6588 records
[i
].replica
.is_static
);
6589 wins_name
->id
= ++ctx
->b
.max_version
;
6590 if (wins_name
->flags
& 2) {
6591 wins_name
->addresses
.addresses
.num_ips
= records
[i
].replica
.num_ips
;
6592 wins_name
->addresses
.addresses
.ips
= discard_const(records
[i
].replica
.ips
);
6594 wins_name
->addresses
.ip
= records
[i
].replica
.ips
[0].ip
;
6596 wins_name
->unknown
= "255.255.255.255";
6598 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
6599 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
,
6600 records
[i
].replica
.apply_expected
);
6602 if (records
[i
].replica
.apply_expected
) {
6603 wins_name
->name
= &records
[i
].name
;
6604 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE
,
6605 WREPL_STATE_TOMBSTONE
,
6606 WREPL_NODE_B
, false);
6607 wins_name
->id
= ++ctx
->b
.max_version
;
6608 wins_name
->addresses
.ip
= addresses_B_1
[0].ip
;
6609 wins_name
->unknown
= "255.255.255.255";
6611 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
6612 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
, true);
6614 release
->in
.name
= records
[i
].name
;
6615 release
->in
.dest_addr
= ctx
->address
;
6616 release
->in
.dest_port
= lp_nbt_port(tctx
->lp_ctx
);
6617 release
->in
.address
= records
[i
].wins
.ips
[0].ip
;
6618 release
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
6619 release
->in
.broadcast
= false;
6620 release
->in
.timeout
= 30;
6621 release
->in
.retries
= 0;
6623 status
= nbt_name_release(ctx
->nbtsock
, ctx
, release
);
6624 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
6625 torture_comment(tctx
, "No response from %s for name release\n", ctx
->address
);
6628 if (!NT_STATUS_IS_OK(status
)) {
6629 torture_comment(tctx
, "Bad response from %s for name query - %s\n",
6630 ctx
->address
, nt_errstr(status
));
6633 CHECK_VALUE(tctx
, release
->out
.rcode
, 0);
6636 torture_comment(tctx
, "conflict handled wrong or record[%u]: %s\n", i
, records
[i
].line
);
6644 struct test_conflict_owned_active_vs_replica_struct
{
6645 const char *line
; /* just better debugging */
6646 const char *section
; /* just better debugging */
6647 struct nbt_name name
;
6648 const char *comment
;
6654 const struct wrepl_ip
*ips
;
6655 bool apply_expected
;
6660 bool expect_release
;
6663 /* when num_ips == 0, then .wins.ips are used */
6665 const struct wrepl_ip
*ips
;
6668 enum wrepl_name_type type
;
6669 enum wrepl_name_state state
;
6670 enum wrepl_name_node node
;
6673 const struct wrepl_ip
*ips
;
6674 bool apply_expected
;
6680 static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket
*nbtsock
,
6681 struct nbt_name_packet
*req_packet
,
6682 struct socket_address
*src
);
6684 static bool test_conflict_owned_active_vs_replica(struct torture_context
*tctx
,
6685 struct test_wrepl_conflict_conn
*ctx
)
6689 struct wrepl_wins_name wins_name_
;
6690 struct wrepl_wins_name
*wins_name
= &wins_name_
;
6691 struct nbt_name_register name_register_
;
6692 struct nbt_name_register
*name_register
= &name_register_
;
6693 struct nbt_name_release release_
;
6694 struct nbt_name_release
*release
= &release_
;
6696 struct test_conflict_owned_active_vs_replica_struct records
[] = {
6698 * unique vs. unique section
6701 * unique,active vs. unique,active with same ip(s), unchecked
6704 .line
= __location__
,
6705 .name
= _NBT_NAME("_UA_UA_SI_U", 0x00, NULL
),
6709 .num_ips
= ctx
->addresses_best_num
,
6710 .ips
= ctx
->addresses_best
,
6711 .apply_expected
= true
6717 .type
= WREPL_TYPE_UNIQUE
,
6718 .state
= WREPL_STATE_ACTIVE
,
6719 .node
= WREPL_NODE_B
,
6721 .num_ips
= ctx
->addresses_best_num
,
6722 .ips
= ctx
->addresses_best
,
6723 .apply_expected
= true
6727 * unique,active vs. unique,active with different ip(s), positive response
6730 .line
= __location__
,
6731 .name
= _NBT_NAME("_UA_UA_DI_P", 0x00, NULL
),
6735 .num_ips
= ctx
->addresses_best_num
,
6736 .ips
= ctx
->addresses_best
,
6737 .apply_expected
= true
6744 .type
= WREPL_TYPE_UNIQUE
,
6745 .state
= WREPL_STATE_ACTIVE
,
6746 .node
= WREPL_NODE_B
,
6748 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6749 .ips
= addresses_B_1
,
6750 .apply_expected
= false
6754 * unique,active vs. unique,active with different ip(s), positive response other ips
6757 .line
= __location__
,
6758 .name
= _NBT_NAME("_UA_UA_DI_O", 0x00, NULL
),
6762 .num_ips
= ctx
->addresses_best_num
,
6763 .ips
= ctx
->addresses_best
,
6764 .apply_expected
= true
6769 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
6770 .ips
= addresses_A_3_4
,
6773 .type
= WREPL_TYPE_UNIQUE
,
6774 .state
= WREPL_STATE_ACTIVE
,
6775 .node
= WREPL_NODE_B
,
6777 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6778 .ips
= addresses_B_1
,
6779 .apply_expected
= false
6783 * unique,active vs. unique,active with different ip(s), negative response
6786 .line
= __location__
,
6787 .name
= _NBT_NAME("_UA_UA_DI_N", 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
= true
6810 * unique,active vs. unique,tombstone with same ip(s), unchecked
6813 .line
= __location__
,
6814 .name
= _NBT_NAME("_UA_UT_SI_U", 0x00, NULL
),
6818 .num_ips
= ctx
->addresses_best_num
,
6819 .ips
= ctx
->addresses_best
,
6820 .apply_expected
= true
6826 .type
= WREPL_TYPE_UNIQUE
,
6827 .state
= WREPL_STATE_TOMBSTONE
,
6828 .node
= WREPL_NODE_B
,
6830 .num_ips
= ctx
->addresses_best_num
,
6831 .ips
= ctx
->addresses_best
,
6832 .apply_expected
= false
6836 * unique,active vs. unique,tombstone with different ip(s), unchecked
6839 .line
= __location__
,
6840 .name
= _NBT_NAME("_UA_UT_DI_U", 0x00, NULL
),
6844 .num_ips
= ctx
->addresses_best_num
,
6845 .ips
= ctx
->addresses_best
,
6846 .apply_expected
= true
6852 .type
= WREPL_TYPE_UNIQUE
,
6853 .state
= WREPL_STATE_TOMBSTONE
,
6854 .node
= WREPL_NODE_B
,
6856 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6857 .ips
= addresses_B_1
,
6858 .apply_expected
= false
6862 * unique vs. group section
6865 * unique,active vs. group,active with same ip(s), release expected
6868 .line
= __location__
,
6869 .name
= _NBT_NAME("_UA_GA_SI_R", 0x00, NULL
),
6873 .num_ips
= ctx
->addresses_best_num
,
6874 .ips
= ctx
->addresses_best
,
6875 .apply_expected
= true
6879 .expect_release
= true,
6882 .type
= WREPL_TYPE_GROUP
,
6883 .state
= WREPL_STATE_ACTIVE
,
6884 .node
= WREPL_NODE_B
,
6886 .num_ips
= ctx
->addresses_best_num
,
6887 .ips
= ctx
->addresses_best
,
6888 .apply_expected
= true
6892 * unique,active vs. group,active with different ip(s), release expected
6895 .line
= __location__
,
6896 .name
= _NBT_NAME("_UA_GA_DI_R", 0x00, NULL
),
6900 .num_ips
= ctx
->addresses_best_num
,
6901 .ips
= ctx
->addresses_best
,
6902 .apply_expected
= true
6906 .expect_release
= true,
6909 .type
= WREPL_TYPE_GROUP
,
6910 .state
= WREPL_STATE_ACTIVE
,
6911 .node
= WREPL_NODE_B
,
6913 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6914 .ips
= addresses_B_1
,
6915 .apply_expected
= true
6919 * unique,active vs. group,tombstone with same ip(s), unchecked
6922 .line
= __location__
,
6923 .name
= _NBT_NAME("_UA_GT_SI_U", 0x00, NULL
),
6927 .num_ips
= ctx
->addresses_best_num
,
6928 .ips
= ctx
->addresses_best
,
6929 .apply_expected
= true
6935 .type
= WREPL_TYPE_GROUP
,
6936 .state
= WREPL_STATE_TOMBSTONE
,
6937 .node
= WREPL_NODE_B
,
6939 .num_ips
= ctx
->addresses_best_num
,
6940 .ips
= ctx
->addresses_best
,
6941 .apply_expected
= false
6945 * unique,active vs. group,tombstone with different ip(s), unchecked
6948 .line
= __location__
,
6949 .name
= _NBT_NAME("_UA_GT_DI_U", 0x00, NULL
),
6953 .num_ips
= ctx
->addresses_best_num
,
6954 .ips
= ctx
->addresses_best
,
6955 .apply_expected
= true
6961 .type
= WREPL_TYPE_GROUP
,
6962 .state
= WREPL_STATE_TOMBSTONE
,
6963 .node
= WREPL_NODE_B
,
6965 .num_ips
= ARRAY_SIZE(addresses_B_1
),
6966 .ips
= addresses_B_1
,
6967 .apply_expected
= false
6971 * unique vs. special group section
6974 * unique,active vs. sgroup,active with same ip(s), release expected
6977 .line
= __location__
,
6978 .name
= _NBT_NAME("_UA_SA_SI_R", 0x00, NULL
),
6982 .num_ips
= ctx
->addresses_best_num
,
6983 .ips
= ctx
->addresses_best
,
6984 .apply_expected
= true
6988 .expect_release
= true,
6991 .type
= WREPL_TYPE_SGROUP
,
6992 .state
= WREPL_STATE_ACTIVE
,
6993 .node
= WREPL_NODE_B
,
6995 .num_ips
= ctx
->addresses_best_num
,
6996 .ips
= ctx
->addresses_best
,
6997 .apply_expected
= true
7001 * unique,active vs. group,active with different ip(s), release expected
7004 .line
= __location__
,
7005 .name
= _NBT_NAME("_UA_SA_DI_R", 0x00, NULL
),
7009 .num_ips
= ctx
->addresses_best_num
,
7010 .ips
= ctx
->addresses_best
,
7011 .apply_expected
= true
7015 .expect_release
= true,
7018 .type
= WREPL_TYPE_SGROUP
,
7019 .state
= WREPL_STATE_ACTIVE
,
7020 .node
= WREPL_NODE_B
,
7022 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7023 .ips
= addresses_B_1
,
7024 .apply_expected
= true
7028 * unique,active vs. sgroup,tombstone with same ip(s), unchecked
7031 .line
= __location__
,
7032 .name
= _NBT_NAME("_UA_ST_SI_U", 0x00, NULL
),
7036 .num_ips
= ctx
->addresses_best_num
,
7037 .ips
= ctx
->addresses_best
,
7038 .apply_expected
= true
7044 .type
= WREPL_TYPE_SGROUP
,
7045 .state
= WREPL_STATE_TOMBSTONE
,
7046 .node
= WREPL_NODE_B
,
7048 .num_ips
= ctx
->addresses_best_num
,
7049 .ips
= ctx
->addresses_best
,
7050 .apply_expected
= false
7054 * unique,active vs. sgroup,tombstone with different ip(s), unchecked
7057 .line
= __location__
,
7058 .name
= _NBT_NAME("_UA_ST_DI_U", 0x00, NULL
),
7062 .num_ips
= ctx
->addresses_best_num
,
7063 .ips
= ctx
->addresses_best
,
7064 .apply_expected
= true
7070 .type
= WREPL_TYPE_SGROUP
,
7071 .state
= WREPL_STATE_TOMBSTONE
,
7072 .node
= WREPL_NODE_B
,
7074 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7075 .ips
= addresses_B_1
,
7076 .apply_expected
= false
7080 * unique vs. multi homed section
7083 * unique,active vs. mhomed,active with same ip(s), unchecked
7086 .line
= __location__
,
7087 .name
= _NBT_NAME("_UA_MA_SI_U", 0x00, NULL
),
7091 .num_ips
= ctx
->addresses_best_num
,
7092 .ips
= ctx
->addresses_best
,
7093 .apply_expected
= true
7099 .type
= WREPL_TYPE_MHOMED
,
7100 .state
= WREPL_STATE_ACTIVE
,
7101 .node
= WREPL_NODE_B
,
7103 .num_ips
= ctx
->addresses_best_num
,
7104 .ips
= ctx
->addresses_best
,
7105 .apply_expected
= true
7109 * unique,active vs. mhomed,active with superset ip(s), unchecked
7112 .line
= __location__
,
7113 .name
= _NBT_NAME("_UA_MA_SP_U", 0x00, NULL
),
7117 .num_ips
= ctx
->addresses_best_num
,
7118 .ips
= ctx
->addresses_best
,
7119 .apply_expected
= true
7125 .type
= WREPL_TYPE_MHOMED
,
7126 .state
= WREPL_STATE_ACTIVE
,
7127 .node
= WREPL_NODE_B
,
7129 .num_ips
= ctx
->addresses_all_num
,
7130 .ips
= ctx
->addresses_all
,
7131 .apply_expected
= true
7135 * unique,active vs. mhomed,active with different ip(s), positive response
7138 .line
= __location__
,
7139 .name
= _NBT_NAME("_UA_MA_DI_P", 0x00, NULL
),
7143 .num_ips
= ctx
->addresses_best_num
,
7144 .ips
= ctx
->addresses_best
,
7145 .apply_expected
= true
7152 .type
= WREPL_TYPE_MHOMED
,
7153 .state
= WREPL_STATE_ACTIVE
,
7154 .node
= WREPL_NODE_B
,
7156 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7157 .ips
= addresses_B_3_4
,
7158 .apply_expected
= false
7162 * unique,active vs. mhomed,active with different ip(s), positive response other ips
7165 .line
= __location__
,
7166 .name
= _NBT_NAME("_UA_MA_DI_O", 0x00, NULL
),
7170 .num_ips
= ctx
->addresses_best_num
,
7171 .ips
= ctx
->addresses_best
,
7172 .apply_expected
= true
7177 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
7178 .ips
= addresses_A_3_4
,
7181 .type
= WREPL_TYPE_MHOMED
,
7182 .state
= WREPL_STATE_ACTIVE
,
7183 .node
= WREPL_NODE_B
,
7185 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7186 .ips
= addresses_B_3_4
,
7187 .apply_expected
= false
7191 * unique,active vs. mhomed,active with different ip(s), negative response
7194 .line
= __location__
,
7195 .name
= _NBT_NAME("_UA_MA_DI_N", 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
= true
7218 * unique,active vs. mhomed,tombstone with same ip(s), unchecked
7221 .line
= __location__
,
7222 .name
= _NBT_NAME("_UA_MT_SI_U", 0x00, NULL
),
7226 .num_ips
= ctx
->addresses_best_num
,
7227 .ips
= ctx
->addresses_best
,
7228 .apply_expected
= true
7234 .type
= WREPL_TYPE_MHOMED
,
7235 .state
= WREPL_STATE_TOMBSTONE
,
7236 .node
= WREPL_NODE_B
,
7238 .num_ips
= ctx
->addresses_best_num
,
7239 .ips
= ctx
->addresses_best
,
7240 .apply_expected
= false
7244 * unique,active vs. mhomed,tombstone with different ip(s), unchecked
7247 .line
= __location__
,
7248 .name
= _NBT_NAME("_UA_MT_DI_U", 0x00, NULL
),
7252 .num_ips
= ctx
->addresses_best_num
,
7253 .ips
= ctx
->addresses_best
,
7254 .apply_expected
= true
7260 .type
= WREPL_TYPE_MHOMED
,
7261 .state
= WREPL_STATE_TOMBSTONE
,
7262 .node
= WREPL_NODE_B
,
7264 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7265 .ips
= addresses_B_3_4
,
7266 .apply_expected
= false
7270 * normal group vs. unique section
7273 * group,active vs. unique,active with same ip(s), unchecked
7276 .line
= __location__
,
7277 .name
= _NBT_NAME("_GA_UA_SI_U", 0x00, NULL
),
7279 .nb_flags
= NBT_NM_GROUP
,
7281 .num_ips
= ctx
->addresses_best_num
,
7282 .ips
= ctx
->addresses_best
,
7283 .apply_expected
= true
7289 .type
= WREPL_TYPE_UNIQUE
,
7290 .state
= WREPL_STATE_ACTIVE
,
7291 .node
= WREPL_NODE_B
,
7293 .num_ips
= ctx
->addresses_best_num
,
7294 .ips
= ctx
->addresses_best
,
7295 .apply_expected
= false
7299 * group,active vs. unique,active with different ip(s), unchecked
7302 .line
= __location__
,
7303 .name
= _NBT_NAME("_GA_UA_DI_U", 0x00, NULL
),
7305 .nb_flags
= NBT_NM_GROUP
,
7307 .num_ips
= ctx
->addresses_best_num
,
7308 .ips
= ctx
->addresses_best
,
7309 .apply_expected
= true
7315 .type
= WREPL_TYPE_UNIQUE
,
7316 .state
= WREPL_STATE_ACTIVE
,
7317 .node
= WREPL_NODE_B
,
7319 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7320 .ips
= addresses_B_1
,
7321 .apply_expected
= false
7325 * group,active vs. unique,tombstone with same ip(s), unchecked
7328 .line
= __location__
,
7329 .name
= _NBT_NAME("_GA_UT_SI_U", 0x00, NULL
),
7331 .nb_flags
= NBT_NM_GROUP
,
7333 .num_ips
= ctx
->addresses_best_num
,
7334 .ips
= ctx
->addresses_best
,
7335 .apply_expected
= true
7341 .type
= WREPL_TYPE_UNIQUE
,
7342 .state
= WREPL_STATE_TOMBSTONE
,
7343 .node
= WREPL_NODE_B
,
7345 .num_ips
= ctx
->addresses_best_num
,
7346 .ips
= ctx
->addresses_best
,
7347 .apply_expected
= false
7351 * group,active vs. unique,tombstone with different ip(s), unchecked
7354 .line
= __location__
,
7355 .name
= _NBT_NAME("_GA_UT_DI_U", 0x00, NULL
),
7357 .nb_flags
= NBT_NM_GROUP
,
7359 .num_ips
= ctx
->addresses_best_num
,
7360 .ips
= ctx
->addresses_best
,
7361 .apply_expected
= true
7367 .type
= WREPL_TYPE_UNIQUE
,
7368 .state
= WREPL_STATE_TOMBSTONE
,
7369 .node
= WREPL_NODE_B
,
7371 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7372 .ips
= addresses_B_1
,
7373 .apply_expected
= false
7377 * normal group vs. normal group section
7380 * group,active vs. group,active with same ip(s), unchecked
7383 .line
= __location__
,
7384 .name
= _NBT_NAME("_GA_GA_SI_U", 0x00, NULL
),
7386 .nb_flags
= NBT_NM_GROUP
,
7388 .num_ips
= ctx
->addresses_best_num
,
7389 .ips
= ctx
->addresses_best
,
7390 .apply_expected
= true
7396 .type
= WREPL_TYPE_GROUP
,
7397 .state
= WREPL_STATE_ACTIVE
,
7398 .node
= WREPL_NODE_B
,
7400 .num_ips
= ctx
->addresses_best_num
,
7401 .ips
= ctx
->addresses_best
,
7402 .apply_expected
= true
7406 * group,active vs. group,active with different ip(s), unchecked
7409 .line
= __location__
,
7410 .name
= _NBT_NAME("_GA_GA_DI_U", 0x00, NULL
),
7412 .nb_flags
= NBT_NM_GROUP
,
7414 .num_ips
= ctx
->addresses_best_num
,
7415 .ips
= ctx
->addresses_best
,
7416 .apply_expected
= true
7422 .type
= WREPL_TYPE_GROUP
,
7423 .state
= WREPL_STATE_ACTIVE
,
7424 .node
= WREPL_NODE_B
,
7426 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7427 .ips
= addresses_B_1
,
7428 .apply_expected
= true
7432 * group,active vs. group,tombstone with same ip(s), unchecked
7435 .line
= __location__
,
7436 .name
= _NBT_NAME("_GA_GT_SI_U", 0x00, NULL
),
7438 .nb_flags
= NBT_NM_GROUP
,
7440 .num_ips
= ctx
->addresses_best_num
,
7441 .ips
= ctx
->addresses_best
,
7442 .apply_expected
= true
7448 .type
= WREPL_TYPE_GROUP
,
7449 .state
= WREPL_STATE_TOMBSTONE
,
7450 .node
= WREPL_NODE_B
,
7452 .num_ips
= ctx
->addresses_best_num
,
7453 .ips
= ctx
->addresses_best
,
7454 .apply_expected
= false
7458 * group,active vs. group,tombstone with different ip(s), unchecked
7461 .line
= __location__
,
7462 .name
= _NBT_NAME("_GA_GT_DI_U", 0x00, NULL
),
7464 .nb_flags
= NBT_NM_GROUP
,
7466 .num_ips
= ctx
->addresses_best_num
,
7467 .ips
= ctx
->addresses_best
,
7468 .apply_expected
= true
7474 .type
= WREPL_TYPE_GROUP
,
7475 .state
= WREPL_STATE_TOMBSTONE
,
7476 .node
= WREPL_NODE_B
,
7478 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7479 .ips
= addresses_B_1
,
7480 .apply_expected
= false
7484 * normal group vs. special group section
7487 * group,active vs. sgroup,active with same ip(s), unchecked
7490 .line
= __location__
,
7491 .name
= _NBT_NAME("_GA_SA_SI_U", 0x00, NULL
),
7493 .nb_flags
= NBT_NM_GROUP
,
7495 .num_ips
= ctx
->addresses_best_num
,
7496 .ips
= ctx
->addresses_best
,
7497 .apply_expected
= true
7503 .type
= WREPL_TYPE_SGROUP
,
7504 .state
= WREPL_STATE_ACTIVE
,
7505 .node
= WREPL_NODE_B
,
7507 .num_ips
= ctx
->addresses_best_num
,
7508 .ips
= ctx
->addresses_best
,
7509 .apply_expected
= false
7513 * group,active vs. sgroup,active with different ip(s), unchecked
7516 .line
= __location__
,
7517 .name
= _NBT_NAME("_GA_SA_DI_U", 0x00, NULL
),
7519 .nb_flags
= NBT_NM_GROUP
,
7521 .num_ips
= ctx
->addresses_best_num
,
7522 .ips
= ctx
->addresses_best
,
7523 .apply_expected
= true
7529 .type
= WREPL_TYPE_SGROUP
,
7530 .state
= WREPL_STATE_ACTIVE
,
7531 .node
= WREPL_NODE_B
,
7533 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7534 .ips
= addresses_B_3_4
,
7535 .apply_expected
= false
7539 * group,active vs. sgroup,tombstone with same ip(s), unchecked
7542 .line
= __location__
,
7543 .name
= _NBT_NAME("_GA_ST_SI_U", 0x00, NULL
),
7545 .nb_flags
= NBT_NM_GROUP
,
7547 .num_ips
= ctx
->addresses_best_num
,
7548 .ips
= ctx
->addresses_best
,
7549 .apply_expected
= true
7555 .type
= WREPL_TYPE_SGROUP
,
7556 .state
= WREPL_STATE_TOMBSTONE
,
7557 .node
= WREPL_NODE_B
,
7559 .num_ips
= ctx
->addresses_best_num
,
7560 .ips
= ctx
->addresses_best
,
7561 .apply_expected
= false
7565 * group,active vs. sgroup,tombstone with different ip(s), unchecked
7568 .line
= __location__
,
7569 .name
= _NBT_NAME("_GA_ST_DI_U", 0x00, NULL
),
7571 .nb_flags
= NBT_NM_GROUP
,
7573 .num_ips
= ctx
->addresses_best_num
,
7574 .ips
= ctx
->addresses_best
,
7575 .apply_expected
= true
7581 .type
= WREPL_TYPE_SGROUP
,
7582 .state
= WREPL_STATE_TOMBSTONE
,
7583 .node
= WREPL_NODE_B
,
7585 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7586 .ips
= addresses_B_3_4
,
7587 .apply_expected
= false
7591 * normal group vs. multi homed section
7594 * group,active vs. mhomed,active with same ip(s), unchecked
7597 .line
= __location__
,
7598 .name
= _NBT_NAME("_GA_MA_SI_U", 0x00, NULL
),
7600 .nb_flags
= NBT_NM_GROUP
,
7602 .num_ips
= ctx
->addresses_best_num
,
7603 .ips
= ctx
->addresses_best
,
7604 .apply_expected
= true
7610 .type
= WREPL_TYPE_MHOMED
,
7611 .state
= WREPL_STATE_ACTIVE
,
7612 .node
= WREPL_NODE_B
,
7614 .num_ips
= ctx
->addresses_best_num
,
7615 .ips
= ctx
->addresses_best
,
7616 .apply_expected
= false
7620 * group,active vs. mhomed,active with different ip(s), unchecked
7623 .line
= __location__
,
7624 .name
= _NBT_NAME("_GA_MA_DI_U", 0x00, NULL
),
7626 .nb_flags
= NBT_NM_GROUP
,
7628 .num_ips
= ctx
->addresses_best_num
,
7629 .ips
= ctx
->addresses_best
,
7630 .apply_expected
= true
7636 .type
= WREPL_TYPE_MHOMED
,
7637 .state
= WREPL_STATE_ACTIVE
,
7638 .node
= WREPL_NODE_B
,
7640 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7641 .ips
= addresses_B_3_4
,
7642 .apply_expected
= false
7646 * group,active vs. mhomed,tombstone with same ip(s), unchecked
7649 .line
= __location__
,
7650 .name
= _NBT_NAME("_GA_MT_SI_U", 0x00, NULL
),
7652 .nb_flags
= NBT_NM_GROUP
,
7654 .num_ips
= ctx
->addresses_best_num
,
7655 .ips
= ctx
->addresses_best
,
7656 .apply_expected
= true
7662 .type
= WREPL_TYPE_MHOMED
,
7663 .state
= WREPL_STATE_TOMBSTONE
,
7664 .node
= WREPL_NODE_B
,
7666 .num_ips
= ctx
->addresses_best_num
,
7667 .ips
= ctx
->addresses_best
,
7668 .apply_expected
= false
7672 * group,active vs. mhomed,tombstone with different ip(s), unchecked
7675 .line
= __location__
,
7676 .name
= _NBT_NAME("_GA_MT_DI_U", 0x00, NULL
),
7678 .nb_flags
= NBT_NM_GROUP
,
7680 .num_ips
= ctx
->addresses_best_num
,
7681 .ips
= ctx
->addresses_best
,
7682 .apply_expected
= true
7688 .type
= WREPL_TYPE_MHOMED
,
7689 .state
= WREPL_STATE_TOMBSTONE
,
7690 .node
= WREPL_NODE_B
,
7692 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
7693 .ips
= addresses_B_3_4
,
7694 .apply_expected
= false
7698 * special group vs. unique section
7701 * sgroup,active vs. unique,active with same ip(s), unchecked
7704 .line
= __location__
,
7705 .name
= _NBT_NAME("_SA_UA_SI_U", 0x1C, NULL
),
7707 .nb_flags
= NBT_NM_GROUP
,
7709 .num_ips
= ctx
->addresses_best_num
,
7710 .ips
= ctx
->addresses_best
,
7711 .apply_expected
= true
7717 .type
= WREPL_TYPE_UNIQUE
,
7718 .state
= WREPL_STATE_ACTIVE
,
7719 .node
= WREPL_NODE_B
,
7721 .num_ips
= ctx
->addresses_best_num
,
7722 .ips
= ctx
->addresses_best
,
7723 .apply_expected
= false
7727 * sgroup,active vs. unique,active with different ip(s), unchecked
7730 .line
= __location__
,
7731 .name
= _NBT_NAME("_SA_UA_DI_U", 0x1C, NULL
),
7733 .nb_flags
= NBT_NM_GROUP
,
7735 .num_ips
= ctx
->addresses_best_num
,
7736 .ips
= ctx
->addresses_best
,
7737 .apply_expected
= true
7743 .type
= WREPL_TYPE_UNIQUE
,
7744 .state
= WREPL_STATE_ACTIVE
,
7745 .node
= WREPL_NODE_B
,
7747 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7748 .ips
= addresses_B_1
,
7749 .apply_expected
= false
7753 * sgroup,active vs. unique,tombstone with same ip(s), unchecked
7756 .line
= __location__
,
7757 .name
= _NBT_NAME("_SA_UT_SI_U", 0x1C, NULL
),
7759 .nb_flags
= NBT_NM_GROUP
,
7761 .num_ips
= ctx
->addresses_best_num
,
7762 .ips
= ctx
->addresses_best
,
7763 .apply_expected
= true
7769 .type
= WREPL_TYPE_UNIQUE
,
7770 .state
= WREPL_STATE_TOMBSTONE
,
7771 .node
= WREPL_NODE_B
,
7773 .num_ips
= ctx
->addresses_best_num
,
7774 .ips
= ctx
->addresses_best
,
7775 .apply_expected
= false
7779 * sgroup,active vs. unique,tombstone with different ip(s), unchecked
7782 .line
= __location__
,
7783 .name
= _NBT_NAME("_SA_UT_DI_U", 0x1C, NULL
),
7785 .nb_flags
= NBT_NM_GROUP
,
7787 .num_ips
= ctx
->addresses_best_num
,
7788 .ips
= ctx
->addresses_best
,
7789 .apply_expected
= true
7795 .type
= WREPL_TYPE_UNIQUE
,
7796 .state
= WREPL_STATE_TOMBSTONE
,
7797 .node
= WREPL_NODE_B
,
7799 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7800 .ips
= addresses_B_1
,
7801 .apply_expected
= false
7805 * special group vs. normal group section
7808 * sgroup,active vs. group,active with same ip(s), unchecked
7811 .line
= __location__
,
7812 .name
= _NBT_NAME("_SA_GA_SI_U", 0x1C, NULL
),
7814 .nb_flags
= NBT_NM_GROUP
,
7816 .num_ips
= ctx
->addresses_best_num
,
7817 .ips
= ctx
->addresses_best
,
7818 .apply_expected
= true
7824 .type
= WREPL_TYPE_GROUP
,
7825 .state
= WREPL_STATE_ACTIVE
,
7826 .node
= WREPL_NODE_B
,
7828 .num_ips
= ctx
->addresses_best_num
,
7829 .ips
= ctx
->addresses_best
,
7830 .apply_expected
= false
7834 * sgroup,active vs. group,active with different ip(s), unchecked
7837 .line
= __location__
,
7838 .name
= _NBT_NAME("_SA_GA_DI_U", 0x1C, NULL
),
7840 .nb_flags
= NBT_NM_GROUP
,
7842 .num_ips
= ctx
->addresses_best_num
,
7843 .ips
= ctx
->addresses_best
,
7844 .apply_expected
= true
7850 .type
= WREPL_TYPE_GROUP
,
7851 .state
= WREPL_STATE_ACTIVE
,
7852 .node
= WREPL_NODE_B
,
7854 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7855 .ips
= addresses_B_1
,
7856 .apply_expected
= false
7860 * sgroup,active vs. group,tombstone with same ip(s), unchecked
7863 .line
= __location__
,
7864 .name
= _NBT_NAME("_SA_GT_SI_U", 0x1C, NULL
),
7866 .nb_flags
= NBT_NM_GROUP
,
7868 .num_ips
= ctx
->addresses_best_num
,
7869 .ips
= ctx
->addresses_best
,
7870 .apply_expected
= true
7876 .type
= WREPL_TYPE_GROUP
,
7877 .state
= WREPL_STATE_TOMBSTONE
,
7878 .node
= WREPL_NODE_B
,
7880 .num_ips
= ctx
->addresses_best_num
,
7881 .ips
= ctx
->addresses_best
,
7882 .apply_expected
= false
7886 * sgroup,active vs. group,tombstone with different ip(s), unchecked
7889 .line
= __location__
,
7890 .name
= _NBT_NAME("_SA_GT_DI_U", 0x1C, NULL
),
7892 .nb_flags
= NBT_NM_GROUP
,
7894 .num_ips
= ctx
->addresses_best_num
,
7895 .ips
= ctx
->addresses_best
,
7896 .apply_expected
= true
7902 .type
= WREPL_TYPE_GROUP
,
7903 .state
= WREPL_STATE_TOMBSTONE
,
7904 .node
= WREPL_NODE_B
,
7906 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7907 .ips
= addresses_B_1
,
7908 .apply_expected
= false
7912 * special group vs. multi homed section
7915 * sgroup,active vs. mhomed,active with same ip(s), unchecked
7918 .line
= __location__
,
7919 .name
= _NBT_NAME("_SA_MA_SI_U", 0x1C, NULL
),
7921 .nb_flags
= NBT_NM_GROUP
,
7923 .num_ips
= ctx
->addresses_best_num
,
7924 .ips
= ctx
->addresses_best
,
7925 .apply_expected
= true
7931 .type
= WREPL_TYPE_MHOMED
,
7932 .state
= WREPL_STATE_ACTIVE
,
7933 .node
= WREPL_NODE_B
,
7935 .num_ips
= ctx
->addresses_best_num
,
7936 .ips
= ctx
->addresses_best
,
7937 .apply_expected
= false
7941 * sgroup,active vs. mhomed,active with different ip(s), unchecked
7944 .line
= __location__
,
7945 .name
= _NBT_NAME("_SA_MA_DI_U", 0x1C, NULL
),
7947 .nb_flags
= NBT_NM_GROUP
,
7949 .num_ips
= ctx
->addresses_best_num
,
7950 .ips
= ctx
->addresses_best
,
7951 .apply_expected
= true
7957 .type
= WREPL_TYPE_MHOMED
,
7958 .state
= WREPL_STATE_ACTIVE
,
7959 .node
= WREPL_NODE_B
,
7961 .num_ips
= ARRAY_SIZE(addresses_B_1
),
7962 .ips
= addresses_B_1
,
7963 .apply_expected
= false
7967 * sgroup,active vs. mhomed,tombstone with same ip(s), unchecked
7970 .line
= __location__
,
7971 .name
= _NBT_NAME("_SA_MT_SI_U", 0x1C, NULL
),
7973 .nb_flags
= NBT_NM_GROUP
,
7975 .num_ips
= ctx
->addresses_best_num
,
7976 .ips
= ctx
->addresses_best
,
7977 .apply_expected
= true
7983 .type
= WREPL_TYPE_MHOMED
,
7984 .state
= WREPL_STATE_TOMBSTONE
,
7985 .node
= WREPL_NODE_B
,
7987 .num_ips
= ctx
->addresses_best_num
,
7988 .ips
= ctx
->addresses_best
,
7989 .apply_expected
= false
7993 * sgroup,active vs. mhomed,tombstone with different ip(s), unchecked
7996 .line
= __location__
,
7997 .name
= _NBT_NAME("_SA_MT_DI_U", 0x1C, NULL
),
7999 .nb_flags
= NBT_NM_GROUP
,
8001 .num_ips
= ctx
->addresses_best_num
,
8002 .ips
= ctx
->addresses_best
,
8003 .apply_expected
= true
8009 .type
= WREPL_TYPE_MHOMED
,
8010 .state
= WREPL_STATE_TOMBSTONE
,
8011 .node
= WREPL_NODE_B
,
8013 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8014 .ips
= addresses_B_1
,
8015 .apply_expected
= false
8019 * multi homed vs. unique section
8022 * mhomed,active vs. unique,active with same ip(s), unchecked
8025 .line
= __location__
,
8026 .name
= _NBT_NAME("_MA_UA_SI_U", 0x00, NULL
),
8030 .num_ips
= ctx
->addresses_best_num
,
8031 .ips
= ctx
->addresses_best
,
8032 .apply_expected
= true
8038 .type
= WREPL_TYPE_UNIQUE
,
8039 .state
= WREPL_STATE_ACTIVE
,
8040 .node
= WREPL_NODE_B
,
8042 .num_ips
= ctx
->addresses_best_num
,
8043 .ips
= ctx
->addresses_best
,
8044 .apply_expected
= true
8048 * mhomed,active vs. unique,active with different ip(s), positive response
8051 .line
= __location__
,
8052 .name
= _NBT_NAME("_MA_UA_DI_P", 0x00, NULL
),
8056 .num_ips
= ctx
->addresses_best_num
,
8057 .ips
= ctx
->addresses_best
,
8058 .apply_expected
= true
8065 .type
= WREPL_TYPE_UNIQUE
,
8066 .state
= WREPL_STATE_ACTIVE
,
8067 .node
= WREPL_NODE_B
,
8069 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8070 .ips
= addresses_B_1
,
8071 .apply_expected
= false
8075 * mhomed,active vs. unique,active with different ip(s), positive response other ips
8078 .line
= __location__
,
8079 .name
= _NBT_NAME("_MA_UA_DI_O", 0x00, NULL
),
8083 .num_ips
= ctx
->addresses_best_num
,
8084 .ips
= ctx
->addresses_best
,
8085 .apply_expected
= true
8090 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
8091 .ips
= addresses_A_3_4
,
8094 .type
= WREPL_TYPE_UNIQUE
,
8095 .state
= WREPL_STATE_ACTIVE
,
8096 .node
= WREPL_NODE_B
,
8098 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8099 .ips
= addresses_B_1
,
8100 .apply_expected
= false
8104 * mhomed,active vs. unique,active with different ip(s), negative response
8107 .line
= __location__
,
8108 .name
= _NBT_NAME("_MA_UA_DI_N", 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
= true
8131 * mhomed,active vs. unique,tombstone with same ip(s), unchecked
8134 .line
= __location__
,
8135 .name
= _NBT_NAME("_MA_UT_SI_U", 0x00, NULL
),
8139 .num_ips
= ctx
->addresses_best_num
,
8140 .ips
= ctx
->addresses_best
,
8141 .apply_expected
= true
8147 .type
= WREPL_TYPE_UNIQUE
,
8148 .state
= WREPL_STATE_TOMBSTONE
,
8149 .node
= WREPL_NODE_B
,
8151 .num_ips
= ctx
->addresses_best_num
,
8152 .ips
= ctx
->addresses_best
,
8153 .apply_expected
= false
8157 * mhomed,active vs. unique,tombstone with different ip(s), unchecked
8160 .line
= __location__
,
8161 .name
= _NBT_NAME("_MA_UT_DI_U", 0x00, NULL
),
8165 .num_ips
= ctx
->addresses_best_num
,
8166 .ips
= ctx
->addresses_best
,
8167 .apply_expected
= true
8173 .type
= WREPL_TYPE_UNIQUE
,
8174 .state
= WREPL_STATE_TOMBSTONE
,
8175 .node
= WREPL_NODE_B
,
8177 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8178 .ips
= addresses_B_1
,
8179 .apply_expected
= false
8183 * multi homed vs. normal group section
8186 * mhomed,active vs. group,active with same ip(s), release expected
8189 .line
= __location__
,
8190 .name
= _NBT_NAME("_MA_GA_SI_R", 0x00, NULL
),
8194 .num_ips
= ctx
->addresses_best_num
,
8195 .ips
= ctx
->addresses_best
,
8196 .apply_expected
= true
8200 .expect_release
= true,
8203 .type
= WREPL_TYPE_GROUP
,
8204 .state
= WREPL_STATE_ACTIVE
,
8205 .node
= WREPL_NODE_B
,
8207 .num_ips
= ctx
->addresses_best_num
,
8208 .ips
= ctx
->addresses_best
,
8209 .apply_expected
= true
8213 * mhomed,active vs. group,active with different ip(s), release expected
8216 .line
= __location__
,
8217 .name
= _NBT_NAME("_MA_GA_DI_R", 0x00, NULL
),
8221 .num_ips
= ctx
->addresses_best_num
,
8222 .ips
= ctx
->addresses_best
,
8223 .apply_expected
= true
8227 .expect_release
= true,
8230 .type
= WREPL_TYPE_GROUP
,
8231 .state
= WREPL_STATE_ACTIVE
,
8232 .node
= WREPL_NODE_B
,
8234 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8235 .ips
= addresses_B_1
,
8236 .apply_expected
= true
8240 * mhomed,active vs. group,tombstone with same ip(s), unchecked
8243 .line
= __location__
,
8244 .name
= _NBT_NAME("_MA_GT_SI_U", 0x00, NULL
),
8248 .num_ips
= ctx
->addresses_best_num
,
8249 .ips
= ctx
->addresses_best
,
8250 .apply_expected
= true
8256 .type
= WREPL_TYPE_GROUP
,
8257 .state
= WREPL_STATE_TOMBSTONE
,
8258 .node
= WREPL_NODE_B
,
8260 .num_ips
= ctx
->addresses_best_num
,
8261 .ips
= ctx
->addresses_best
,
8262 .apply_expected
= false
8266 * mhomed,active vs. group,tombstone with different ip(s), unchecked
8269 .line
= __location__
,
8270 .name
= _NBT_NAME("_MA_GT_DI_U", 0x00, NULL
),
8274 .num_ips
= ctx
->addresses_best_num
,
8275 .ips
= ctx
->addresses_best
,
8276 .apply_expected
= true
8282 .type
= WREPL_TYPE_GROUP
,
8283 .state
= WREPL_STATE_TOMBSTONE
,
8284 .node
= WREPL_NODE_B
,
8286 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8287 .ips
= addresses_B_1
,
8288 .apply_expected
= false
8292 * multi homed vs. special group section
8295 * mhomed,active vs. sgroup,active with same ip(s), release expected
8298 .line
= __location__
,
8299 .name
= _NBT_NAME("_MA_SA_SI_R", 0x00, NULL
),
8303 .num_ips
= ctx
->addresses_best_num
,
8304 .ips
= ctx
->addresses_best
,
8305 .apply_expected
= true
8309 .expect_release
= true,
8312 .type
= WREPL_TYPE_SGROUP
,
8313 .state
= WREPL_STATE_ACTIVE
,
8314 .node
= WREPL_NODE_B
,
8316 .num_ips
= ctx
->addresses_best_num
,
8317 .ips
= ctx
->addresses_best
,
8318 .apply_expected
= true
8322 * mhomed,active vs. group,active with different ip(s), release expected
8325 .line
= __location__
,
8326 .name
= _NBT_NAME("_MA_SA_DI_R", 0x00, NULL
),
8330 .num_ips
= ctx
->addresses_best_num
,
8331 .ips
= ctx
->addresses_best
,
8332 .apply_expected
= true
8336 .expect_release
= true,
8339 .type
= WREPL_TYPE_SGROUP
,
8340 .state
= WREPL_STATE_ACTIVE
,
8341 .node
= WREPL_NODE_B
,
8343 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8344 .ips
= addresses_B_1
,
8345 .apply_expected
= true
8349 * mhomed,active vs. sgroup,tombstone with same ip(s), unchecked
8352 .line
= __location__
,
8353 .name
= _NBT_NAME("_MA_ST_SI_U", 0x00, NULL
),
8357 .num_ips
= ctx
->addresses_best_num
,
8358 .ips
= ctx
->addresses_best
,
8359 .apply_expected
= true
8365 .type
= WREPL_TYPE_SGROUP
,
8366 .state
= WREPL_STATE_TOMBSTONE
,
8367 .node
= WREPL_NODE_B
,
8369 .num_ips
= ctx
->addresses_best_num
,
8370 .ips
= ctx
->addresses_best
,
8371 .apply_expected
= false
8375 * mhomed,active vs. sgroup,tombstone with different ip(s), unchecked
8378 .line
= __location__
,
8379 .name
= _NBT_NAME("_MA_ST_DI_U", 0x00, NULL
),
8383 .num_ips
= ctx
->addresses_best_num
,
8384 .ips
= ctx
->addresses_best
,
8385 .apply_expected
= true
8391 .type
= WREPL_TYPE_SGROUP
,
8392 .state
= WREPL_STATE_TOMBSTONE
,
8393 .node
= WREPL_NODE_B
,
8395 .num_ips
= ARRAY_SIZE(addresses_B_1
),
8396 .ips
= addresses_B_1
,
8397 .apply_expected
= false
8401 * multi homed vs. multi homed section
8404 * mhomed,active vs. mhomed,active with same ip(s), unchecked
8407 .line
= __location__
,
8408 .name
= _NBT_NAME("_MA_MA_SI_U", 0x00, NULL
),
8412 .num_ips
= ctx
->addresses_best_num
,
8413 .ips
= ctx
->addresses_best
,
8414 .apply_expected
= true
8420 .type
= WREPL_TYPE_MHOMED
,
8421 .state
= WREPL_STATE_ACTIVE
,
8422 .node
= WREPL_NODE_B
,
8424 .num_ips
= ctx
->addresses_best_num
,
8425 .ips
= ctx
->addresses_best
,
8426 .apply_expected
= true
8430 * mhomed,active vs. mhomed,active with superset ip(s), unchecked
8433 .line
= __location__
,
8434 .name
= _NBT_NAME("_MA_MA_SP_U", 0x00, NULL
),
8438 .num_ips
= ctx
->addresses_best_num
,
8439 .ips
= ctx
->addresses_best
,
8440 .apply_expected
= true
8446 .type
= WREPL_TYPE_MHOMED
,
8447 .state
= WREPL_STATE_ACTIVE
,
8448 .node
= WREPL_NODE_B
,
8450 .num_ips
= ctx
->addresses_all_num
,
8451 .ips
= ctx
->addresses_all
,
8452 .apply_expected
= true
8456 * mhomed,active vs. mhomed,active with different ip(s), positive response
8459 .line
= __location__
,
8460 .name
= _NBT_NAME("_MA_MA_DI_P", 0x00, NULL
),
8464 .num_ips
= ctx
->addresses_best_num
,
8465 .ips
= ctx
->addresses_best
,
8466 .apply_expected
= true
8473 .type
= WREPL_TYPE_MHOMED
,
8474 .state
= WREPL_STATE_ACTIVE
,
8475 .node
= WREPL_NODE_B
,
8477 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8478 .ips
= addresses_B_3_4
,
8479 .apply_expected
= false
8483 * mhomed,active vs. mhomed,active with different ip(s), positive response other ips
8486 .line
= __location__
,
8487 .name
= _NBT_NAME("_MA_MA_DI_O", 0x00, NULL
),
8491 .num_ips
= ctx
->addresses_best_num
,
8492 .ips
= ctx
->addresses_best
,
8493 .apply_expected
= true
8498 .num_ips
= ARRAY_SIZE(addresses_A_3_4
),
8499 .ips
= addresses_A_3_4
,
8502 .type
= WREPL_TYPE_MHOMED
,
8503 .state
= WREPL_STATE_ACTIVE
,
8504 .node
= WREPL_NODE_B
,
8506 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8507 .ips
= addresses_B_3_4
,
8508 .apply_expected
= false
8512 * mhomed,active vs. mhomed,active with different ip(s), negative response
8515 .line
= __location__
,
8516 .name
= _NBT_NAME("_MA_MA_DI_N", 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
= true
8539 * mhomed,active vs. mhomed,tombstone with same ip(s), unchecked
8542 .line
= __location__
,
8543 .name
= _NBT_NAME("_MA_MT_SI_U", 0x00, NULL
),
8547 .num_ips
= ctx
->addresses_best_num
,
8548 .ips
= ctx
->addresses_best
,
8549 .apply_expected
= true
8555 .type
= WREPL_TYPE_MHOMED
,
8556 .state
= WREPL_STATE_TOMBSTONE
,
8557 .node
= WREPL_NODE_B
,
8559 .num_ips
= ctx
->addresses_best_num
,
8560 .ips
= ctx
->addresses_best
,
8561 .apply_expected
= false
8565 * mhomed,active vs. mhomed,tombstone with different ip(s), unchecked
8568 .line
= __location__
,
8569 .name
= _NBT_NAME("_MA_MT_DI_U", 0x00, NULL
),
8573 .num_ips
= ctx
->addresses_best_num
,
8574 .ips
= ctx
->addresses_best
,
8575 .apply_expected
= true
8581 .type
= WREPL_TYPE_MHOMED
,
8582 .state
= WREPL_STATE_TOMBSTONE
,
8583 .node
= WREPL_NODE_B
,
8585 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8586 .ips
= addresses_B_3_4
,
8587 .apply_expected
= false
8591 * some more multi homed test, including merging
8594 * mhomed,active vs. mhomed,active with superset ip(s), unchecked
8597 .line
= __location__
,
8598 .section
= "Test Replica vs. owned active: some more MHOMED combinations",
8599 .name
= _NBT_NAME("_MA_MA_SP_U", 0x00, NULL
),
8600 .comment
= "C:MHOMED vs. B:ALL => B:ALL",
8601 .skip
= (ctx
->addresses_all_num
< 3),
8605 .num_ips
= ctx
->addresses_mhomed_num
,
8606 .ips
= ctx
->addresses_mhomed
,
8607 .apply_expected
= true
8613 .type
= WREPL_TYPE_MHOMED
,
8614 .state
= WREPL_STATE_ACTIVE
,
8615 .node
= WREPL_NODE_B
,
8617 .num_ips
= ctx
->addresses_all_num
,
8618 .ips
= ctx
->addresses_all
,
8619 .apply_expected
= true
8623 * mhomed,active vs. mhomed,active with same ips, unchecked
8626 .line
= __location__
,
8627 .name
= _NBT_NAME("_MA_MA_SM_U", 0x00, NULL
),
8628 .comment
= "C:MHOMED vs. B:MHOMED => B:MHOMED",
8629 .skip
= (ctx
->addresses_mhomed_num
< 2),
8633 .num_ips
= ctx
->addresses_mhomed_num
,
8634 .ips
= ctx
->addresses_mhomed
,
8635 .apply_expected
= true
8641 .type
= WREPL_TYPE_MHOMED
,
8642 .state
= WREPL_STATE_ACTIVE
,
8643 .node
= WREPL_NODE_B
,
8645 .num_ips
= ctx
->addresses_mhomed_num
,
8646 .ips
= ctx
->addresses_mhomed
,
8647 .apply_expected
= true
8651 * mhomed,active vs. mhomed,active with subset ip(s), positive response
8654 .line
= __location__
,
8655 .name
= _NBT_NAME("_MA_MA_SB_P", 0x00, NULL
),
8656 .comment
= "C:MHOMED vs. B:BEST (C:MHOMED) => B:MHOMED",
8657 .skip
= (ctx
->addresses_mhomed_num
< 2),
8661 .num_ips
= ctx
->addresses_mhomed_num
,
8662 .ips
= ctx
->addresses_mhomed
,
8663 .apply_expected
= true
8670 .type
= WREPL_TYPE_MHOMED
,
8671 .state
= WREPL_STATE_ACTIVE
,
8672 .node
= WREPL_NODE_B
,
8674 .num_ips
= ctx
->addresses_best_num
,
8675 .ips
= ctx
->addresses_best
,
8676 .mhomed_merge
= true
8680 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with all addresses
8683 .line
= __location__
,
8684 .name
= _NBT_NAME("_MA_MA_SB_A", 0x00, NULL
),
8685 .comment
= "C:MHOMED vs. B:BEST (C:ALL) => B:MHOMED",
8686 .skip
= (ctx
->addresses_all_num
< 3),
8690 .num_ips
= ctx
->addresses_mhomed_num
,
8691 .ips
= ctx
->addresses_mhomed
,
8692 .apply_expected
= true
8697 .num_ips
= ctx
->addresses_all_num
,
8698 .ips
= ctx
->addresses_all
,
8701 .type
= WREPL_TYPE_MHOMED
,
8702 .state
= WREPL_STATE_ACTIVE
,
8703 .node
= WREPL_NODE_B
,
8705 .num_ips
= ctx
->addresses_best_num
,
8706 .ips
= ctx
->addresses_best
,
8707 .mhomed_merge
= true
8711 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with replicas addresses
8712 * TODO: check why the server sends a name release demand for one address?
8713 * the release demand has no effect to the database record...
8716 .line
= __location__
,
8717 .name
= _NBT_NAME("_MA_MA_SB_PRA", 0x00, NULL
),
8718 .comment
= "C:MHOMED vs. B:BEST (C:BEST) => C:MHOMED",
8719 .skip
= (ctx
->addresses_all_num
< 2),
8723 .num_ips
= ctx
->addresses_mhomed_num
,
8724 .ips
= ctx
->addresses_mhomed
,
8725 .apply_expected
= true
8730 .num_ips
= ctx
->addresses_best_num
,
8731 .ips
= ctx
->addresses_best
,
8732 .late_release
= true
8735 .type
= WREPL_TYPE_MHOMED
,
8736 .state
= WREPL_STATE_ACTIVE
,
8737 .node
= WREPL_NODE_B
,
8739 .num_ips
= ctx
->addresses_best_num
,
8740 .ips
= ctx
->addresses_best
,
8741 .apply_expected
= false
8745 * mhomed,active vs. mhomed,active with subset ip(s), positive response, with other addresses
8748 .line
= __location__
,
8749 .name
= _NBT_NAME("_MA_MA_SB_O", 0x00, NULL
),
8750 .comment
= "C:MHOMED vs. B:BEST (B:B_3_4) =>C:MHOMED",
8751 .skip
= (ctx
->addresses_all_num
< 2),
8755 .num_ips
= ctx
->addresses_mhomed_num
,
8756 .ips
= ctx
->addresses_mhomed
,
8757 .apply_expected
= true
8762 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8763 .ips
= addresses_B_3_4
,
8766 .type
= WREPL_TYPE_MHOMED
,
8767 .state
= WREPL_STATE_ACTIVE
,
8768 .node
= WREPL_NODE_B
,
8770 .num_ips
= ctx
->addresses_best_num
,
8771 .ips
= ctx
->addresses_best
,
8772 .apply_expected
= false
8776 * mhomed,active vs. mhomed,active with subset ip(s), negative response
8779 .line
= __location__
,
8780 .name
= _NBT_NAME("_MA_MA_SB_N", 0x00, NULL
),
8781 .comment
= "C:MHOMED vs. B:BEST (NEGATIVE) => B:BEST",
8782 .skip
= (ctx
->addresses_mhomed_num
< 2),
8786 .num_ips
= ctx
->addresses_mhomed_num
,
8787 .ips
= ctx
->addresses_mhomed
,
8788 .apply_expected
= true
8795 .type
= WREPL_TYPE_MHOMED
,
8796 .state
= WREPL_STATE_ACTIVE
,
8797 .node
= WREPL_NODE_B
,
8799 .num_ips
= ctx
->addresses_best_num
,
8800 .ips
= ctx
->addresses_best
,
8801 .apply_expected
= true
8805 * some more multi homed and unique test, including merging
8808 * mhomed,active vs. unique,active with subset ip(s), positive response
8811 .line
= __location__
,
8812 .section
= "Test Replica vs. owned active: some more UNIQUE,MHOMED combinations",
8813 .name
= _NBT_NAME("_MA_UA_SB_P", 0x00, NULL
),
8814 .comment
= "C:MHOMED vs. B:UNIQUE,BEST (C:MHOMED) => B:MHOMED",
8815 .skip
= (ctx
->addresses_all_num
< 2),
8819 .num_ips
= ctx
->addresses_mhomed_num
,
8820 .ips
= ctx
->addresses_mhomed
,
8821 .apply_expected
= true
8828 .type
= WREPL_TYPE_UNIQUE
,
8829 .state
= WREPL_STATE_ACTIVE
,
8830 .node
= WREPL_NODE_B
,
8832 .num_ips
= ctx
->addresses_best_num
,
8833 .ips
= ctx
->addresses_best
,
8834 .mhomed_merge
= true
8838 * unique,active vs. unique,active with different ip(s), positive response, with replicas address
8839 * TODO: check why the server sends a name release demand for one address?
8840 * the release demand has no effect to the database record...
8843 .line
= __location__
,
8844 .name
= _NBT_NAME("_UA_UA_DI_PRA", 0x00, NULL
),
8845 .comment
= "C:BEST vs. B:BEST2 (C:BEST2,LR:BEST2) => C:BEST",
8846 .skip
= (ctx
->addresses_all_num
< 2),
8850 .num_ips
= ctx
->addresses_best_num
,
8851 .ips
= ctx
->addresses_best
,
8852 .apply_expected
= true
8857 .num_ips
= ctx
->addresses_best2_num
,
8858 .ips
= ctx
->addresses_best2
,
8859 .late_release
= true
8862 .type
= WREPL_TYPE_UNIQUE
,
8863 .state
= WREPL_STATE_ACTIVE
,
8864 .node
= WREPL_NODE_B
,
8866 .num_ips
= ctx
->addresses_best2_num
,
8867 .ips
= ctx
->addresses_best2
,
8868 .apply_expected
= false,
8872 * unique,active vs. unique,active with different ip(s), positive response, with all addresses
8875 .line
= __location__
,
8876 .name
= _NBT_NAME("_UA_UA_DI_A", 0x00, NULL
),
8877 .comment
= "C:BEST vs. B:BEST2 (C:ALL) => B:MHOMED",
8878 .skip
= (ctx
->addresses_all_num
< 3),
8882 .num_ips
= ctx
->addresses_best_num
,
8883 .ips
= ctx
->addresses_best
,
8884 .apply_expected
= true
8889 .num_ips
= ctx
->addresses_all_num
,
8890 .ips
= ctx
->addresses_all
,
8893 .type
= WREPL_TYPE_UNIQUE
,
8894 .state
= WREPL_STATE_ACTIVE
,
8895 .node
= WREPL_NODE_B
,
8897 .num_ips
= ctx
->addresses_best2_num
,
8898 .ips
= ctx
->addresses_best2
,
8899 .mhomed_merge
= true,
8903 * unique,active vs. mhomed,active with different ip(s), positive response, with all addresses
8906 .line
= __location__
,
8907 .name
= _NBT_NAME("_UA_MA_DI_A", 0x00, NULL
),
8908 .comment
= "C:BEST vs. B:BEST2 (C:ALL) => B:MHOMED",
8909 .skip
= (ctx
->addresses_all_num
< 3),
8913 .num_ips
= ctx
->addresses_best_num
,
8914 .ips
= ctx
->addresses_best
,
8915 .apply_expected
= true
8920 .num_ips
= ctx
->addresses_all_num
,
8921 .ips
= ctx
->addresses_all
,
8924 .type
= WREPL_TYPE_MHOMED
,
8925 .state
= WREPL_STATE_ACTIVE
,
8926 .node
= WREPL_NODE_B
,
8928 .num_ips
= ctx
->addresses_best2_num
,
8929 .ips
= ctx
->addresses_best2
,
8930 .mhomed_merge
= true,
8934 * special group vs. special group merging section
8937 * sgroup,active vs. sgroup,active with different ip(s)
8940 .line
= __location__
,
8941 .section
= "Test Replica vs. owned active: SGROUP vs. SGROUP tests",
8942 .name
= _NBT_NAME("_SA_SA_DI_U", 0x1C, NULL
),
8943 .skip
= (ctx
->addresses_all_num
< 3),
8945 .nb_flags
= NBT_NM_GROUP
,
8947 .num_ips
= ctx
->addresses_mhomed_num
,
8948 .ips
= ctx
->addresses_mhomed
,
8949 .apply_expected
= true
8955 .type
= WREPL_TYPE_SGROUP
,
8956 .state
= WREPL_STATE_ACTIVE
,
8957 .node
= WREPL_NODE_B
,
8959 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
8960 .ips
= addresses_B_3_4
,
8961 .sgroup_merge
= true
8965 * sgroup,active vs. sgroup,active with same ip(s)
8968 .line
= __location__
,
8969 .name
= _NBT_NAME("_SA_SA_SI_U", 0x1C, NULL
),
8970 .skip
= (ctx
->addresses_all_num
< 3),
8972 .nb_flags
= NBT_NM_GROUP
,
8974 .num_ips
= ctx
->addresses_mhomed_num
,
8975 .ips
= ctx
->addresses_mhomed
,
8976 .apply_expected
= true
8982 .type
= WREPL_TYPE_SGROUP
,
8983 .state
= WREPL_STATE_ACTIVE
,
8984 .node
= WREPL_NODE_B
,
8986 .num_ips
= ctx
->addresses_mhomed_num
,
8987 .ips
= ctx
->addresses_mhomed
,
8988 .sgroup_merge
= true
8992 * sgroup,active vs. sgroup,active with superset ip(s)
8995 .line
= __location__
,
8996 .name
= _NBT_NAME("_SA_SA_SP_U", 0x1C, NULL
),
8997 .skip
= (ctx
->addresses_all_num
< 3),
8999 .nb_flags
= NBT_NM_GROUP
,
9001 .num_ips
= ctx
->addresses_mhomed_num
,
9002 .ips
= ctx
->addresses_mhomed
,
9003 .apply_expected
= true
9009 .type
= WREPL_TYPE_SGROUP
,
9010 .state
= WREPL_STATE_ACTIVE
,
9011 .node
= WREPL_NODE_B
,
9013 .num_ips
= ctx
->addresses_all_num
,
9014 .ips
= ctx
->addresses_all
,
9015 .sgroup_merge
= true
9019 * sgroup,active vs. sgroup,active with subset ip(s)
9022 .line
= __location__
,
9023 .name
= _NBT_NAME("_SA_SA_SB_U", 0x1C, NULL
),
9024 .skip
= (ctx
->addresses_all_num
< 3),
9026 .nb_flags
= NBT_NM_GROUP
,
9028 .num_ips
= ctx
->addresses_mhomed_num
,
9029 .ips
= ctx
->addresses_mhomed
,
9030 .apply_expected
= true
9036 .type
= WREPL_TYPE_SGROUP
,
9037 .state
= WREPL_STATE_ACTIVE
,
9038 .node
= WREPL_NODE_B
,
9040 .num_ips
= ctx
->addresses_best_num
,
9041 .ips
= ctx
->addresses_best
,
9042 .sgroup_merge
= true
9046 * sgroup,active vs. sgroup,tombstone with different ip(s)
9049 .line
= __location__
,
9050 .name
= _NBT_NAME("_SA_ST_DI_U", 0x1C, NULL
),
9051 .skip
= (ctx
->addresses_all_num
< 3),
9053 .nb_flags
= NBT_NM_GROUP
,
9055 .num_ips
= ctx
->addresses_mhomed_num
,
9056 .ips
= ctx
->addresses_mhomed
,
9057 .apply_expected
= true
9063 .type
= WREPL_TYPE_SGROUP
,
9064 .state
= WREPL_STATE_TOMBSTONE
,
9065 .node
= WREPL_NODE_B
,
9067 .num_ips
= ARRAY_SIZE(addresses_B_3_4
),
9068 .ips
= addresses_B_3_4
,
9069 .apply_expected
= false
9073 * sgroup,active vs. sgroup,tombstone with same ip(s)
9076 .line
= __location__
,
9077 .name
= _NBT_NAME("_SA_ST_SI_U", 0x1C, NULL
),
9078 .skip
= (ctx
->addresses_all_num
< 3),
9080 .nb_flags
= NBT_NM_GROUP
,
9082 .num_ips
= ctx
->addresses_mhomed_num
,
9083 .ips
= ctx
->addresses_mhomed
,
9084 .apply_expected
= true
9090 .type
= WREPL_TYPE_SGROUP
,
9091 .state
= WREPL_STATE_TOMBSTONE
,
9092 .node
= WREPL_NODE_B
,
9094 .num_ips
= ctx
->addresses_mhomed_num
,
9095 .ips
= ctx
->addresses_mhomed
,
9096 .apply_expected
= false
9100 * sgroup,active vs. sgroup,tombstone with superset ip(s)
9103 .line
= __location__
,
9104 .name
= _NBT_NAME("_SA_ST_SP_U", 0x1C, NULL
),
9105 .skip
= (ctx
->addresses_all_num
< 3),
9107 .nb_flags
= NBT_NM_GROUP
,
9109 .num_ips
= ctx
->addresses_mhomed_num
,
9110 .ips
= ctx
->addresses_mhomed
,
9111 .apply_expected
= true
9117 .type
= WREPL_TYPE_SGROUP
,
9118 .state
= WREPL_STATE_TOMBSTONE
,
9119 .node
= WREPL_NODE_B
,
9121 .num_ips
= ctx
->addresses_all_num
,
9122 .ips
= ctx
->addresses_all
,
9123 .apply_expected
= false
9127 * sgroup,active vs. sgroup,tombstone with subset ip(s)
9130 .line
= __location__
,
9131 .name
= _NBT_NAME("_SA_ST_SB_U", 0x1C, NULL
),
9132 .skip
= (ctx
->addresses_all_num
< 3),
9134 .nb_flags
= NBT_NM_GROUP
,
9136 .num_ips
= ctx
->addresses_mhomed_num
,
9137 .ips
= ctx
->addresses_mhomed
,
9138 .apply_expected
= true
9144 .type
= WREPL_TYPE_SGROUP
,
9145 .state
= WREPL_STATE_TOMBSTONE
,
9146 .node
= WREPL_NODE_B
,
9148 .num_ips
= ctx
->addresses_best_num
,
9149 .ips
= ctx
->addresses_best
,
9150 .apply_expected
= false
9155 if (!ctx
->nbtsock_srv
) {
9156 torture_comment(tctx
, "SKIP: Test Replica records vs. owned active records: not bound to port[%d]\n",
9157 lp_nbt_port(tctx
->lp_ctx
));
9161 torture_comment(tctx
, "Test Replica records vs. owned active records\n");
9163 for(i
=0; ret
&& i
< ARRAY_SIZE(records
); i
++) {
9165 struct test_conflict_owned_active_vs_replica_struct record
= records
[i
];
9166 uint32_t j
, count
= 1;
9169 if (records
[i
].wins
.mhomed
|| records
[i
].name
.type
== 0x1C) {
9170 count
= records
[i
].wins
.num_ips
;
9173 if (records
[i
].section
) {
9174 torture_comment(tctx
, "%s\n", records
[i
].section
);
9177 if (records
[i
].skip
) {
9178 torture_comment(tctx
, "%s => SKIPPED\n", nbt_name_string(ctx
, &records
[i
].name
));
9182 if (records
[i
].replica
.mhomed_merge
) {
9183 action
= "MHOMED_MERGE";
9184 } else if (records
[i
].replica
.sgroup_merge
) {
9185 action
= "SGROUP_MERGE";
9186 } else if (records
[i
].replica
.apply_expected
) {
9189 action
= "NOT REPLACE";
9192 torture_comment(tctx
, "%s%s%s => %s\n",
9193 nbt_name_string(ctx
, &records
[i
].name
),
9194 (records
[i
].comment
?": ":""),
9195 (records
[i
].comment
?records
[i
].comment
:""),
9198 /* Prepare for multi homed registration */
9199 ZERO_STRUCT(records
[i
].defend
);
9200 records
[i
].defend
.timeout
= 10;
9201 records
[i
].defend
.positive
= true;
9202 nbt_set_incoming_handler(ctx
->nbtsock_srv
,
9203 test_conflict_owned_active_vs_replica_handler
,
9205 if (ctx
->nbtsock_srv2
) {
9206 nbt_set_incoming_handler(ctx
->nbtsock_srv2
,
9207 test_conflict_owned_active_vs_replica_handler
,
9214 for (j
=0; j
< count
; j
++) {
9215 struct nbt_name_request
*req
;
9217 name_register
->in
.name
= records
[i
].name
;
9218 name_register
->in
.dest_addr
= ctx
->address
;
9219 name_register
->in
.dest_port
= lp_nbt_port(tctx
->lp_ctx
);
9220 name_register
->in
.address
= records
[i
].wins
.ips
[j
].ip
;
9221 name_register
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
9222 name_register
->in
.register_demand
= false;
9223 name_register
->in
.broadcast
= false;
9224 name_register
->in
.multi_homed
= records
[i
].wins
.mhomed
;
9225 name_register
->in
.ttl
= 300000;
9226 name_register
->in
.timeout
= 70;
9227 name_register
->in
.retries
= 0;
9229 req
= nbt_name_register_send(ctx
->nbtsock
, name_register
);
9231 /* push the request on the wire */
9232 event_loop_once(ctx
->nbtsock
->event_ctx
);
9235 * if we register multiple addresses,
9236 * the server will do name queries to see if the old addresses
9239 if (records
[i
].wins
.mhomed
&& j
> 0) {
9240 end
= timeval_current_ofs(records
[i
].defend
.timeout
,0);
9241 records
[i
].defend
.ret
= true;
9242 while (records
[i
].defend
.timeout
> 0) {
9243 event_loop_once(ctx
->nbtsock_srv
->event_ctx
);
9244 if (timeval_expired(&end
)) break;
9246 ret
&= records
[i
].defend
.ret
;
9249 status
= nbt_name_register_recv(req
, ctx
, name_register
);
9250 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
9251 torture_comment(tctx
, "No response from %s for name register\n", ctx
->address
);
9254 if (!NT_STATUS_IS_OK(status
)) {
9255 torture_comment(tctx
, "Bad response from %s for name register - %s\n",
9256 ctx
->address
, nt_errstr(status
));
9259 CHECK_VALUE(tctx
, name_register
->out
.rcode
, 0);
9260 CHECK_VALUE_STRING(tctx
, name_register
->out
.reply_from
, ctx
->address
);
9261 CHECK_VALUE(tctx
, name_register
->out
.name
.type
, records
[i
].name
.type
);
9262 CHECK_VALUE_STRING(tctx
, name_register
->out
.name
.name
, records
[i
].name
.name
);
9263 CHECK_VALUE_STRING(tctx
, name_register
->out
.name
.scope
, records
[i
].name
.scope
);
9264 CHECK_VALUE_STRING(tctx
, name_register
->out
.reply_addr
, records
[i
].wins
.ips
[j
].ip
);
9267 /* Prepare for the current test */
9268 records
[i
].defend
= record
.defend
;
9269 nbt_set_incoming_handler(ctx
->nbtsock_srv
,
9270 test_conflict_owned_active_vs_replica_handler
,
9272 if (ctx
->nbtsock_srv2
) {
9273 nbt_set_incoming_handler(ctx
->nbtsock_srv2
,
9274 test_conflict_owned_active_vs_replica_handler
,
9281 wins_name
->name
= &records
[i
].name
;
9282 wins_name
->flags
= WREPL_NAME_FLAGS(records
[i
].replica
.type
,
9283 records
[i
].replica
.state
,
9284 records
[i
].replica
.node
,
9285 records
[i
].replica
.is_static
);
9286 wins_name
->id
= ++ctx
->b
.max_version
;
9287 if (wins_name
->flags
& 2) {
9288 wins_name
->addresses
.addresses
.num_ips
= records
[i
].replica
.num_ips
;
9289 wins_name
->addresses
.addresses
.ips
= discard_const(records
[i
].replica
.ips
);
9291 wins_name
->addresses
.ip
= records
[i
].replica
.ips
[0].ip
;
9293 wins_name
->unknown
= "255.255.255.255";
9295 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9298 * wait for the name query, which is handled in
9299 * test_conflict_owned_active_vs_replica_handler()
9301 end
= timeval_current_ofs(records
[i
].defend
.timeout
,0);
9302 records
[i
].defend
.ret
= true;
9303 while (records
[i
].defend
.timeout
> 0) {
9304 event_loop_once(ctx
->nbtsock_srv
->event_ctx
);
9305 if (timeval_expired(&end
)) break;
9307 ret
&= records
[i
].defend
.ret
;
9309 if (records
[i
].defend
.late_release
) {
9310 records
[i
].defend
= record
.defend
;
9311 records
[i
].defend
.expect_release
= true;
9313 * wait for the name release demand, which is handled in
9314 * test_conflict_owned_active_vs_replica_handler()
9316 end
= timeval_current_ofs(records
[i
].defend
.timeout
,0);
9317 records
[i
].defend
.ret
= true;
9318 while (records
[i
].defend
.timeout
> 0) {
9319 event_loop_once(ctx
->nbtsock_srv
->event_ctx
);
9320 if (timeval_expired(&end
)) break;
9322 ret
&= records
[i
].defend
.ret
;
9325 if (records
[i
].replica
.mhomed_merge
) {
9326 ret
&= test_wrepl_mhomed_merged(tctx
, ctx
, &ctx
->c
,
9327 records
[i
].wins
.num_ips
, records
[i
].wins
.ips
,
9329 records
[i
].replica
.num_ips
, records
[i
].replica
.ips
,
9331 } else if (records
[i
].replica
.sgroup_merge
) {
9332 ret
&= test_wrepl_sgroup_merged(tctx
, ctx
, NULL
,
9334 records
[i
].wins
.num_ips
, records
[i
].wins
.ips
,
9336 records
[i
].replica
.num_ips
, records
[i
].replica
.ips
,
9339 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
,
9340 records
[i
].replica
.apply_expected
);
9343 if (records
[i
].replica
.apply_expected
||
9344 records
[i
].replica
.mhomed_merge
) {
9345 wins_name
->name
= &records
[i
].name
;
9346 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE
,
9347 WREPL_STATE_TOMBSTONE
,
9348 WREPL_NODE_B
, false);
9349 wins_name
->id
= ++ctx
->b
.max_version
;
9350 wins_name
->addresses
.ip
= addresses_B_1
[0].ip
;
9351 wins_name
->unknown
= "255.255.255.255";
9353 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9354 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
, true);
9356 for (j
=0; j
< count
; j
++) {
9357 struct nbt_name_socket
*nbtsock
= ctx
->nbtsock
;
9359 if (ctx
->myaddr2
&& strcmp(records
[i
].wins
.ips
[j
].ip
, ctx
->myaddr2
->addr
) == 0) {
9360 nbtsock
= ctx
->nbtsock2
;
9363 release
->in
.name
= records
[i
].name
;
9364 release
->in
.dest_addr
= ctx
->address
;
9365 release
->in
.dest_port
= lp_nbt_port(tctx
->lp_ctx
);
9366 release
->in
.address
= records
[i
].wins
.ips
[j
].ip
;
9367 release
->in
.nb_flags
= records
[i
].wins
.nb_flags
;
9368 release
->in
.broadcast
= false;
9369 release
->in
.timeout
= 30;
9370 release
->in
.retries
= 0;
9372 status
= nbt_name_release(nbtsock
, ctx
, release
);
9373 if (NT_STATUS_EQUAL(status
, NT_STATUS_IO_TIMEOUT
)) {
9374 torture_comment(tctx
, "No response from %s for name release\n", ctx
->address
);
9377 if (!NT_STATUS_IS_OK(status
)) {
9378 torture_comment(tctx
, "Bad response from %s for name query - %s\n",
9379 ctx
->address
, nt_errstr(status
));
9382 CHECK_VALUE(tctx
, release
->out
.rcode
, 0);
9385 if (records
[i
].replica
.sgroup_merge
) {
9386 /* clean up the SGROUP record */
9387 wins_name
->name
= &records
[i
].name
;
9388 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
9390 WREPL_NODE_B
, false);
9391 wins_name
->id
= ++ctx
->b
.max_version
;
9392 wins_name
->addresses
.addresses
.num_ips
= 0;
9393 wins_name
->addresses
.addresses
.ips
= NULL
;
9394 wins_name
->unknown
= "255.255.255.255";
9395 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9397 /* take ownership of the SGROUP record */
9398 wins_name
->name
= &records
[i
].name
;
9399 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_SGROUP
,
9401 WREPL_NODE_B
, false);
9402 wins_name
->id
= ++ctx
->b
.max_version
;
9403 wins_name
->addresses
.addresses
.num_ips
= ARRAY_SIZE(addresses_B_1
);
9404 wins_name
->addresses
.addresses
.ips
= discard_const(addresses_B_1
);
9405 wins_name
->unknown
= "255.255.255.255";
9406 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9407 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
, true);
9409 /* overwrite the SGROUP record with unique,tombstone */
9410 wins_name
->name
= &records
[i
].name
;
9411 wins_name
->flags
= WREPL_NAME_FLAGS(WREPL_TYPE_UNIQUE
,
9412 WREPL_STATE_TOMBSTONE
,
9413 WREPL_NODE_B
, false);
9414 wins_name
->id
= ++ctx
->b
.max_version
;
9415 wins_name
->addresses
.ip
= addresses_A_1
[0].ip
;
9416 wins_name
->unknown
= "255.255.255.255";
9417 ret
&= test_wrepl_update_one(tctx
, ctx
, &ctx
->b
, wins_name
);
9418 ret
&= test_wrepl_is_applied(tctx
, ctx
, &ctx
->b
, wins_name
, true);
9423 torture_comment(tctx
, "conflict handled wrong or record[%u]: %s\n", i
, records
[i
].line
);
9431 #define _NBT_ASSERT(v, correct) do { \
9432 if ((v) != (correct)) { \
9433 printf("(%s) Incorrect value %s=%d - should be %s (%d)\n", \
9434 __location__, #v, v, #correct, correct); \
9439 #define _NBT_ASSERT_STRING(v, correct) do { \
9440 if ( ((!v) && (correct)) || \
9441 ((v) && (!correct)) || \
9442 ((v) && (correct) && strcmp(v,correct) != 0)) { \
9443 printf("(%s) Incorrect value %s=%s - should be %s\n", \
9444 __location__, #v, v, correct); \
9449 static void test_conflict_owned_active_vs_replica_handler_query(struct nbt_name_socket
*nbtsock
,
9450 struct nbt_name_packet
*req_packet
,
9451 struct socket_address
*src
)
9453 struct nbt_name
*name
;
9454 struct nbt_name_packet
*rep_packet
;
9455 struct test_conflict_owned_active_vs_replica_struct
*rec
=
9456 (struct test_conflict_owned_active_vs_replica_struct
*)nbtsock
->incoming
.private_data
;
9458 _NBT_ASSERT(req_packet
->qdcount
, 1);
9459 _NBT_ASSERT(req_packet
->questions
[0].question_type
, NBT_QTYPE_NETBIOS
);
9460 _NBT_ASSERT(req_packet
->questions
[0].question_class
, NBT_QCLASS_IP
);
9462 name
= &req_packet
->questions
[0].name
;
9464 _NBT_ASSERT(name
->type
, rec
->name
.type
);
9465 _NBT_ASSERT_STRING(name
->name
, rec
->name
.name
);
9466 _NBT_ASSERT_STRING(name
->scope
, rec
->name
.scope
);
9468 _NBT_ASSERT(rec
->defend
.expect_release
, false);
9470 rep_packet
= talloc_zero(nbtsock
, struct nbt_name_packet
);
9471 if (rep_packet
== NULL
) return;
9473 rep_packet
->name_trn_id
= req_packet
->name_trn_id
;
9474 rep_packet
->ancount
= 1;
9476 rep_packet
->answers
= talloc_array(rep_packet
, struct nbt_res_rec
, 1);
9477 if (rep_packet
->answers
== NULL
) return;
9479 rep_packet
->answers
[0].name
= *name
;
9480 rep_packet
->answers
[0].rr_class
= NBT_QCLASS_IP
;
9481 rep_packet
->answers
[0].ttl
= 0;
9483 if (rec
->defend
.positive
) {
9484 uint32_t i
, num_ips
;
9485 const struct wrepl_ip
*ips
;
9487 if (rec
->defend
.num_ips
> 0) {
9488 num_ips
= rec
->defend
.num_ips
;
9489 ips
= rec
->defend
.ips
;
9491 num_ips
= rec
->wins
.num_ips
;
9492 ips
= rec
->wins
.ips
;
9495 /* send a positive reply */
9496 rep_packet
->operation
=
9499 NBT_FLAG_AUTHORITIVE
|
9500 NBT_FLAG_RECURSION_DESIRED
|
9501 NBT_FLAG_RECURSION_AVAIL
;
9503 rep_packet
->answers
[0].rr_type
= NBT_QTYPE_NETBIOS
;
9505 rep_packet
->answers
[0].rdata
.netbios
.length
= num_ips
*6;
9506 rep_packet
->answers
[0].rdata
.netbios
.addresses
=
9507 talloc_array(rep_packet
->answers
, struct nbt_rdata_address
, num_ips
);
9508 if (rep_packet
->answers
[0].rdata
.netbios
.addresses
== NULL
) return;
9510 for (i
=0; i
< num_ips
; i
++) {
9511 struct nbt_rdata_address
*addr
=
9512 &rep_packet
->answers
[0].rdata
.netbios
.addresses
[i
];
9513 addr
->nb_flags
= rec
->wins
.nb_flags
;
9514 addr
->ipaddr
= ips
[i
].ip
;
9516 DEBUG(2,("Sending positive name query reply for %s to %s:%d\n",
9517 nbt_name_string(rep_packet
, name
), src
->addr
, src
->port
));
9519 /* send a negative reply */
9520 rep_packet
->operation
=
9523 NBT_FLAG_AUTHORITIVE
|
9526 rep_packet
->answers
[0].rr_type
= NBT_QTYPE_NULL
;
9528 ZERO_STRUCT(rep_packet
->answers
[0].rdata
);
9530 DEBUG(2,("Sending negative name query reply for %s to %s:%d\n",
9531 nbt_name_string(rep_packet
, name
), src
->addr
, src
->port
));
9534 nbt_name_reply_send(nbtsock
, src
, rep_packet
);
9535 talloc_free(rep_packet
);
9537 /* make sure we push the reply to the wire */
9538 while (nbtsock
->send_queue
) {
9539 event_loop_once(nbtsock
->event_ctx
);
9543 rec
->defend
.timeout
= 0;
9544 rec
->defend
.ret
= true;
9547 static void test_conflict_owned_active_vs_replica_handler_release(
9548 struct nbt_name_socket
*nbtsock
,
9549 struct nbt_name_packet
*req_packet
,
9550 struct socket_address
*src
)
9552 struct nbt_name
*name
;
9553 struct nbt_name_packet
*rep_packet
;
9554 struct test_conflict_owned_active_vs_replica_struct
*rec
=
9555 (struct test_conflict_owned_active_vs_replica_struct
*)nbtsock
->incoming
.private_data
;
9557 _NBT_ASSERT(req_packet
->qdcount
, 1);
9558 _NBT_ASSERT(req_packet
->questions
[0].question_type
, NBT_QTYPE_NETBIOS
);
9559 _NBT_ASSERT(req_packet
->questions
[0].question_class
, NBT_QCLASS_IP
);
9561 name
= &req_packet
->questions
[0].name
;
9563 _NBT_ASSERT(name
->type
, rec
->name
.type
);
9564 _NBT_ASSERT_STRING(name
->name
, rec
->name
.name
);
9565 _NBT_ASSERT_STRING(name
->scope
, rec
->name
.scope
);
9567 _NBT_ASSERT(rec
->defend
.expect_release
, true);
9569 rep_packet
= talloc_zero(nbtsock
, struct nbt_name_packet
);
9570 if (rep_packet
== NULL
) return;
9572 rep_packet
->name_trn_id
= req_packet
->name_trn_id
;
9573 rep_packet
->ancount
= 1;
9574 rep_packet
->operation
=
9576 NBT_OPCODE_RELEASE
|
9577 NBT_FLAG_AUTHORITIVE
;
9579 rep_packet
->answers
= talloc_array(rep_packet
, struct nbt_res_rec
, 1);
9580 if (rep_packet
->answers
== NULL
) return;
9582 rep_packet
->answers
[0].name
= *name
;
9583 rep_packet
->answers
[0].rr_type
= NBT_QTYPE_NETBIOS
;
9584 rep_packet
->answers
[0].rr_class
= NBT_QCLASS_IP
;
9585 rep_packet
->answers
[0].ttl
= req_packet
->additional
[0].ttl
;
9586 rep_packet
->answers
[0].rdata
= req_packet
->additional
[0].rdata
;
9588 DEBUG(2,("Sending name release reply for %s to %s:%d\n",
9589 nbt_name_string(rep_packet
, name
), src
->addr
, src
->port
));
9591 nbt_name_reply_send(nbtsock
, src
, rep_packet
);
9592 talloc_free(rep_packet
);
9594 /* make sure we push the reply to the wire */
9595 while (nbtsock
->send_queue
) {
9596 event_loop_once(nbtsock
->event_ctx
);
9600 rec
->defend
.timeout
= 0;
9601 rec
->defend
.ret
= true;
9604 static void test_conflict_owned_active_vs_replica_handler(struct nbt_name_socket
*nbtsock
,
9605 struct nbt_name_packet
*req_packet
,
9606 struct socket_address
*src
)
9608 struct test_conflict_owned_active_vs_replica_struct
*rec
=
9609 (struct test_conflict_owned_active_vs_replica_struct
*)nbtsock
->incoming
.private_data
;
9611 rec
->defend
.ret
= false;
9613 switch (req_packet
->operation
& NBT_OPCODE
) {
9614 case NBT_OPCODE_QUERY
:
9615 test_conflict_owned_active_vs_replica_handler_query(nbtsock
, req_packet
, src
);
9617 case NBT_OPCODE_RELEASE
:
9618 test_conflict_owned_active_vs_replica_handler_release(nbtsock
, req_packet
, src
);
9621 printf("%s: unexpected incoming packet\n", __location__
);
9627 test WINS replication replica conflicts operations
9629 static bool torture_nbt_winsreplication_replica(struct torture_context
*tctx
)
9632 struct test_wrepl_conflict_conn
*ctx
;
9634 const char *address
;
9635 struct nbt_name name
;
9637 if (!torture_nbt_get_name(tctx
, &name
, &address
))
9640 ctx
= test_create_conflict_ctx(tctx
, address
);
9641 if (!ctx
) return false;
9643 ret
&= test_conflict_same_owner(tctx
, ctx
);
9644 ret
&= test_conflict_different_owner(tctx
, ctx
);
9650 test WINS replication owned conflicts operations
9652 static bool torture_nbt_winsreplication_owned(struct torture_context
*tctx
)
9654 const char *address
;
9655 struct nbt_name name
;
9657 struct test_wrepl_conflict_conn
*ctx
;
9659 if (torture_setting_bool(tctx
, "quick", false))
9661 "skip NBT-WINSREPLICATION-OWNED test in quick test mode\n");
9663 if (!torture_nbt_get_name(tctx
, &name
, &address
))
9666 ctx
= test_create_conflict_ctx(tctx
, address
);
9667 torture_assert(tctx
, ctx
!= NULL
, "Creating context failed");
9669 ret
&= test_conflict_owned_released_vs_replica(tctx
, ctx
);
9670 ret
&= test_conflict_owned_active_vs_replica(tctx
, ctx
);
9676 test simple WINS replication operations
9678 struct torture_suite
*torture_nbt_winsreplication(TALLOC_CTX
*mem_ctx
)
9680 struct torture_suite
*suite
= torture_suite_create(
9681 mem_ctx
, "WINSREPLICATION");
9682 struct torture_tcase
*tcase
;
9684 tcase
= torture_suite_add_simple_test(suite
, "assoc_ctx1",
9686 tcase
->tests
->dangerous
= true;
9688 torture_suite_add_simple_test(suite
, "assoc_ctx2",
9691 torture_suite_add_simple_test(suite
, "wins_replication",
9692 test_wins_replication
);
9694 torture_suite_add_simple_test(suite
, "replica",
9695 torture_nbt_winsreplication_replica
);
9697 torture_suite_add_simple_test(suite
, "owned",
9698 torture_nbt_winsreplication_owned
);