mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net/frr: Fix passive interface generation in ospf (#4594)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
PLUGIN_NAME= frr
|
||||
PLUGIN_VERSION= 1.43
|
||||
PLUGIN_REVISION= 1
|
||||
PLUGIN_COMMENT= The FRRouting Protocol Suite
|
||||
PLUGIN_DEPENDS= frr8-pythontools
|
||||
PLUGIN_MAINTAINER= ad@opnsense.org
|
||||
|
||||
@@ -9,20 +9,17 @@
|
||||
agentx
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% set passive_interfaces = [] %}
|
||||
{% if helpers.exists('OPNsense.quagga.ospf.passiveinterfaces') and OPNsense.quagga.ospf.passiveinterfaces != '' %}
|
||||
{% for line in OPNsense.quagga.ospf.passiveinterfaces.split(',') %}
|
||||
{% set iface = physical_interface(line) %}
|
||||
{% set _ = passive_interfaces.append(iface) %}
|
||||
interface {{ iface }}
|
||||
{% if OPNsense.quagga.ospf.passiveinterfaces %}
|
||||
{% for iface in OPNsense.quagga.ospf.passiveinterfaces.split(',') %}
|
||||
interface {{ helpers.physical_interface(iface) }}
|
||||
ip ospf passive
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{# Render only the enabled non-passive interfaces past this point #}
|
||||
{# vtysh automatically merges passive interfaces with interfaces below #}
|
||||
{% if helpers.exists('OPNsense.quagga.ospf.interfaces.interface') %}
|
||||
{% for interface in helpers.toList('OPNsense.quagga.ospf.interfaces.interface') %}
|
||||
{% set iface = physical_interface(interface.interfacename) %}
|
||||
{% if interface.enabled == '1' and iface not in passive_interfaces %}
|
||||
{% if interface.enabled == '1' %}
|
||||
interface {{ iface }}
|
||||
{% if interface.bfd|default('') == '1' %}
|
||||
ip ospf bfd
|
||||
|
||||
Reference in New Issue
Block a user