From f6efe3035d352970dc492450c3c9ddf710dda5fe Mon Sep 17 00:00:00 2001 From: initramfs Date: Sun, 31 Jul 2022 09:35:00 +0800 Subject: router-advert: T4582: fix preferred cannot equal valid lifetime Allows preferred lifetime for prefix advertisements to equal the configured valid lifetime as per RFC 4861. --- src/conf_mode/service_router-advert.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf_mode/service_router-advert.py b/src/conf_mode/service_router-advert.py index ff7caaa84..1b8377a4a 100755 --- a/src/conf_mode/service_router-advert.py +++ b/src/conf_mode/service_router-advert.py @@ -90,8 +90,8 @@ def verify(rtradv): if preferred_lifetime == 'infinity': preferred_lifetime = 4294967295 - if not (int(valid_lifetime) > int(preferred_lifetime)): - raise ConfigError('Prefix valid-lifetime must be greater then preferred-lifetime') + 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_lifetime' in interface_config: # man page states: -- cgit v1.2.3