net/frr: Added BGP Network Import-Check (#3109)

This commit is contained in:
Patrik Kernstock
2022-10-12 11:38:19 +02:00
committed by GitHub
parent 4a2a3cf5de
commit 3e0372e05b
3 changed files with 19 additions and 3 deletions
@@ -31,13 +31,20 @@
<style>tokenize</style>
<type>select_multiple</type>
<allownew>true</allownew>
<help>Select the network to advertise, you have to set a Null route via System -> Routes</help>
<help>Defines which networks, which are connected to this router, will be advertised over BGP. To announce all defined networks, Network Import-Check can be disabled in advanced settings if required.</help>
</field>
<field>
<id>bgp.networkimportcheck</id>
<label>Network Import-Check</label>
<type>checkbox</type>
<advanced>true</advanced>
<help>When enabled (default), BGP only announces networks set at 'Network' if they are present in the routers routing table (alternatively, you can also set a null-route via System -> Routes). If disabled, all configured networks will be announced.</help>
</field>
<field>
<id>bgp.redistribute</id>
<label>Route Redistribution</label>
<type>select_multiple</type>
<help><![CDATA[Select other routing sources, which should be redistributed to the other nodes.]]></help>
<help>Select other routing sources, which should be redistributed to the other nodes.</help>
<hint>Type or select a route source.</hint>
</field>
</form>
@@ -1,7 +1,7 @@
<model>
<mount>//OPNsense/quagga/bgp</mount>
<description>BGP Routing configuration</description>
<version>1.0.6</version>
<version>1.0.7</version>
<items>
<enabled type="BooleanField">
<default>0</default>
@@ -21,6 +21,10 @@
<default>0</default>
<Required>Y</Required>
</graceful>
<networkimportcheck type="BooleanField">
<default>1</default>
<Required>Y</Required>
</networkimportcheck>
<networks type="CSVListField">
<default></default>
<Required>N</Required>
@@ -45,6 +45,11 @@ frr defaults {{ OPNsense.quagga.general.profile }}
router bgp {{ OPNsense.quagga.bgp.asnumber }}
no bgp default ipv4-unicast
no bgp ebgp-requires-policy
{% if helpers.exists('OPNsense.quagga.bgp.networkimportcheck') and OPNsense.quagga.bgp.networkimportcheck == '1' %}
bgp network import-check
{% else %}
no bgp network import-check
{% endif %}
{% if helpers.exists('OPNsense.quagga.bgp.graceful') and OPNsense.quagga.bgp.graceful == '1' %}
bgp graceful-restart
{% endif %}