diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-11-27 11:04:09 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-11-27 11:15:12 +0100 |
commit | fb7e761ae3efa8f17d9199f29dae2fdc1f51f188 (patch) | |
tree | 695bc152c37b0fd938417449aecbd450a136f5bb /data/templates | |
parent | 854052217684d1b27607050d21e826f3cfa2b142 (diff) | |
download | vyos-1x-fb7e761ae3efa8f17d9199f29dae2fdc1f51f188.tar.gz vyos-1x-fb7e761ae3efa8f17d9199f29dae2fdc1f51f188.zip |
igmp-proxy: T3088: migrate to get_config_dict()
Diffstat (limited to 'data/templates')
-rw-r--r-- | data/templates/igmp-proxy/igmpproxy.conf.tmpl | 51 |
1 files changed, 27 insertions, 24 deletions
diff --git a/data/templates/igmp-proxy/igmpproxy.conf.tmpl b/data/templates/igmp-proxy/igmpproxy.conf.tmpl index c7fc5cef5..e3966def3 100644 --- a/data/templates/igmp-proxy/igmpproxy.conf.tmpl +++ b/data/templates/igmp-proxy/igmpproxy.conf.tmpl @@ -2,36 +2,39 @@ # # autogenerated by igmp_proxy.py # -# The configuration file must define one upstream -# interface, and one or more downstream interfaces. +# The configuration file must define one upstream interface, and one or more +# downstream interfaces. # -# If multicast traffic originates outside the -# upstream subnet, the "altnet" option can be -# used in order to define legal multicast sources. -# (Se example...) +# If multicast traffic originates outside the upstream subnet, the "altnet" +# option can be used in order to define legal multicast sources. # -# The "quickleave" should be used to avoid saturation -# of the upstream link. The option should only -# be used if it's absolutely nessecary to -# accurately imitate just one Client. +# The "quickleave" should be used to avoid saturation of the upstream link. The +# option should only be used if it's absolutely nessecary to accurately imitate +# just one Client. # ######################################################## -{% if not disable_quickleave -%} +{% if disable_quickleave is not defined %} quickleave -{% endif -%} +{% endif %} +{% if interface is defined and interface is not none %} +{% for iface, config in interface.items() %} -{% for interface in interfaces %} -# Configuration for {{ interface.name }} ({{ interface.role }} interface) -{% if interface.role == 'disabled' -%} -phyint {{ interface.name }} disabled -{%- else -%} -phyint {{ interface.name }} {{ interface.role }} ratelimit 0 threshold {{ interface.threshold }} -{%- endif -%} -{%- for subnet in interface.alt_subnet %} +# Configuration for {{ iface }} ({{ config.role }} interface) +{% if config.role == 'disabled' %} +phyint {{ iface }} disabled +{% else %} +phyint {{ iface }} {{ config.role }} ratelimit 0 threshold {{ config.threshold }} +{% endif %} +{% if config.alt_subnet is defined and config.alt_subnet is not none %} +{% for subnet in config.alt_subnet %} altnet {{ subnet }} -{%- endfor %} -{%- for subnet in interface.whitelist %} +{% endfor %} +{% endif %} +{% if config.whitelist is defined and config.whitelist is not none %} +{% for subnet in config.whitelist %} whitelist {{ subnet }} -{%- endfor %} -{% endfor %} +{% endfor %} +{% endif %} +{% endfor %} +{% endif %} |