mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/frr: Add bgp listen range to peer groups (#4722)
This commit is contained in:
+8
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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') %}
|
||||
|
||||
Reference in New Issue
Block a user