From 2e841f7595deae6251e090c46d2bd70b22b9193f Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sun, 28 May 2023 15:23:33 +0200 Subject: router-advert: T5240: verify() that no more then 3 IPv6 name-servers configured This is a radvd limitation. (cherry picked from commit 8ef017a3496467433c311af63116af7657c58037) --- src/conf_mode/service_router-advert.py | 4 ++++ src/etc/systemd/system/radvd.service.d/override.conf | 1 + 2 files changed, 5 insertions(+) (limited to 'src') 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 -- cgit v1.2.3