Development

This commit is contained in:
Matthew Grotke 2026-05-31 02:17:25 -04:00
parent 84118a4c2b
commit 916d238602
9 changed files with 51 additions and 51 deletions

View file

@ -460,7 +460,7 @@ def validate_config(data):
f"any server_identity IP. Must be one of: "
f"{[str(ip) for ip in identity_ips]}."
)
dns = eo.get("dns_server", "")
dns = eo.get("dns_servers", "")
if dns and not ipv4(dns):
errors.append(f"{label}: vpn_information.explicit_overrides.dns_server '{dns}' is not a valid IPv4 address.")
mtu = eo.get("mtu", "")
@ -564,14 +564,14 @@ def validate_config(data):
f"any server_identity IP. Must be one of: "
f"{[str(ip) for ip in identity_ips]}."
)
dns = eo.get("dns_server", "")
dns = eo.get("dns_servers", "")
if dns:
for _ip in (dns if isinstance(dns, list) else [dns]):
check_ip("explicit_overrides.dns_server", _ip)
ntp = eo.get("ntp_server", "")
check_ip("explicit_overrides.dns_servers", _ip)
ntp = eo.get("ntp_servers", "")
if ntp:
for _ip in (ntp if isinstance(ntp, list) else [ntp]):
check_ip("explicit_overrides.ntp_server", _ip)
check_ip("explicit_overrides.ntp_servers", _ip)
pool_start = check_ip("dynamic_pool_start", d["dynamic_pool_start"])
pool_end = check_ip("dynamic_pool_end", d["dynamic_pool_end"])