summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-05-12 18:01:19 +0200
committerGitHub <noreply@github.com>2023-05-12 18:01:19 +0200
commit0224707acc7299b02eccdd1d2df434c4a57402b5 (patch)
tree98d05417f52baacd9c88442f41dbcd5fd20af004 /src
parent25545b1e3cf2e94f3521e4ed80ce744f4b08683e (diff)
parent9fc53924271c151e3e5229a64acec35006d4f7fe (diff)
downloadvyos-1x-0224707acc7299b02eccdd1d2df434c4a57402b5.tar.gz
vyos-1x-0224707acc7299b02eccdd1d2df434c4a57402b5.zip
Merge pull request #2002 from Zen3515/fix-cloudflare-ddns
T5219: ddclient: Allow not set login for Cloudflare API token
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/dynamic_dns.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/conf_mode/dynamic_dns.py b/src/conf_mode/dynamic_dns.py
index 06a2f7e15..426e3d693 100755
--- a/src/conf_mode/dynamic_dns.py
+++ b/src/conf_mode/dynamic_dns.py
@@ -108,7 +108,8 @@ def verify(dyndns):
raise ConfigError(f'"host-name" {error_msg}')
if 'login' not in config:
- raise ConfigError(f'"login" (username) {error_msg}')
+ if service != 'cloudflare' and ('protocol' not in config or config['protocol'] != 'cloudflare'):
+ raise ConfigError(f'"login" (username) {error_msg}, unless using CloudFlare')
if 'password' not in config:
raise ConfigError(f'"password" {error_msg}')