diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2023-09-10 09:33:55 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2023-09-11 12:45:59 -0400 |
| commit | 70f6103afd129853cf5a611e28f8002ed5f9ff79 (patch) | |
| tree | 61b050fae7b208e63684f3f0514714bd38ca8759 | |
| parent | b7dd15242cc5e616e140369f598bed4527a6e838 (diff) | |
bgpd: bgp_process_main_one should ensure dest exists
Unsetting a flag after the dest has been possibly been
freed is not a good thing to do. Ensure that this
is not possible.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
| -rw-r--r-- | bgpd/bgp_route.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 34d36a6375..7d0cc377bd 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -3504,11 +3504,12 @@ static void bgp_process_main_one(struct bgp *bgp, struct bgp_dest *dest, /* Clear any route change flags. */ bgp_zebra_clear_route_change_flags(dest); + UNSET_FLAG(dest->flags, BGP_NODE_PROCESS_SCHEDULED); + /* Reap old select bgp_path_info, if it has been removed */ if (old_select && CHECK_FLAG(old_select->flags, BGP_PATH_REMOVED)) bgp_path_info_reap(dest, old_select); - UNSET_FLAG(dest->flags, BGP_NODE_PROCESS_SCHEDULED); return; } |
