Page MenuHomeVyOS Platform

dhcp_server.patch

Authored By
patanne
Jan 6 2019, 3:05 AM
Size
2 KB
Referenced Files
None
Subscribers
None

dhcp_server.patch

*** ~/dhcp_server.py 2019-01-03 02:47:12.246518015 -0500
--- /usr/libexec/vyos/conf_mode/dhcp_server.py 2019-01-03 06:26:41.756600189 -0500
***************
*** 150,155 ****
--- 150,161 ----
{%- 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,576 ****
#
# 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')
# 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
--- 576,582 ----
#
# deprecate this and issue a warning like we do for DNS forwarding?
if conf.exists('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
***************
*** 767,772 ****
--- 773,779 ----
tmpl = jinja2.Template(config_tmpl)
config_text = tmpl.render(dhcp)
+ config_text = config_text.replace(""",'"')
with open(config_file, 'w') as f:
f.write(config_text)

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ea/ee/99f6d1b14935bfe195dcb4a23530
Default Alt Text
dhcp_server.patch (2 KB)

Event Timeline