diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-07-07 16:42:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-07 16:42:17 +0200 |
commit | 5b563a78e1bd20c03a77527052585f025d6e7b4b (patch) | |
tree | fdcf059a1bbacf51019d4d6a760f7abadd98e0d6 /src/conf_mode | |
parent | 484350192470147627f384bf759e913265b78be0 (diff) | |
parent | 483389af5db8a2ac4d258280ba132240c6df19d4 (diff) | |
download | vyos-1x-5b563a78e1bd20c03a77527052585f025d6e7b4b.tar.gz vyos-1x-5b563a78e1bd20c03a77527052585f025d6e7b4b.zip |
Merge pull request #1400 from c-po/t4509-pdns-6to4-equuleus
dns: T4509: Add dns64-prefix option (equuleus)
Diffstat (limited to 'src/conf_mode')
-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 bc3821f61..3f3a2e232 100755 --- a/src/conf_mode/dns_forwarding.py +++ b/src/conf_mode/dns_forwarding.py @@ -83,6 +83,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 6to4 prefix must be of length /96') + if 'system' in dns: if not 'system_name_server' in dns: print('Warning: No "system name-server" configured') |