diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-07-05 12:25:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-05 12:25:44 +0200 |
commit | 373aacd2375f35400a351345b2fa849efdae0543 (patch) | |
tree | 9f21d48dff52fe9c22f6780d6feae33f11617a8a /src/conf_mode/dns_forwarding.py | |
parent | 1520deeddfb6928e0b7053a6f526909407868dfd (diff) | |
parent | 2bdf4798570222b57af2de2f0b443529abdc3feb (diff) | |
download | vyos-1x-373aacd2375f35400a351345b2fa849efdae0543.tar.gz vyos-1x-373aacd2375f35400a351345b2fa849efdae0543.zip |
Merge pull request #1389 from sever-sever/T4509
dns: T4509: Add dns64-prefix option
Diffstat (limited to 'src/conf_mode/dns_forwarding.py')
-rwxr-xr-x | src/conf_mode/dns_forwarding.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/conf_mode/dns_forwarding.py b/src/conf_mode/dns_forwarding.py index 41023c135..a96183b04 100755 --- a/src/conf_mode/dns_forwarding.py +++ b/src/conf_mode/dns_forwarding.py @@ -266,6 +266,12 @@ def verify(dns): if 'server' not in dns['domain'][domain]: raise ConfigError(f'No server configured for domain {domain}!') + if 'dns64_prefix' in dns: + dns_prefix = dns['dns64_prefix'].split('/')[1] + # RFC 6147 requires prefix /96 + if int(dns_prefix) != 96: + raise ConfigError('DNS forwarding "dns64-prefix" must be /96') + if ('authoritative_zone_errors' in dns) and dns['authoritative_zone_errors']: for error in dns['authoritative_zone_errors']: print(error) |