From ffff1a1760c11f9dc3a35282429edf5c0718d22d Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 18 Feb 2025 10:25:47 -0500 Subject: [PATCH] bgpd: Fix another crash in orf I was pointed at yet another crash in the orf code. I think it stems from basicaly the same problem as the last one. Let's just make sure that the orf_plist is handled appropriately. Signed-off-by: Donald Sharp --- bgpd/bgp_packet.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index 37de42d0e3b8..54cd1250cbca 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -2842,6 +2842,14 @@ static int bgp_route_refresh_receive(struct peer_connection *connection, prefix_bgp_orf_remove_all(afi, name); peer->orf_plist[afi][safi] = prefix_bgp_orf_lookup(afi, name); + + paf = peer_af_find(peer, afi, safi); + if (paf && paf->subgroup) { + updgrp = PAF_UPDGRP(paf); + updgrp_peer = UPDGRP_PEER(updgrp); + updgrp_peer->orf_plist[afi][safi] = + peer->orf_plist[afi][safi]; + } break; }