summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYuxiang Zhu <vfreex@gmail.com>2023-09-03 19:27:54 +0800
committerGitHub <noreply@github.com>2023-09-03 13:27:54 +0200
commit630d40046b4fd1b58060c42a075e19d870ac69ba (patch)
treec23842284ebb2b966bdc95025e4262ca0dabb8fe /src
parent1ae9c4162dc13844ec0f028a51b4b2d111954196 (diff)
downloadvyos-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 'src')
-rwxr-xr-xsrc/conf_mode/protocols_igmp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/conf_mode/protocols_igmp.py b/src/conf_mode/protocols_igmp.py
index f6097e282..435189025 100755
--- a/src/conf_mode/protocols_igmp.py
+++ b/src/conf_mode/protocols_igmp.py
@@ -102,7 +102,7 @@ def verify(igmp):
# Check, is this multicast group
for intfc in igmp['ifaces']:
for gr_addr in igmp['ifaces'][intfc]['gr_join']:
- if IPv4Address(gr_addr) < IPv4Address('224.0.0.0'):
+ if not IPv4Address(gr_addr).is_multicast:
raise ConfigError(gr_addr + " not a multicast group")
def generate(igmp):