summaryrefslogtreecommitdiff
path: root/data/templates/dhcp-client/ipv4.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-04-05 16:25:49 +0200
committerGitHub <noreply@github.com>2021-04-05 16:25:49 +0200
commit43894aae17375b99ce10c6b1ccbd24533ae7d99e (patch)
treedd713e48937eca7c8ecab5ae87158b5060bd2e53 /data/templates/dhcp-client/ipv4.tmpl
parent1e66589d1f674f78c6989324d80ae82187b59698 (diff)
parente8535616aae2bf0c20aacee6a4d0761183bae6d9 (diff)
downloadvyos-1x-43894aae17375b99ce10c6b1ccbd24533ae7d99e.tar.gz
vyos-1x-43894aae17375b99ce10c6b1ccbd24533ae7d99e.zip
Merge pull request #799 from scj643/current
interfaces: dhcp-client: T3454: add reject option
Diffstat (limited to 'data/templates/dhcp-client/ipv4.tmpl')
-rw-r--r--data/templates/dhcp-client/ipv4.tmpl4
1 files changed, 4 insertions, 0 deletions
diff --git a/data/templates/dhcp-client/ipv4.tmpl b/data/templates/dhcp-client/ipv4.tmpl
index 71b429db6..c934b7cdb 100644
--- a/data/templates/dhcp-client/ipv4.tmpl
+++ b/data/templates/dhcp-client/ipv4.tmpl
@@ -20,5 +20,9 @@ interface "{{ ifname }}" {
# 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 %}
+ # Block addresses coming from theses dhcp servers if configured.
+ reject {{ dhcp_options.reject | join(', ') }};
+{% endif %}
}