Skip to content

Commit

Permalink
Merge pull request #2603 from vyos/mergify/bp/sagitta/pr-2602
Browse files Browse the repository at this point in the history
T5791: DNS dynamic exclude check for dynamic interfaces PPPoE (backport #2602)
  • Loading branch information
c-po authored Dec 10, 2023
2 parents 6c6dae5 + 51a2196 commit 5ff7613
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 5ff7613

Please sign in to comment.