summaryrefslogtreecommitdiffstats
path: root/ospfd
diff options
context:
space:
mode:
authorrgirada <rgirada@vmware.com>2020-05-18 06:40:48 +0200
committerrgirada <rgirada@vmware.com>2020-05-18 06:40:48 +0200
commit87e6e11ee80fff474ee4574fd940e94505ae3c0f (patch)
treefebe85dd57198d740beaa43af670cfb21f24bea9 /ospfd
parentMerge pull request #6422 from rudis/master (diff)
downloadfrr-87e6e11ee80fff474ee4574fd940e94505ae3c0f.tar.xz
frr-87e6e11ee80fff474ee4574fd940e94505ae3c0f.zip
ospfd: Route-tag is not set to external lsas when applying with rmap
Description: Route-tag is not set to external lsas originated by ospf when a routemap applied by setting a specific tag. When applying a route-map on redistribution, external lsas will be refreshed if there is any change in the route parametrs after applying routemap. But changing tag is not handled here. Added the apripriate fix to correct this. Signed-off-by: Rajesh Girada <rgirada@vmware.com>
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_zebra.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index c7e6bd9cb..f3f54f7b5 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -696,6 +696,7 @@ int ospf_redistribute_check(struct ospf *ospf, struct external_info *ei,
struct ospf_redist *red;
uint8_t type = is_prefix_default(&ei->p) ? DEFAULT_ROUTE : ei->type;
unsigned short instance = is_prefix_default(&ei->p) ? 0 : ei->instance;
+ route_tag_t saved_tag = 0;
if (changed)
*changed = 0;
@@ -725,6 +726,7 @@ 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;
/* apply route-map if needed */
red = ospf_redist_lookup(ospf, type, instance);
@@ -747,9 +749,13 @@ int ospf_redistribute_check(struct ospf *ospf, struct external_info *ei,
}
/* check if 'route-map set' changed something */
- if (changed)
+ if (changed) {
*changed = !ospf_route_map_set_compare(
&ei->route_map_set, &save_values);
+
+ /* check if tag is modified */
+ *changed |= (saved_tag != ei->tag);
+ }
}
return 1;