]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: fix wrong event called when removing a set rule
authorPhilippe Guibert <philippe.guibert@6wind.com>
Thu, 28 Sep 2023 15:41:27 +0000 (17:41 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 21 Nov 2023 17:10:38 +0000 (18:10 +0100)
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 <philippe.guibert@6wind.com>
bgpd/bgp_routemap_nb_config.c

index 6ea8ebe6ab3500ca92befedd62916d6a6554fe50..d6fa94f401d09131dcbadaa4877caf56b66a1090 100644 (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;