summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2023-12-10 11:34:09 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2023-12-10 11:57:35 +0000
commit0a1c9bc38440c86cbbc016fb6d8f7d6f36993652 (patch)
treefd53f8b6b33ac86861540e1ea93cdcd9f3956ac3 /src
parent8258fedac0c38101051e660a37cb62fbdf6b4bce (diff)
downloadvyos-1x-0a1c9bc38440c86cbbc016fb6d8f7d6f36993652.tar.gz
vyos-1x-0a1c9bc38440c86cbbc016fb6d8f7d6f36993652.zip
T5791: DNS dynamic exclude check for dynamic interfaces PPPoE
Dynamic interfaces such as PPPoE/sstpc can not exist during verification dns dynamic. As they added and removed dynamically. Add interface_filter to exclude them from checks
Diffstat (limited to 'src')
-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')