net/frr: BGP add bestpath route selection options (#5002)

This commit is contained in:
Monviech 2025-11-03 15:07:52 +01:00 committed by GitHub
parent b4f54361f0
commit 674f0a6fa5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 23 additions and 0 deletions

View file

@ -40,6 +40,13 @@
<allownew>true</allownew>
<help>Defines connected networks to be advertised over BGP. Disable Network Import-Check to announce all networks.</help>
</field>
<field>
<id>bgp.bestpath</id>
<label>Bestpath</label>
<type>select_multiple</type>
<advanced>true</advanced>
<help>Route selection modifiers that influence the best path.</help>
</field>
<field>
<id>bgp.networkimportcheck</id>
<label>Network Import-Check</label>

View file

@ -33,6 +33,17 @@
<Required>Y</Required>
</logneighborchanges>
<networks type="CSVListField"/>
<bestpath type="OptionField">
<OptionValues>
<as_path_confed value="as-path confed">as-path confed</as_path_confed>
<as_path_multipath_relax value="as-path multipath-relax">as-path multipath-relax</as_path_multipath_relax>
<compare_routerid value="compare-routerid">compare-routerid</compare_routerid>
<peer_type_multipath_relax value="peer-type multipath-relax">peer-type multipath-relax</peer_type_multipath_relax>
<aigp>aigp</aigp>
<med_missing_as_worst value="med missing-as-worst">med missing-as-worst</med_missing_as_worst>
</OptionValues>
<Multiple>Y</Multiple>
</bestpath>
<neighbors>
<neighbor type="ArrayField">
<enabled type="BooleanField">

View file

@ -42,6 +42,11 @@ router bgp {{ OPNsense.quagga.bgp.asnumber }}
{% if helpers.exists('OPNsense.quagga.bgp.graceful') and OPNsense.quagga.bgp.graceful == '1' %}
bgp graceful-restart
{% endif %}
{% if OPNsense.quagga.bgp.bestpath %}
{% for option in OPNsense.quagga.bgp.bestpath.split(',') %}
bgp bestpath {{ option }}
{% endfor %}
{% endif %}
{% if helpers.exists('OPNsense.quagga.bgp.routerid') and OPNsense.quagga.bgp.routerid != '' %}
bgp router-id {{ OPNsense.quagga.bgp.routerid }}
{% endif %}