summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python/vyos/kea.py6
-rwxr-xr-xsmoketest/scripts/cli/test_service_dhcp-server.py3
2 files changed, 9 insertions, 0 deletions
diff --git a/python/vyos/kea.py b/python/vyos/kea.py
index 8dcd0d6eb..e38347012 100644
--- a/python/vyos/kea.py
+++ b/python/vyos/kea.py
@@ -216,6 +216,9 @@ def kea_parse_subnet(subnet, config):
if 'disable' in host_config:
continue
+ if 'mac' not in host_config and 'duid' not in host_config:
+ continue
+
reservation = {
'hostname': host,
}
@@ -354,6 +357,9 @@ def kea6_parse_subnet(subnet, config):
if 'disable' in host_config:
continue
+ if 'mac' not in host_config and 'duid' not in host_config:
+ continue
+
reservation = {'hostname': host}
if 'mac' in host_config:
diff --git a/smoketest/scripts/cli/test_service_dhcp-server.py b/smoketest/scripts/cli/test_service_dhcp-server.py
index f1929b71e..47e26fc84 100755
--- a/smoketest/scripts/cli/test_service_dhcp-server.py
+++ b/smoketest/scripts/cli/test_service_dhcp-server.py
@@ -664,6 +664,9 @@ class TestServiceDHCPServer(VyOSUnitTestSHIM.TestCase):
self.cli_delete(pool + ['static-mapping', 'dupe3'])
self.cli_delete(pool + ['static-mapping', 'dupe4'])
+ # Create blank static mapping, will not be present in resulting config
+ self.cli_set(pool + ['static-mapping', 'blank'])
+
# commit changes
self.cli_commit()