diff options
author | Brandon Stepler <brandon@stepler.net> | 2021-01-06 23:44:00 -0500 |
---|---|---|
committer | Brandon Stepler <brandon@stepler.net> | 2021-01-06 23:44:00 -0500 |
commit | 98ec1ce377ea2d21323991af3eae8ab784eb9d02 (patch) | |
tree | 4fbf08c9caa3b9d5ee98bcf1c81a5526a25babc5 /python/vyos | |
parent | 0a1c218d010df4568d4c35ee9cf68c9affe24498 (diff) | |
download | vyos-1x-98ec1ce377ea2d21323991af3eae8ab784eb9d02.tar.gz vyos-1x-98ec1ce377ea2d21323991af3eae8ab784eb9d02.zip |
dhcpv6-pd: verify: T3193: detect conflict between auto-assigned and configured SLA-IDs
"data/templates/dhcp-client/ipv6.tmpl" handles the auto-assigning of SLA-IDs on
lines 39, 46, and 52.
Diffstat (limited to 'python/vyos')
-rw-r--r-- | python/vyos/configverify.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/python/vyos/configverify.py b/python/vyos/configverify.py index 48c858ba4..b4447306e 100644 --- a/python/vyos/configverify.py +++ b/python/vyos/configverify.py @@ -193,9 +193,11 @@ def verify_dhcpv6(config): raise ConfigError('DHCPv6-PD requires an interface where to assign ' 'the delegated prefix!') - for interface in interfaces: + for count, interface in enumerate(interfaces): if 'sla_id' in interfaces[interface]: sla_ids.append(interfaces[interface]['sla_id']) + else: + sla_ids.append(str(count)) # Check for duplicates duplicates = [x for n, x in enumerate(sla_ids) if x in sla_ids[:n]] |