net/frr: add IntegerField for auto-cost calculation (#2144)

This commit is contained in:
Michael
2020-12-13 07:47:20 +01:00
committed by GitHub
parent 46196b9e24
commit 73cabd03e5
5 changed files with 21 additions and 1 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
PLUGIN_NAME= frr
PLUGIN_VERSION= 1.19
PLUGIN_VERSION= 1.20
PLUGIN_COMMENT= The FRRouting Protocol Suite
PLUGIN_DEPENDS= frr7 ruby
PLUGIN_MAINTAINER= franz.fabian.94@gmail.com
+4
View File
@@ -11,6 +11,10 @@ switching and routing, Internet access routers, and Internet peering.
Plugin Changelog
================
1.20
* Allow to adjust reference cost for OSPF calculation
1.19
* OSPF influence interface cost via carp
@@ -22,6 +22,13 @@
<advanced>true</advanced>
<help>If you have a CARP setup, you may want to configure a router id in case of a conflict.</help>
</field>
<field>
<id>ospf.costreference</id>
<label>Reference Cost</label>
<type>text</type>
<advanced>true</advanced>
<help>Here you can adjust the reference cost in Mbps for path calculation. Mostly needed when you bundle interfaces to higher bandwidth.</help>
</field>
<field>
<id>ospf.passiveinterfaces</id>
<label>Passive Interfaces</label>
@@ -16,6 +16,12 @@
<Required>N</Required>
<mask>/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/</mask>
</routerid>
<costreference type="IntegerField">
<Required>N</Required>
<MinimumValue>1</MinimumValue>
<MaximumValue>4294967</MaximumValue>
<ValidationMessage>Must be a number between 1 and 4294967.</ValidationMessage>
</costreference>
<originate type="BooleanField">
<default>0</default>
<Required>Y</Required>
@@ -38,6 +38,9 @@ interface {{ physical_interface(interface.interfacename) }}
{% endif %}
!
router ospf
{% if helpers.exists('OPNsense.quagga.ospf.costreference') and OPNsense.quagga.ospf.costreference != '' %}
auto-cost reference-bandwidth {{ OPNsense.quagga.ospf.costreference }}
{% endif %}
{% if helpers.exists('OPNsense.quagga.ospf.routerid') and OPNsense.quagga.ospf.routerid != '' %}
ospf router-id {{ OPNsense.quagga.ospf.routerid }}
{% endif %}