From d7810f7aaf0e3cf4f3b3e8cb0845e84d4b59cbf2 Mon Sep 17 00:00:00 2001 From: Nataliia Solomko Date: Fri, 30 Oct 2026 16:08:18 +0200 Subject: nhrp: T9546: Remove nftables rules when NHRP is deleted Deleting NHRP left its nft tables in place. The conf script skipped regenerating the ruleset on delete but still reloaded the existing file, so the multicast drop rules stayed active. On delete the ruleset is now rendered without NHRP config, which only removes the NHRP tables. The smoketest checks after each test that no NHRP tables remain. --- src/conf_mode/protocols_nhrp.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/conf_mode/protocols_nhrp.py b/src/conf_mode/protocols_nhrp.py index 1e9220fce..66aa700f3 100755 --- a/src/conf_mode/protocols_nhrp.py +++ b/src/conf_mode/protocols_nhrp.py @@ -98,9 +98,12 @@ def generate(config_dict): if not has_frr_protocol_in_dict(config_dict, 'nhrp'): return None - if 'deleted' in config_dict['nhrp']: - return None - render(nhrp_nftables_conf, 'frr/nhrpd_nftables.conf.j2', config_dict['nhrp']) + nhrp = config_dict['nhrp'] + # Without NHRP config the template only deletes its nft tables + if 'deleted' in nhrp: + nhrp = {} + + render(nhrp_nftables_conf, 'frr/nhrpd_nftables.conf.j2', nhrp) return None -- cgit v1.2.3