]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
pfsync: Add CTLFLAG_VNET to carp_demotion_factor sysctl
authorLuiz Amaral <email@luiz.eng.br>
Sat, 2 Apr 2022 10:09:06 +0000 (12:09 +0200)
committerKristof Provost <kp@FreeBSD.org>
Sat, 2 Apr 2022 10:11:32 +0000 (12:11 +0200)
commit654c1b8ef3c0fcbad3a77ea2a6f35c0dffc86e88
tree9c196047bc51a42b5cdbf2ec97c4cf21dececb9d
parent8d30ef92d59567d47a1fee9dc71baf17a555234d
pfsync: Add CTLFLAG_VNET to carp_demotion_factor sysctl

When trying to avoid a CARP demotion during a pfsync service restart, I
noticed that a non-default value for the net.pfsync.carp_demotion_factor
sysctl was not being applied during the demotion. The CARP was always
demoted by 240.

After investigating, I realized that the sysctl was using VNET_NAME()
without the CTLFLAG_VNET.

PR: 262983
Reviewed by: kp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D34737
sys/netpfil/pf/if_pfsync.c