net/frr: Add bgp listen range to peer groups (#4722)

This commit is contained in:
Monviech 2025-05-27 17:01:17 +02:00 committed by GitHub
parent 248fa0c978
commit b24cec3208
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 20 additions and 0 deletions

View file

@ -33,6 +33,14 @@
<visible>false</visible>
</grid_view>
</field>
<field>
<id>peergroup.listenranges</id>
<label>Listen Ranges</label>
<type>select_multiple</type>
<style>tokenize</style>
<allownew>true</allownew>
<help>Enter one or multiple IP networks in CIDR notation. Accept connections from any peers in the specified prefix.</help>
</field>
<field>
<id>peergroup.updatesource</id>
<label>Update-Source Interface</label>

View file

@ -439,6 +439,13 @@
<MinimumValue>1</MinimumValue>
<MaximumValue>4294967295</MaximumValue>
</remoteas>
<listenranges type="NetworkField">
<FieldSeparator>,</FieldSeparator>
<AsList>Y</AsList>
<Strict>Y</Strict>
<NetMaskRequired>Y</NetMaskRequired>
<ValidationMessage>Please enter one or multiple valid IP networks in CIDR notation.</ValidationMessage>
</listenranges>
<updatesource type="InterfaceField">
<AllowDynamic>Y</AllowDynamic>
<filters>

View file

@ -98,6 +98,11 @@ router bgp {{ OPNsense.quagga.bgp.asnumber }}
{% endif %}
{% endfor %}
{% endif %}
{% if peergroup.listenranges %}
{% for prefix in peergroup.listenranges.split(',') %}
bgp listen range {{ prefix }} peer-group {{ peergroup.name }}
{% endfor %}
{% endif %}
{% endif %}
{% endfor %}
{% if helpers.exists('OPNsense.quagga.bgp.neighbors.neighbor') %}