diff options
author | root <root@dslice-debian.cumulusnetworks.com> | 2016-08-30 14:59:08 +0200 |
---|---|---|
committer | root <root@dslice-debian.cumulusnetworks.com> | 2016-08-30 14:59:08 +0200 |
commit | 3aef92192569c33906c6a2623d0753c16c0e7a64 (patch) | |
tree | 0d3b42f37e1d24d82db13cd1aa2627a4ca1a13cb /bgpd | |
parent | isisd: warn if there is an MTU issue on circuits (diff) | |
download | frr-3aef92192569c33906c6a2623d0753c16c0e7a64.tar.xz frr-3aef92192569c33906c6a2623d0753c16c0e7a64.zip |
bgpd: Add fix for multiple set commands with prefer-global
In further testing, found that if there were multiple set commands in
the route-map with one being prefer-global, the removal of the prefer-global
was not recognized and reacted to correctly. This small addition includes
that support
Ticket: CM-11480
Signed-off-by: Don Slice
Reviewed By: Donald Sharp
Testing Done: Manual testing, bgp-min and bgp-smoke completed
Diffstat (limited to 'bgpd')
-rw-r--r-- | bgpd/bgp_attr.h | 2 | ||||
-rw-r--r-- | bgpd/bgp_routemap.c | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/bgpd/bgp_attr.h b/bgpd/bgp_attr.h index a279674af..9a8e2a75e 100644 --- a/bgpd/bgp_attr.h +++ b/bgpd/bgp_attr.h @@ -148,6 +148,7 @@ struct attr #define BATTR_RMAP_NEXTHOP_UNCHANGED (1 << 3) #define BATTR_RMAP_IPV6_GLOBAL_NHOP_CHANGED (1 << 4) #define BATTR_RMAP_IPV6_LL_NHOP_CHANGED (1 << 5) +#define BATTR_RMAP_IPV6_PREFER_GLOBAL_CHANGED (1 << 6) /* Router Reflector related structure. */ struct cluster_list @@ -277,6 +278,7 @@ bgp_rmap_nhop_changed(u_int32_t out_rmap_flags, u_int32_t in_rmap_flags) CHECK_FLAG(out_rmap_flags, BATTR_RMAP_NEXTHOP_UNCHANGED) || CHECK_FLAG(out_rmap_flags, BATTR_RMAP_IPV4_NHOP_CHANGED) || CHECK_FLAG(out_rmap_flags, BATTR_RMAP_IPV6_GLOBAL_NHOP_CHANGED) || + CHECK_FLAG(out_rmap_flags, BATTR_RMAP_IPV6_PREFER_GLOBAL_CHANGED) || CHECK_FLAG(out_rmap_flags, BATTR_RMAP_IPV6_LL_NHOP_CHANGED) || CHECK_FLAG(in_rmap_flags, BATTR_RMAP_NEXTHOP_UNCHANGED)) ? 1 : 0); } diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 2a4d41663..e4fd730cf 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -2215,8 +2215,14 @@ route_set_ipv6_nexthop_prefer_global (void *rule, struct prefix *prefix, /* Set next hop preference to global */ bgp_info->attr->extra->mp_nexthop_prefer_global = TRUE; SET_FLAG(bgp_info->attr->rmap_change_flags, - BATTR_RMAP_IPV6_GLOBAL_NHOP_CHANGED); + BATTR_RMAP_IPV6_PREFER_GLOBAL_CHANGED); } + else + { + bgp_info->attr->extra->mp_nexthop_prefer_global = FALSE; + SET_FLAG(bgp_info->attr->rmap_change_flags, + BATTR_RMAP_IPV6_PREFER_GLOBAL_CHANGED); + } } return RMAP_OKAY; } |