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.
Please inform me if something is wrong or missing with this revision/differential. This is the first time I'm creating one.
PR: 262983
Submitted by: Luiz Amaral <email@luiz.eng.br>