Date: Sat, 18 Jan 2025 18:05:26 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 284140] ifconfig carp : unicast switch back to multicast when not specifying peer Message-ID: <bug-284140-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D284140 Bug ID: 284140 Summary: ifconfig carp : unicast switch back to multicast when not specifying peer Product: Base System Version: 14.2-RELEASE Hardware: amd64 OS: Any Status: New Severity: Affects Many People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: johan@nosd.in Using carp in unicast, changing any other attribute than "peer" switch back= to unicast : root@testvip1:~ # ifconfig epair0b epair0b: flags=3D1008943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,LOW= ER_UP> metric 0 mtu 9000 options=3D8<VLAN_MTU> ether 2c:44:fd:19:94:db hwaddr 02:03:7f:1f:e6:0b inet 192.168.1.83 netmask 0xffffff00 broadcast 192.168.1.255 inet 192.168.1.85 netmask 0xffffff00 broadcast 192.168.1.255 vhid 99 groups: epair carp: BACKUP vhid 99 advbase 1 advskew 150 peer 192.168.1.84 peer6 ff02::12 media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>) status: active nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> root@testvip1:~ # ifconfig epair0b vhid 99 advskew 50 root@testvip1:~ # ifconfig epair0b epair0b: flags=3D1008943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,LOW= ER_UP> metric 0 mtu 9000 options=3D8<VLAN_MTU> ether 2c:44:fd:19:94:db hwaddr 02:03:7f:1f:e6:0b inet 192.168.1.83 netmask 0xffffff00 broadcast 192.168.1.255 inet 192.168.1.85 netmask 0xffffff00 broadcast 192.168.1.255 vhid 99 groups: epair carp: MASTER vhid 99 advbase 1 advskew 50 peer 224.0.0.18 peer6 ff02::12 media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>) status: active nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> This is caused by multicast set as default in carp_ctor in sbin/ifconfig/carp.c, so when setcarp_callback run it sets carpr.carpr_addr back to 224.0.0.18. On my setup, commenting default values works like assumed, and first initialization also correctly set peer to 224.0.0.18 if not specified by ifconfig. Maybe these default values could be removed ? iff --git a/sbin/ifconfig/carp.c b/sbin/ifconfig/carp.c index dd09838b5d8b..ef24b0899fe7 100644 --- a/sbin/ifconfig/carp.c +++ b/sbin/ifconfig/carp.c @@ -246,10 +264,6 @@ static struct afswtch af_carp =3D { static __constructor void carp_ctor(void) { - /* Default to multicast. */ - setcarp_mcast(NULL, NULL, 0); - setcarp_mcast6(NULL, NULL, 0); - for (size_t i =3D 0; i < nitems(carp_cmds); i++) cmd_register(&carp_cmds[i]); af_register(&af_carp); --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-284140-227>