net/frr: Fix passive interface generation in ospf (#4594)

This commit is contained in:
Monviech
2025-03-13 19:33:00 +01:00
committed by GitHub
parent 931f2c5d7a
commit 8e95b6ed46
2 changed files with 6 additions and 8 deletions
+1
View File
@@ -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