diff options
Diffstat (limited to 'bgpd/bgp_label.c')
| -rw-r--r-- | bgpd/bgp_label.c | 9 | 
1 files changed, 3 insertions, 6 deletions
diff --git a/bgpd/bgp_label.c b/bgpd/bgp_label.c index c101cf917b..4a20f2c090 100644 --- a/bgpd/bgp_label.c +++ b/bgpd/bgp_label.c @@ -335,7 +335,7 @@ int bgp_nlri_parse_label(struct peer *peer, struct attr *attr,  	int prefixlen;  	afi_t afi;  	safi_t safi; -	int addpath_encoded; +	bool addpath_capable;  	uint32_t addpath_id;  	mpls_label_t label = MPLS_INVALID_LABEL;  	uint8_t llen; @@ -346,16 +346,13 @@ int bgp_nlri_parse_label(struct peer *peer, struct attr *attr,  	safi = packet->safi;  	addpath_id = 0; -	addpath_encoded = -		(CHECK_FLAG(peer->af_cap[afi][safi], PEER_CAP_ADDPATH_AF_RX_ADV) -		 && CHECK_FLAG(peer->af_cap[afi][safi], -			       PEER_CAP_ADDPATH_AF_TX_RCV)); +	addpath_capable = bgp_addpath_encode_rx(peer, afi, safi);  	for (; pnt < lim; pnt += psize) {  		/* Clear prefix structure. */  		memset(&p, 0, sizeof(struct prefix)); -		if (addpath_encoded) { +		if (addpath_capable) {  			/* When packet overflow occurs return immediately. */  			if (pnt + BGP_ADDPATH_ID_LEN > lim)  | 
