diff options
| author | Miaosen Wang <secretandanon@gmail.com> | 2026-02-23 23:31:26 -0800 |
|---|---|---|
| committer | Miaosen Wang <secretandanon@gmail.com> | 2026-02-24 00:43:34 -0800 |
| commit | 7f6545b188b7ad00a2ba4bf2dc7281bca93f05bf (patch) | |
| tree | de3cd4ad1498eb95d26c9d8a017fff6819aec7e0 /src | |
| parent | 662b45c159393aa9451c93b168da415021949857 (diff) | |
| download | vyos-1x-7f6545b188b7ad00a2ba4bf2dc7281bca93f05bf.tar.gz vyos-1x-7f6545b188b7ad00a2ba4bf2dc7281bca93f05bf.zip | |
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 <lan-if> prefix ::/64 base-interface <wan-if>`
- Render `Base6Interface <wan-if>;` 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.
Diffstat (limited to 'src')
| -rwxr-xr-x | src/conf_mode/service_router-advert.py | 3 |
1 files changed, 3 insertions, 0 deletions
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(): |
