Skip to content

Commit

Permalink
net/frr: add default-metric to RIP (opnsense#1601)
Browse files Browse the repository at this point in the history
* Update pkg-descr

* Update rip.xml

* Update RIP.xml

* Update ripd.conf

* Update ripd.conf

* Update net/frr/src/opnsense/mvc/app/controllers/OPNsense/Quagga/forms/rip.xml

Co-Authored-By: Fabian Franz BSc <[email protected]>
  • Loading branch information
mimugmail and fabianfrz committed Dec 2, 2019
1 parent 9261cca commit cf49a53
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions net/frr/pkg-descr
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Plugin Changelog
1.13

* Fix wrong match statement for IPv6 route-maps
* Allow to set default-metric for RIP protocol

1.12

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,10 @@
<allownew>true</allownew>
<help>Enter your networks in CIDR notation like 127.0.0.0/8.</help>
</field>
<field>
<id>rip.defaultmetric</id>
<label>Default Metric</label>
<type>text</type>
<help>Set the default metric to a value between 1 and 16.</help>
</field>
</form>
8 changes: 6 additions & 2 deletions net/frr/src/opnsense/mvc/app/models/OPNsense/Quagga/RIP.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<model>
<mount>//OPNsense/quagga/rip</mount>
<description>RIP Routing configuration</description>
<version>1.0.1</version>
<version>1.0.2</version>
<items>
<enabled type="BooleanField">
<default>0</default>
Expand All @@ -18,7 +18,6 @@
<Required>Y</Required>
<mask>/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/\d{1,2},)*(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/\d{1,2})$/</mask>
</networks>

<passiveinterfaces type="InterfaceField">
<Required>N</Required>
<multiple>Y</multiple>
Expand All @@ -40,5 +39,10 @@
<static>Statically configured routes</static>
</OptionValues>
</redistribute>
<defaultmetric type="IntegerField">
<MinimumValue>1</MinimumValue>
<MaximumValue>16</MaximumValue>
<Required>N</Required>
</defaultmetric>
</items>
</model>
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ router rip
{% for line in OPNsense.quagga.rip.passiveinterfaces.split(',') %}
passive-interface {{ physical_interface(line) }}
{% endfor %}{% endif %}
{% if helpers.exists('OPNsense.quagga.rip.defaultmetric') and OPNsense.quagga.rip.defaultmetric != '' %}
default-metric {{ OPNsense.quagga.rip.defaultmetric }}
{% endif %}
!
line vty
!
Expand Down

0 comments on commit cf49a53

Please sign in to comment.