reapply BGP patches

This commit is contained in:
Fabian Franz
2017-04-15 08:57:25 +02:00
parent 04c0efcd87
commit c82e280b42
4 changed files with 26 additions and 21 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
PLUGIN_NAME= quagga
PLUGIN_VERSION= 1.0.0
PLUGIN_VERSION= 1.0.1
PLUGIN_COMMENT= Quagga Routing Suite
PLUGIN_DEPENDS= quagga
PLUGIN_MAINTAINER= franz.fabian.94@gmail.com
@@ -19,7 +19,7 @@
<field>
<id>neighbor.updatesource</id>
<label>Update-Source Interface</label>
<type>text</type>
<type>select_multiple</type>
<help>Physical name of the interface facing the peer</help>
</field>
<field>
@@ -45,9 +45,13 @@
<default></default>
<Required>Y</Required>
</remoteas>
<updatesource type="TextField">
<updatesource type="InterfaceField">
<default></default>
<Required>N</Required>
<multiple>N</multiple>
<filters>
<enable>/^(?!0).*$/</enable>
</filters>
</updatesource>
<nexthopself type="BooleanField">
<default>0</default>
@@ -1,4 +1,5 @@
{% if helpers.exists('OPNsense.quagga.bgp.enabled') and OPNsense.quagga.bgp.enabled == '1' %}
{% from 'OPNsense/Macros/interface.macro' import physical_interface %}
!
! Zebra configuration saved from vty
! 2017/03/03 20:21:04
@@ -8,27 +9,27 @@
!
{% if helpers.exists('OPNsense.quagga.bgp.asnumber') and OPNsense.quagga.bgp.asnumber != '' %}
router bgp {{ OPNsense.quagga.bgp.asnumber }}
{% if helpers.exists('OPNsense.quagga.bgp.networks') %}
{% for network in OPNsense.quagga.bgp.networks.split(',') %}
{% if helpers.exists('OPNsense.quagga.bgp.networks') %}
{% for network in OPNsense.quagga.bgp.networks.split(',') %}
network {{ network }}
{% endfor %}
{% endif %}
{% if helpers.exists('OPNsense.quagga.bgp.neighbors.neighbor') %}
{% for neighbor in helpers.toList('OPNsense.quagga.bgp.neighbors.neighbor') %}
{% if neighbor.enabled == '1' %}
neighbor {{ neighbor.address }} remote-as {{ neighbor.remoteas }}
{% if helpers.exists('OPNsense.quagga.bgp.neighbors.neighbor.updatesource') and OPNsense.quagga.bgp.neighbors.neighbor.updatesource != '' %}
neighbor {{ neighbor.address }} update-source {{ neighbor.updatesource }}
{% endif %}
{% if neighbor.nexthopself == '1' %}
{% endfor %}
{% endif %}
{% if helpers.exists('OPNsense.quagga.bgp.neighbors.neighbor') %}
{% for neighbor in helpers.toList('OPNsense.quagga.bgp.neighbors.neighbor') %}
{% if neighbor.enabled == '1' %}
neighbor {{ neighbor.address }} remote-as {{ neighbor.remoteas }}
{% if 'updatesource' in neighbor and neighbor.updatesource != '' %}
neighbor {{ neighbor.address }} update-source {{ physical_interface(neighbor.updatesource) }}
{% endif %}
{% if 'nexthopself' in neighbor and neighbor.nexthopself == '1' %}
neighbor {{ neighbor.address }} next-hop-self
{% endif %}
{% if neighbor.defaultoriginate == '1' %}
{% endif %}
{% if 'defaultoriginate' in neighbor and neighbor.defaultoriginate == '1' %}
neighbor {{ neighbor.address }} default-originate
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
!
line vty