Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T6681: Add option for SLAAC to support suppress Interval Advertisement in RA Packets #4022

Merged
merged 2 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/templates/router-advert/radvd.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface {{ iface }} {
{% if iface_config.reachable_time is vyos_defined %}
AdvReachableTime {{ iface_config.reachable_time }};
{% endif %}
AdvIntervalOpt {{ 'off' if iface_config.no_send_advert is vyos_defined else 'on' }};
AdvIntervalOpt {{ 'off' if iface_config.no_send_interval is vyos_defined else 'on' }};
AdvSendAdvert {{ 'off' if iface_config.no_send_advert is vyos_defined else 'on' }};
{% if iface_config.default_lifetime is vyos_defined %}
AdvDefaultLifetime {{ iface_config.default_lifetime }};
Expand Down
6 changes: 6 additions & 0 deletions interface-definitions/service_router-advert.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,12 @@
<valueless/>
</properties>
</leafNode>
<leafNode name="no-send-interval">
<properties>
<help>Do not send Advertisement Interval option in RAs</help>
<valueless/>
</properties>
</leafNode>
</children>
</tagNode>
</children>
Expand Down
29 changes: 29 additions & 0 deletions smoketest/scripts/cli/test_service_router-advert.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,5 +224,34 @@ def test_nat64prefix(self):
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)
Loading