summaryrefslogtreecommitdiff
path: root/data/templates/dhcp-client/ipv4.tmpl
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2022-04-08 18:54:44 +0300
committerGitHub <noreply@github.com>2022-04-08 18:54:44 +0300
commitf43031ec4591662fadee3176fe1ace2ac018a9df (patch)
tree9c96321f2432ee11db826a7051b4b5adefc030c5 /data/templates/dhcp-client/ipv4.tmpl
parentb75b351b7dd2ec87407f98668468b1fc146428bf (diff)
parent2bf7589e926b3d5f2f7aee0f98505eeb14fc826d (diff)
downloadvyos-1x-f43031ec4591662fadee3176fe1ace2ac018a9df.tar.gz
vyos-1x-f43031ec4591662fadee3176fe1ace2ac018a9df.zip
Merge branch 'current' into T4344
Diffstat (limited to 'data/templates/dhcp-client/ipv4.tmpl')
-rw-r--r--data/templates/dhcp-client/ipv4.tmpl8
1 files changed, 4 insertions, 4 deletions
diff --git a/data/templates/dhcp-client/ipv4.tmpl b/data/templates/dhcp-client/ipv4.tmpl
index b3e74c22b..83fb93dc1 100644
--- a/data/templates/dhcp-client/ipv4.tmpl
+++ b/data/templates/dhcp-client/ipv4.tmpl
@@ -7,7 +7,7 @@ initial-interval 2;
interface "{{ ifname }}" {
send host-name "{{ dhcp_options.host_name }}";
-{% if dhcp_options.client_id is defined and dhcp_options.client_id is not none %}
+{% if dhcp_options.client_id is vyos_defined %}
{% set client_id = dhcp_options.client_id %}
{# Use HEX representation of client-id as it is send in MAC-address style using hex characters. If not HEX, use double quotes ASCII format #}
{% if not dhcp_options.client_id.split(':') | length >= 5 %}
@@ -15,18 +15,18 @@ interface "{{ ifname }}" {
{% endif %}
send dhcp-client-identifier {{ client_id }};
{% endif %}
-{% if dhcp_options.vendor_class_id is defined and dhcp_options.vendor_class_id is not none %}
+{% if dhcp_options.vendor_class_id is vyos_defined %}
send vendor-class-identifier "{{ dhcp_options.vendor_class_id }}";
{% endif %}
# The request statement causes the client to request that any server responding to the
# client send the client its values for the specified options.
- request subnet-mask, broadcast-address,{{ " routers," if dhcp_options.no_default_route is not defined }} domain-name-servers,
+ request subnet-mask, broadcast-address,{{ " routers," if dhcp_options.no_default_route is not vyos_defined }} domain-name-servers,
rfc3442-classless-static-routes, domain-name, interface-mtu;
# The require statement lists options that must be sent in order for an offer to be
# accepted. Offers that do not contain all the listed options will be ignored!
require subnet-mask;
-{% if dhcp_options.reject is defined and dhcp_options.reject is not none %}
+{% if dhcp_options.reject is vyos_defined %}
# Block addresses coming from theses dhcp servers if configured.
reject {{ dhcp_options.reject | join(', ') }};
{% endif %}