From 317c6a10287d0cbb43fd6b82ade76d3f2f444ed8 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 25 Jun 2019 17:10:12 -0400 Subject: [PATCH] zebra: import table entries are not showing up in the right table When we are importing/removing the table entry from table X into the default routing table we are not properly setting the table_id of the route entry. This is causing the route to be pushed into the wrong internal table and to not be found for deletion. Signed-off-by: Donald Sharp --- zebra/redistribute.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zebra/redistribute.c b/zebra/redistribute.c index 8aa005a40e..d56579ff4f 100644 --- a/zebra/redistribute.c +++ b/zebra/redistribute.c @@ -612,7 +612,7 @@ int zebra_add_import_table_entry(struct zebra_vrf *zvrf, struct route_node *rn, newre->flags = re->flags; newre->metric = re->metric; newre->mtu = re->mtu; - newre->table = 0; + newre->table = zvrf->table_id; newre->nexthop_num = 0; newre->uptime = monotime(NULL); newre->instance = re->table; @@ -633,8 +633,8 @@ int zebra_del_import_table_entry(struct zebra_vrf *zvrf, struct route_node *rn, prefix_copy(&p, &rn->p); rib_delete(afi, SAFI_UNICAST, zvrf->vrf->vrf_id, ZEBRA_ROUTE_TABLE, - re->table, re->flags, &p, NULL, re->ng.nexthop, 0, - re->metric, re->distance, false); + re->table, re->flags, &p, NULL, re->ng.nexthop, + zvrf->table_id, re->metric, re->distance, false); return 0; }