Skip to content

Commit

Permalink
Merge pull request #14249 from FRRouting/mergify/bp/stable/8.5/pr-14245
Browse files Browse the repository at this point in the history
bgpd: Don't read the first byte of ORF header if we are ahead of stream (backport #14245)
  • Loading branch information
donaldsharp committed Aug 21, 2023
2 parents 3d1b6c0 + 3515178 commit 9993bc1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bgpd/bgp_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -2408,7 +2408,8 @@ static int bgp_route_refresh_receive(struct peer *peer, bgp_size_t size)
* and 7 bytes of ORF Address-filter entry from
* the stream
*/
if (*p_pnt & ORF_COMMON_PART_REMOVE_ALL) {
if (p_pnt < p_end &&
*p_pnt & ORF_COMMON_PART_REMOVE_ALL) {
if (bgp_debug_neighbor_events(peer))
zlog_debug(
"%pBP rcvd Remove-All pfxlist ORF request",
Expand Down

0 comments on commit 9993bc1

Please sign in to comment.