diff options
author | Yuxiang Zhu <vfreex@gmail.com> | 2023-09-03 19:27:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-03 13:27:54 +0200 |
commit | 630d40046b4fd1b58060c42a075e19d870ac69ba (patch) | |
tree | c23842284ebb2b966bdc95025e4262ca0dabb8fe /data | |
parent | 1ae9c4162dc13844ec0f028a51b4b2d111954196 (diff) | |
download | vyos-1x-630d40046b4fd1b58060c42a075e19d870ac69ba.tar.gz vyos-1x-630d40046b4fd1b58060c42a075e19d870ac69ba.zip |
T5543: IGMP: fix source address handling in static joins
The following command expects to join source-specific multicast group 239.1.2.3
on interface eth0, where the source address is 192.0.2.1.
set protocols igmp interface eth0 join 239.1.2.3 source 192.0.2.1
This command should generate FRR config:
interface eth0
ip igmp
ip igmp join 239.1.2.3 192.0.2.1
exit
However, there is a bug in the Jinja template where `if ifaces[iface].gr_join[group]`
is mostly evaluated as `false` because `iface` is a loop variable from another loop.
Diffstat (limited to 'data')
-rw-r--r-- | data/templates/frr/igmp.frr.j2 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/data/templates/frr/igmp.frr.j2 b/data/templates/frr/igmp.frr.j2 index ce1f8fdda..b75884484 100644 --- a/data/templates/frr/igmp.frr.j2 +++ b/data/templates/frr/igmp.frr.j2 @@ -27,9 +27,9 @@ interface {{ interface }} {% if interface_config.query_max_resp_time %} ip igmp query-max-response-time {{ interface_config.query_max_resp_time }} {% endif %} -{% for group in interface_config.gr_join %} -{% if ifaces[iface].gr_join[group] %} -{% for source in ifaces[iface].gr_join[group] %} +{% for group, sources in interface_config.gr_join.items() %} +{% if sources is vyos_defined %} +{% for source in sources %} ip igmp join {{ group }} {{ source }} {% endfor %} {% else %} |