Merge pull request #14270 from FRRouting/mergify/bp/stable/8.5/pr-14260

bgpd: Do not process NLRIs if the attribute length is zero (backport #14260)
This commit is contained in:
Donald Sharp 2023-08-24 14:54:14 -04:00 committed by GitHub
commit 3c9e3f9640
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1983,7 +1983,7 @@ static int bgp_update_receive(struct peer *peer, bgp_size_t size)
/* Network Layer Reachability Information. */
update_len = end - stream_pnt(s);
if (update_len) {
if (update_len && attribute_len) {
/* Set NLRI portion to structure. */
nlris[NLRI_UPDATE].afi = AFI_IP;
nlris[NLRI_UPDATE].safi = SAFI_UNICAST;