net/frr: Add BGP remote-as internal and external to neighbors and peergroups (#4611)

This commit is contained in:
Monviech
2025-03-21 07:54:37 +01:00
committed by GitHub
parent 037cb532ea
commit 4a202ebcd2
6 changed files with 43 additions and 5 deletions
+1 -2
View File
@@ -1,6 +1,5 @@
PLUGIN_NAME= frr
PLUGIN_VERSION= 1.43
PLUGIN_REVISION= 1
PLUGIN_VERSION= 1.44
PLUGIN_COMMENT= The FRRouting Protocol Suite
PLUGIN_DEPENDS= frr8-pythontools
PLUGIN_MAINTAINER= ad@opnsense.org
+4
View File
@@ -12,6 +12,10 @@ WWW: https://frrouting.org/
Plugin Changelog
================
1.44
* Add BGP remote-as internal and external (opnsense/plugins/issues/4609)
1.43
* Use frr-reload instead of restarting the service on configuration changes (opnsense/plugins/issues/4529)
@@ -21,6 +21,15 @@
<type>text</type>
<help>Specify the IP address of the BGP neighbor.</help>
</field>
<field>
<id>neighbor.remote_as_mode</id>
<label>Remote AS mode</label>
<type>dropdown</type>
<help>"Use Remote AS Number" will use the number specified in the "Remote AS" field, while "External" or "Internal" will ignore it in favor of the alternative "remote-as internal" and "remote-as external" settings.</help>
<grid_view>
<visible>false</visible>
</grid_view>
</field>
<field>
<id>neighbor.remoteas</id>
<label>Remote AS</label>
@@ -15,6 +15,15 @@
<type>text</type>
<help>Name of the peer group.</help>
</field>
<field>
<id>peergroup.remote_as_mode</id>
<label>Remote AS mode</label>
<type>dropdown</type>
<help>"Use Remote AS Number" will use the number specified in the "Remote AS" field, while "External" or "Internal" will ignore it in favor of the alternative "remote-as internal" and "remote-as external" settings.</help>
<grid_view>
<visible>false</visible>
</grid_view>
</field>
<field>
<id>peergroup.remoteas</id>
<label>Remote AS</label>
@@ -63,6 +63,13 @@
<default></default>
<Required>Y</Required>
</address>
<remote_as_mode type="OptionField">
<BlankDesc>Use Remote AS Number</BlankDesc>
<OptionValues>
<internal>Internal</internal>
<external>External</external>
</OptionValues>
</remote_as_mode>
<remoteas type="IntegerField">
<MinimumValue>1</MinimumValue>
<MaximumValue>4294967295</MaximumValue>
@@ -418,8 +425,14 @@
<name type="TextField">
<Required>Y</Required>
</name>
<remote_as_mode type="OptionField">
<BlankDesc>Use Remote AS Number</BlankDesc>
<OptionValues>
<internal>Internal</internal>
<external>External</external>
</OptionValues>
</remote_as_mode>
<remoteas type="IntegerField">
<Required>Y</Required>
<MinimumValue>1</MinimumValue>
<MaximumValue>4294967295</MaximumValue>
</remoteas>
@@ -51,8 +51,10 @@ router bgp {{ OPNsense.quagga.bgp.asnumber }}
{% for peergroup in helpers.toList('OPNsense.quagga.bgp.peergroups.peergroup') %}
{% if peergroup.enabled == '1' %}
neighbor {{ peergroup.name }} peer-group
{% if 'remoteas' in peergroup and peergroup.remoteas != '' %}
{% if 'remoteas' in peergroup and peergroup.remoteas and not peergroup.remote_as_mode %}
neighbor {{ peergroup.name }} remote-as {{ peergroup.remoteas }}
{% else %}
neighbor {{ peergroup.name }} remote-as {{ peergroup.remote_as_mode }}
{% endif %}
{% if peergroup.updatesource %}
neighbor {{ peergroup.name }} update-source {{ physical_interface(peergroup.updatesource) }}
@@ -101,8 +103,10 @@ router bgp {{ OPNsense.quagga.bgp.asnumber }}
{% if helpers.exists('OPNsense.quagga.bgp.neighbors.neighbor') %}
{% for neighbor in helpers.toList('OPNsense.quagga.bgp.neighbors.neighbor') %}
{% if neighbor.enabled == '1' %}
{% if 'remoteas' in neighbor and neighbor.remoteas != '' %}
{% if 'remoteas' in neighbor and neighbor.remoteas and not neighbor.remote_as_mode %}
neighbor {{ neighbor.address }} remote-as {{ neighbor.remoteas }}
{% else %}
neighbor {{ neighbor.address }} remote-as {{ neighbor.remote_as_mode }}
{% endif %}
{% if neighbor.bfd|default('') == '1' %}
neighbor {{ neighbor.address }} bfd