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: 48cb7ea99d ("bgpd: North-bound implementation for bgp rmaps")
Fixes: c9a2561444 ("bgpd: Implement Node Target Extended Communities")
Fixes: b80ebc2d8c ("bgpd: add colored extended communities support")

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
Philippe Guibert 2023-09-28 17:41:27 +02:00
parent 77ff93b8f5
commit 7243e9daa4

View File

@ -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;