summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/conf_mode/service_dhcp-server.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/conf_mode/service_dhcp-server.py b/src/conf_mode/service_dhcp-server.py
index b11fa7c1a..4c0d2cb0c 100755
--- a/src/conf_mode/service_dhcp-server.py
+++ b/src/conf_mode/service_dhcp-server.py
@@ -247,13 +247,14 @@ def verify(dhcp):
if mapping_config['ip_address'] in used_ips:
raise ConfigError(f'Configured IP address for static mapping "{mapping}" exists on another static mapping')
+ used_ips.append(mapping_config['ip_address'])
+ if 'mac' in mapping_config:
if mapping_config['mac'] in used_mac:
raise ConfigError(f'Configured MAC address for static mapping "{mapping}" exists on another static mapping')
-
- used_ips.append(mapping_config['ip_address'])
used_mac.append(mapping_config['mac'])
+
# There must be one subnet connected to a listen interface.
# This only counts if the network itself is not disabled!
if 'disable' not in network_config: