diff options
author | Mitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com> | 2017-07-07 01:33:50 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-08-08 16:28:54 +0200 |
commit | ddd16ed5f274863ca23401f1f7bf628feb610b11 (patch) | |
tree | 1c18699c554d7cb4f23454fa1cafd5fe9a56cc14 /bgpd/bgp_evpn.c | |
parent | zebra: Provide neigh-mac tie-in in zebra (diff) | |
download | frr-ddd16ed5f274863ca23401f1f7bf628feb610b11.tar.xz frr-ddd16ed5f274863ca23401f1f7bf628feb610b11.zip |
bgpd/zebra: honor tunnel ip change in bgp regardless of vni readiness
Ticket: CM-17014
Review: CCR-6432
Unit-test: Manual
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_evpn.c')
-rw-r--r-- | bgpd/bgp_evpn.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/bgpd/bgp_evpn.c b/bgpd/bgp_evpn.c index ab3307a6a..110ff3a17 100644 --- a/bgpd/bgp_evpn.c +++ b/bgpd/bgp_evpn.c @@ -1193,6 +1193,12 @@ static int handle_tunnel_ip_change(struct bgp *bgp, struct bgpevpn *vpn, { struct prefix_evpn p; + /* If VNI is not live, we only need to update the originator ip */ + if (!is_vni_live(vpn)) { + vpn->originator_ip = originator_ip; + return 0; + } + /* Need to withdraw type-3 route as the originator IP is part * of the key. */ @@ -2678,14 +2684,14 @@ int bgp_evpn_local_vni_add(struct bgp *bgp, vni_t vni, /* Lookup VNI. If present and no change, exit. */ vpn = bgp_evpn_lookup_vni(bgp, vni); - if (vpn && is_vni_live(vpn)) { + if (vpn) { if (IPV4_ADDR_SAME(&vpn->originator_ip, &originator_ip)) /* Probably some other param has changed that we don't * care about. */ return 0; /* Local tunnel endpoint IP address has changed */ - return handle_tunnel_ip_change(bgp, vpn, originator_ip); + handle_tunnel_ip_change(bgp, vpn, originator_ip); } /* Create or update as appropriate. */ @@ -2699,6 +2705,10 @@ int bgp_evpn_local_vni_add(struct bgp *bgp, vni_t vni, } } + /* if the VNI is live already, there is nothibng more to do */ + if (is_vni_live(vpn)) + return 0; + /* Mark as "live" */ SET_FLAG(vpn->flags, VNI_FLAG_LIVE); |