summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Felt <fatpelt@gmail.com>2026-03-26 08:02:44 +0000
committerPatrick Felt <fatpelt@gmail.com>2026-03-26 08:02:44 +0000
commit76e4cc7656fa339b5ca7797aa5148c4f62be9ab8 (patch)
treeeff63bf8112f9d1041ec67d2c29928ce2e4860c6
parent1c0de22b735fc398975b218b601f0d209a9985a0 (diff)
downloadvyos-1x-76e4cc7656fa339b5ca7797aa5148c4f62be9ab8.tar.gz
vyos-1x-76e4cc7656fa339b5ca7797aa5148c4f62be9ab8.zip
kea: T8408: Fixes to enable dhcp option 67
- convert to the simpler kea4_options dict - add the smoketest
-rw-r--r--python/vyos/kea.py14
-rwxr-xr-xpython/vyos/template.py1
-rwxr-xr-xsmoketest/scripts/cli/test_service_dhcp-server.py5
3 files changed, 6 insertions, 14 deletions
diff --git a/python/vyos/kea.py b/python/vyos/kea.py
index c692dcac0..c49292033 100644
--- a/python/vyos/kea.py
+++ b/python/vyos/kea.py
@@ -47,6 +47,7 @@ kea4_options = {
'captive_portal': 'v4-captive-portal',
'capwap_controller': 'capwap-ac-v4',
'interface_mtu': 'interface-mtu',
+ 'bootfile_name': 'boot-file-name'
}
kea6_options = {
@@ -165,7 +166,6 @@ def kea_parse_subnet(subnet, config):
if 'bootfile_name' in config['option']:
out['boot-file-name'] = config['option']['bootfile_name']
- out['option-data'].append({'name': 'boot-file-name', 'data': config['option']['bootfile_name']})
if 'bootfile_server' in config['option']:
out['next-server'] = config['option']['bootfile_server']
@@ -194,12 +194,6 @@ def kea_parse_subnet(subnet, config):
if 'bootfile_name' in range_config['option']:
pool['boot-file-name'] = range_config['option']['bootfile_name']
- pool['option-data'].append(
- {
- 'name': 'boot-file-name',
- 'data': range_config['option']['bootfile_name']
- }
- )
if 'bootfile_server' in range_config['option']:
pool['next-server'] = range_config['option']['bootfile_server']
@@ -236,12 +230,6 @@ def kea_parse_subnet(subnet, config):
reservation['boot-file-name'] = host_config['option'][
'bootfile_name'
]
- reservation['option-data'].append(
- {
- 'name': 'boot-file-name',
- 'data': host_config['option']['bootfile_name']
- }
- )
if 'bootfile_server' in host_config['option']:
reservation['next-server'] = host_config['option'][
diff --git a/python/vyos/template.py b/python/vyos/template.py
index d72479c85..2a783bc74 100755
--- a/python/vyos/template.py
+++ b/python/vyos/template.py
@@ -1031,7 +1031,6 @@ def kea_shared_network_json(shared_networks):
if 'bootfile_name' in config['option']:
network['boot-file-name'] = config['option']['bootfile_name']
- network['option-data'].append({'name': 'boot-file-name', 'data': config['option']['bootfile_name']})
if 'bootfile_server' in config['option']:
network['next-server'] = config['option']['bootfile_server']
diff --git a/smoketest/scripts/cli/test_service_dhcp-server.py b/smoketest/scripts/cli/test_service_dhcp-server.py
index 285b56dfe..d778f9c33 100755
--- a/smoketest/scripts/cli/test_service_dhcp-server.py
+++ b/smoketest/scripts/cli/test_service_dhcp-server.py
@@ -384,6 +384,11 @@ class TestServiceDHCPServer(VyOSUnitTestSHIM.TestCase):
self.verify_config_object(
obj,
['Dhcp4', 'shared-networks', 0, 'subnet4', 0, 'option-data'],
+ {'name': 'boot-file-name', 'data': bootfile_name},
+ )
+ self.verify_config_object(
+ obj,
+ ['Dhcp4', 'shared-networks', 0, 'subnet4', 0, 'option-data'],
{'name': 'domain-name', 'data': domain_name},
)
self.verify_config_object(