diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2022-07-04 18:16:06 +0000 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-07-07 12:09:42 +0200 |
commit | 1577dc53f144d8a7c4438ca98a574102bea14c6b (patch) | |
tree | 37763e27fc7445e9058e40937cad2d0cb2d8a57c /smoketest/scripts | |
parent | f315714d0c680ad80a79dcdac21576407794dcd1 (diff) | |
download | vyos-1x-1577dc53f144d8a7c4438ca98a574102bea14c6b.tar.gz vyos-1x-1577dc53f144d8a7c4438ca98a574102bea14c6b.zip |
dns: T4509: Add dns64-prefix option
rfc6147: DNS Extensions for Network Address Translation
from IPv6 Clients to IPv4 Servers
set service dns forwarding dns64-prefix 2001:db8:aabb::/96
(cherry picked from commit 2bdf4798570222b57af2de2f0b443529abdc3feb)
Diffstat (limited to 'smoketest/scripts')
-rwxr-xr-x | smoketest/scripts/cli/test_service_dns_forwarding.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_service_dns_forwarding.py b/smoketest/scripts/cli/test_service_dns_forwarding.py index 44e27828d..c7e21320b 100755 --- a/smoketest/scripts/cli/test_service_dns_forwarding.py +++ b/smoketest/scripts/cli/test_service_dns_forwarding.py @@ -48,6 +48,7 @@ class TestServicePowerDNS(VyOSUnitTestSHIM.TestCase): # Check basic DNS forwarding settings cache_size = '20' negative_ttl = '120' + dns_prefix = '64:ff9b::/96' self.cli_set(base_path + ['cache-size', cache_size]) self.cli_set(base_path + ['negative-ttl', negative_ttl]) @@ -64,6 +65,12 @@ class TestServicePowerDNS(VyOSUnitTestSHIM.TestCase): for address in listen_adress: self.cli_set(base_path + ['listen-address', address]) + # Check dns64-prefix - must be prefix /96 + self.cli_set(base_path + ['dns64-prefix', '2001:db8:aabb::/64']) + with self.assertRaises(ConfigSessionError): + self.cli_commit() + self.cli_set(base_path + ['dns64-prefix', dns_prefix]) + # configure DNSSEC self.cli_set(base_path + ['dnssec', 'validate']) @@ -93,6 +100,10 @@ class TestServicePowerDNS(VyOSUnitTestSHIM.TestCase): tmp = get_config_value('export-etc-hosts') self.assertEqual(tmp, 'no') + # dns64-prefix + tmp = get_config_value('dns64-prefix') + self.assertEqual(tmp, dns_prefix) + # Check for running process self.assertTrue(process_named_running(PROCESS_NAME)) |