mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 07:23:41 +00:00
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>
This commit is contained in:
parent
b7dd15242c
commit
70f6103afd
@ -3504,11 +3504,12 @@ static void bgp_process_main_one(struct bgp *bgp, struct bgp_dest *dest,
|
|||||||
/* Clear any route change flags. */
|
/* Clear any route change flags. */
|
||||||
bgp_zebra_clear_route_change_flags(dest);
|
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 */
|
/* Reap old select bgp_path_info, if it has been removed */
|
||||||
if (old_select && CHECK_FLAG(old_select->flags, BGP_PATH_REMOVED))
|
if (old_select && CHECK_FLAG(old_select->flags, BGP_PATH_REMOVED))
|
||||||
bgp_path_info_reap(dest, old_select);
|
bgp_path_info_reap(dest, old_select);
|
||||||
|
|
||||||
UNSET_FLAG(dest->flags, BGP_NODE_PROCESS_SCHEDULED);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user