From 291a161106f5c239d72200ae62c10c01f5ed6e9f Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Wed, 13 Apr 2022 22:54:43 +0200 Subject: ndppd: T4333: migrate to new vyos_defined Jinja2 test --- data/templates/ndppd/ndppd.conf.tmpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'data/templates/ndppd') diff --git a/data/templates/ndppd/ndppd.conf.tmpl b/data/templates/ndppd/ndppd.conf.tmpl index 502dab5b8..c41392cc7 100644 --- a/data/templates/ndppd/ndppd.conf.tmpl +++ b/data/templates/ndppd/ndppd.conf.tmpl @@ -15,13 +15,13 @@ ######################################################## {% set global = namespace(ndppd_interfaces = [],ndppd_prefixs = []) %} -{% if source is defined and source.rule is defined and source.rule is not none %} +{% if source.rule is vyos_defined %} {% for rule, config in source.rule.items() if config.disable is not defined %} -{% if config.outbound_interface is defined %} +{% if config.outbound_interface is vyos_defined %} {% if config.outbound_interface not in global.ndppd_interfaces %} {% set global.ndppd_interfaces = global.ndppd_interfaces + [config.outbound_interface] %} {% endif %} -{% if config.translation is defined and config.translation.address is defined and config.translation.address | is_ip_network %} +{% if config.translation.address is vyos_defined and config.translation.address | is_ip_network %} {% set global.ndppd_prefixs = global.ndppd_prefixs + [{'interface':config.outbound_interface,'rule':config.translation.address}] %} {% endif %} {% endif %} -- cgit v1.2.3