Skip to content

net/frr: add BFD strict mode for BGP neighbors#5315

Open
r3m8 wants to merge 2 commits intoopnsense:masterfrom
r3m8:feature/bfd-strict-mode
Open

net/frr: add BFD strict mode for BGP neighbors#5315
r3m8 wants to merge 2 commits intoopnsense:masterfrom
r3m8:feature/bfd-strict-mode

Conversation

@r3m8
Copy link
Copy Markdown
Contributor

@r3m8 r3m8 commented Mar 13, 2026

Important notices
Before you submit a pull request, we ask you kindly to acknowledge the following:


Related issue

#5314


Describe the problem

The OPNsense FRR plugin currently lacks support for BFD Strict Mode in BGP neighbor configuration. This FRR feature ensures BGP sessions are only established when the underlying BFD session is up, preventing routing issues when physical connectivity is lost but BGP sessions remain artificially active.


Describe the proposed solution

This PR adds a "BFD Strict Mode" checkbox to the BGP neighbor configuration. The checkbox is hidden when BFD is disabled and appears when BFD is enabled, following the same pattern as OSPFv3's "Advertise Default Gateway" feature (I'm not sure this is the best way to do it, please let me know if not).

docs.frrouting.org/en/latest/bfd.html

router bgp ASN
 neighbor <address> bfd strict

neighbor {{ neighbor.address }} bfd
{% endif %}
{% if neighbor.bfd_strict|default('') == '1' %}
neighbor {{ neighbor.address }} bfd strict
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect strict is an add-on to the neighbor .. bfd line above, in which case this probably should merge in there (e.g. {{if neighbor.bfd_strict|default('') == '1' %}strict{{ endif }} at the end

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

frr works fine with this duplicate lines, but it would look cleaner on a single line I agree.

@AdSchellevis AdSchellevis self-assigned this Mar 21, 2026
@r3m8
Copy link
Copy Markdown
Contributor Author

r3m8 commented Mar 23, 2026

Ready for another review

@Monviech
Copy link
Copy Markdown
Member

I won't review this PR, but I want to have docs updates as requirement too before any merging here.

https://github.com/opnsense/docs/blob/master/source/manual/dynamic_routing.rst

check out this example:
opnsense/docs@9d5c1a4

@r3m8
Copy link
Copy Markdown
Contributor Author

r3m8 commented Mar 27, 2026

I won't review this PR, but I want to have docs updates as requirement too before any merging here.

https://github.com/opnsense/docs/blob/master/source/manual/dynamic_routing.rst

check out this example: opnsense/docs@9d5c1a4

Thanks for all the information ! I'll do that for other open PRs and maybe new ones in the future.

opnsense/docs#865

formatTokenizersUI();
$('.selectpicker').selectpicker('refresh');
updateServiceControlUI('quagga');
$('#neighbor\\.bfd').trigger('change');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expect you don't need this as the change event is triggered on all inputs on load anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants