carp: don't unintentionally revert to multicast mode

PR:		284140
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
This commit is contained in:
Kristof Provost 2025-01-21 10:49:55 +01:00 committed by Franco Fichtner
parent ced5abf15b
commit 063f4fdfc9
2 changed files with 5 additions and 6 deletions

View file

@ -246,10 +246,6 @@ static struct afswtch af_carp = {
static __constructor void
carp_ctor(void)
{
/* Default to multicast. */
setcarp_mcast(NULL, NULL, 0);
setcarp_mcast6(NULL, NULL, 0);
for (size_t i = 0; i < nitems(carp_cmds); i++)
cmd_register(&carp_cmds[i]);
af_register(&af_carp);

View file

@ -155,8 +155,11 @@ unicast_v4_body()
atf_check -s exit:0 -o ignore jexec carp_uni_v4_one \
ping -c 3 192.0.2.1
jexec carp_uni_v4_two ifconfig
jexec carp_uni_v4_three ifconfig
# Check that we remain in unicast when tweaking settings
atf_check -s exit:0 -o ignore \
jexec carp_uni_v4_two ifconfig ${epair_one}b vhid 1 advskew 2
atf_check -s exit:0 -o match:"peer 198.51.100.130" \
jexec carp_uni_v4_two ifconfig ${epair_one}b
}
unicast_v4_cleanup()