summaryrefslogtreecommitdiff
path: root/bgpd/bgp_routemap_nb.h
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2024-02-24 00:06:41 +0200
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-02-25 21:55:03 +0000
commit2ca3dc7701bc9dab82b01e7197c9879f5d8b6ca5 (patch)
tree2b37a554ccfe0c6966c0c713fc0a880eafd78b83 /bgpd/bgp_routemap_nb.h
parentf9b30889e3ca942aa1d9746014946af404a3c1b9 (diff)
lib: fix nb callbacks for containers inside choice case
Containers inside a choice's case must be treated as presence containers as they can be explicitly created and deleted. They must have `create` and `destroy` callbacks, otherwise the internal data they represent may never be deleted. The issue can be reproduced with the following steps: - create an access-list with destination-network params ``` # access-list test seq 1 permit ip any 10.10.10.0 0.0.0.255 ``` - delete the `destination-network` container ``` # mgmt delete-config /frr-filter:lib/access-list[name='test'][type='ipv4']/entry[sequence='1']/destination-network # mgmt commit apply MGMTD: No changes found to be committed! ``` As the `destination-network` container is non-presence, and all its leafs are mandatory, mgmtd doesn't see any changes to be commited and simply updates its YANG data tree without passing any updates to backend daemons. This commit fixes the issue by requiring `create` and `destroy` callbacks for containers inside choice's cases. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com> (cherry picked from commit 0b905f740459291bca12e552aea4975fb46e9d98)
Diffstat (limited to 'bgpd/bgp_routemap_nb.h')
-rw-r--r--bgpd/bgp_routemap_nb.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/bgpd/bgp_routemap_nb.h b/bgpd/bgp_routemap_nb.h
index 28e4188026..00c1bde62a 100644
--- a/bgpd/bgp_routemap_nb.h
+++ b/bgpd/bgp_routemap_nb.h
@@ -60,6 +60,10 @@ int lib_route_map_entry_match_condition_rmap_match_condition_evpn_route_type_mod
int lib_route_map_entry_match_condition_rmap_match_condition_evpn_route_type_destroy(struct nb_cb_destroy_args *args);
int lib_route_map_entry_match_condition_rmap_match_condition_route_distinguisher_modify(struct nb_cb_modify_args *args);
int lib_route_map_entry_match_condition_rmap_match_condition_route_distinguisher_destroy(struct nb_cb_destroy_args *args);
+int lib_route_map_entry_match_condition_rmap_match_condition_comm_list_create(
+ struct nb_cb_create_args *args);
+int lib_route_map_entry_match_condition_rmap_match_condition_comm_list_destroy(
+ struct nb_cb_destroy_args *args);
void lib_route_map_entry_match_condition_rmap_match_condition_comm_list_finish(struct nb_cb_apply_finish_args *args);
int lib_route_map_entry_match_condition_rmap_match_condition_comm_list_comm_list_name_modify(struct nb_cb_modify_args *args);
int lib_route_map_entry_match_condition_rmap_match_condition_comm_list_comm_list_name_destroy(struct nb_cb_destroy_args *args);
@@ -127,6 +131,10 @@ int lib_route_map_entry_set_action_rmap_set_action_large_community_none_modify(s
int lib_route_map_entry_set_action_rmap_set_action_large_community_none_destroy(struct nb_cb_destroy_args *args);
int lib_route_map_entry_set_action_rmap_set_action_large_community_string_modify(struct nb_cb_modify_args *args);
int lib_route_map_entry_set_action_rmap_set_action_large_community_string_destroy(struct nb_cb_destroy_args *args);
+int lib_route_map_entry_set_action_rmap_set_action_aggregator_create(
+ struct nb_cb_create_args *args);
+int lib_route_map_entry_set_action_rmap_set_action_aggregator_destroy(
+ struct nb_cb_destroy_args *args);
void lib_route_map_entry_set_action_rmap_set_action_aggregator_finish(struct nb_cb_apply_finish_args *args);
int lib_route_map_entry_set_action_rmap_set_action_aggregator_aggregator_asn_modify(struct nb_cb_modify_args *args);
int lib_route_map_entry_set_action_rmap_set_action_aggregator_aggregator_asn_destroy(struct nb_cb_destroy_args *args);
@@ -138,6 +146,10 @@ int lib_route_map_entry_set_action_rmap_set_action_comm_list_num_extended_modify
int lib_route_map_entry_set_action_rmap_set_action_comm_list_num_extended_destroy(struct nb_cb_destroy_args *args);
int lib_route_map_entry_set_action_rmap_set_action_comm_list_name_modify(struct nb_cb_modify_args *args);
int lib_route_map_entry_set_action_rmap_set_action_comm_list_name_destroy(struct nb_cb_destroy_args *args);
+int lib_route_map_entry_set_action_rmap_set_action_extcommunity_lb_create(
+ struct nb_cb_create_args *args);
+int lib_route_map_entry_set_action_rmap_set_action_extcommunity_lb_destroy(
+ struct nb_cb_destroy_args *args);
void lib_route_map_entry_set_action_rmap_set_action_extcommunity_lb_finish(struct nb_cb_apply_finish_args *args);
int lib_route_map_entry_set_action_rmap_set_action_extcommunity_lb_lb_type_modify(struct nb_cb_modify_args *args);
int lib_route_map_entry_set_action_rmap_set_action_extcommunity_lb_lb_type_destroy(struct nb_cb_destroy_args *args);