Skip to content

Commit

Permalink
bgpd: Call bgp_process when bgp_path_info_delete is called
Browse files Browse the repository at this point in the history
bgp_damp.c has an instance of bgp_path_info_delete is called.
Thus setting up the path info for deletion, but since it never
calls bgp_process, it can never be deleted.  This means that in
a dampening situation, after a withdrawal the path_info would
stick around.  Schedule the path for deletion.

Signed-off-by: Donald Sharp <[email protected]>
  • Loading branch information
donaldsharp committed Mar 20, 2024
1 parent 4f95148 commit 4ae7fb6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bgpd/bgp_damp.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,10 @@ void bgp_damp_info_free(struct bgp_damp_info *bdi, int withdraw, afi_t afi,
bgp_path_info_unset_flag(bdi->dest, path,
BGP_PATH_HISTORY | BGP_PATH_DAMPED);

if (bdi->lastrecord == BGP_RECORD_WITHDRAW && withdraw)
if (bdi->lastrecord == BGP_RECORD_WITHDRAW && withdraw) {
bgp_path_info_delete(bdi->dest, path);
bgp_process(path->peer->bgp, bdi->dest, afi, safi);
}

XFREE(MTYPE_BGP_DAMP_INFO, bdi);
}
Expand Down

0 comments on commit 4ae7fb6

Please sign in to comment.