From 7f6545b188b7ad00a2ba4bf2dc7281bca93f05bf Mon Sep 17 00:00:00 2001 From: Miaosen Wang Date: Mon, 23 Feb 2026 23:31:26 -0800 Subject: T8302: This PR adds Router Advertisement (RA) base-interface support for IPv6 wildcard prefix derivation and includes validation and smoketests. Included changes: - Add `base-interface` under: - `service router-advert interface prefix ::/64 base-interface ` - Render `Base6Interface ;` in `radvd.conf` when configured. - Add validation guard: - `base-interface` is only allowed with wildcard prefix `::/64`. - Extend smoketests: - Positive case: `::/64` + `base-interface` commits and renders correctly. - Negative case: non-`::/64` prefix with `base-interface` fails commit. --- src/conf_mode/service_router-advert.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/conf_mode/service_router-advert.py b/src/conf_mode/service_router-advert.py index 4345bea1d..86b0f8dd5 100755 --- a/src/conf_mode/service_router-advert.py +++ b/src/conf_mode/service_router-advert.py @@ -64,6 +64,9 @@ def verify(rtradv): if not (int(valid_lifetime) >= int(preferred_lifetime)): raise ConfigError('Prefix valid-lifetime must be greater then or equal to preferred-lifetime') + if 'base_interface' in prefix_config and prefix != '::/64': + raise ConfigError('Prefix base-interface can only be used together with the wildcard prefix "::/64"') + if 'nat64prefix' in interface_config: nat64_supported_lengths = [32, 40, 48, 56, 64, 96] for prefix, prefix_config in interface_config['nat64prefix'].items(): -- cgit v1.2.3