]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: Fix other table inactive when ip import-table is on 12858/head
authorzyxwvu Shi <i@shiyc.cn>
Wed, 15 Feb 2023 15:55:00 +0000 (23:55 +0800)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Tue, 21 Feb 2023 16:38:15 +0000 (16:38 +0000)
In `rib_link`, if is_zebra_import_table_enabled returns
true, `rib_queue_add` will not called, resulting in other
table route node never processed. This actually should not
be dependent on whether the route is imported.

In `rib_delnode`, if is_zebra_import_table_enabled returns
true, it will use `rib_unlink` instead of enqueuing the
route node for process. There is no reason that imported
route nodes should not be reprocessed. Long ago, the
behaviour was dependent on whether the route_entry comes
from a table other than main.

Signed-off-by: zyxwvu Shi <i@shiyc.cn>
(cherry picked from commit 207207c0c03e1108d1bae5cf345b7a29850e6ffd)

zebra/zebra_rib.c

index fceaaaa9f02633a1dd24433841dc22bdb962a1e0..adc6a904f1c8ac8ce345698e06c549d2b121c2f5 100644 (file)
@@ -3800,7 +3800,9 @@ static void rib_link(struct route_node *rn, struct route_entry *re, int process)
 
                rmap_name = zebra_get_import_table_route_map(afi, re->table);
                zebra_add_import_table_entry(zvrf, rn, re, rmap_name);
-       } else if (process)
+       }
+
+       if (process)
                rib_queue_add(rn);
 }
 
@@ -3875,11 +3877,9 @@ void rib_delnode(struct route_node *rn, struct route_entry *re)
                        zlog_debug("%s(%u):%pRN: Freeing route rn %p, re %p (%s)",
                                   vrf_id_to_name(re->vrf_id), re->vrf_id, rn,
                                   rn, re, zebra_route_string(re->type));
-
-               rib_unlink(rn, re);
-       } else {
-               rib_queue_add(rn);
        }
+
+       rib_queue_add(rn);
 }
 
 /*