diff options
| author | Sri Mohana Singamsetty <srimohans@gmail.com> | 2019-03-04 13:18:31 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-04 13:18:31 -0800 |
| commit | 94b4f0860197b9f180ac9de7160e85c3c1dfceb7 (patch) | |
| tree | 55597d461feb7a5c6819bb2ab0a646c9cea4f433 | |
| parent | 700e9faa28bbdc3460e1d7aa109b6e4acaf347b3 (diff) | |
| parent | f007bdcef1898ce65826fac7e9b7def5bcd1ca09 (diff) | |
Merge pull request #3879 from chiragshah6/evpn_dev1
bgpd: fix evpn type-5 implicit withdraw processing
| -rw-r--r-- | bgpd/bgp_evpn.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bgpd/bgp_evpn.c b/bgpd/bgp_evpn.c index 4a8fe111be..f123b7f8ec 100644 --- a/bgpd/bgp_evpn.c +++ b/bgpd/bgp_evpn.c @@ -3935,7 +3935,7 @@ static int process_type4_route(struct peer *peer, afi_t afi, safi_t safi, */ static int process_type5_route(struct peer *peer, afi_t afi, safi_t safi, struct attr *attr, uint8_t *pfx, int psize, - uint32_t addpath_id, int withdraw) + uint32_t addpath_id) { struct prefix_rd prd; struct prefix_evpn p; @@ -4021,7 +4021,7 @@ static int process_type5_route(struct peer *peer, afi_t afi, safi_t safi, */ /* Process the route. */ - if (!withdraw) + if (attr) ret = bgp_update(peer, (struct prefix *)&p, addpath_id, attr, afi, safi, ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd, &label, 1, 0, &evpn); @@ -4873,8 +4873,9 @@ int bgp_nlri_parse_evpn(struct peer *peer, struct attr *attr, break; case BGP_EVPN_IP_PREFIX_ROUTE: - if (process_type5_route(peer, afi, safi, attr, pnt, - psize, addpath_id, withdraw)) { + if (process_type5_route(peer, afi, safi, + withdraw ? NULL : attr, pnt, + psize, addpath_id)) { flog_err( EC_BGP_PKT_PROCESS, "%u:%s - Error in processing EVPN type-5 NLRI size %d", |
