CARP BACKUP initiating IPsec when p2 'Automatically ping host' is set
-
Hi,
We are running pfSense Plus 26.07 in HA pairs.
Our backup firewalls repeatedly initiate IPsec connections from the shared WAN VIP while in CARP BACKUP state when P2 are configured with "Automatically ping host".
Clearing Phase 2 'Automatically ping host' entries stops the attempts.
The backup check in /usr/local/bin/ping_hosts.sh uses $IFVPN, but the script never assigns it:
if [ "$( ifconfig "$IFVPN" | grep -c "carp: BACKUP vhid" )" -gt 1 ]; then
With the variable unset, ifconfig "" errors and the check falls through to the “pinging ipsec hosts” branch.
Reproduced on a backup firewall in sh, with more than one CARP
BACKUP entry:
unset IFVPNCurrent check: prints an interface error, then "no"
if [ "$(ifconfig "$IFVPN" | grep -c "carp: BACKUP vhid")" -gt 1 ]; then echo yes; else echo no; fiOlder check: prints "yes"
IFVPNSTATE=ifconfig $IFVPN | grep "carp: BACKUP vhid" | wc -l; if [ "$IFVPNSTATE" -gt 1 ]; then echo yes; else echo no; fiThe unquoted empty variable disappears, so the old command runs plain ifconfig and finds the BACKUP entries across all interfaces. The quoted version passes an empty interface name instead.
The quoting was added in commit 77f1f7e (“Clean up and modernize”).
Wanted to check if anyone else is seeing this behavior here before opening a Redmine issue.
Thanks,
JTG
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginPrivacy Policy · Cookie Policy