Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Feb 2025 16:53:12 GMT
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 8921c82b76e3 - stable/14 - carp: don't unintentionally revert to multicast mode
Message-ID:  <202502111653.51BGrCPO057486@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=8921c82b76e355deadf6a7810dfe20d65de49daa

commit 8921c82b76e355deadf6a7810dfe20d65de49daa
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2025-01-21 09:49:55 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2025-02-11 16:52:42 +0000

    carp: don't unintentionally revert to multicast mode
    
    PR:             284140
    MFC after:      2 weeks
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
    
    (cherry picked from commit af33f86e6aef6b15c8aa3da615167272aa7a3ee3)
---
 sbin/ifconfig/carp.c      | 4 ----
 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 dd09838b5d8b..a23c245f7fe6 100644
--- a/sbin/ifconfig/carp.c
+++ b/sbin/ifconfig/carp.c
@@ -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);
diff --git a/tests/sys/netinet/carp.sh b/tests/sys/netinet/carp.sh
index d0e10bc2c085..8cea2f4cbf1b 100755
--- a/tests/sys/netinet/carp.sh
+++ b/tests/sys/netinet/carp.sh
@@ -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()



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502111653.51BGrCPO057486>