summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-01-06 10:55:02 +0100
committerChristian Poessinger <christian@poessinger.com>2019-01-06 10:56:55 +0100
commit3223b33a555c614e799a3e968f8da4aff6d31fdf (patch)
tree69cc6e7dd2b4020a887fbd48ad3574bdeed29661
parente8cb7260689c0dec9cf86811a6a57f8851b2c151 (diff)
downloadvyos-1x-3223b33a555c614e799a3e968f8da4aff6d31fdf.tar.gz
vyos-1x-3223b33a555c614e799a3e968f8da4aff6d31fdf.zip
T1129: fix handling of raw DHCP 'subnet-parameters'
subnet-parameters were not added to the resulting configuration.
-rwxr-xr-xsrc/conf_mode/dhcp_server.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/conf_mode/dhcp_server.py b/src/conf_mode/dhcp_server.py
index 560c80e7f..c1f3c62dc 100755
--- a/src/conf_mode/dhcp_server.py
+++ b/src/conf_mode/dhcp_server.py
@@ -150,6 +150,12 @@ shared-network {{ network.name }} {
{%- if subnet.domain_name %}
option domain-name "{{ subnet.domain_name }}";
{%- endif -%}
+ {%- if subnet.subnet_parameters %}
+ # The following {{ subnet.subnet_parameters | length }} line(s) were added as subnet-parameters in the CLI and have not been validated
+ {%- for param in subnet.subnet_parameters %}
+ {{ param }}
+ {%- endfor -%}
+ {%- endif %}
{%- if subnet.tftp_server %}
option tftp-server-name "{{ subnet.tftp_server }}";
{%- endif -%}
@@ -570,7 +576,7 @@ def get_config():
#
# deprecate this and issue a warning like we do for DNS forwarding?
if conf.exists('subnet-parameters'):
- config['subnet_parameters'] = conf.return_values('subnet-parameters')
+ subnet['subnet_parameters'] = conf.return_values('subnet-parameters')
# This option is used to identify a TFTP server and, if supported by the client, should have
# the same effect as the server-name declaration. BOOTP clients are unlikely to support this