forked from Mirror/frr
commit
cea55c9223
|
@ -1198,10 +1198,9 @@ int bgp_evpn_type1_route_process(struct peer *peer, afi_t afi, safi_t safi,
|
||||||
struct prefix_rd prd;
|
struct prefix_rd prd;
|
||||||
esi_t esi;
|
esi_t esi;
|
||||||
uint32_t eth_tag;
|
uint32_t eth_tag;
|
||||||
mpls_label_t label;
|
mpls_label_t label[BGP_MAX_LABELS] = {};
|
||||||
struct in_addr vtep_ip;
|
struct in_addr vtep_ip;
|
||||||
struct prefix_evpn p;
|
struct prefix_evpn p;
|
||||||
uint8_t num_labels = 0;
|
|
||||||
|
|
||||||
if (psize != BGP_EVPN_TYPE1_PSIZE) {
|
if (psize != BGP_EVPN_TYPE1_PSIZE) {
|
||||||
flog_err(EC_BGP_EVPN_ROUTE_INVALID,
|
flog_err(EC_BGP_EVPN_ROUTE_INVALID,
|
||||||
|
@ -1225,8 +1224,7 @@ int bgp_evpn_type1_route_process(struct peer *peer, afi_t afi, safi_t safi,
|
||||||
eth_tag = ntohl(eth_tag);
|
eth_tag = ntohl(eth_tag);
|
||||||
pfx += EVPN_ETH_TAG_BYTES;
|
pfx += EVPN_ETH_TAG_BYTES;
|
||||||
|
|
||||||
memcpy(&label, pfx, BGP_LABEL_BYTES);
|
memcpy(&label[0], pfx, BGP_LABEL_BYTES);
|
||||||
num_labels++;
|
|
||||||
|
|
||||||
/* EAD route prefix doesn't include the nexthop in the global
|
/* EAD route prefix doesn't include the nexthop in the global
|
||||||
* table
|
* table
|
||||||
|
@ -1236,10 +1234,10 @@ int bgp_evpn_type1_route_process(struct peer *peer, afi_t afi, safi_t safi,
|
||||||
/* Process the route. */
|
/* Process the route. */
|
||||||
if (attr) {
|
if (attr) {
|
||||||
bgp_update(peer, (struct prefix *)&p, addpath_id, attr, afi, safi, ZEBRA_ROUTE_BGP,
|
bgp_update(peer, (struct prefix *)&p, addpath_id, attr, afi, safi, ZEBRA_ROUTE_BGP,
|
||||||
BGP_ROUTE_NORMAL, &prd, &label, num_labels, 0, NULL);
|
BGP_ROUTE_NORMAL, &prd, &label[0], 1, 0, NULL);
|
||||||
} else {
|
} else {
|
||||||
bgp_withdraw(peer, (struct prefix *)&p, addpath_id, afi, safi, ZEBRA_ROUTE_BGP,
|
bgp_withdraw(peer, (struct prefix *)&p, addpath_id, afi, safi, ZEBRA_ROUTE_BGP,
|
||||||
BGP_ROUTE_NORMAL, &prd, &label, num_labels);
|
BGP_ROUTE_NORMAL, &prd, &label[0], 1);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue