Skip to content

Commit

Permalink
T5791: DNS dynamic exclude check for dynamic interfaces PPPoE
Browse files Browse the repository at this point in the history
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

(cherry picked from commit 0a1c9bc)
  • Loading branch information
sever-sever authored and mergify[bot] committed Dec 10, 2023
1 parent 6c6dae5 commit 51a2196
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/conf_mode/dns_dynamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

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
Expand Down Expand Up @@ -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')

Expand Down

0 comments on commit 51a2196

Please sign in to comment.