Skip to content

Commit 14dda8a

Browse files
authored
net/frr - BFD for OSPF (opnsense#3488)
* BFD for OSPF/OSPF6
1 parent f37375f commit 14dda8a

File tree

7 files changed

+28
-2
lines changed

7 files changed

+28
-2
lines changed

net/frr/src/opnsense/mvc/app/controllers/OPNsense/Quagga/forms/dialogEditOSPF6Interface.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@
6363
<label>Priority</label>
6464
<type>text</type>
6565
</field>
66+
<field>
67+
<id>interface.bfd</id>
68+
<label>BFD</label>
69+
<type>checkbox</type>
70+
<help>You can enable BFD support for this interface. You will also need to configure BFD peers.</help>
71+
</field>
6672
<field>
6773
<id>interface.networktype</id>
6874
<label>Network Type</label>

net/frr/src/opnsense/mvc/app/controllers/OPNsense/Quagga/forms/dialogEditOSPFInterface.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@
7474
<label>Priority</label>
7575
<type>text</type>
7676
</field>
77+
<field>
78+
<id>interface.bfd</id>
79+
<label>BFD</label>
80+
<type>checkbox</type>
81+
<help>You can enable BFD support for this interface. You will also need to configure BFD peers.</help>
82+
</field>
7783
<field>
7884
<id>interface.networktype</id>
7985
<label>Network Type</label>

net/frr/src/opnsense/mvc/app/models/OPNsense/Quagga/OSPF.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,10 @@
217217
<MaximumValue>4294967295</MaximumValue>
218218
<ValidationMessage>Priority must be between 0 and 4294967295.</ValidationMessage>
219219
</priority>
220+
<bfd type="BooleanField">
221+
<default>0</default>
222+
<Required>N</Required>
223+
</bfd>
220224
<networktype type="OptionField">
221225
<Required>N</Required>
222226
<multiple>N</multiple>

net/frr/src/opnsense/mvc/app/models/OPNsense/Quagga/OSPF6.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@
102102
<MaximumValue>4294967295</MaximumValue>
103103
<ValidationMessage>Priority must be between 0 and 4294967295.</ValidationMessage>
104104
</priority>
105+
<bfd type="BooleanField">
106+
<default>0</default>
107+
<Required>N</Required>
108+
</bfd>
105109
<networktype type="OptionField">
106110
<Required>N</Required>
107111
<multiple>N</multiple>

net/frr/src/opnsense/service/templates/OPNsense/Quagga/bgpd.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ router bgp {{ OPNsense.quagga.bgp.asnumber }}
6060
{% for neighbor in helpers.toList('OPNsense.quagga.bgp.neighbors.neighbor') %}
6161
{% if neighbor.enabled == '1' %}
6262
neighbor {{ neighbor.address }} remote-as {{ neighbor.remoteas }}
63-
{% if 'bfd' in neighbor and neighbor.bfd == '1' %}
63+
{% if neighbor.bfd|default('') == '1' %}
6464
neighbor {{ neighbor.address }} bfd
6565
{% endif %}
6666
{% if 'password' in neighbor and neighbor.password != '' %}
@@ -107,7 +107,7 @@ router bgp {{ OPNsense.quagga.bgp.asnumber }}
107107
network {{ network }}
108108
{% endfor %}
109109
{% for neighbor in neighbors[addressFamily] %}
110-
neighbor {{ neighbor.address }} activate
110+
neighbor {{ neighbor.address }} activate
111111
{% if 'nexthopself' in neighbor and neighbor.nexthopself == '1' %}
112112
neighbor {{ neighbor.address }} next-hop-self {% if 'nexthopselfall' in neighbor and neighbor.nexthopselfall == '1' %}all{% endif %}
113113

net/frr/src/opnsense/service/templates/OPNsense/Quagga/ospf6d.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ agentx
2525
{% for interface in helpers.toList('OPNsense.quagga.ospf6.interfaces.interface') %}
2626
{% if interface.enabled == '1' %}
2727
interface {{ physical_interface(interface.interfacename) }}
28+
{% if interface.bfd|default('') == '1' %}
29+
ipv6 ospf6 bfd
30+
{% endif %}
2831
{% if interface.networktype %}
2932
ipv6 ospf6 network {{ interface.networktype }}
3033
{% endif %}

net/frr/src/opnsense/service/templates/OPNsense/Quagga/ospfd.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ agentx
2525
{% for interface in helpers.toList('OPNsense.quagga.ospf.interfaces.interface') %}
2626
{% if interface.enabled == '1' %}
2727
interface {{ physical_interface(interface.interfacename) }}
28+
{% if interface.bfd|default('') == '1' %}
29+
ip ospf bfd
30+
{% endif %}
2831
{% if interface.networktype %}
2932
{{ cline("network",interface.networktype)
3033
}}{% endif %}

0 commit comments

Comments
 (0)