In bgp_update_receive the first thing we do is establish
that the peer->status is Established. We then do a bunch
of work and call bgp_nlri_parse where we break out for
each address family. Each AFI is then checking for
being peer->status is Established again. There is no
point in checking this again.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
u_char rlen;
struct prefix p;
- /* Check peer status. */
- if (peer->status != Established) {
- zlog_err("%u:%s - EVPN update received in state %d",
- peer->bgp->vrf_id, peer->host, peer->status);
- return -1;
- }
-
/* Start processing the NLRI - there may be multiple in the MP_REACH */
pnt = packet->nlri;
lim = pnt + packet->length;
mpls_label_t label = MPLS_INVALID_LABEL;
u_char llen;
- /* Check peer status. */
- if (peer->status != Established)
- return 0;
-
pnt = packet->nlri;
lim = pnt + packet->length;
afi = packet->afi;
int addpath_encoded;
u_int32_t addpath_id;
- /* Check peer status. */
- if (peer->status != Established)
- return 0;
-
/* Make prefix_rd */
prd.family = AF_UNSPEC;
prd.prefixlen = 64;
int addpath_encoded;
u_int32_t addpath_id;
- /* Check peer status. */
- if (peer->status != Established)
- return 0;
-
pnt = packet->nlri;
lim = pnt + packet->length;
afi = packet->afi;