Created attachment 205076 [details] D20638.diff based on information from man pages like carp(4) and ifconfig(8), some inconstant values popped out while I troubleshooted a HA setup using CARP. - advskew was able to be changed to values higher than CARP_MAXSKEW; - CARP advertisements collected via tcpdump were still using (respecting) its limit; changing values on net.inet.carp.demotion does not increase advskew above the limit (expected, I think). root@fw1-lab:~ # uname -UKvm FreeBSD 13.0-CURRENT r348978 GENERIC amd64 1300031 1300031 root@fw1-lab:~ # ifconfig vlan3131 vhid 10 advskew 254 root@fw1-lab:~ # echo $? 0 root@fw1-lab:~ # ifconfig vlan3131 | grep carp carp: MASTER vhid 10 advbase 1 advskew 254 root@fw1-lab:~ # tcpdump -c 1 -n -v -i vlan3131 carp -T carp tcpdump: listening on vlan3131, link-type EN10MB (Ethernet), capture size 262144 bytes 15:56:59.299379 IP (tos 0xe0, ttl 255, id 0, offset 0, flags [DF], proto VRRP (112), length 56) 172.31.31.1 > 224.0.0.18: carp 172.31.31.1 > 224.0.0.18: CARPv2-advertise 36: vhid=10 advbase=1 advskew=240 authlen=7 counter=8688083474654986394 1 packet captured 1 packet received by filter 0 packets dropped by kernel
I was working on it without rebooting, on the fly (with fresh buildworld and installworld). after a reboot - or after a `service netif restart` - I now see the following error: ifconfig: SIOCSVH: Invalid argument
and, just to be clear: all worked as expected so far. root@fw2-lab:~ # ifconfig vlan3131 vhid 10 advskew 254 ifconfig: advskew must be something between 0 and 240 root@fw2-lab:~ # echo $? 1 root@fw2-lab:~ # ifconfig vlan3131 vhid 10 advskew 234 root@fw2-lab:~ # echo $? 0 root@fw2-lab:~ # ifconfig vlan3131 | grep carp carp: MASTER vhid 10 advbase 1 advskew 234 root@fw2-lab:~ # ifconfig vlan3131 advskew 222 ifconfig: advskew requires vhid (must come first) root@fw2-lab:~ # ifconfig vlan3131 advskew 222 vhid 10 ifconfig: advskew requires vhid (must come first) root@fw2-lab:~ # ifconfig vlan3131 vhid 10 advskew 222 root@fw2-lab:~ # echo $? 0
Created attachment 205196 [details] [PATCH] respect defines from 'sys/netinet/ip_carp.h' updating the patch to reflect last minor changes present on Phabricator.
Created attachment 205197 [details] ktrace__ifconfig.txt
Created attachment 205198 [details] ktrace__ifconfig_GOOD.txt adding ktrace outputs for the following command: # ifconfig vlan1616 vhid 99 pass florentina 192.168.32.1/32 ktrace__ifconfig.txt (running the command for the first time); ktrace__ifconfig_GOOD.txt (running the very same command command again).
Created attachment 205222 [details] [PATCH] respect defines from 'sys/netinet/ip_carp.h' fix. using demotion function fished from r228736
Created attachment 205306 [details] [PATCH] respect defines from 'sys/netinet/ip_carp.h'
ping?
https://reviews.freebsd.org/D20638