Skip to content

Commit

Permalink
bgpd: Ensure peer data structure is accessed only when BGPD is not te…
Browse files Browse the repository at this point in the history
…rminating

With these changes,
the code ensures that the peer data-structures are accessed
only after it knows that BGPD is not terminating.

Authored-by: Naveen Thanikachalam <[email protected]>
Signed-off-by: Iqra Siddiqui <[email protected]>
  • Loading branch information
NaveenThanikachalam authored and iqras23 committed Jun 28, 2023
1 parent 07a2b9d commit 7e28578
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bgpd/bgp_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ static void bgp_process_reads(struct event *thread)

peer = EVENT_ARG(thread);

if (peer->fd < 0 || bm->terminating)
if (bm->terminating || peer->fd < 0)
return;

struct frr_pthread *fpt = bgp_pth_io;
Expand Down

0 comments on commit 7e28578

Please sign in to comment.