summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/conf_mode/dhcpv6_server.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/conf_mode/dhcpv6_server.py b/src/conf_mode/dhcpv6_server.py
index d2769466e..039321430 100755
--- a/src/conf_mode/dhcpv6_server.py
+++ b/src/conf_mode/dhcpv6_server.py
@@ -397,6 +397,12 @@ def verify(dhcpv6):
'in shared network {2} is outside subnet {3}!' \
.format(mapping['ipv6_address'], mapping['name'], network['name'], subnet['network']))
+ # Subnets must be unique
+ if subnet['network'] in subnets:
+ raise ConfigError('DHCPv6 subnets must be unique! Subnet {0} defined multiple times!'.format(subnet['network']))
+ else:
+ subnets.append(subnet['network'])
+
# DHCPv6 requires at least one configured address range or one static mapping
# (FIXME: is not actually checked right now?)