From 04e94d3929829c79e097f9b0d435da02cc6322f1 Mon Sep 17 00:00:00 2001 From: rgirada Date: Sun, 17 May 2020 22:02:34 -0700 Subject: ospfd: Restoring the original tag in external lsas Description: When a routemap applied to set a tag, all the permitted routes are refreshed with new tag, but when a different route map applied with a different action still the same tag persits in the external route. The actual tag received from zebra is expected to be set back to the routes here. Corrected this behaviour by restoring a original tag received from zebra. Signed-off-by: Rajesh Girada --- ospfd/ospf_zebra.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ospfd/ospf_zebra.c') diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index f3f54f7b5..e8e2fbeaa 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -726,7 +726,10 @@ int ospf_redistribute_check(struct ospf *ospf, struct external_info *ei, save_values = ei->route_map_set; ospf_reset_route_map_set_values(&ei->route_map_set); + saved_tag = ei->tag; + /* Resetting with original route tag */ + ei->tag = ei->orig_tag; /* apply route-map if needed */ red = ospf_redist_lookup(ospf, type, instance); -- cgit v1.2.3