diff options
author | Christian Breunig <christian@breunig.cc> | 2024-09-02 21:11:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-02 21:11:45 +0200 |
commit | 9a92c365faf9ef6a8ce30e003d05dc9a52d9b788 (patch) | |
tree | f3972de9131a3f94cfe3db67a0669ad380653b19 /smoketest | |
parent | 99556ee5e61f2335bffc827ba91a5aad6f4e7f99 (diff) | |
parent | e5508cd657b9ab17bbd84607195115d3ebbce0ff (diff) | |
download | vyos-1x-9a92c365faf9ef6a8ce30e003d05dc9a52d9b788.tar.gz vyos-1x-9a92c365faf9ef6a8ce30e003d05dc9a52d9b788.zip |
Merge pull request #4026 from vyos/mergify/bp/circinus/pr-4022
T6681: Add option for SLAAC to support suppress Interval Advertisement in RA Packets (backport #4022)
Diffstat (limited to 'smoketest')
-rwxr-xr-x | smoketest/scripts/cli/test_service_router-advert.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_service_router-advert.py b/smoketest/scripts/cli/test_service_router-advert.py index d1ff25a58..6dbb6add4 100755 --- a/smoketest/scripts/cli/test_service_router-advert.py +++ b/smoketest/scripts/cli/test_service_router-advert.py @@ -224,5 +224,34 @@ class TestServiceRADVD(VyOSUnitTestSHIM.TestCase): self.assertIn(tmp, config) self.assertIn('AdvValidLifetime 65528;', config) # default + def test_advsendadvert_advintervalopt(self): + ra_src = ['fe80::1', 'fe80::2'] + + self.cli_set(base_path + ['prefix', prefix]) + self.cli_set(base_path + ['no-send-advert']) + # commit changes + self.cli_commit() + + # Verify generated configuration + config = read_file(RADVD_CONF) + tmp = get_config_value('AdvSendAdvert') + self.assertEqual(tmp, 'off') + + tmp = get_config_value('AdvIntervalOpt') + self.assertEqual(tmp, 'on') + + self.cli_set(base_path + ['no-send-interval']) + # commit changes + self.cli_commit() + + # Verify generated configuration + config = read_file(RADVD_CONF) + tmp = get_config_value('AdvSendAdvert') + self.assertEqual(tmp, 'off') + + tmp = get_config_value('AdvIntervalOpt') + self.assertEqual(tmp, 'off') + + if __name__ == '__main__': unittest.main(verbosity=2) |