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:23:33 +0200 |
commit | 8ef017a3496467433c311af63116af7657c58037 (patch) | |
tree | d222ed9d29639effcb33148373be061e91372f65 | |
parent | 367423acc33c7a5d1ee5f0f8980884026529f426 (diff) | |
download | vyos-1x-8ef017a3496467433c311af63116af7657c58037.tar.gz vyos-1x-8ef017a3496467433c311af63116af7657c58037.zip |
router-advert: T5240: verify() that no more then 3 IPv6 name-servers configured
This is a radvd limitation.
-rwxr-xr-x | src/conf_mode/service_router-advert.py | 4 | ||||
-rw-r--r-- | src/etc/systemd/system/radvd.service.d/override.conf | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/conf_mode/service_router-advert.py b/src/conf_mode/service_router-advert.py index 1b8377a4a..1dd973d67 100755 --- a/src/conf_mode/service_router-advert.py +++ b/src/conf_mode/service_router-advert.py @@ -93,6 +93,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_config: + if len(interface_config['name_server']) > 3: + raise ConfigError('No more then 3 IPv6 name-servers supported!') + if 'name_server_lifetime' in interface_config: # man page states: # The maximum duration how long the RDNSS entries are used for name diff --git a/src/etc/systemd/system/radvd.service.d/override.conf b/src/etc/systemd/system/radvd.service.d/override.conf index 472710a8b..812446dd9 100644 --- a/src/etc/systemd/system/radvd.service.d/override.conf +++ b/src/etc/systemd/system/radvd.service.d/override.conf @@ -16,3 +16,4 @@ ExecReload=/usr/sbin/radvd --logmethod stderr_clean --configtest --config /run/r ExecReload=/bin/kill -HUP $MAINPID PIDFile= PIDFile=/run/radvd/radvd.pid +Restart=always |