summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorinitramfs <initramfs@initramfs.io>2022-07-31 09:35:00 +0800
committerinitramfs <initramfs@initramfs.io>2022-08-01 06:13:36 +0800
commitf6efe3035d352970dc492450c3c9ddf710dda5fe (patch)
tree13f8f3eaadf855ef1b6c228723a0872a7cdd7da2 /src
parent0e9115e34305d5a703a72557d0830e2d0ed385ac (diff)
downloadvyos-1x-f6efe3035d352970dc492450c3c9ddf710dda5fe.tar.gz
vyos-1x-f6efe3035d352970dc492450c3c9ddf710dda5fe.zip
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.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/service_router-advert.py4
1 files 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: