]> git.puffer.fish Git - matthieu/frr.git/commitdiff
isisd: Uninstall routes only if installed
authorCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Sat, 10 Jun 2023 07:30:17 +0000 (09:30 +0200)
committerCarmine Scarpitta <carmine.scarpitta@uniroma2.it>
Mon, 11 Sep 2023 15:35:04 +0000 (17:35 +0200)
In some cases, IS-IS may attempt to remove routes that have not been
installed before. We can prevent IS-IS from doing this by aborting
`isis_zebra_route_del_route` when the ISIS_ROUTE_FLAG_ZEBRA_SYNCED flag
is unset, meaning that the route is not installed in the kernel.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
isisd/isis_zebra.c

index 4813173f453b2a0ad936fd03257a36d287d12116..1706d27a3a0b0a89db93a94ceb173e035235860b 100644 (file)
@@ -308,6 +308,9 @@ void isis_zebra_route_del_route(struct isis *isis,
        if (zclient->sock < 0)
                return;
 
+       if (!CHECK_FLAG(route_info->flag, ISIS_ROUTE_FLAG_ZEBRA_SYNCED))
+               return;
+
        memset(&api, 0, sizeof(api));
        api.vrf_id = isis->vrf_id;
        api.type = PROTO_TYPE;