summaryrefslogtreecommitdiff
path: root/data/templates
diff options
context:
space:
mode:
authorCharles Surett <surettcharles@gmail.com>2021-04-02 17:40:02 -0400
committerChristian Poessinger <christian@poessinger.com>2021-04-12 21:51:59 +0200
commit86cb96ae1861908ea1fa6d1b0cbd1832661c8571 (patch)
treeae1749d2c4a9f39bb840c74f9126cc374d92743e /data/templates
parentb9fc9f1ea59861765b64d34dee3f7e46e6753e52 (diff)
downloadvyos-1x-86cb96ae1861908ea1fa6d1b0cbd1832661c8571.tar.gz
vyos-1x-86cb96ae1861908ea1fa6d1b0cbd1832661c8571.zip
interfaces: dhcp-client: T3454: add reject option
Sometimes a modem might give a local IP before it retrieves a WAN IP. This can be an issue with failover routes, since the default route will get overridden. (cherry picked from commit e8535616aae2bf0c20aacee6a4d0761183bae6d9)
Diffstat (limited to 'data/templates')
-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 %}
}