summaryrefslogtreecommitdiffstats
path: root/ospfd
diff options
context:
space:
mode:
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_asbr.c1
-rw-r--r--ospfd/ospf_asbr.h3
-rw-r--r--ospfd/ospf_zebra.c3
3 files changed, 7 insertions, 0 deletions
diff --git a/ospfd/ospf_asbr.c b/ospfd/ospf_asbr.c
index 6d0093534..3682b4cdd 100644
--- a/ospfd/ospf_asbr.c
+++ b/ospfd/ospf_asbr.c
@@ -149,6 +149,7 @@ ospf_external_info_add(struct ospf *ospf, uint8_t type, unsigned short instance,
new->ifindex = ifindex;
new->nexthop = nexthop;
new->tag = tag;
+ new->orig_tag = tag;
/* we don't unlock rn from the get() because we're attaching the info */
if (rn)
diff --git a/ospfd/ospf_asbr.h b/ospfd/ospf_asbr.h
index ac7bd68b5..1bcc32e3d 100644
--- a/ospfd/ospf_asbr.h
+++ b/ospfd/ospf_asbr.h
@@ -46,6 +46,9 @@ struct external_info {
/* Additional Route tag. */
route_tag_t tag;
+ /* Actual tag received from zebra*/
+ route_tag_t orig_tag;
+
struct route_map_set_values route_map_set;
#define ROUTEMAP_METRIC(E) (E)->route_map_set.metric
#define ROUTEMAP_METRIC_TYPE(E) (E)->route_map_set.metric_type
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);