From 7243e9daa42d27e6426e9d9ca5ae86ba8a0cc5f6 Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Thu, 28 Sep 2023 17:41:27 +0200 Subject: [PATCH] bgpd: fix wrong event called when removing a set rule The following route-map set rules events are destroyed with the 'match_destroy' API whereas there is a 'set_destroy' API available. Fix this for the following set commands: > set distance > set extcommunity rt > set extcommunity nt > set extcommunity color > set extcommunity soo Fixes: 48cb7ea99d10 ("bgpd: North-bound implementation for bgp rmaps") Fixes: c9a256144479 ("bgpd: Implement Node Target Extended Communities") Fixes: b80ebc2d8cf0 ("bgpd: add colored extended communities support") Signed-off-by: Philippe Guibert --- bgpd/bgp_routemap_nb_config.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bgpd/bgp_routemap_nb_config.c b/bgpd/bgp_routemap_nb_config.c index 6ea8ebe6ab..d6fa94f401 100644 --- a/bgpd/bgp_routemap_nb_config.c +++ b/bgpd/bgp_routemap_nb_config.c @@ -1450,7 +1450,7 @@ int lib_route_map_entry_set_action_rmap_set_action_distance_destroy( case NB_EV_ABORT: break; case NB_EV_APPLY: - return lib_route_map_entry_match_destroy(args); + return lib_route_map_entry_set_destroy(args); } return NB_OK; @@ -1504,7 +1504,7 @@ lib_route_map_entry_set_action_rmap_set_action_extcommunity_rt_destroy( case NB_EV_ABORT: break; case NB_EV_APPLY: - return lib_route_map_entry_match_destroy(args); + return lib_route_map_entry_set_destroy(args); } return NB_OK; @@ -1556,7 +1556,7 @@ int lib_route_map_entry_set_action_rmap_set_action_extcommunity_nt_destroy( case NB_EV_ABORT: break; case NB_EV_APPLY: - return lib_route_map_entry_match_destroy(args); + return lib_route_map_entry_set_destroy(args); } return NB_OK; @@ -1611,7 +1611,7 @@ lib_route_map_entry_set_action_rmap_set_action_extcommunity_soo_destroy( case NB_EV_ABORT: break; case NB_EV_APPLY: - return lib_route_map_entry_match_destroy(args); + return lib_route_map_entry_set_destroy(args); } return NB_OK; @@ -3043,7 +3043,7 @@ int lib_route_map_entry_set_action_rmap_set_action_extcommunity_color_destroy( case NB_EV_ABORT: break; case NB_EV_APPLY: - return lib_route_map_entry_match_destroy(args); + return lib_route_map_entry_set_destroy(args); } return NB_OK; -- 2.39.5