summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-12-10 13:02:25 +0100
committerGitHub <noreply@github.com>2023-12-10 13:02:25 +0100
commit5ff7613b3fbe2de244bfba57ced93a50156f6b75 (patch)
tree23a04798829f71337bec75f2f5bf98cbe4315c4d
parent6c6dae5179b17f9253c38d973dfa7e5cdaa0491e (diff)
parent51a2196e3d08c11ba3390fc53f19eb1df6ec2b0a (diff)
downloadvyos-1x-5ff7613b3fbe2de244bfba57ced93a50156f6b75.tar.gz
vyos-1x-5ff7613b3fbe2de244bfba57ced93a50156f6b75.zip
Merge pull request #2603 from vyos/mergify/bp/sagitta/pr-2602
T5791: DNS dynamic exclude check for dynamic interfaces PPPoE (backport #2602)
-rwxr-xr-xsrc/conf_mode/dns_dynamic.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/conf_mode/dns_dynamic.py b/src/conf_mode/dns_dynamic.py
index 3ddc8e7fd..c4dcb76ed 100755
--- a/src/conf_mode/dns_dynamic.py
+++ b/src/conf_mode/dns_dynamic.py
@@ -18,6 +18,7 @@ import os
from sys import exit
+from vyos.base import Warning
from vyos.config import Config
from vyos.configverify import verify_interface_exists
from vyos.template import render
@@ -88,7 +89,12 @@ def verify(dyndns):
# If dyndns address is an interface, ensure that it exists
# and that web-options are not set
if config['address'] != 'web':
- verify_interface_exists(config['address'])
+ # exclude check interface for dynamic interfaces
+ interface_filter = ('pppoe', 'sstpc')
+ if config['address'].startswith(interface_filter):
+ Warning(f'interface {config["address"]} does not exist!')
+ else:
+ verify_interface_exists(config['address'])
if 'web_options' in config:
raise ConfigError(f'"web-options" is applicable only when using HTTP(S) web request to obtain the IP address')