Page MenuHomeVyOS Platform

BGP: ORF send + receive causes unnecessary session resets on unrelated policy commits
In progress, NormalPublicBUG

Description

VyOS renders the ORF send and receive settings as two separate FRR configuration lines:

neighbor 192.0.2.2 capability orf prefix-list send
neighbor 192.0.2.2 capability orf prefix-list receive

When both are configured, FRR represents them as a single both line in its running configuration:

neighbor 192.0.2.2 capability orf prefix-list both

During a subsequent configuration reload, frr-reload.py does not recognize these representations as equivalent. It therefore removes both and reapplies send and receive, even though the ORF settings have not changed:

no neighbor 192.0.2.2 capability orf prefix-list both
neighbor 192.0.2.2 capability orf prefix-list send
neighbor 192.0.2.2 capability orf prefix-list receive

In the tested configuration, without Dynamic Capability enabled, this caused the BGP session to reset on unrelated policy commits.

The issue originates in data/templates/frr/bgpd.frr.j2, where two independent conditions render send and receive separately:

jinja2
{% if afi_config.capability.orf.prefix_list.send is vyos_defined %}
  neighbor {{ neighbor }} capability orf prefix-list send
{% endif %}
{% if afi_config.capability.orf.prefix_list.receive is vyos_defined %}
  neighbor {{ neighbor }} capability orf prefix-list receive
{% endif %}

The proposed fix is to check whether both settings are present first and render a single both line in that case. Using exclusive if/elif branches preserves the existing output for send-only, receive-only, and unset configurations. This aligns the generated configuration with FRR’s running configuration without changing the user-facing VyOS configuration syntax.

Details

Version
rolling (vyos-1x commit e559637d34e0)
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

c-po changed the task status from Open to In progress.Sun, Sep 27, 6:03 PM
c-po assigned this task to t.shiroma.
c-po triaged this task as Normal priority.
c-po changed Is it a breaking change? from Behavior change to Perfectly compatible.