summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-06-24 16:28:26 +0200
committerGitHub <noreply@github.com>2023-06-24 16:28:26 +0200
commit9c756d5dd20ee059b76a3e8ba2d5602e5a9bbefc (patch)
treea5ddc097c0f11167aa6e7a551cb51c8f2b66a2fe /src
parent0b85c416525eae06974763043bab4b0ec706c445 (diff)
parent2e841f7595deae6251e090c46d2bd70b22b9193f (diff)
downloadvyos-1x-9c756d5dd20ee059b76a3e8ba2d5602e5a9bbefc.tar.gz
vyos-1x-9c756d5dd20ee059b76a3e8ba2d5602e5a9bbefc.zip
Merge pull request #2019 from c-po/t5240-backport-radvd
router-advert: T5240: verify() that no more then 3 IPv6 name-servers configured
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/service_router-advert.py4
-rw-r--r--src/etc/systemd/system/radvd.service.d/override.conf1
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 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):
diff --git a/src/etc/systemd/system/radvd.service.d/override.conf b/src/etc/systemd/system/radvd.service.d/override.conf
index c2f640cf5..ecea031bc 100644
--- a/src/etc/systemd/system/radvd.service.d/override.conf
+++ b/src/etc/systemd/system/radvd.service.d/override.conf
@@ -15,3 +15,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