diff options
author | Kristof Provost <kp@FreeBSD.org> | 2025-01-21 09:49:55 +0000 |
---|---|---|
committer | Kristof Provost <kp@FreeBSD.org> | 2025-01-24 10:20:30 +0000 |
commit | af33f86e6aef6b15c8aa3da615167272aa7a3ee3 (patch) | |
tree | 8bbe79bb6afe16b4e64e8f83017456e413710788 | |
parent | 3331975ab18f88a519b16e5c4781f5924b191eb7 (diff) |
carp: don't unintentionally revert to multicast mode
PR: 284140
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
-rw-r--r-- | sbin/ifconfig/carp.c | 4 | ||||
-rwxr-xr-x | tests/sys/netinet/carp.sh | 7 |
2 files changed, 5 insertions, 6 deletions
diff --git a/sbin/ifconfig/carp.c b/sbin/ifconfig/carp.c index 36b5d85ab7b8..7c7398f92d48 100644 --- a/sbin/ifconfig/carp.c +++ b/sbin/ifconfig/carp.c @@ -292,10 +292,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); diff --git a/tests/sys/netinet/carp.sh b/tests/sys/netinet/carp.sh index 39cfad14907c..f9e47c70f492 100755 --- a/tests/sys/netinet/carp.sh +++ b/tests/sys/netinet/carp.sh @@ -202,8 +202,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() |