Skip to content

net/frr: OSPF CARP interface costs don't survive a service restart #4702

@AndyX90

Description

@AndyX90

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug
The FRR Plugin has multiple ways to interact with carp.

  1. CARP failover mode
  2. CARP demote
  3. Influence interface cost based on CARP

This issue is about number 3.

If you choose a carp vip to depend on for an ospf interface, it works as long as the frr daemons are running.
If a deamon which is in carp-state backup ends and starts again, it starts with the normal interface costs, not the demoted ones.
This leads to same path costs and therefor routing problems.
To get it working again, you have to move the vips, then the costs get corrected for both firewalls.

Also if you manually trigger python3 /usr/local/opnsense/scripts/frr/carp_event_handler the correct costs are getting applied.

To Reproduce
Steps to reproduce the behavior:

  1. Use 2 OPNSense Firewalls in HA
  2. Create an interface in OSPF and set a Carp VIP to track [depend on (carp)], also set interface costs and demoted costs
  3. Move VIPs to second firewall (costs get the demoted ones on first firewall which is now in carp-state BACKUP)
  4. Reboot first firewall which is now in carp-state BACKUP
  5. After a reboot, the rebooted backup firewall gets the default costs of the interface and not the demoted ones

Expected behavior
The firewall in state carp-backup should get the demoted costs after a reboot (or a service restart) and not the default ones.

Screenshots
none

Relevant log files
Error on system startup:
>>> Error in start script '50-frr'

Additional context
Interestingly, this log line never appears.

Environment
OPNsense 25.1.6_4 (amd64).
Virtual testing appliance

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions