diff options
author | Christian Breunig <christian@breunig.cc> | 2023-05-28 15:23:33 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2023-05-28 15:35:30 +0200 |
commit | 2e841f7595deae6251e090c46d2bd70b22b9193f (patch) | |
tree | a5ddc097c0f11167aa6e7a551cb51c8f2b66a2fe /src/conf_mode/service_router-advert.py | |
parent | 0b85c416525eae06974763043bab4b0ec706c445 (diff) | |
download | vyos-1x-2e841f7595deae6251e090c46d2bd70b22b9193f.tar.gz vyos-1x-2e841f7595deae6251e090c46d2bd70b22b9193f.zip |
router-advert: T5240: verify() that no more then 3 IPv6 name-servers configured
This is a radvd limitation.
(cherry picked from commit 8ef017a3496467433c311af63116af7657c58037)
Diffstat (limited to 'src/conf_mode/service_router-advert.py')
-rwxr-xr-x | src/conf_mode/service_router-advert.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/conf_mode/service_router-advert.py b/src/conf_mode/service_router-advert.py index 367567bf6..d876ff0a9 100755 --- a/src/conf_mode/service_router-advert.py +++ b/src/conf_mode/service_router-advert.py @@ -95,6 +95,10 @@ 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 'name_server' in interface: + if len(interface['name_server']) > 3: + raise ConfigError('No more then 3 IPv6 name-servers supported!') + return None def generate(rtradv): |