From 5310713bf116b8ad65f9e86346a7c02b2922212e Mon Sep 17 00:00:00 2001 From: Kyrylo Yatsenko Date: Thu, 8 Jan 2026 14:50:51 +0200 Subject: isis: T8158: fix lsp-timers There are three configuration values in VyOS isis XML: * lsp-gen-interval * lsp-refresh-interval * max-lsp-lifetime In FRR they have the following restrictions in yang model: * refresh-interval, default 900 * maximum-lifetime >= refresh-interval + 300 (350-65535), default 1200 * generation-interval < refresh-interval (1..120), default 30 When setting these values in separate steps we can get error e.g.: libyang: Must condition ". >= ../refresh-interval + 300" not satisfied. even when all restrictions are satisfied. To fix the issue: 1. Write default values in our XML. 2. Check these restrictions in protocol_isis.py 3. Use FRR command `lsp-timers` that sets all these values in one go --- src/conf_mode/protocols_isis.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/conf_mode/protocols_isis.py b/src/conf_mode/protocols_isis.py index 4444a8e44..151c5450a 100755 --- a/src/conf_mode/protocols_isis.py +++ b/src/conf_mode/protocols_isis.py @@ -252,6 +252,15 @@ def verify(config_dict): if int(len(isis['fast_reroute']['lfa']['remote']['prefix_list'].items())) > 1: raise ConfigError(f'LFA remote prefix-list has more than one configured. Cannot have more than one configured.') + # Check for lsp-timers violations + # Must be in sync with FRR yang limitations in yang/frr-isisd.yang + if int(isis['lsp_gen_interval']) >= int(isis['lsp_refresh_interval']): + raise ConfigError(f'lsp-gen-interval must be less then lsp-refresh-interval') + if int(isis['max_lsp_lifetime']) < int(isis['lsp_refresh_interval']) + 300: + raise ConfigError( + f'max-lsp-lifetime must be greater or equal to lsp-refresh-interval + 300' + ) + return None def generate(config_dict): -- cgit v1.2.3