diff options
63 files changed, 15269 insertions, 4491 deletions
diff --git a/bgpd/bgp_mpath.c b/bgpd/bgp_mpath.c index b7f516eaf7..ff5cfe05fb 100644 --- a/bgpd/bgp_mpath.c +++ b/bgpd/bgp_mpath.c @@ -412,8 +412,9 @@ static void bgp_path_info_mpath_lb_update(struct bgp_path_info *path, bool set, struct bgp_path_info_mpath *mpath; if ((mpath = path->mpath) == NULL) { - if (!set) + if (!set || (cum_bw == 0 && !all_paths_lb)) return; + mpath = bgp_path_info_mpath_get(path); if (!mpath) return; diff --git a/bgpd/bgp_nb.c b/bgpd/bgp_nb.c index 333ca3cce9..644b03dff0 100644 --- a/bgpd/bgp_nb.c +++ b/bgpd/bgp_nb.c @@ -607,9 +607,16 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-as", + .cbs = { + .apply_finish = bgp_neighbors_neighbor_local_as_apply_finish, + } + }, + { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-as/local-as", .cbs = { .modify = bgp_neighbors_neighbor_local_as_local_as_modify, + .destroy = bgp_neighbors_neighbor_local_as_local_as_destroy, } }, { @@ -667,9 +674,16 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/admin-shutdown", + .cbs = { + .apply_finish = bgp_neighbors_neighbor_admin_shutdown_apply_finish, + } + }, + { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/admin-shutdown/enable", .cbs = { .modify = bgp_neighbors_neighbor_admin_shutdown_enable_modify, + .destroy = bgp_neighbors_neighbor_admin_shutdown_enable_destroy, } }, { @@ -737,6 +751,7 @@ const struct frr_yang_module_info frr_bgp_info = { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/enabled", .cbs = { .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_enabled_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_enabled_destroy, } }, { @@ -843,9 +858,16 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/neighbor-remote-as", + .cbs = { + .apply_finish = bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_apply_finish, + } + }, + { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/neighbor-remote-as/remote-as-type", .cbs = { .modify = bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_type_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_type_destroy, } }, { @@ -876,9 +898,16 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/local-as", + .cbs = { + .apply_finish = bgp_neighbors_unnumbered_neighbor_local_as_apply_finish, + } + }, + { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/local-as/local-as", .cbs = { .modify = bgp_neighbors_unnumbered_neighbor_local_as_local_as_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_local_as_local_as_destroy, } }, { @@ -936,9 +965,16 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/admin-shutdown", + .cbs = { + .apply_finish = bgp_neighbors_unnumbered_neighbor_admin_shutdown_apply_finish, + } + }, + { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/admin-shutdown/enable", .cbs = { .modify = bgp_neighbors_unnumbered_neighbor_admin_shutdown_enable_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_admin_shutdown_enable_destroy, } }, { @@ -1006,6 +1042,7 @@ const struct frr_yang_module_info frr_bgp_info = { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/enabled", .cbs = { .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_enabled_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_enabled_destroy, } }, { @@ -1113,9 +1150,16 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/neighbor-remote-as", + .cbs = { + .apply_finish = bgp_peer_group_neighbor_remote_as_apply_finish, + } + }, + { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/neighbor-remote-as/remote-as-type", .cbs = { .modify = bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_type_modify, + .destroy = bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_type_destroy, } }, { @@ -1146,9 +1190,16 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/local-as", + .cbs = { + .apply_finish = bgp_peer_groups_peer_group_local_as_apply_finish, + } + }, + { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/local-as/local-as", .cbs = { .modify = bgp_peer_groups_peer_group_local_as_local_as_modify, + .destroy = bgp_peer_groups_peer_group_local_as_local_as_destroy, } }, { @@ -1206,9 +1257,16 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/admin-shutdown", + .cbs = { + .apply_finish = bgp_peer_groups_peer_group_admin_shutdown_apply_finish, + } + }, + { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/admin-shutdown/enable", .cbs = { .modify = bgp_peer_groups_peer_group_admin_shutdown_enable_modify, + .destroy = bgp_peer_groups_peer_group_admin_shutdown_enable_destroy, } }, { @@ -1276,6 +1334,7 @@ const struct frr_yang_module_info frr_bgp_info = { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/enabled", .cbs = { .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_enabled_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_enabled_destroy, } }, { @@ -2512,16 +2571,22 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate-options/send-default-route", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate", + .cbs = { + .apply_finish = bgp_neighbor_afi_safi_default_originate_apply_finish, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate/originate", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_options_send_default_route_modify, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_originate_modify, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate-options/rmap-policy-export", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate/route-map", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_options_rmap_policy_export_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_options_rmap_policy_export_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_destroy, } }, { @@ -2529,6 +2594,7 @@ const struct frr_yang_module_info frr_bgp_info = { .cbs = { .create = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_create, .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_destroy, + .apply_finish = bgp_neighbors_neighbor_afi_safi_prefix_limit_apply_finish, } }, { @@ -2538,52 +2604,58 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/force-check", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_force_check_modify, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/warning-only", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/restart-timer", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only", + .cbs = { + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy, } }, { @@ -2807,6 +2879,25 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/default-originate", + .cbs = { + .apply_finish = bgp_neighbor_afi_safi_default_originate_apply_finish, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/default-originate/originate", + .cbs = { + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_originate_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/default-originate/route-map", + .cbs = { + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_destroy, + } + }, + { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/as-path-unchanged", .cbs = { .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_as_path_unchanged_modify, @@ -2850,6 +2941,7 @@ const struct frr_yang_module_info frr_bgp_info = { .cbs = { .create = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_create, .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_destroy, + .apply_finish = bgp_neighbors_neighbor_afi_safi_prefix_limit_apply_finish, } }, { @@ -2859,52 +2951,58 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/force-check", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_force_check_modify, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/warning-only", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/restart-timer", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only", + .cbs = { + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy, } }, { @@ -3013,6 +3111,25 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/default-originate", + .cbs = { + .apply_finish = bgp_neighbor_afi_safi_default_originate_apply_finish, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/default-originate/originate", + .cbs = { + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_originate_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/default-originate/route-map", + .cbs = { + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_destroy, + } + }, + { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/as-path-unchanged", .cbs = { .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_as_path_unchanged_modify, @@ -3056,6 +3173,7 @@ const struct frr_yang_module_info frr_bgp_info = { .cbs = { .create = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_create, .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_destroy, + .apply_finish = bgp_neighbors_neighbor_afi_safi_prefix_limit_apply_finish, } }, { @@ -3065,52 +3183,58 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/force-check", + .cbs = { + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_force_check_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/warning-only", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/restart-timer", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-restart-timer", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-warning-only", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy, } }, { @@ -3219,6 +3343,25 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/default-originate", + .cbs = { + .apply_finish = bgp_neighbor_afi_safi_default_originate_apply_finish, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/default-originate/originate", + .cbs = { + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_originate_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/default-originate/route-map", + .cbs = { + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_destroy, + } + }, + { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/as-path-unchanged", .cbs = { .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_as_path_unchanged_modify, @@ -3262,6 +3405,7 @@ const struct frr_yang_module_info frr_bgp_info = { .cbs = { .create = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_create, .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_destroy, + .apply_finish = bgp_neighbors_neighbor_afi_safi_prefix_limit_apply_finish, } }, { @@ -3271,52 +3415,58 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/force-check", + .cbs = { + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_force_check_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/warning-only", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/restart-timer", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-restart-timer", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-warning-only", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy, } }, { @@ -3425,6 +3575,25 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate", + .cbs = { + .apply_finish = bgp_neighbor_afi_safi_default_originate_apply_finish, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/originate", + .cbs = { + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_originate_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/route-map", + .cbs = { + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_destroy, + } + }, + { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/as-path-unchanged", .cbs = { .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_as_path_unchanged_modify, @@ -3468,6 +3637,7 @@ const struct frr_yang_module_info frr_bgp_info = { .cbs = { .create = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_create, .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_destroy, + .apply_finish = bgp_neighbors_neighbor_afi_safi_prefix_limit_apply_finish, } }, { @@ -3477,52 +3647,58 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/force-check", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_force_check_modify, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/warning-only", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/restart-timer", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only", + .cbs = { + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy, } }, { @@ -3631,6 +3807,25 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate", + .cbs = { + .apply_finish = bgp_neighbor_afi_safi_default_originate_apply_finish, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/originate", + .cbs = { + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_originate_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/route-map", + .cbs = { + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_destroy, + } + }, + { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/as-path-unchanged", .cbs = { .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_as_path_unchanged_modify, @@ -3674,6 +3869,7 @@ const struct frr_yang_module_info frr_bgp_info = { .cbs = { .create = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_create, .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_destroy, + .apply_finish = bgp_neighbors_neighbor_afi_safi_prefix_limit_apply_finish, } }, { @@ -3683,52 +3879,58 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/force-check", + .cbs = { + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_force_check_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/warning-only", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/restart-timer", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy, } }, { @@ -3859,6 +4061,7 @@ const struct frr_yang_module_info frr_bgp_info = { .cbs = { .create = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_create, .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_destroy, + .apply_finish = bgp_neighbors_neighbor_afi_safi_prefix_limit_apply_finish, } }, { @@ -3868,52 +4071,58 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/force-check", + .cbs = { + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_force_check_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/warning-only", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/restart-timer", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy, } }, { @@ -4044,6 +4253,7 @@ const struct frr_yang_module_info frr_bgp_info = { .cbs = { .create = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_create, .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_destroy, + .apply_finish = bgp_neighbors_neighbor_afi_safi_prefix_limit_apply_finish, } }, { @@ -4053,52 +4263,58 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/force-check", + .cbs = { + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_force_check_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/warning-only", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/restart-timer", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only", .cbs = { - .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify, - .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy, + .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify, + .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy, } }, { @@ -4311,16 +4527,22 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate-options/send-default-route", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_options_send_default_route_modify, + .apply_finish = bgp_unnumbered_neighbor_afi_safi_default_originate_apply_finish, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate-options/rmap-policy-export", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate/originate", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_options_rmap_policy_export_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_options_rmap_policy_export_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_originate_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate/route-map", + .cbs = { + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_destroy, } }, { @@ -4328,6 +4550,7 @@ const struct frr_yang_module_info frr_bgp_info = { .cbs = { .create = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_create, .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_destroy, + .apply_finish = bgp_unnumbered_neighbor_afi_safi_prefix_limit_apply_finish, } }, { @@ -4337,52 +4560,58 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/force-check", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_force_check_modify, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/warning-only", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/restart-timer", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only", + .cbs = { + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy, } }, { @@ -4606,6 +4835,25 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/default-originate", + .cbs = { + .apply_finish = bgp_unnumbered_neighbor_afi_safi_default_originate_apply_finish, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/default-originate/originate", + .cbs = { + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_originate_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/default-originate/route-map", + .cbs = { + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_destroy, + } + }, + { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/as-path-unchanged", .cbs = { .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_as_path_unchanged_modify, @@ -4649,6 +4897,7 @@ const struct frr_yang_module_info frr_bgp_info = { .cbs = { .create = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_create, .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_destroy, + .apply_finish = bgp_unnumbered_neighbor_afi_safi_prefix_limit_apply_finish, } }, { @@ -4658,52 +4907,58 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/force-check", + .cbs = { + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_force_check_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/warning-only", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/restart-timer", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy, } }, { @@ -4812,6 +5067,25 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/default-originate", + .cbs = { + .apply_finish = bgp_unnumbered_neighbor_afi_safi_default_originate_apply_finish, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/default-originate/originate", + .cbs = { + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_originate_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/default-originate/route-map", + .cbs = { + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_destroy, + } + }, + { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/as-path-unchanged", .cbs = { .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_as_path_unchanged_modify, @@ -4864,52 +5138,58 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/force-check", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_force_check_modify, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/warning-only", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/restart-timer", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-restart-timer", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-warning-only", + .cbs = { + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy, } }, { @@ -5018,6 +5298,25 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/default-originate", + .cbs = { + .apply_finish = bgp_unnumbered_neighbor_afi_safi_default_originate_apply_finish, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/default-originate/originate", + .cbs = { + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_originate_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/default-originate/route-map", + .cbs = { + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_destroy, + } + }, + { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/as-path-unchanged", .cbs = { .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_as_path_unchanged_modify, @@ -5070,52 +5369,58 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/force-check", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_force_check_modify, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/warning-only", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/restart-timer", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-restart-timer", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-warning-only", + .cbs = { + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy, } }, { @@ -5224,6 +5529,25 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate", + .cbs = { + .apply_finish = bgp_unnumbered_neighbor_afi_safi_default_originate_apply_finish, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/originate", + .cbs = { + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_originate_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/route-map", + .cbs = { + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_destroy, + } + }, + { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/as-path-unchanged", .cbs = { .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_as_path_unchanged_modify, @@ -5267,6 +5591,7 @@ const struct frr_yang_module_info frr_bgp_info = { .cbs = { .create = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_create, .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_destroy, + .apply_finish = bgp_unnumbered_neighbor_afi_safi_prefix_limit_apply_finish, } }, { @@ -5276,52 +5601,58 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/force-check", + .cbs = { + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_force_check_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/warning-only", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/restart-timer", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy, } }, { @@ -5430,6 +5761,25 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate", + .cbs = { + .apply_finish = bgp_unnumbered_neighbor_afi_safi_default_originate_apply_finish, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/originate", + .cbs = { + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_originate_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/route-map", + .cbs = { + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_destroy, + } + }, + { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/as-path-unchanged", .cbs = { .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_as_path_unchanged_modify, @@ -5473,6 +5823,7 @@ const struct frr_yang_module_info frr_bgp_info = { .cbs = { .create = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_create, .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_destroy, + .apply_finish = bgp_unnumbered_neighbor_afi_safi_prefix_limit_apply_finish, } }, { @@ -5482,52 +5833,58 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/force-check", + .cbs = { + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_force_check_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/warning-only", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/restart-timer", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy, } }, { @@ -5658,6 +6015,7 @@ const struct frr_yang_module_info frr_bgp_info = { .cbs = { .create = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_create, .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_destroy, + .apply_finish = bgp_unnumbered_neighbor_afi_safi_prefix_limit_apply_finish, } }, { @@ -5667,52 +6025,58 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/force-check", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_force_check_modify, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/warning-only", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/restart-timer", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only", + .cbs = { + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy, } }, { @@ -5843,6 +6207,7 @@ const struct frr_yang_module_info frr_bgp_info = { .cbs = { .create = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_create, .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_destroy, + .apply_finish = bgp_unnumbered_neighbor_afi_safi_prefix_limit_apply_finish, } }, { @@ -5852,52 +6217,58 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/force-check", + .cbs = { + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_force_check_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/warning-only", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/restart-timer", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only", .cbs = { - .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify, - .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify, + .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy, } }, { @@ -6110,16 +6481,22 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/default-originate-options/send-default-route", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/default-originate", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_options_send_default_route_modify, + .apply_finish = bgp_peer_group_afi_safi_default_originate_apply_finish, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/default-originate-options/rmap-policy-export", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/default-originate/originate", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_options_rmap_policy_export_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_options_rmap_policy_export_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_originate_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/default-originate/route-map", + .cbs = { + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_destroy, } }, { @@ -6127,6 +6504,7 @@ const struct frr_yang_module_info frr_bgp_info = { .cbs = { .create = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_create, .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_destroy, + .apply_finish = bgp_peer_group_afi_safi_prefix_limit_apply_finish, } }, { @@ -6136,52 +6514,58 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/force-check", + .cbs = { + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_force_check_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/warning-only", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/restart-timer", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy, } }, { @@ -6405,6 +6789,25 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/default-originate", + .cbs = { + .apply_finish = bgp_peer_group_afi_safi_default_originate_apply_finish, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/default-originate/originate", + .cbs = { + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_default_originate_originate_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/default-originate/route-map", + .cbs = { + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_destroy, + } + }, + { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/as-path-unchanged", .cbs = { .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_as_path_unchanged_modify, @@ -6448,6 +6851,7 @@ const struct frr_yang_module_info frr_bgp_info = { .cbs = { .create = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_create, .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_destroy, + .apply_finish = bgp_peer_group_afi_safi_prefix_limit_apply_finish, } }, { @@ -6457,52 +6861,58 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/force-check", + .cbs = { + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_force_check_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/warning-only", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/restart-timer", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy, } }, { @@ -6611,6 +7021,25 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/default-originate", + .cbs = { + .apply_finish = bgp_peer_group_afi_safi_default_originate_apply_finish, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/default-originate/originate", + .cbs = { + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_default_originate_originate_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/default-originate/route-map", + .cbs = { + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_destroy, + } + }, + { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/as-path-unchanged", .cbs = { .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_as_path_unchanged_modify, @@ -6654,6 +7083,7 @@ const struct frr_yang_module_info frr_bgp_info = { .cbs = { .create = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_create, .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_destroy, + .apply_finish = bgp_peer_group_afi_safi_prefix_limit_apply_finish, } }, { @@ -6663,52 +7093,64 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/force-check", + .cbs = { + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_force_check_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/force-check", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy, + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_force_check_modify, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/warning-only", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/restart-timer", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-restart-timer", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-warning-only", + .cbs = { + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy, } }, { @@ -6817,6 +7259,25 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/default-originate", + .cbs = { + .apply_finish = bgp_peer_group_afi_safi_default_originate_apply_finish, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/default-originate/originate", + .cbs = { + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_default_originate_originate_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/default-originate/route-map", + .cbs = { + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_destroy, + } + }, + { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/as-path-unchanged", .cbs = { .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_as_path_unchanged_modify, @@ -6860,6 +7321,7 @@ const struct frr_yang_module_info frr_bgp_info = { .cbs = { .create = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_create, .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_destroy, + .apply_finish = bgp_peer_group_afi_safi_prefix_limit_apply_finish, } }, { @@ -6869,52 +7331,64 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/force-check", + .cbs = { + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_force_check_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/force-check", + .cbs = { + .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_force_check_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/warning-only", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/restart-timer", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-restart-timer", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-warning-only", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy, } }, { @@ -7023,6 +7497,25 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate", + .cbs = { + .apply_finish = bgp_peer_group_afi_safi_default_originate_apply_finish, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/originate", + .cbs = { + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_originate_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/route-map", + .cbs = { + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_destroy, + } + }, + { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/as-path-unchanged", .cbs = { .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_as_path_unchanged_modify, @@ -7066,6 +7559,7 @@ const struct frr_yang_module_info frr_bgp_info = { .cbs = { .create = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_create, .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_destroy, + .apply_finish = bgp_peer_group_afi_safi_prefix_limit_apply_finish, } }, { @@ -7075,52 +7569,58 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/force-check", + .cbs = { + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_force_check_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/warning-only", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/restart-timer", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy, } }, { @@ -7229,6 +7729,25 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate", + .cbs = { + .apply_finish = bgp_peer_group_afi_safi_default_originate_apply_finish, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/originate", + .cbs = { + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_originate_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/route-map", + .cbs = { + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_destroy, + } + }, + { .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/as-path-unchanged", .cbs = { .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_as_path_unchanged_modify, @@ -7272,6 +7791,7 @@ const struct frr_yang_module_info frr_bgp_info = { .cbs = { .create = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_create, .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_destroy, + .apply_finish = bgp_peer_group_afi_safi_prefix_limit_apply_finish, } }, { @@ -7281,52 +7801,58 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/force-check", + .cbs = { + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_force_check_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/warning-only", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/restart-timer", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy, } }, { @@ -7457,6 +7983,7 @@ const struct frr_yang_module_info frr_bgp_info = { .cbs = { .create = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_create, .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_destroy, + .apply_finish = bgp_peer_group_afi_safi_prefix_limit_apply_finish, } }, { @@ -7466,52 +7993,58 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/force-check", + .cbs = { + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_force_check_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/warning-only", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/restart-timer", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy, } }, { @@ -7642,6 +8175,7 @@ const struct frr_yang_module_info frr_bgp_info = { .cbs = { .create = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_create, .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_destroy, + .apply_finish = bgp_peer_group_afi_safi_prefix_limit_apply_finish, } }, { @@ -7651,52 +8185,58 @@ const struct frr_yang_module_info frr_bgp_info = { } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/force-check", + .cbs = { + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_force_check_modify, + } + }, + { + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/warning-only", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/restart-timer", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy, } }, { - .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only", + .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only", .cbs = { - .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify, - .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy, + .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify, + .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy, } }, { diff --git a/bgpd/bgp_nb.h b/bgpd/bgp_nb.h index 532021425f..c78c9c34ad 100644 --- a/bgpd/bgp_nb.h +++ b/bgpd/bgp_nb.h @@ -210,6 +210,8 @@ int bgp_neighbors_neighbor_update_source_interface_destroy( struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_neighbor_remote_as_remote_as_type_modify( struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_neighbor_remote_as_remote_as_type_destroy( + struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_neighbor_remote_as_remote_as_modify( struct nb_cb_modify_args *args); int bgp_neighbors_neighbor_neighbor_remote_as_remote_as_destroy( @@ -226,6 +228,8 @@ int bgp_neighbors_neighbor_ebgp_multihop_disable_connected_check_modify( struct nb_cb_modify_args *args); int bgp_neighbors_neighbor_local_as_local_as_modify( struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_local_as_local_as_destroy( + struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_local_as_no_prepend_modify( struct nb_cb_modify_args *args); int bgp_neighbors_neighbor_local_as_no_prepend_destroy( @@ -256,6 +260,8 @@ int bgp_neighbors_neighbor_bfd_options_check_cp_failure_destroy( struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_admin_shutdown_enable_modify( struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_admin_shutdown_enable_destroy( + struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_admin_shutdown_message_modify( struct nb_cb_modify_args *args); int bgp_neighbors_neighbor_admin_shutdown_message_destroy( @@ -290,6 +296,8 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_destroy( struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_enabled_modify( struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_afi_safis_afi_safi_enabled_destroy( + struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_create(struct nb_cb_create_args *args); int bgp_neighbors_unnumbered_neighbor_destroy(struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_v6only_modify( @@ -336,6 +344,8 @@ int bgp_neighbors_unnumbered_neighbor_update_source_interface_destroy( struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_type_modify( struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_type_destroy( + struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_modify( struct nb_cb_modify_args *args); int bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_destroy( @@ -352,6 +362,8 @@ int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_disable_connected_check_modi struct nb_cb_modify_args *args); int bgp_neighbors_unnumbered_neighbor_local_as_local_as_modify( struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_local_as_local_as_destroy( + struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_local_as_no_prepend_modify( struct nb_cb_modify_args *args); int bgp_neighbors_unnumbered_neighbor_local_as_no_prepend_destroy( @@ -382,6 +394,8 @@ int bgp_neighbors_unnumbered_neighbor_bfd_options_check_cp_failure_destroy( struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_admin_shutdown_enable_modify( struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_admin_shutdown_enable_destroy( + struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_admin_shutdown_message_modify( struct nb_cb_modify_args *args); int bgp_neighbors_unnumbered_neighbor_admin_shutdown_message_destroy( @@ -416,6 +430,8 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_destroy( struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_enabled_modify( struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_enabled_destroy( + struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_create(struct nb_cb_create_args *args); int bgp_peer_groups_peer_group_destroy(struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_ipv4_listen_range_create( @@ -462,6 +478,8 @@ int bgp_peer_groups_peer_group_update_source_interface_destroy( struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_type_modify( struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_type_destroy( + struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_modify( struct nb_cb_modify_args *args); int bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_destroy( @@ -478,6 +496,8 @@ int bgp_peer_groups_peer_group_ebgp_multihop_disable_connected_check_modify( struct nb_cb_modify_args *args); int bgp_peer_groups_peer_group_local_as_local_as_modify( struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_local_as_local_as_destroy( + struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_local_as_no_prepend_modify( struct nb_cb_modify_args *args); int bgp_peer_groups_peer_group_local_as_no_prepend_destroy( @@ -508,6 +528,8 @@ int bgp_peer_groups_peer_group_bfd_options_check_cp_failure_destroy( struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_admin_shutdown_enable_modify( struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_admin_shutdown_enable_destroy( + struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_admin_shutdown_message_modify( struct nb_cb_modify_args *args); int bgp_peer_groups_peer_group_admin_shutdown_message_destroy( @@ -542,6 +564,8 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_destroy( struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_enabled_modify( struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_afi_safis_afi_safi_enabled_destroy( + struct nb_cb_destroy_args *args); int bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_create( struct nb_cb_create_args *args); int bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_destroy( @@ -1076,11 +1100,11 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_replace_peer_as_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_options_send_default_route_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_originate_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_options_rmap_policy_export_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_options_rmap_policy_export_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_destroy( struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_create( struct nb_cb_create_args *args); @@ -1088,33 +1112,35 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_directio struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_modify( struct nb_cb_modify_args *args); @@ -1216,6 +1242,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_replace_peer_as_modify( struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_originate_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_as_path_unchanged_modify( struct nb_cb_modify_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify( @@ -1240,33 +1272,35 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_directio struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_force_check_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_modify( struct nb_cb_modify_args *args); @@ -1308,6 +1342,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_all struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_replace_peer_as_modify( struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_originate_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_as_path_unchanged_modify( struct nb_cb_modify_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_next_hop_unchanged_modify( @@ -1332,33 +1372,35 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direct struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_max_prefixes_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_force_check_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_modify( struct nb_cb_modify_args *args); @@ -1400,6 +1442,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_all struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_replace_peer_as_modify( struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_originate_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_as_path_unchanged_modify( struct nb_cb_modify_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_next_hop_unchanged_modify( @@ -1424,33 +1472,35 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direct struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_max_prefixes_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_modify( struct nb_cb_modify_args *args); @@ -1492,6 +1542,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_optio struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_replace_peer_as_modify( struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_originate_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_as_path_unchanged_modify( struct nb_cb_modify_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_next_hop_unchanged_modify( @@ -1516,33 +1572,35 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_ struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_force_check_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_modify( struct nb_cb_modify_args *args); @@ -1584,6 +1642,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_optio struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_replace_peer_as_modify( struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_originate_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_as_path_unchanged_modify( struct nb_cb_modify_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_next_hop_unchanged_modify( @@ -1608,33 +1672,35 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_ struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_force_check_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_modify( struct nb_cb_modify_args *args); @@ -1688,33 +1754,35 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_di struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_modify( struct nb_cb_modify_args *args); @@ -1768,33 +1836,35 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_di struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_force_check_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args); int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_modify( struct nb_cb_modify_args *args); @@ -1874,11 +1944,11 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_op struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_replace_peer_as_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_options_send_default_route_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_originate_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_options_rmap_policy_export_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_options_rmap_policy_export_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_destroy( struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_create( struct nb_cb_create_args *args); @@ -1886,33 +1956,35 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_lim struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_force_check_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_modify( struct nb_cb_modify_args *args); @@ -2014,6 +2086,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_op struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_replace_peer_as_modify( struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_originate_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_as_path_unchanged_modify( struct nb_cb_modify_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify( @@ -2038,33 +2116,35 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_lim struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_modify( struct nb_cb_modify_args *args); @@ -2106,6 +2186,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_ struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_replace_peer_as_modify( struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_originate_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_as_path_unchanged_modify( struct nb_cb_modify_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_next_hop_unchanged_modify( @@ -2130,33 +2216,35 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_l struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_max_prefixes_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_force_check_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_modify( struct nb_cb_modify_args *args); @@ -2198,6 +2286,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_ struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_replace_peer_as_modify( struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_originate_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_as_path_unchanged_modify( struct nb_cb_modify_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_next_hop_unchanged_modify( @@ -2222,33 +2316,35 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_l struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_max_prefixes_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_force_check_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_modify( struct nb_cb_modify_args *args); @@ -2290,6 +2386,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_replace_peer_as_modify( struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_originate_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_as_path_unchanged_modify( struct nb_cb_modify_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_next_hop_unchanged_modify( @@ -2314,33 +2416,35 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_pr struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_modify( struct nb_cb_modify_args *args); @@ -2382,6 +2486,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_replace_peer_as_modify( struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_originate_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_as_path_unchanged_modify( struct nb_cb_modify_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_next_hop_unchanged_modify( @@ -2406,33 +2516,35 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_pr struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_force_check_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_modify( struct nb_cb_modify_args *args); @@ -2486,33 +2598,35 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_pref struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_force_check_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_modify( struct nb_cb_modify_args *args); @@ -2566,33 +2680,35 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_pref struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args); +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args); int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_modify( struct nb_cb_modify_args *args); @@ -2672,11 +2788,11 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_as_path_options_a struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_as_path_options_replace_peer_as_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_options_send_default_route_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_originate_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_options_rmap_policy_export_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_options_rmap_policy_export_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_destroy( struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_create( struct nb_cb_create_args *args); @@ -2684,33 +2800,35 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_dire struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_force_check_modify( + struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_modify( struct nb_cb_modify_args *args); @@ -2812,6 +2930,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_as_path_options_a struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_as_path_options_replace_peer_as_modify( struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_default_originate_originate_modify( + struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_as_path_unchanged_modify( struct nb_cb_modify_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify( @@ -2836,33 +2960,35 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_dire struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_force_check_modify( + struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_modify( struct nb_cb_modify_args *args); @@ -2904,6 +3030,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_as_path_options struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_as_path_options_replace_peer_as_modify( struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_default_originate_originate_modify( + struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_as_path_unchanged_modify( struct nb_cb_modify_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_next_hop_unchanged_modify( @@ -2928,33 +3060,35 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_di struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_max_prefixes_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_modify( struct nb_cb_modify_args *args); @@ -2996,6 +3130,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_as_path_options struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_as_path_options_replace_peer_as_modify( struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_default_originate_originate_modify( + struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_as_path_unchanged_modify( struct nb_cb_modify_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_next_hop_unchanged_modify( @@ -3020,33 +3160,35 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_di struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_max_prefixes_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_force_check_modify( + struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_modify( struct nb_cb_modify_args *args); @@ -3088,6 +3230,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_o struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_replace_peer_as_modify( struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_originate_modify( + struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_as_path_unchanged_modify( struct nb_cb_modify_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_next_hop_unchanged_modify( @@ -3112,33 +3260,35 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_li struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_force_check_modify( + struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_modify( struct nb_cb_modify_args *args); @@ -3180,6 +3330,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_o struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_replace_peer_as_modify( struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_originate_modify( + struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_as_path_unchanged_modify( struct nb_cb_modify_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_next_hop_unchanged_modify( @@ -3204,33 +3360,35 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_li struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_modify( struct nb_cb_modify_args *args); @@ -3284,33 +3442,35 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limi struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_force_check_modify( + struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_modify( struct nb_cb_modify_args *args); @@ -3364,33 +3524,35 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limi struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_force_check_modify( + struct nb_cb_modify_args *args); +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args); -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args); int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_modify( struct nb_cb_modify_args *args); @@ -3577,6 +3739,34 @@ void bgp_global_afi_safi_ip_unicast_redistribution_list_apply_finish( struct nb_cb_apply_finish_args *args); void bgp_global_afi_safis_afi_safi_route_flap_dampening_apply_finish( struct nb_cb_apply_finish_args *args); +void bgp_neighbors_neighbor_local_as_apply_finish( + struct nb_cb_apply_finish_args *args); +void bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_apply_finish( + struct nb_cb_apply_finish_args *args); +void bgp_neighbors_unnumbered_neighbor_local_as_apply_finish( + struct nb_cb_apply_finish_args *args); +void bgp_peer_group_neighbor_remote_as_apply_finish( + struct nb_cb_apply_finish_args *args); +void bgp_neighbors_neighbor_admin_shutdown_apply_finish( + struct nb_cb_apply_finish_args *args); +void bgp_neighbors_unnumbered_neighbor_admin_shutdown_apply_finish( + struct nb_cb_apply_finish_args *args); +void bgp_peer_groups_peer_group_admin_shutdown_apply_finish( + struct nb_cb_apply_finish_args *args); +void bgp_peer_groups_peer_group_local_as_apply_finish( + struct nb_cb_apply_finish_args *args); +void bgp_neighbors_neighbor_afi_safi_prefix_limit_apply_finish( + struct nb_cb_apply_finish_args *args); +void bgp_unnumbered_neighbor_afi_safi_prefix_limit_apply_finish( + struct nb_cb_apply_finish_args *args); +void bgp_peer_group_afi_safi_prefix_limit_apply_finish( + struct nb_cb_apply_finish_args *args); +void bgp_neighbor_afi_safi_default_originate_apply_finish( + struct nb_cb_apply_finish_args *args); +void bgp_unnumbered_neighbor_afi_safi_default_originate_apply_finish( + struct nb_cb_apply_finish_args *args); +void bgp_peer_group_afi_safi_default_originate_apply_finish( + struct nb_cb_apply_finish_args *args); /* xpath macros */ /* route-list */ @@ -3592,5 +3782,17 @@ void bgp_global_afi_safis_afi_safi_route_flap_dampening_apply_finish( #define FRR_BGP_AFI_SAFI_REDIST_XPATH \ "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/" \ "redistribution-list[route-type='%s'][route-instance='%s']" +#define FRR_BGP_NEIGHBOR_NUM_XPATH "./neighbors/neighbor[remote-address='%s']%s" +#define FRR_BGP_NEIGHBOR_UNNUM_XPATH \ + "./neighbors/unnumbered-neighbor[interface='%s']%s" +#define FRR_BGP_PEER_GROUP_XPATH \ + "./peer-groups/peer-group[peer-group-name='%s']%s" +#define FRR_BGP_NEIGHBOR_NUM_AFI_SAFI_XPATH \ + "./neighbors/neighbor[remote-address='%s']/afi-safis/afi-safi[afi-safi-name='%s']" +#define FRR_BGP_NEIGHBOR_UNNUM_AFI_SAFI_XPATH \ + "./neighbors/neighbor[interface='%s']/afi-safis/afi-safi[afi-safi-name='%s']" +#define FRR_BGP_PEER_GROUP_AFI_SAFI_XPATH \ + "./peer-groups/peer-group[peer-group-name='%s']/afi-safis/afi-safi[afi-safi-name='%s']" +#define FRR_BGP_AF_XPATH "/afi-safis/afi-safi[afi-safi-name='%s']" #endif diff --git a/bgpd/bgp_nb_config.c b/bgpd/bgp_nb_config.c index 66dfa2aea7..096fd11d18 100644 --- a/bgpd/bgp_nb_config.c +++ b/bgpd/bgp_nb_config.c @@ -2090,18 +2090,73 @@ int bgp_global_afi_safis_afi_safi_destroy(struct nb_cb_destroy_args *args) return NB_OK; } +static struct peer *bgp_neighbor_peer_lookup(struct bgp *bgp, + const char *peer_str, char *errmsg, + size_t errmsg_len) +{ + struct peer *peer = NULL; + union sockunion su; + + str2sockunion(peer_str, &su); + peer = peer_lookup(bgp, &su); + if (!peer) { + snprintf(errmsg, errmsg_len, + "Specify remote-as or peer-group commands first"); + return NULL; + } + if (peer_dynamic_neighbor(peer)) { + snprintf(errmsg, errmsg_len, + "Operation not allowed on a dynamic neighbor\n"); + return NULL; + } + return peer; +} + /* * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor */ int bgp_neighbors_neighbor_create(struct nb_cb_create_args *args) { + struct bgp *bgp; + const char *peer_str; + union sockunion su; + switch (args->event) { case NB_EV_VALIDATE: + + peer_str = + yang_dnode_get_string(args->dnode, "./remote-address"); + + bgp = nb_running_get_entry(args->dnode, NULL, false); + if (!bgp) + return NB_OK; + + str2sockunion(peer_str, &su); + if (peer_address_self_check(bgp, &su)) { + snprintf( + args->errmsg, args->errmsg_len, + "Can not configure the local system as neighbor"); + return NB_ERR_VALIDATION; + } + + break; case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + /* Once bgp instance available check self peer addr */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + + peer_str = + yang_dnode_get_string(args->dnode, "./remote-address"); + str2sockunion(peer_str, &su); + if (peer_address_self_check(bgp, &su)) { + snprintf( + args->errmsg, args->errmsg_len, + "Can not configure the local system as neighbor"); + return NB_ERR_INCONSISTENCY; + } break; } @@ -2110,12 +2165,65 @@ int bgp_neighbors_neighbor_create(struct nb_cb_create_args *args) int bgp_neighbors_neighbor_destroy(struct nb_cb_destroy_args *args) { + + struct bgp *bgp; + const char *peer_str; + union sockunion su; + struct peer *peer = NULL; + struct peer *other; + switch (args->event) { case NB_EV_VALIDATE: + bgp = nb_running_get_entry(args->dnode, NULL, false); + if (!bgp) + return NB_OK; + peer_str = + yang_dnode_get_string(args->dnode, "./remote-address"); + str2sockunion(peer_str, &su); + + peer = peer_lookup(bgp, &su); + if (peer) { + if (peer_dynamic_neighbor(peer)) { + snprintf( + args->errmsg, args->errmsg_len, + "Operation not allowed on a dynamic neighbor"); + return NB_ERR_VALIDATION; + } + } + break; case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + + bgp = nb_running_get_entry(args->dnode, NULL, true); + + peer_str = + yang_dnode_get_string(args->dnode, "./remote-address"); + str2sockunion(peer_str, &su); + + peer = peer_lookup(bgp, &su); + if (peer) { + if (peer_dynamic_neighbor(peer)) { + snprintf( + args->errmsg, args->errmsg_len, + "Operation not allowed on a dynamic neighbor"); + return NB_ERR_INCONSISTENCY; + } + + other = peer->doppelganger; + + if (CHECK_FLAG(peer->flags, PEER_FLAG_CAPABILITY_ENHE)) + bgp_zebra_terminate_radv(peer->bgp, peer); + + peer_notify_unconfig(peer); + peer_delete(peer); + if (other && other->status != Deleted) { + peer_notify_unconfig(other); + peer_delete(other); + } + } + break; } @@ -2129,12 +2237,38 @@ int bgp_neighbors_neighbor_destroy(struct nb_cb_destroy_args *args) int bgp_neighbors_neighbor_local_interface_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + const char *intf_str; + struct peer *peer; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) { + snprintf(args->errmsg, args->errmsg_len, + "BGP invalid peer %s", peer_str); + return NB_ERR_INCONSISTENCY; + } + + if (peer->conf_if) { + snprintf(args->errmsg, args->errmsg_len, + "BGP invalid peer %s", peer_str); + return NB_ERR_INCONSISTENCY; + } + + intf_str = yang_dnode_get_string(args->dnode, NULL); + + peer_interface_set(peer, intf_str); + break; } @@ -2144,12 +2278,35 @@ int bgp_neighbors_neighbor_local_interface_modify( int bgp_neighbors_neighbor_local_interface_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) { + snprintf(args->errmsg, args->errmsg_len, + "BGP invalid peer %s", peer_str); + return NB_ERR_INCONSISTENCY; + } + + if (peer->conf_if) { + snprintf(args->errmsg, args->errmsg_len, + "BGP invalid peer %s", peer_str); + return NB_ERR_INCONSISTENCY; + } + + peer_interface_unset(peer); + break; } @@ -2162,12 +2319,31 @@ int bgp_neighbors_neighbor_local_interface_destroy( */ int bgp_neighbors_neighbor_local_port_modify(struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + uint16_t port; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) { + snprintf(args->errmsg, args->errmsg_len, + "BGP invalid peer %s", peer_str); + return NB_ERR_INCONSISTENCY; + } + + port = yang_dnode_get_uint16(args->dnode, NULL); + peer_port_set(peer, port); + break; } @@ -2176,12 +2352,33 @@ int bgp_neighbors_neighbor_local_port_modify(struct nb_cb_modify_args *args) int bgp_neighbors_neighbor_local_port_destroy(struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + uint16_t port; + struct servent *sp; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) { + snprintf(args->errmsg, args->errmsg_len, + "BGP invalid peer %s", peer_str); + return NB_ERR_INCONSISTENCY; + } + + sp = getservbyname("bgp", "tcp"); + port = (sp == NULL) ? BGP_PORT_DEFAULT : ntohs(sp->s_port); + peer_port_set(peer, port); + break; } @@ -2194,12 +2391,67 @@ int bgp_neighbors_neighbor_local_port_destroy(struct nb_cb_destroy_args *args) */ int bgp_neighbors_neighbor_peer_group_modify(struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + const char *peer_grp_str; + struct peer *peer; + struct peer_group *group; + union sockunion su; + as_t as; + int ret = 0; + char prgrp_xpath[XPATH_MAXLEN]; + const struct lyd_node *bgp_dnode; + switch (args->event) { case NB_EV_VALIDATE: + peer_grp_str = yang_dnode_get_string(args->dnode, NULL); + bgp_dnode = yang_dnode_get_parent(args->dnode, "bgp"); + snprintf(prgrp_xpath, sizeof(prgrp_xpath), + FRR_BGP_PEER_GROUP_XPATH, peer_grp_str, ""); + + if (!yang_dnode_exists(bgp_dnode, prgrp_xpath)) { + snprintf(args->errmsg, args->errmsg_len, + "Configure the peer-group first %s", + peer_grp_str); + return NB_ERR_VALIDATION; + } + + break; case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + + str2sockunion(peer_str, &su); + + peer_grp_str = yang_dnode_get_string(args->dnode, NULL); + group = peer_group_lookup(bgp, peer_grp_str); + if (!group) { + snprintf(args->errmsg, args->errmsg_len, + "Configure the peer-group first %s", + peer_grp_str); + return NB_ERR_INCONSISTENCY; + } + + ret = peer_group_bind(bgp, &su, peer, group, &as); + + if (ret == BGP_ERR_PEER_GROUP_PEER_TYPE_DIFFERENT) { + snprintf( + args->errmsg, args->errmsg_len, + "Peer with AS %u cannot be in this peer-group, members must be all internal or all external\n", + as); + return NB_ERR_INCONSISTENCY; + } + + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -2208,12 +2460,33 @@ int bgp_neighbors_neighbor_peer_group_modify(struct nb_cb_modify_args *args) int bgp_neighbors_neighbor_peer_group_destroy(struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + int ret; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + + if (CHECK_FLAG(peer->flags, PEER_FLAG_CAPABILITY_ENHE)) + bgp_zebra_terminate_radv(peer->bgp, peer); + + peer_notify_unconfig(peer); + ret = peer_delete(peer); + + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -2226,12 +2499,29 @@ int bgp_neighbors_neighbor_peer_group_destroy(struct nb_cb_destroy_args *args) */ int bgp_neighbors_neighbor_password_modify(struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + const char *passwrd_str; + struct peer *peer; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + passwrd_str = yang_dnode_get_string(args->dnode, NULL); + + peer_password_set(peer, passwrd_str); + break; } @@ -2240,12 +2530,26 @@ int bgp_neighbors_neighbor_password_modify(struct nb_cb_modify_args *args) int bgp_neighbors_neighbor_password_destroy(struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + peer_password_unset(peer); + break; } @@ -2258,12 +2562,44 @@ int bgp_neighbors_neighbor_password_destroy(struct nb_cb_destroy_args *args) */ int bgp_neighbors_neighbor_ttl_security_modify(struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + int ret; + uint8_t gtsm_hops; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + gtsm_hops = yang_dnode_get_uint8(args->dnode, NULL); + /* + * If 'neighbor swpX', then this is for directly connected + * peers, we should not accept a ttl-security hops value greater + * than 1. + */ + if (peer->conf_if && (gtsm_hops > BGP_GTSM_HOPS_CONNECTED)) { + snprintf( + args->errmsg, args->errmsg_len, + "%d is directly connected peer, hops cannot exceed 1\n", + gtsm_hops); + return NB_ERR_INCONSISTENCY; + } + + ret = peer_ttl_security_hops_set(peer, gtsm_hops); + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)) + return NB_ERR_INCONSISTENCY; + break; } @@ -2272,12 +2608,31 @@ int bgp_neighbors_neighbor_ttl_security_modify(struct nb_cb_modify_args *args) int bgp_neighbors_neighbor_ttl_security_destroy(struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + int ret; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + ret = peer_ttl_security_hops_unset(peer); + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + + break; } @@ -2309,12 +2664,28 @@ int bgp_neighbors_neighbor_solo_modify(struct nb_cb_modify_args *args) int bgp_neighbors_neighbor_enforce_first_as_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool enable = false; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + + enable = yang_dnode_get_bool(args->dnode, NULL); + + peer_flag_modify_nb(bgp, peer_str, peer, + PEER_FLAG_ENFORCE_FIRST_AS, enable, + args->errmsg, args->errmsg_len); break; } @@ -2327,12 +2698,30 @@ int bgp_neighbors_neighbor_enforce_first_as_modify( */ int bgp_neighbors_neighbor_description_modify(struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + const char *desc_str; + struct peer *peer; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../remote-address"); + + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + desc_str = yang_dnode_get_string(args->dnode, NULL); + + peer_description_set(peer, desc_str); + break; } @@ -2341,12 +2730,26 @@ int bgp_neighbors_neighbor_description_modify(struct nb_cb_modify_args *args) int bgp_neighbors_neighbor_description_destroy(struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + peer_description_unset(peer); + break; } @@ -2359,12 +2762,32 @@ int bgp_neighbors_neighbor_description_destroy(struct nb_cb_destroy_args *args) */ int bgp_neighbors_neighbor_passive_mode_modify(struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool set = false; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + set = yang_dnode_get_bool(args->dnode, NULL); + + if (peer_flag_modify_nb(bgp, peer_str, peer, PEER_FLAG_PASSIVE, + set, args->errmsg, args->errmsg_len) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -2378,12 +2801,29 @@ int bgp_neighbors_neighbor_passive_mode_modify(struct nb_cb_modify_args *args) int bgp_neighbors_neighbor_capability_options_dynamic_capability_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool enable = false; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + + enable = yang_dnode_get_bool(args->dnode, NULL); + + peer_flag_modify_nb(bgp, peer_str, peer, + PEER_FLAG_DYNAMIC_CAPABILITY, enable, + args->errmsg, args->errmsg_len); + break; } @@ -2397,12 +2837,29 @@ int bgp_neighbors_neighbor_capability_options_dynamic_capability_modify( int bgp_neighbors_neighbor_capability_options_strict_capability_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool enable = false; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + + enable = yang_dnode_get_bool(args->dnode, NULL); + + peer_flag_modify_nb(bgp, peer_str, peer, + PEER_FLAG_STRICT_CAP_MATCH, enable, + args->errmsg, args->errmsg_len); + break; } @@ -2416,12 +2873,29 @@ int bgp_neighbors_neighbor_capability_options_strict_capability_modify( int bgp_neighbors_neighbor_capability_options_extended_nexthop_capability_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool enable = false; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + + enable = yang_dnode_get_bool(args->dnode, NULL); + + peer_flag_modify_nb(bgp, peer_str, peer, + PEER_FLAG_CAPABILITY_ENHE, enable, + args->errmsg, args->errmsg_len); + break; } @@ -2454,12 +2928,29 @@ int bgp_neighbors_neighbor_capability_options_capability_negotiate_modify( int bgp_neighbors_neighbor_capability_options_override_capability_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool enable = false; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + + enable = yang_dnode_get_bool(args->dnode, NULL); + + peer_flag_modify_nb(bgp, peer_str, peer, + PEER_FLAG_OVERRIDE_CAPABILITY, enable, + args->errmsg, args->errmsg_len); + break; } @@ -2473,12 +2964,30 @@ int bgp_neighbors_neighbor_capability_options_override_capability_modify( int bgp_neighbors_neighbor_update_source_ip_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str, *source_str; + struct peer *peer; + union sockunion su; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + source_str = yang_dnode_get_string(args->dnode, NULL); + + str2sockunion(source_str, &su); + peer_update_source_addr_set(peer, &su); + break; } @@ -2488,12 +2997,26 @@ int bgp_neighbors_neighbor_update_source_ip_modify( int bgp_neighbors_neighbor_update_source_ip_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + peer_update_source_unset(peer); + break; } @@ -2507,12 +3030,28 @@ int bgp_neighbors_neighbor_update_source_ip_destroy( int bgp_neighbors_neighbor_update_source_interface_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str, *source_str; + struct peer *peer; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + source_str = yang_dnode_get_string(args->dnode, NULL); + + peer_update_source_if_set(peer, source_str); + break; } @@ -2522,12 +3061,26 @@ int bgp_neighbors_neighbor_update_source_interface_modify( int bgp_neighbors_neighbor_update_source_interface_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + peer_update_source_unset(peer); + break; } @@ -2541,6 +3094,46 @@ int bgp_neighbors_neighbor_update_source_interface_destroy( int bgp_neighbors_neighbor_neighbor_remote_as_remote_as_type_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + int as_type = AS_SPECIFIED; + union sockunion su; + int ret; + as_t as = 0; + + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + return NB_OK; + case NB_EV_APPLY: + bgp = nb_running_get_entry(args->dnode, NULL, true); + + peer_str = yang_dnode_get_string(args->dnode, + "../../remote-address"); + as_type = yang_dnode_get_enum(args->dnode, "../remote-as-type"); + /* When remote-as-type is as-specified, the peer will be + * created in remote_as_modify callback */ + if (yang_dnode_exists(args->dnode, "../remote-as")) + return NB_OK; + + str2sockunion(peer_str, &su); + ret = peer_remote_as(bgp, &su, NULL, &as, as_type, AFI_IP, + SAFI_UNICAST); + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + + + break; + } + + return NB_OK; +} + +int bgp_neighbors_neighbor_neighbor_remote_as_remote_as_type_destroy( + struct nb_cb_destroy_args *args) +{ switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: @@ -2560,12 +3153,34 @@ int bgp_neighbors_neighbor_neighbor_remote_as_remote_as_type_modify( int bgp_neighbors_neighbor_neighbor_remote_as_remote_as_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + int as_type = AS_SPECIFIED; + union sockunion su; + int ret; + as_t as = 0; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + + peer_str = yang_dnode_get_string(args->dnode, + "../../remote-address"); + as_type = yang_dnode_get_enum(args->dnode, "../remote-as-type"); + as = yang_dnode_get_uint32(args->dnode, NULL); + + str2sockunion(peer_str, &su); + ret = peer_remote_as(bgp, &su, NULL, &as, as_type, AFI_IP, + SAFI_UNICAST); + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + + break; } @@ -2594,12 +3209,46 @@ int bgp_neighbors_neighbor_neighbor_remote_as_remote_as_destroy( int bgp_neighbors_neighbor_ebgp_multihop_enabled_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool set = false; + int ret = 0; + uint8_t ttl = MAXTTL; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + if (peer->conf_if) { + ret = BGP_ERR_INVALID_FOR_DIRECT_PEER; + bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, + ret); + return NB_ERR_INCONSISTENCY; + } + + set = yang_dnode_get_bool(args->dnode, NULL); + + if (set) + ret = peer_ebgp_multihop_set(peer, ttl); + else + ret = peer_ebgp_multihop_unset(peer); + + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + + break; } @@ -2609,12 +3258,32 @@ int bgp_neighbors_neighbor_ebgp_multihop_enabled_modify( int bgp_neighbors_neighbor_ebgp_multihop_enabled_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + int ret = 0; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + ret = peer_ebgp_multihop_unset(peer); + + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + + break; } @@ -2628,12 +3297,39 @@ int bgp_neighbors_neighbor_ebgp_multihop_enabled_destroy( int bgp_neighbors_neighbor_ebgp_multihop_multihop_ttl_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + int ret = 0; + uint8_t ttl = MAXTTL; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + if (peer->conf_if) { + ret = BGP_ERR_INVALID_FOR_DIRECT_PEER; + bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, + ret); + return NB_ERR_INCONSISTENCY; + } + + ttl = yang_dnode_get_uint8(args->dnode, NULL); + + ret = peer_ebgp_multihop_set(peer, ttl); + + bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret); + break; } @@ -2643,12 +3339,29 @@ int bgp_neighbors_neighbor_ebgp_multihop_multihop_ttl_modify( int bgp_neighbors_neighbor_ebgp_multihop_multihop_ttl_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + int ret = 0; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + ret = peer_ebgp_multihop_unset(peer); + + bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret); + break; } @@ -2662,12 +3375,33 @@ int bgp_neighbors_neighbor_ebgp_multihop_multihop_ttl_destroy( int bgp_neighbors_neighbor_ebgp_multihop_disable_connected_check_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool set = false; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + set = yang_dnode_get_bool(args->dnode, NULL); + + if (peer_flag_modify_nb(bgp, peer_str, peer, + PEER_FLAG_DISABLE_CONNECTED_CHECK, set, + args->errmsg, args->errmsg_len) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -2676,6 +3410,41 @@ int bgp_neighbors_neighbor_ebgp_multihop_disable_connected_check_modify( /* * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-as + */ +void bgp_neighbors_neighbor_local_as_apply_finish( + struct nb_cb_apply_finish_args *args) +{ + struct bgp *bgp; + int ret; + as_t as = 0; + const char *peer_str; + struct peer *peer = NULL; + bool no_prepend = 0; + bool replace_as = 0; + + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, "../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + + if (yang_dnode_exists(args->dnode, "./local-as")) + as = yang_dnode_get_uint32(args->dnode, "./local-as"); + if (yang_dnode_exists(args->dnode, "./no-prepend")) + no_prepend = yang_dnode_get_bool(args->dnode, "./no-prepend"); + if (yang_dnode_exists(args->dnode, "./no-replace-as")) + replace_as = + yang_dnode_get_bool(args->dnode, "./no-replace-as"); + + if (!as && !no_prepend && !replace_as) + ret = peer_local_as_unset(peer); + else + ret = peer_local_as_set(peer, as, no_prepend, replace_as); + bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret); +} + +/* + * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-as/local-as */ int bgp_neighbors_neighbor_local_as_local_as_modify( @@ -2693,6 +3462,40 @@ int bgp_neighbors_neighbor_local_as_local_as_modify( return NB_OK; } +int bgp_neighbors_neighbor_local_as_local_as_destroy( + struct nb_cb_destroy_args *args) +{ + struct bgp *bgp; + int ret; + const char *peer_str; + struct peer *peer; + + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + return NB_OK; + case NB_EV_APPLY: + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../remote-address"); + + + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + + ret = peer_local_as_unset(peer); + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + + + break; + } + + return NB_OK; +} + /* * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-as/no-prepend @@ -2937,6 +3740,34 @@ int bgp_neighbors_neighbor_bfd_options_check_cp_failure_destroy( /* * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/admin-shutdown + */ +void bgp_neighbors_neighbor_admin_shutdown_apply_finish( + struct nb_cb_apply_finish_args *args) +{ + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool enable = false; + const char *message; + + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, "../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + + if (yang_dnode_exists(args->dnode, "./message")) { + message = yang_dnode_get_string(args->dnode, "./message"); + peer_tx_shutdown_message_set(peer, message); + } + enable = yang_dnode_get_bool(args->dnode, "./enable"); + + peer_flag_modify_nb(bgp, peer_str, peer, PEER_FLAG_SHUTDOWN, enable, + args->errmsg, args->errmsg_len); +} + +/* + * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/admin-shutdown/enable */ int bgp_neighbors_neighbor_admin_shutdown_enable_modify( @@ -2954,6 +3785,21 @@ int bgp_neighbors_neighbor_admin_shutdown_enable_modify( return NB_OK; } +int bgp_neighbors_neighbor_admin_shutdown_enable_destroy( + struct nb_cb_destroy_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + /* * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/admin-shutdown/message @@ -3097,12 +3943,30 @@ int bgp_neighbors_neighbor_graceful_restart_graceful_restart_disable_destroy( int bgp_neighbors_neighbor_timers_advertise_interval_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + uint16_t routeadv; + int ret; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + routeadv = yang_dnode_get_uint16(args->dnode, NULL); + + ret = peer_advertise_interval_set(peer, routeadv); + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -3112,12 +3976,28 @@ int bgp_neighbors_neighbor_timers_advertise_interval_modify( int bgp_neighbors_neighbor_timers_advertise_interval_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + int ret; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + + ret = peer_advertise_interval_unset(peer); + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -3131,12 +4011,30 @@ int bgp_neighbors_neighbor_timers_advertise_interval_destroy( int bgp_neighbors_neighbor_timers_connect_time_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + uint16_t connect; + int ret; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + connect = yang_dnode_get_uint16(args->dnode, NULL); + + ret = peer_timers_connect_set(peer, connect); + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -3146,12 +4044,28 @@ int bgp_neighbors_neighbor_timers_connect_time_modify( int bgp_neighbors_neighbor_timers_connect_time_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + int ret; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + + ret = peer_timers_connect_unset(peer); + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -3165,12 +4079,37 @@ int bgp_neighbors_neighbor_timers_connect_time_destroy( int bgp_neighbors_neighbor_timers_hold_time_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + uint16_t keepalive = 0; + uint16_t holdtime = 0; + int ret = 0; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + keepalive = yang_dnode_get_uint16(args->dnode, "../keepalive"); + holdtime = yang_dnode_get_uint16(args->dnode, NULL); + + if (keepalive != BGP_DEFAULT_KEEPALIVE + && holdtime != BGP_DEFAULT_HOLDTIME) { + ret = peer_timers_set(peer, keepalive, holdtime); + } else + ret = peer_timers_unset(peer); + + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -3184,12 +4123,44 @@ int bgp_neighbors_neighbor_timers_hold_time_modify( int bgp_neighbors_neighbor_timers_keepalive_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + uint16_t keepalive = 0, curr_keep = 0; + uint16_t holdtime = 0; + int ret = 0; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + keepalive = yang_dnode_get_uint16(args->dnode, NULL); + holdtime = yang_dnode_get_uint16(args->dnode, "../hold-time"); + + if (keepalive != BGP_DEFAULT_KEEPALIVE + && holdtime != BGP_DEFAULT_HOLDTIME) { + if (peer->holdtime == holdtime) { + curr_keep = (keepalive < holdtime / 3 + ? keepalive + : holdtime / 3); + if (curr_keep == keepalive) + return NB_OK; + } + ret = peer_timers_set(peer, keepalive, holdtime); + } else + ret = peer_timers_unset(peer); + + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -3237,6 +4208,49 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_destroy( int bgp_neighbors_neighbor_afi_safis_afi_safi_enabled_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + const char *af_name; + afi_t afi; + safi_t safi; + bool activate = false; + int ret = 0; + union sockunion su; + struct peer *peer; + + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + return NB_OK; + case NB_EV_APPLY: + bgp = nb_running_get_entry(args->dnode, NULL, true); + af_name = + yang_dnode_get_string(args->dnode, "../afi-safi-name"); + yang_afi_safi_identity2value(af_name, &afi, &safi); + peer_str = yang_dnode_get_string(args->dnode, + "../../../remote-address"); + str2sockunion(peer_str, &su); + peer = peer_lookup(bgp, &su); + + activate = yang_dnode_get_bool(args->dnode, NULL); + + if (activate) + ret = peer_activate(peer, afi, safi); + else + ret = peer_deactivate(peer, afi, safi); + + bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret); + + break; + } + + return NB_OK; +} + +int bgp_neighbors_neighbor_afi_safis_afi_safi_enabled_destroy( + struct nb_cb_destroy_args *args) +{ switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: @@ -3249,18 +4263,91 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_enabled_modify( return NB_OK; } +static struct peer *bgp_unnumbered_neighbor_peer_lookup(struct bgp *bgp, + const char *peer_str, + char *errmsg, + size_t errmsg_len) +{ + struct peer *peer = NULL; + + /* Not IP, could match either peer configured on interface or a + * group. */ + peer = peer_lookup_by_conf_if(bgp, peer_str); + if (!peer) { + snprintf(errmsg, errmsg_len, + "Specify remote-as or peer-group commands first"); + return NULL; + } + if (peer_dynamic_neighbor(peer)) { + snprintf(errmsg, errmsg_len, + "Operation not allowed on a dynamic neighbor\n"); + return NULL; + } + + return peer; +} + /* * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor */ int bgp_neighbors_unnumbered_neighbor_create(struct nb_cb_create_args *args) { + struct bgp *bgp; + const char *peer_str; + const char *peer_grp_str = NULL; + bool v6_only = false; + int as_type = AS_UNSPECIFIED; + as_t as = 0; + char prgrp_xpath[XPATH_MAXLEN]; + const struct lyd_node *bgp_dnode; + switch (args->event) { case NB_EV_VALIDATE: + peer_str = yang_dnode_get_string(args->dnode, "./interface"); + bgp_dnode = yang_dnode_get_parent(args->dnode, "bgp"); + snprintf(prgrp_xpath, sizeof(prgrp_xpath), + FRR_BGP_PEER_GROUP_XPATH, peer_str, ""); + + if (yang_dnode_exists(bgp_dnode, prgrp_xpath)) { + snprintf(args->errmsg, args->errmsg_len, + "Name conflict with peer-group: %s", peer_str); + return NB_ERR_VALIDATION; + } + + break; case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, "./interface"); + + if (yang_dnode_exists(args->dnode, "./peer-group")) + peer_grp_str = yang_dnode_get_string(args->dnode, + "./peer-group"); + + if (yang_dnode_exists(args->dnode, "./v6-only")) + v6_only = yang_dnode_get_bool(args->dnode, "./v6-only"); + + if (yang_dnode_exists(args->dnode, + "./neighbor-remote-as/remote-as-type")) { + as_type = yang_dnode_get_enum( + args->dnode, + "./neighbor-remote-as/remote-as-type"); + if (yang_dnode_exists(args->dnode, + "./neighbor-remote-as/remote-as")) + as = yang_dnode_get_uint32( + args->dnode, + "./neighbor-remote-as/remote-as"); + } + + if (peer_conf_interface_create(bgp, peer_str, AFI_IP, + SAFI_UNICAST, v6_only, + peer_grp_str, as_type, as, + args->errmsg, args->errmsg_len)) + return NB_ERR_INCONSISTENCY; + break; } @@ -3269,12 +4356,34 @@ int bgp_neighbors_unnumbered_neighbor_create(struct nb_cb_create_args *args) int bgp_neighbors_unnumbered_neighbor_destroy(struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + + peer_str = yang_dnode_get_string(args->dnode, "./interface"); + /* look up for neighbor by interface name config. */ + peer = peer_lookup_by_conf_if(bgp, peer_str); + if (peer) { + /* Request zebra to terminate IPv6 RAs on this + * interface. */ + if (peer->ifp) + bgp_zebra_terminate_radv(peer->bgp, peer); + peer_notify_unconfig(peer); + peer_delete(peer); + } else { + snprintf(args->errmsg, args->errmsg_len, + "Create the peer-group first"); + return NB_ERR_INCONSISTENCY; + } + break; } @@ -3288,12 +4397,26 @@ int bgp_neighbors_unnumbered_neighbor_destroy(struct nb_cb_destroy_args *args) int bgp_neighbors_unnumbered_neighbor_v6only_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + bool v6_only = false; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, "../interface"); + + v6_only = yang_dnode_get_bool(args->dnode, NULL); + + if (peer_conf_interface_create( + bgp, peer_str, AFI_IP, SAFI_UNICAST, v6_only, NULL, + AS_UNSPECIFIED, 0, args->errmsg, args->errmsg_len)) + return NB_ERR_INCONSISTENCY; + break; } @@ -3307,12 +4430,60 @@ int bgp_neighbors_unnumbered_neighbor_v6only_modify( int bgp_neighbors_unnumbered_neighbor_peer_group_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + const char *peer_grp_str; + struct peer *peer; + struct peer_group *group; + union sockunion su; + as_t as; + int ret = 0; + char prgrp_xpath[XPATH_MAXLEN]; + const struct lyd_node *bgp_dnode; + switch (args->event) { case NB_EV_VALIDATE: + peer_grp_str = yang_dnode_get_string(args->dnode, NULL); + bgp_dnode = yang_dnode_get_parent(args->dnode, "bgp"); + snprintf(prgrp_xpath, sizeof(prgrp_xpath), + FRR_BGP_PEER_GROUP_XPATH, peer_grp_str, ""); + + if (!yang_dnode_exists(bgp_dnode, prgrp_xpath)) { + snprintf(args->errmsg, args->errmsg_len, + "Configure the peer-group first %s", + peer_grp_str); + return NB_ERR_VALIDATION; + } + + break; case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, "../interface"); + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + + peer_grp_str = yang_dnode_get_string(args->dnode, NULL); + group = peer_group_lookup(bgp, peer_grp_str); + if (!group) { + snprintf(args->errmsg, args->errmsg_len, + "Configure the peer-group first\n"); + return NB_ERR_INCONSISTENCY; + } + + ret = peer_group_bind(bgp, &su, peer, group, &as); + if (ret == BGP_ERR_PEER_GROUP_PEER_TYPE_DIFFERENT) { + snprintf( + args->errmsg, args->errmsg_len, + "Peer with AS %u cannot be in this peer-group, members must be all internal or all external\n", + as); + return NB_ERR_INCONSISTENCY; + } + + bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret); + break; } @@ -3322,12 +4493,33 @@ int bgp_neighbors_unnumbered_neighbor_peer_group_modify( int bgp_neighbors_unnumbered_neighbor_peer_group_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + int ret; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../remote-address"); + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + + if (CHECK_FLAG(peer->flags, PEER_FLAG_CAPABILITY_ENHE)) + bgp_zebra_terminate_radv(peer->bgp, peer); + + peer_notify_unconfig(peer); + ret = peer_delete(peer); + + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -3341,12 +4533,27 @@ int bgp_neighbors_unnumbered_neighbor_peer_group_destroy( int bgp_neighbors_unnumbered_neighbor_password_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + const char *passwrd_str; + struct peer *peer = NULL; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, "../interface"); + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + passwrd_str = yang_dnode_get_string(args->dnode, NULL); + peer_password_set(peer, passwrd_str); + break; } @@ -3356,12 +4563,25 @@ int bgp_neighbors_unnumbered_neighbor_password_modify( int bgp_neighbors_unnumbered_neighbor_password_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer = NULL; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, "../interface"); + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + peer_password_unset(peer); + break; } @@ -3375,12 +4595,44 @@ int bgp_neighbors_unnumbered_neighbor_password_destroy( int bgp_neighbors_unnumbered_neighbor_ttl_security_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + int ret; + uint8_t gtsm_hops; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, "../interface"); + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + gtsm_hops = yang_dnode_get_uint8(args->dnode, NULL); + /* + * If 'neighbor swpX', then this is for directly connected + * peers, we should not accept a ttl-security hops value greater + * than 1. + */ + if (peer->conf_if && (gtsm_hops > BGP_GTSM_HOPS_CONNECTED)) { + snprintf( + args->errmsg, args->errmsg_len, + "%d is directly connected peer, hops cannot exceed 1\n", + gtsm_hops); + return NB_ERR_INCONSISTENCY; + } + + ret = peer_ttl_security_hops_set(peer, gtsm_hops); + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -3390,12 +4642,27 @@ int bgp_neighbors_unnumbered_neighbor_ttl_security_modify( int bgp_neighbors_unnumbered_neighbor_ttl_security_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + int ret; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, "../interface"); + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + ret = peer_ttl_security_hops_unset(peer); + bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret); + break; } @@ -3428,12 +4695,28 @@ int bgp_neighbors_unnumbered_neighbor_solo_modify( int bgp_neighbors_unnumbered_neighbor_enforce_first_as_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool enable = false; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, "../interface"); + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + + enable = yang_dnode_get_bool(args->dnode, NULL); + + peer_flag_modify_nb(bgp, peer_str, peer, + PEER_FLAG_ENFORCE_FIRST_AS, enable, + args->errmsg, args->errmsg_len); + break; } @@ -3447,12 +4730,29 @@ int bgp_neighbors_unnumbered_neighbor_enforce_first_as_modify( int bgp_neighbors_unnumbered_neighbor_description_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + const char *desc_str; + struct peer *peer = NULL; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, "../interface"); + + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + desc_str = yang_dnode_get_string(args->dnode, NULL); + + peer_description_set(peer, desc_str); + break; } @@ -3462,12 +4762,26 @@ int bgp_neighbors_unnumbered_neighbor_description_modify( int bgp_neighbors_unnumbered_neighbor_description_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer = NULL; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, "../interface"); + + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + peer_description_unset(peer); + break; } @@ -3481,12 +4795,31 @@ int bgp_neighbors_unnumbered_neighbor_description_destroy( int bgp_neighbors_unnumbered_neighbor_passive_mode_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool set = false; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, "../interface"); + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + set = yang_dnode_get_bool(args->dnode, NULL); + + if (peer_flag_modify_nb(bgp, peer_str, peer, PEER_FLAG_PASSIVE, + set, args->errmsg, args->errmsg_len) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -3500,12 +4833,31 @@ int bgp_neighbors_unnumbered_neighbor_passive_mode_modify( int bgp_neighbors_unnumbered_neighbor_capability_options_dynamic_capability_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool enable = false; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../../interface"); + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + enable = yang_dnode_get_bool(args->dnode, NULL); + + peer_flag_modify_nb(bgp, peer_str, peer, + PEER_FLAG_DYNAMIC_CAPABILITY, enable, + args->errmsg, args->errmsg_len); + break; } @@ -3519,12 +4871,31 @@ int bgp_neighbors_unnumbered_neighbor_capability_options_dynamic_capability_modi int bgp_neighbors_unnumbered_neighbor_capability_options_strict_capability_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool enable = false; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../../interface"); + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + enable = yang_dnode_get_bool(args->dnode, NULL); + + peer_flag_modify_nb(bgp, peer_str, peer, + PEER_FLAG_STRICT_CAP_MATCH, enable, + args->errmsg, args->errmsg_len); + break; } @@ -3538,12 +4909,31 @@ int bgp_neighbors_unnumbered_neighbor_capability_options_strict_capability_modif int bgp_neighbors_unnumbered_neighbor_capability_options_extended_nexthop_capability_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool enable = false; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../../interface"); + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + enable = yang_dnode_get_bool(args->dnode, NULL); + + peer_flag_modify_nb(bgp, peer_str, peer, + PEER_FLAG_CAPABILITY_ENHE, enable, + args->errmsg, args->errmsg_len); + break; } @@ -3576,12 +4966,29 @@ int bgp_neighbors_unnumbered_neighbor_capability_options_capability_negotiate_mo int bgp_neighbors_unnumbered_neighbor_capability_options_override_capability_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool enable = false; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../../interface"); + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + + enable = yang_dnode_get_bool(args->dnode, NULL); + + peer_flag_modify_nb(bgp, peer_str, peer, + PEER_FLAG_OVERRIDE_CAPABILITY, enable, + args->errmsg, args->errmsg_len); + break; } @@ -3595,12 +5002,30 @@ int bgp_neighbors_unnumbered_neighbor_capability_options_override_capability_mod int bgp_neighbors_unnumbered_neighbor_update_source_ip_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str, *source_str; + struct peer *peer; + union sockunion su; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../../interface"); + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + source_str = yang_dnode_get_string(args->dnode, NULL); + + str2sockunion(source_str, &su); + peer_update_source_addr_set(peer, &su); + break; } @@ -3610,12 +5035,26 @@ int bgp_neighbors_unnumbered_neighbor_update_source_ip_modify( int bgp_neighbors_unnumbered_neighbor_update_source_ip_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../../interface"); + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + peer_update_source_unset(peer); + break; } @@ -3629,12 +5068,28 @@ int bgp_neighbors_unnumbered_neighbor_update_source_ip_destroy( int bgp_neighbors_unnumbered_neighbor_update_source_interface_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str, *source_str; + struct peer *peer; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../../interface"); + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + source_str = yang_dnode_get_string(args->dnode, NULL); + + peer_update_source_if_set(peer, source_str); + break; } @@ -3644,12 +5099,26 @@ int bgp_neighbors_unnumbered_neighbor_update_source_interface_modify( int bgp_neighbors_unnumbered_neighbor_update_source_interface_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../../interface"); + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + peer_update_source_unset(peer); + break; } @@ -3658,6 +5127,41 @@ int bgp_neighbors_unnumbered_neighbor_update_source_interface_destroy( /* * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/neighbor-remote-as + */ +void bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_apply_finish( + struct nb_cb_apply_finish_args *args) +{ + struct bgp *bgp; + const char *peer_str; + int as_type = AS_SPECIFIED; + int ret; + as_t as = 0; + struct peer *peer = NULL; + afi_t afi = AFI_IP; + safi_t safi = SAFI_UNICAST; + + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, "../interface"); + as_type = yang_dnode_get_enum(args->dnode, "./remote-as-type"); + if (yang_dnode_exists(args->dnode, "./remote-as")) + as = yang_dnode_get_uint32(args->dnode, "./remote-as"); + + peer = peer_lookup_by_conf_if(bgp, peer_str); + + ret = peer_remote_as(bgp, NULL, peer_str, &as, as_type, afi, safi); + + if (ret < 0 && !peer) { + snprintf(args->errmsg, args->errmsg_len, + "Create the peer-group or interface first"); + return; + } + + bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret); +} + +/* + * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/neighbor-remote-as/remote-as-type */ int bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_type_modify( @@ -3675,6 +5179,33 @@ int bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_type_modify( return NB_OK; } +int bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_type_destroy( + struct nb_cb_destroy_args *args) +{ + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + return NB_OK; + case NB_EV_APPLY: + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../../interface"); + peer = peer_lookup_by_conf_if(bgp, peer_str); + + /* remote-as set to 0 and as_type to unspecified */ + peer_as_change(peer, 0, AS_UNSPECIFIED); + + break; + } + + return NB_OK; +} + /* * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/neighbor-remote-as/remote-as @@ -3716,12 +5247,42 @@ int bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_destroy( int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_enabled_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool set = false; + int ret = 0; + uint8_t ttl = MAXTTL; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../../interface"); + peer = peer_lookup_by_conf_if(bgp, peer_str); + if (!peer) + return NB_ERR_INCONSISTENCY; + + if (peer->conf_if) { + ret = BGP_ERR_INVALID_FOR_DIRECT_PEER; + bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, + ret); + return NB_ERR_INCONSISTENCY; + } + + set = yang_dnode_get_bool(args->dnode, NULL); + + if (set) + ret = peer_ebgp_multihop_set(peer, ttl); + else + ret = peer_ebgp_multihop_unset(peer); + + bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret); + break; } @@ -3731,12 +5292,28 @@ int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_enabled_modify( int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_enabled_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + int ret = 0; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../../interface"); + peer = peer_lookup_by_conf_if(bgp, peer_str); + if (!peer) + return NB_ERR_INCONSISTENCY; + + ret = peer_ebgp_multihop_unset(peer); + + bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret); + break; } @@ -3750,12 +5327,38 @@ int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_enabled_destroy( int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_multihop_ttl_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + int ret = 0; + uint8_t ttl = MAXTTL; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../../interface"); + peer = peer_lookup_by_conf_if(bgp, peer_str); + if (!peer) + return NB_ERR_INCONSISTENCY; + + if (peer->conf_if) { + ret = BGP_ERR_INVALID_FOR_DIRECT_PEER; + bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, + ret); + return NB_ERR_INCONSISTENCY; + } + + ttl = yang_dnode_get_uint8(args->dnode, NULL); + + ret = peer_ebgp_multihop_set(peer, ttl); + + bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret); + break; } @@ -3765,12 +5368,28 @@ int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_multihop_ttl_modify( int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_multihop_ttl_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + int ret = 0; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../../interface"); + peer = peer_lookup_by_conf_if(bgp, peer_str); + if (!peer) + return NB_ERR_INCONSISTENCY; + + ret = peer_ebgp_multihop_unset(peer); + + bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret); + break; } @@ -3784,12 +5403,32 @@ int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_multihop_ttl_destroy( int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_disable_connected_check_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool set = false; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../../interface"); + peer = peer_lookup_by_conf_if(bgp, peer_str); + if (!peer) + return NB_ERR_INCONSISTENCY; + + set = yang_dnode_get_bool(args->dnode, NULL); + + if (peer_flag_modify_nb(bgp, peer_str, peer, + PEER_FLAG_DISABLE_CONNECTED_CHECK, set, + args->errmsg, args->errmsg_len) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -3798,6 +5437,43 @@ int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_disable_connected_check_modi /* * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-as + */ +void bgp_neighbors_unnumbered_neighbor_local_as_apply_finish( + struct nb_cb_apply_finish_args *args) +{ + struct bgp *bgp; + int ret; + as_t as = 0; + const char *peer_str; + struct peer *peer = NULL; + bool no_prepend = 0; + bool replace_as = 0; + + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, "../interface"); + + peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + + if (yang_dnode_exists(args->dnode, "./local-as")) + as = yang_dnode_get_uint32(args->dnode, "./local-as"); + if (yang_dnode_exists(args->dnode, "./no-prepend")) + no_prepend = yang_dnode_get_bool(args->dnode, "./no-prepend"); + if (yang_dnode_exists(args->dnode, "./no-replace-as")) + replace_as = + yang_dnode_get_bool(args->dnode, "./no-replace-as"); + + if (!as && !no_prepend && !replace_as) + ret = peer_local_as_unset(peer); + else + ret = peer_local_as_set(peer, as, no_prepend, replace_as); + + bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret); +} + +/* + * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/local-as/local-as */ int bgp_neighbors_unnumbered_neighbor_local_as_local_as_modify( @@ -3815,6 +5491,21 @@ int bgp_neighbors_unnumbered_neighbor_local_as_local_as_modify( return NB_OK; } +int bgp_neighbors_unnumbered_neighbor_local_as_local_as_destroy( + struct nb_cb_destroy_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + /* * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/local-as/no-prepend @@ -4059,6 +5750,34 @@ int bgp_neighbors_unnumbered_neighbor_bfd_options_check_cp_failure_destroy( /* * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/admin-shutdown + */ +void bgp_neighbors_unnumbered_neighbor_admin_shutdown_apply_finish( + struct nb_cb_apply_finish_args *args) +{ + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool enable = false; + const char *message; + + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, "../interface"); + peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + + if (yang_dnode_exists(args->dnode, "./message")) { + message = yang_dnode_get_string(args->dnode, "./message"); + peer_tx_shutdown_message_set(peer, message); + } + enable = yang_dnode_get_bool(args->dnode, "./enable"); + + peer_flag_modify_nb(bgp, peer_str, peer, PEER_FLAG_SHUTDOWN, enable, + args->errmsg, args->errmsg_len); +} + +/* + * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/admin-shutdown/enable */ int bgp_neighbors_unnumbered_neighbor_admin_shutdown_enable_modify( @@ -4076,6 +5795,21 @@ int bgp_neighbors_unnumbered_neighbor_admin_shutdown_enable_modify( return NB_OK; } +int bgp_neighbors_unnumbered_neighbor_admin_shutdown_enable_destroy( + struct nb_cb_destroy_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + /* * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/admin-shutdown/message @@ -4219,12 +5953,28 @@ int bgp_neighbors_unnumbered_neighbor_graceful_restart_graceful_restart_disable_ int bgp_neighbors_unnumbered_neighbor_timers_advertise_interval_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + uint16_t routeadv; + int ret; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../../interface"); + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + routeadv = yang_dnode_get_uint16(args->dnode, NULL); + + ret = peer_advertise_interval_set(peer, routeadv); + bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret); + break; } @@ -4234,12 +5984,26 @@ int bgp_neighbors_unnumbered_neighbor_timers_advertise_interval_modify( int bgp_neighbors_unnumbered_neighbor_timers_advertise_interval_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + int ret; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../../interface"); + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + + ret = peer_advertise_interval_unset(peer); + bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret); + break; } @@ -4253,12 +6017,28 @@ int bgp_neighbors_unnumbered_neighbor_timers_advertise_interval_destroy( int bgp_neighbors_unnumbered_neighbor_timers_connect_time_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + uint16_t connect; + int ret; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../../interface"); + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + connect = yang_dnode_get_uint16(args->dnode, NULL); + + ret = peer_timers_connect_set(peer, connect); + bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret); + break; } @@ -4268,12 +6048,27 @@ int bgp_neighbors_unnumbered_neighbor_timers_connect_time_modify( int bgp_neighbors_unnumbered_neighbor_timers_connect_time_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + int ret; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../../interface"); + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + ret = peer_timers_connect_unset(peer); + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -4287,12 +6082,38 @@ int bgp_neighbors_unnumbered_neighbor_timers_connect_time_destroy( int bgp_neighbors_unnumbered_neighbor_timers_hold_time_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + uint16_t keepalive = 0; + uint16_t holdtime = 0; + int ret = 0; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../../interface"); + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + + keepalive = yang_dnode_get_uint16(args->dnode, "../keepalive"); + holdtime = yang_dnode_get_uint16(args->dnode, NULL); + + if (keepalive != BGP_DEFAULT_KEEPALIVE + && holdtime != BGP_DEFAULT_HOLDTIME) { + ret = peer_timers_set(peer, keepalive, holdtime); + } else + ret = peer_timers_unset(peer); + + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -4306,12 +6127,45 @@ int bgp_neighbors_unnumbered_neighbor_timers_hold_time_modify( int bgp_neighbors_unnumbered_neighbor_timers_keepalive_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + uint16_t keepalive = 0, curr_keep = 0; + uint16_t holdtime = 0; + int ret = 0; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = + yang_dnode_get_string(args->dnode, "../../interface"); + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + + keepalive = yang_dnode_get_uint16(args->dnode, NULL); + holdtime = yang_dnode_get_uint16(args->dnode, "../hold-time"); + + if (keepalive != BGP_DEFAULT_KEEPALIVE + && holdtime != BGP_DEFAULT_HOLDTIME) { + if (peer->holdtime == holdtime) { + curr_keep = (keepalive < holdtime / 3 + ? keepalive + : holdtime / 3); + if (curr_keep == keepalive) + return NB_OK; + } + ret = peer_timers_set(peer, keepalive, holdtime); + } else + ret = peer_timers_unset(peer); + + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -4359,6 +6213,51 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_destroy( int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_enabled_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + const char *af_name; + afi_t afi; + safi_t safi; + bool activate = false; + int ret = 0; + struct peer *peer; + + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + return NB_OK; + case NB_EV_APPLY: + bgp = nb_running_get_entry(args->dnode, NULL, true); + af_name = + yang_dnode_get_string(args->dnode, "../afi-safi-name"); + yang_afi_safi_identity2value(af_name, &afi, &safi); + peer_str = yang_dnode_get_string(args->dnode, + "../../../interface"); + + peer = bgp_unnumbered_neighbor_peer_lookup( + bgp, peer_str, args->errmsg, args->errmsg_len); + + activate = yang_dnode_get_bool(args->dnode, NULL); + + if (activate) + ret = peer_activate(peer, afi, safi); + else + ret = peer_deactivate(peer, afi, safi); + + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + + break; + } + + return NB_OK; +} + +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_enabled_destroy( + struct nb_cb_destroy_args *args) +{ switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: @@ -4371,18 +6270,65 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_enabled_modify( return NB_OK; } +static struct peer *bgp_peer_group_peer_lookup(struct bgp *bgp, + const char *peer_str) +{ + struct peer *peer = NULL; + struct peer_group *group = NULL; + + group = peer_group_lookup(bgp, peer_str); + return peer = group->conf; +} + /* * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group */ int bgp_peer_groups_peer_group_create(struct nb_cb_create_args *args) { + const char *peer_grp_str; + struct peer *peer; + struct peer_group *group; + struct bgp *bgp; + char unnbr_xpath[XPATH_MAXLEN]; + const struct lyd_node *bgp_dnode; + switch (args->event) { case NB_EV_VALIDATE: + peer_grp_str = + yang_dnode_get_string(args->dnode, "./peer-group-name"); + bgp_dnode = yang_dnode_get_parent(args->dnode, "bgp"); + snprintf(unnbr_xpath, sizeof(unnbr_xpath), + FRR_BGP_NEIGHBOR_UNNUM_XPATH, peer_grp_str, ""); + + if (yang_dnode_exists(bgp_dnode, unnbr_xpath)) { + snprintf(args->errmsg, args->errmsg_len, + "Name conflict with interface: %s", + peer_grp_str); + return NB_ERR_VALIDATION; + } + + break; case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_grp_str = + yang_dnode_get_string(args->dnode, "./peer-group-name"); + peer = peer_lookup_by_conf_if(bgp, peer_grp_str); + if (peer) { + snprintf(args->errmsg, args->errmsg_len, + "Name conflict with interface:"); + return NB_ERR_INCONSISTENCY; + } + + group = peer_group_get(bgp, peer_grp_str); + if (!group) { + snprintf(args->errmsg, args->errmsg_len, + "BGP failed to find or create peer-group"); + return NB_ERR_INCONSISTENCY; + } break; } @@ -4391,12 +6337,26 @@ int bgp_peer_groups_peer_group_create(struct nb_cb_create_args *args) int bgp_peer_groups_peer_group_destroy(struct nb_cb_destroy_args *args) { + const char *peer_grp_str; + struct peer_group *group; + struct bgp *bgp; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_grp_str = + yang_dnode_get_string(args->dnode, "./peer-group-name"); + + group = peer_group_lookup(bgp, peer_grp_str); + if (group) { + peer_group_notify_unconfig(group); + peer_group_delete(group); + } + break; } @@ -4477,12 +6437,25 @@ int bgp_peer_groups_peer_group_ipv6_listen_range_destroy( */ int bgp_peer_groups_peer_group_password_modify(struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + const char *passwrd_str; + struct peer *peer = NULL; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + + passwrd_str = yang_dnode_get_string(args->dnode, NULL); + peer_password_set(peer, passwrd_str); + break; } @@ -4491,12 +6464,23 @@ int bgp_peer_groups_peer_group_password_modify(struct nb_cb_modify_args *args) int bgp_peer_groups_peer_group_password_destroy(struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer = NULL; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + + peer_password_unset(peer); + break; } @@ -4510,12 +6494,44 @@ int bgp_peer_groups_peer_group_password_destroy(struct nb_cb_destroy_args *args) int bgp_peer_groups_peer_group_ttl_security_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + int ret; + uint8_t gtsm_hops; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + if (!peer) + return NB_ERR_INCONSISTENCY; + + gtsm_hops = yang_dnode_get_uint8(args->dnode, NULL); + /* + * If 'neighbor swpX', then this is for directly connected + * peers, we should not accept a ttl-security hops value greater + * than 1. + */ + if (peer->conf_if && (gtsm_hops > BGP_GTSM_HOPS_CONNECTED)) { + snprintf( + args->errmsg, args->errmsg_len, + "%d is directly connected peer, hops cannot exceed 1\n", + gtsm_hops); + return NB_ERR_INCONSISTENCY; + } + + ret = peer_ttl_security_hops_set(peer, gtsm_hops); + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -4525,12 +6541,29 @@ int bgp_peer_groups_peer_group_ttl_security_modify( int bgp_peer_groups_peer_group_ttl_security_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + int ret; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + if (!peer) + return NB_ERR_INCONSISTENCY; + + ret = peer_ttl_security_hops_unset(peer); + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -4562,12 +6595,28 @@ int bgp_peer_groups_peer_group_solo_modify(struct nb_cb_modify_args *args) int bgp_peer_groups_peer_group_enforce_first_as_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool enable = false; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + + enable = yang_dnode_get_bool(args->dnode, NULL); + + peer_flag_modify_nb(bgp, peer_str, peer, + PEER_FLAG_ENFORCE_FIRST_AS, enable, + args->errmsg, args->errmsg_len); + break; } @@ -4581,12 +6630,26 @@ int bgp_peer_groups_peer_group_enforce_first_as_modify( int bgp_peer_groups_peer_group_description_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + const char *desc_str; + struct peer *peer = NULL; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + + desc_str = yang_dnode_get_string(args->dnode, NULL); + + peer_description_set(peer, desc_str); + break; } @@ -4596,12 +6659,25 @@ int bgp_peer_groups_peer_group_description_modify( int bgp_peer_groups_peer_group_description_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer = NULL; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + if (!peer) + return NB_ERR_INCONSISTENCY; + + peer_description_unset(peer); + break; } @@ -4615,12 +6691,31 @@ int bgp_peer_groups_peer_group_description_destroy( int bgp_peer_groups_peer_group_passive_mode_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool set = false; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + if (!peer) + return NB_ERR_INCONSISTENCY; + + set = yang_dnode_get_bool(args->dnode, NULL); + + if (peer_flag_modify_nb(bgp, peer_str, peer, PEER_FLAG_PASSIVE, + set, args->errmsg, args->errmsg_len) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -4634,12 +6729,30 @@ int bgp_peer_groups_peer_group_passive_mode_modify( int bgp_peer_groups_peer_group_capability_options_dynamic_capability_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool enable = false; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + if (!peer) + return NB_ERR_INCONSISTENCY; + + enable = yang_dnode_get_bool(args->dnode, NULL); + + peer_flag_modify_nb(bgp, peer_str, peer, + PEER_FLAG_DYNAMIC_CAPABILITY, enable, + args->errmsg, args->errmsg_len); + break; } @@ -4653,12 +6766,30 @@ int bgp_peer_groups_peer_group_capability_options_dynamic_capability_modify( int bgp_peer_groups_peer_group_capability_options_strict_capability_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool enable = false; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + if (!peer) + return NB_ERR_INCONSISTENCY; + + enable = yang_dnode_get_bool(args->dnode, NULL); + + peer_flag_modify_nb(bgp, peer_str, peer, + PEER_FLAG_STRICT_CAP_MATCH, enable, + args->errmsg, args->errmsg_len); + break; } @@ -4672,12 +6803,30 @@ int bgp_peer_groups_peer_group_capability_options_strict_capability_modify( int bgp_peer_groups_peer_group_capability_options_extended_nexthop_capability_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool enable = false; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + if (!peer) + return NB_ERR_INCONSISTENCY; + + enable = yang_dnode_get_bool(args->dnode, NULL); + + peer_flag_modify_nb(bgp, peer_str, peer, + PEER_FLAG_CAPABILITY_ENHE, enable, + args->errmsg, args->errmsg_len); + break; } @@ -4710,12 +6859,30 @@ int bgp_peer_groups_peer_group_capability_options_capability_negotiate_modify( int bgp_peer_groups_peer_group_capability_options_override_capability_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool enable = false; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + if (!peer) + return NB_ERR_INCONSISTENCY; + + enable = yang_dnode_get_bool(args->dnode, NULL); + + peer_flag_modify_nb(bgp, peer_str, peer, + PEER_FLAG_OVERRIDE_CAPABILITY, enable, + args->errmsg, args->errmsg_len); + break; } @@ -4729,12 +6896,29 @@ int bgp_peer_groups_peer_group_capability_options_override_capability_modify( int bgp_peer_groups_peer_group_update_source_ip_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str, *source_str; + struct peer *peer; + union sockunion su; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + if (!peer) + return NB_ERR_INCONSISTENCY; + + source_str = yang_dnode_get_string(args->dnode, NULL); + + str2sockunion(source_str, &su); + peer_update_source_addr_set(peer, &su); + break; } @@ -4744,12 +6928,25 @@ int bgp_peer_groups_peer_group_update_source_ip_modify( int bgp_peer_groups_peer_group_update_source_ip_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + if (!peer) + return NB_ERR_INCONSISTENCY; + + peer_update_source_unset(peer); + break; } @@ -4763,12 +6960,27 @@ int bgp_peer_groups_peer_group_update_source_ip_destroy( int bgp_peer_groups_peer_group_update_source_interface_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str, *source_str; + struct peer *peer; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + if (!peer) + return NB_ERR_INCONSISTENCY; + + source_str = yang_dnode_get_string(args->dnode, NULL); + + peer_update_source_if_set(peer, source_str); + break; } @@ -4778,12 +6990,25 @@ int bgp_peer_groups_peer_group_update_source_interface_modify( int bgp_peer_groups_peer_group_update_source_interface_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + if (!peer) + return NB_ERR_INCONSISTENCY; + + peer_update_source_unset(peer); + break; } @@ -4792,6 +7017,33 @@ int bgp_peer_groups_peer_group_update_source_interface_destroy( /* * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/neighbor-remote-as + */ +void bgp_peer_group_neighbor_remote_as_apply_finish( + struct nb_cb_apply_finish_args *args) +{ + struct bgp *bgp; + const char *peer_str; + int as_type = AS_SPECIFIED; + int ret; + as_t as = 0; + + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, "../peer-group-name"); + as_type = yang_dnode_get_enum(args->dnode, "./remote-as-type"); + if (yang_dnode_exists(args->dnode, "./remote-as")) + as = yang_dnode_get_uint32(args->dnode, "./remote-as"); + + ret = peer_group_remote_as(bgp, peer_str, &as, as_type); + if (ret < 0) { + snprintf(args->errmsg, args->errmsg_len, + "Create the peer-group or interface first"); + return; + } +} + +/* + * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/neighbor-remote-as/remote-as-type */ int bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_type_modify( @@ -4809,6 +7061,32 @@ int bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_type_modify( return NB_OK; } +int bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_type_destroy( + struct nb_cb_destroy_args *args) +{ + struct bgp *bgp; + const char *peer_str; + struct peer_group *group; + + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + return NB_OK; + case NB_EV_APPLY: + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../peer-group-name"); + group = peer_group_lookup(bgp, peer_str); + if (group) + peer_group_remote_as_delete(group); + + break; + } + + return NB_OK; +} + /* * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/neighbor-remote-as/remote-as @@ -4850,12 +7128,44 @@ int bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_destroy( int bgp_peer_groups_peer_group_ebgp_multihop_enabled_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool set = false; + int ret = 0; + uint8_t ttl = MAXTTL; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + if (!peer) + return NB_ERR_INCONSISTENCY; + + if (peer->conf_if) { + ret = BGP_ERR_INVALID_FOR_DIRECT_PEER; + bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, + ret); + return NB_ERR_INCONSISTENCY; + } + + set = yang_dnode_get_bool(args->dnode, NULL); + + if (set) + ret = peer_ebgp_multihop_set(peer, ttl); + else + ret = peer_ebgp_multihop_unset(peer); + + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -4865,12 +7175,30 @@ int bgp_peer_groups_peer_group_ebgp_multihop_enabled_modify( int bgp_peer_groups_peer_group_ebgp_multihop_enabled_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + int ret = 0; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + if (!peer) + return NB_ERR_INCONSISTENCY; + + ret = peer_ebgp_multihop_unset(peer); + + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -4884,12 +7212,40 @@ int bgp_peer_groups_peer_group_ebgp_multihop_enabled_destroy( int bgp_peer_groups_peer_group_ebgp_multihop_multihop_ttl_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + int ret = 0; + uint8_t ttl = MAXTTL; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + if (!peer) + return NB_ERR_INCONSISTENCY; + + if (peer->conf_if) { + ret = BGP_ERR_INVALID_FOR_DIRECT_PEER; + bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, + ret); + return NB_ERR_INCONSISTENCY; + } + + ttl = yang_dnode_get_uint8(args->dnode, NULL); + + ret = peer_ebgp_multihop_set(peer, ttl); + + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -4899,12 +7255,30 @@ int bgp_peer_groups_peer_group_ebgp_multihop_multihop_ttl_modify( int bgp_peer_groups_peer_group_ebgp_multihop_multihop_ttl_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + int ret = 0; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + if (!peer) + return NB_ERR_INCONSISTENCY; + + ret = peer_ebgp_multihop_unset(peer); + + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -4918,12 +7292,32 @@ int bgp_peer_groups_peer_group_ebgp_multihop_multihop_ttl_destroy( int bgp_peer_groups_peer_group_ebgp_multihop_disable_connected_check_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool set = false; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + if (!peer) + return NB_ERR_INCONSISTENCY; + + set = yang_dnode_get_bool(args->dnode, NULL); + + if (peer_flag_modify_nb(bgp, peer_str, peer, + PEER_FLAG_DISABLE_CONNECTED_CHECK, set, + args->errmsg, args->errmsg_len) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -4932,6 +7326,45 @@ int bgp_peer_groups_peer_group_ebgp_multihop_disable_connected_check_modify( /* * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/local-as + */ +void bgp_peer_groups_peer_group_local_as_apply_finish( + struct nb_cb_apply_finish_args *args) +{ + struct bgp *bgp; + int ret; + as_t as = 0; + const char *peer_str; + struct peer *peer = NULL; + bool no_prepend = false; + bool replace_as = false; + + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, "../peer-group-name"); + + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + + if (yang_dnode_exists(args->dnode, "./local-as")) + as = yang_dnode_get_uint32(args->dnode, "./local-as"); + + if (yang_dnode_exists(args->dnode, "./local-as")) + as = yang_dnode_get_uint32(args->dnode, "./local-as"); + if (yang_dnode_exists(args->dnode, "./no-prepend")) + no_prepend = yang_dnode_get_bool(args->dnode, "./no-prepend"); + if (yang_dnode_exists(args->dnode, "./no-replace-as")) + replace_as = + yang_dnode_get_bool(args->dnode, "./no-replace-as"); + + if (!as && !no_prepend && !replace_as) + ret = peer_local_as_unset(peer); + else + ret = peer_local_as_set(peer, as, no_prepend, replace_as); + + bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret); +} + +/* + * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/local-as/local-as */ int bgp_peer_groups_peer_group_local_as_local_as_modify( @@ -4949,6 +7382,36 @@ int bgp_peer_groups_peer_group_local_as_local_as_modify( return NB_OK; } +int bgp_peer_groups_peer_group_local_as_local_as_destroy( + struct nb_cb_destroy_args *args) +{ + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + int ret; + + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + return NB_OK; + case NB_EV_APPLY: + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + + ret = peer_local_as_unset(peer); + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + + break; + } + + return NB_OK; +} + /* * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/local-as/no-prepend @@ -5193,6 +7656,33 @@ int bgp_peer_groups_peer_group_bfd_options_check_cp_failure_destroy( /* * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/admin-shutdown + */ +void bgp_peer_groups_peer_group_admin_shutdown_apply_finish( + struct nb_cb_apply_finish_args *args) +{ + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + bool enable = false; + const char *message; + + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, "../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + + if (yang_dnode_exists(args->dnode, "./message")) { + message = yang_dnode_get_string(args->dnode, "./message"); + peer_tx_shutdown_message_set(peer, message); + } + enable = yang_dnode_get_bool(args->dnode, "./enable"); + + peer_flag_modify_nb(bgp, peer_str, peer, PEER_FLAG_SHUTDOWN, enable, + args->errmsg, args->errmsg_len); +} + +/* + * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/admin-shutdown/enable */ int bgp_peer_groups_peer_group_admin_shutdown_enable_modify( @@ -5210,6 +7700,21 @@ int bgp_peer_groups_peer_group_admin_shutdown_enable_modify( return NB_OK; } +int bgp_peer_groups_peer_group_admin_shutdown_enable_destroy( + struct nb_cb_destroy_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + /* * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/admin-shutdown/message @@ -5353,12 +7858,29 @@ int bgp_peer_groups_peer_group_graceful_restart_graceful_restart_disable_destroy int bgp_peer_groups_peer_group_timers_advertise_interval_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + uint16_t routeadv; + int ret; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + routeadv = yang_dnode_get_uint16(args->dnode, NULL); + + ret = peer_advertise_interval_set(peer, routeadv); + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -5368,12 +7890,27 @@ int bgp_peer_groups_peer_group_timers_advertise_interval_modify( int bgp_peer_groups_peer_group_timers_advertise_interval_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + int ret; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + + ret = peer_advertise_interval_unset(peer); + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -5387,12 +7924,29 @@ int bgp_peer_groups_peer_group_timers_advertise_interval_destroy( int bgp_peer_groups_peer_group_timers_connect_time_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + uint16_t connect; + int ret; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + connect = yang_dnode_get_uint16(args->dnode, NULL); + + ret = peer_timers_connect_set(peer, connect); + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -5402,12 +7956,27 @@ int bgp_peer_groups_peer_group_timers_connect_time_modify( int bgp_peer_groups_peer_group_timers_connect_time_destroy( struct nb_cb_destroy_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + int ret; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + + ret = peer_timers_connect_unset(peer); + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -5421,12 +7990,37 @@ int bgp_peer_groups_peer_group_timers_connect_time_destroy( int bgp_peer_groups_peer_group_timers_hold_time_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + uint16_t keepalive = 0; + uint16_t holdtime = 0; + int ret = 0; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + + keepalive = yang_dnode_get_uint16(args->dnode, "../keepalive"); + holdtime = yang_dnode_get_uint16(args->dnode, NULL); + + if (keepalive != BGP_DEFAULT_KEEPALIVE + && holdtime != BGP_DEFAULT_HOLDTIME) { + ret = peer_timers_set(peer, keepalive, holdtime); + } else + ret = peer_timers_unset(peer); + + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -5440,12 +8034,49 @@ int bgp_peer_groups_peer_group_timers_hold_time_modify( int bgp_peer_groups_peer_group_timers_keepalive_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + uint16_t keepalive = 0, curr_keep = 0; + uint16_t holdtime = 0; + int ret = 0; + switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + bgp = nb_running_get_entry(args->dnode, NULL, true); + peer_str = yang_dnode_get_string(args->dnode, + "../../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + + keepalive = yang_dnode_get_uint16(args->dnode, NULL); + holdtime = yang_dnode_get_uint16(args->dnode, "../hold-time"); + + if (keepalive != BGP_DEFAULT_KEEPALIVE + && holdtime != BGP_DEFAULT_HOLDTIME) { + if (peer->holdtime == holdtime) { + curr_keep = (keepalive < holdtime / 3 + ? keepalive + : holdtime / 3); + if (curr_keep == keepalive) { + // zlog_debug("%s holdtime %u keepalive + // %u value is already set, skipping + // update.", + // __func__, holdtime, keepalive); + return NB_OK; + } + } + ret = peer_timers_set(peer, keepalive, holdtime); + } else + ret = peer_timers_unset(peer); + + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + break; } @@ -5493,6 +8124,48 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_destroy( int bgp_peer_groups_peer_group_afi_safis_afi_safi_enabled_modify( struct nb_cb_modify_args *args) { + struct bgp *bgp; + const char *peer_str; + const char *af_name; + afi_t afi; + safi_t safi; + bool activate = false; + int ret = 0; + struct peer *peer; + + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + return NB_OK; + case NB_EV_APPLY: + bgp = nb_running_get_entry(args->dnode, NULL, true); + af_name = + yang_dnode_get_string(args->dnode, "../afi-safi-name"); + yang_afi_safi_identity2value(af_name, &afi, &safi); + peer_str = yang_dnode_get_string(args->dnode, + "../../../peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + + activate = yang_dnode_get_bool(args->dnode, NULL); + if (activate) + ret = peer_activate(peer, afi, safi); + else + ret = peer_deactivate(peer, afi, safi); + + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) + < 0) + return NB_ERR_INCONSISTENCY; + + break; + } + + return NB_OK; +} + +int bgp_peer_groups_peer_group_afi_safis_afi_safi_enabled_destroy( + struct nb_cb_destroy_args *args) +{ switch (args->event) { case NB_EV_VALIDATE: case NB_EV_PREPARE: @@ -11165,6 +13838,36 @@ int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv6_multicast_common_c return NB_OK; } +static int bgp_neighbor_afi_safi_flag_modify(struct nb_cb_modify_args *args, + uint32_t flags, bool set) +{ + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + const struct lyd_node *nbr_dnode; + const struct lyd_node *nbr_af_dnode; + const char *af_name; + afi_t afi; + safi_t safi; + + nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi"); + af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name"); + yang_afi_safi_identity2value(af_name, &afi, &safi); + + nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "neighbor"); + bgp = nb_running_get_entry(nbr_dnode, NULL, true); + peer_str = yang_dnode_get_string(nbr_dnode, "./remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + + if (peer_af_flag_modify_nb(peer, afi, safi, flags, set, args->errmsg, + args->errmsg_len) + < 0) + return NB_ERR_INCONSISTENCY; + + return NB_OK; +} + /* * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/add-paths/path-type @@ -11263,19 +13966,87 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_repla case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } return NB_OK; } +static int +bgp_peer_afi_safi_default_originate_apply(struct nb_cb_apply_finish_args *args, + struct peer *peer, afi_t afi, + safi_t safi) +{ + bool originate = false; + int ret = 0; + struct route_map *route_map = NULL; + const char *rmap = NULL; + + originate = yang_dnode_get_bool(args->dnode, "./originate"); + + if (yang_dnode_exists(args->dnode, "./route-map")) { + rmap = yang_dnode_get_string(args->dnode, "./route-map"); + route_map = route_map_lookup_by_name(rmap); + if (!route_map) { + snprintf(args->errmsg, args->errmsg_len, + "The route-map '%s' does not exist.", rmap); + return -1; + } + } + + // zlog_debug("%s: originate %u route-map %s", __func__, originate, + // rmap); + if (originate) + ret = peer_default_originate_set(peer, afi, safi, rmap, + route_map); + else + ret = peer_default_originate_unset(peer, afi, safi); + + return bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret); +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate + */ +void bgp_neighbor_afi_safi_default_originate_apply_finish( + struct nb_cb_apply_finish_args *args) +{ + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + const struct lyd_node *nbr_dnode; + const struct lyd_node *nbr_af_dnode; + const char *af_name; + afi_t afi; + safi_t safi; + + nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi"); + af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name"); + yang_afi_safi_identity2value(af_name, &afi, &safi); + + nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "neighbor"); + bgp = nb_running_get_entry(nbr_dnode, NULL, true); + peer_str = yang_dnode_get_string(nbr_dnode, "./remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) + return; + + bgp_peer_afi_safi_default_originate_apply(args, peer, afi, safi); +} + /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate-options/send-default-route + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate/originate */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_options_send_default_route_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_originate_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -11292,9 +14063,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_opt /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate-options/rmap-policy-export + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate/route-map */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_options_rmap_policy_export_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -11309,7 +14080,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_opt return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_options_rmap_policy_export_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -11324,6 +14095,46 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_opt return NB_OK; } +static int +bgp_neighbor_afi_safi_prefix_limit_list_destroy(struct nb_cb_destroy_args *args) +{ + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + const struct lyd_node *nbr_dnode; + const struct lyd_node *nbr_af_dnode; + const char *af_name; + afi_t afi; + safi_t safi; + int direction; + + nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi"); + af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name"); + yang_afi_safi_identity2value(af_name, &afi, &safi); + + nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "neighbor"); + bgp = nb_running_get_entry(nbr_dnode, NULL, true); + peer_str = yang_dnode_get_string(nbr_dnode, "./remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + direction = yang_dnode_get_enum(args->dnode, "./direction"); + + switch (direction) { + case 1: + peer_maximum_prefix_unset(peer, afi, safi); + break; + case 2: + UNSET_FLAG(peer->af_flags[afi][safi], PEER_FLAG_MAX_PREFIX_OUT); + peer->pmax_out[afi][safi] = 0; + break; + } + + return NB_OK; +} + /* * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list @@ -11350,14 +14161,101 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_directio case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ - break; + return bgp_neighbor_afi_safi_prefix_limit_list_destroy(args); } return NB_OK; } +static void +bgp_peer_afi_safi_maximum_prefix_set(struct nb_cb_apply_finish_args *args, + struct peer *peer, afi_t afi, safi_t safi) +{ + int direction; + uint32_t max; + uint8_t threshold = MAXIMUM_PREFIX_THRESHOLD_DEFAULT; + uint16_t restart = 0; + bool warning = false; + bool force; + + max = yang_dnode_get_uint32(args->dnode, "./max-prefixes"); + direction = yang_dnode_get_enum(args->dnode, "./direction"); + switch (direction) { + case 1: + force = yang_dnode_get_bool(args->dnode, "./force-check"); + + if (yang_dnode_exists(args->dnode, + "./options/shutdown-threshold-pct")) + threshold = yang_dnode_get_uint8( + args->dnode, + "./options/shutdown-threshold-pct"); + if (yang_dnode_exists(args->dnode, + "./options/tw-shutdown-threshold-pct")) + threshold = yang_dnode_get_uint8( + args->dnode, + "./options/tw-shutdown-threshold-pct"); + if (yang_dnode_exists(args->dnode, + "./options/tr-shutdown-threshold-pct")) + threshold = yang_dnode_get_uint8( + args->dnode, + "./options/tr-shutdown-threshold-pct"); + + if (yang_dnode_exists(args->dnode, "./options/warning-only")) + warning = yang_dnode_get_bool(args->dnode, + "./options/warning-only"); + if (yang_dnode_exists(args->dnode, "./options/tw-warning-only")) + warning = yang_dnode_get_bool( + args->dnode, "./options/tw-warning-only"); + + if (yang_dnode_exists(args->dnode, "./options/restart-timer")) + restart = yang_dnode_get_uint16( + args->dnode, "./options/restart-timer"); + if (yang_dnode_exists(args->dnode, + "./options/tr-restart-timer")) + restart = yang_dnode_get_uint16( + args->dnode, "./options/tr-restart-timer"); + + peer_maximum_prefix_set(peer, afi, safi, max, threshold, + warning, restart, force); + + break; + case 2: + SET_FLAG(peer->af_flags[afi][safi], PEER_FLAG_MAX_PREFIX_OUT); + peer->pmax_out[afi][safi] = max; + + break; + } +} + +void bgp_neighbors_neighbor_afi_safi_prefix_limit_apply_finish( + struct nb_cb_apply_finish_args *args) +{ + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + const struct lyd_node *nbr_dnode; + const struct lyd_node *nbr_af_dnode; + const char *af_name; + afi_t afi; + safi_t safi; + + nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi"); + af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name"); + yang_afi_safi_identity2value(af_name, &afi, &safi); + + nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "neighbor"); + bgp = nb_running_get_entry(nbr_dnode, NULL, true); + peer_str = yang_dnode_get_string(nbr_dnode, "./remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) + return; + + bgp_peer_afi_safi_maximum_prefix_set(args, peer, afi, safi); +} + /* * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/max-prefixes @@ -11379,9 +14277,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_directio /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/force-check */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -11396,7 +14294,26 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_directio return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/warning-only + */ +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -11413,9 +14330,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_directio /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/restart-timer */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -11430,7 +14347,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_directio return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -11447,9 +14364,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_directio /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -11464,7 +14381,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_directio return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -11481,9 +14398,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_directio /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -11498,7 +14415,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_directio return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -11515,9 +14432,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_directio /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -11532,7 +14449,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_directio return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -11549,9 +14466,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_directio /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -11566,7 +14483,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_directio return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -11583,9 +14500,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_directio /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -11600,7 +14517,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_directio return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -11626,8 +14543,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -11645,8 +14566,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -11664,8 +14589,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_pri case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -11683,8 +14612,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_pri case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -11702,8 +14635,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_pri case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -11721,14 +14658,79 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_pri case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } return NB_OK; } +static int bgp_neighbor_afi_safi_weight_modify(struct nb_cb_modify_args *args) +{ + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + const struct lyd_node *nbr_dnode; + const struct lyd_node *nbr_af_dnode; + const char *af_name; + uint16_t weight; + afi_t afi; + safi_t safi; + int ret; + + nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi"); + af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name"); + yang_afi_safi_identity2value(af_name, &afi, &safi); + + nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "neighbor"); + bgp = nb_running_get_entry(nbr_dnode, NULL, true); + peer_str = yang_dnode_get_string(nbr_dnode, "./remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + + weight = yang_dnode_get_uint16(args->dnode, NULL); + + ret = peer_weight_set(peer, afi, safi, weight); + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) < 0) + return NB_ERR_INCONSISTENCY; + + return NB_OK; +} + +static int bgp_neighbor_afi_safi_weight_destroy(struct nb_cb_destroy_args *args) +{ + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + const struct lyd_node *nbr_dnode; + const struct lyd_node *nbr_af_dnode; + const char *af_name; + afi_t afi; + safi_t safi; + int ret; + + nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi"); + af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name"); + yang_afi_safi_identity2value(af_name, &afi, &safi); + + nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "neighbor"); + bgp = nb_running_get_entry(nbr_dnode, NULL, true); + peer_str = yang_dnode_get_string(nbr_dnode, "./remote-address"); + peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + + ret = peer_weight_unset(peer, afi, safi); + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) < 0) + return NB_ERR_INCONSISTENCY; + + return NB_OK; +} + /* * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/weight/weight-attribute @@ -11740,8 +14742,10 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribu case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_weight_modify(args); + break; } @@ -11755,8 +14759,10 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribu case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_weight_destroy(args); + break; } @@ -11774,8 +14780,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_route_reflector_route case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -11793,8 +14803,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_route_server_route_se case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -11812,8 +14826,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_c case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -11831,8 +14849,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_e case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_EXT_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -11850,8 +14872,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_l case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_LARGE_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -11869,8 +14895,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_soft_reconfiguration_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -11888,8 +14918,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_as_pat case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -11907,8 +14941,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_next_h case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -11926,8 +14964,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_med_un case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -12493,6 +15535,63 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_repla case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; + case NB_EV_APPLY: + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/default-originate/originate + */ +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_originate_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/default-originate/route-map + */ +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: case NB_EV_APPLY: /* TODO: implement me. */ break; @@ -12512,8 +15611,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_as_pat case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -12531,8 +15634,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_next_h case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -12550,8 +15657,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_med_un case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -12686,9 +15797,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_directio case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ - break; + return bgp_neighbor_afi_safi_prefix_limit_list_destroy(args); } return NB_OK; @@ -12715,9 +15826,28 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_directio /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/force-check + */ +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_force_check_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/warning-only */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -12732,7 +15862,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_directio return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -12749,9 +15879,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_directio /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/restart-timer */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -12766,7 +15896,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_directio return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -12783,9 +15913,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_directio /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -12800,7 +15930,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_directio return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -12817,9 +15947,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_directio /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -12834,7 +15964,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_directio return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -12851,9 +15981,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_directio /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -12868,7 +15998,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_directio return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -12885,9 +16015,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_directio /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -12902,7 +16032,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_directio return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -12919,9 +16049,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_directio /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -12936,7 +16066,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_directio return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -12962,8 +16092,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -12981,8 +16115,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13000,8 +16138,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_pri case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13019,8 +16161,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_pri case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13038,8 +16184,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_pri case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13057,8 +16207,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_pri case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13076,8 +16230,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_route_reflector_route case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13095,8 +16253,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_route_server_route_se case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13114,8 +16276,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_c case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13133,8 +16299,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_e case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_EXT_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13152,8 +16322,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_l case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_LARGE_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13171,8 +16345,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_soft_reconfiguration_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13190,8 +16368,10 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribu case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_weight_modify(args); + break; } @@ -13205,8 +16385,10 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribu case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_weight_destroy(args); + break; } @@ -13311,6 +16493,63 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_rep case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; + case NB_EV_APPLY: + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/default-originate/originate + */ +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_originate_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/default-originate/route-map + */ +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: case NB_EV_APPLY: /* TODO: implement me. */ break; @@ -13330,8 +16569,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_as_p case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13349,8 +16592,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_next case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13368,8 +16615,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_med_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13504,9 +16755,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direct case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ - break; + return bgp_neighbor_afi_safi_prefix_limit_list_destroy(args); } return NB_OK; @@ -13533,9 +16784,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direct /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/force-check */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -13550,7 +16801,26 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direct return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/warning-only + */ +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -13567,9 +16837,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direct /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/restart-timer */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -13584,7 +16854,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direct return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -13601,9 +16871,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direct /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -13618,7 +16888,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direct return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -13635,9 +16905,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direct /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -13652,7 +16922,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direct return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -13669,9 +16939,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direct /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-restart-timer */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -13686,7 +16956,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direct return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -13703,9 +16973,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direct /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -13720,7 +16990,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direct return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -13737,9 +17007,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direct /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-warning-only */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -13754,7 +17024,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direct return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -13780,8 +17050,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_h case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13799,8 +17073,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_h case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13818,8 +17096,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_p case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13837,8 +17119,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_p case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13856,8 +17142,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_p case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13875,8 +17165,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_p case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13894,8 +17188,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_route_reflector_rou case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13913,8 +17211,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_route_server_route_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13932,8 +17234,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13951,8 +17257,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_EXT_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13970,8 +17280,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_LARGE_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -13989,8 +17303,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_soft_reconfiguratio case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -14008,8 +17326,10 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_weight_weight_attri case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_weight_modify(args); + break; } @@ -14023,8 +17343,10 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_weight_weight_attri case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_weight_destroy(args); + break; } @@ -14129,6 +17451,63 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_rep case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; + case NB_EV_APPLY: + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/default-originate/originate + */ +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_originate_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/default-originate/route-map + */ +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: case NB_EV_APPLY: /* TODO: implement me. */ break; @@ -14148,8 +17527,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_as_p case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -14167,8 +17550,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_next case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -14186,8 +17573,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_med_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -14322,9 +17713,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direct case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ - break; + return bgp_neighbor_afi_safi_prefix_limit_list_destroy(args); } return NB_OK; @@ -14351,9 +17742,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direct /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/force-check */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -14368,7 +17759,26 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direct return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/warning-only + */ +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -14385,9 +17795,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direct /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/restart-timer */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -14402,7 +17812,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direct return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -14419,9 +17829,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direct /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -14436,7 +17846,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direct return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -14453,9 +17863,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direct /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -14470,7 +17880,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direct return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -14487,9 +17897,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direct /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-restart-timer */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -14504,7 +17914,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direct return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -14521,9 +17931,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direct /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -14538,7 +17948,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direct return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -14555,9 +17965,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direct /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-warning-only */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -14572,7 +17982,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direct return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -14598,8 +18008,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_h case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -14617,8 +18031,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_h case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -14636,8 +18054,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_p case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -14655,8 +18077,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_p case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -14674,8 +18100,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_p case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -14693,8 +18123,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_p case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -14712,8 +18146,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_route_reflector_rou case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -14731,8 +18169,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_route_server_route_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -14750,8 +18192,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -14769,8 +18215,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_EXT_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -14788,8 +18238,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_LARGE_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -14807,8 +18261,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_soft_reconfiguratio case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -14826,8 +18284,10 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_weight_weight_attri case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_weight_modify(args); + break; } @@ -14841,8 +18301,10 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_weight_weight_attri case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_weight_destroy(args); + break; } @@ -14947,6 +18409,63 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_optio case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; + case NB_EV_APPLY: + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/originate + */ +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_originate_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/route-map + */ +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: case NB_EV_APPLY: /* TODO: implement me. */ break; @@ -14966,8 +18485,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchange case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -14985,8 +18508,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchange case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -15004,8 +18531,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchange case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -15140,9 +18671,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ - break; + return bgp_neighbor_afi_safi_prefix_limit_list_destroy(args); } return NB_OK; @@ -15169,9 +18700,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_ /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/force-check */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -15186,7 +18717,26 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_ return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/warning-only + */ +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -15203,9 +18753,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_ /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/restart-timer */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -15220,7 +18770,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_ return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -15237,9 +18787,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_ /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -15254,7 +18804,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_ return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -15271,9 +18821,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_ /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -15288,7 +18838,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_ return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -15305,9 +18855,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_ /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -15322,7 +18872,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_ return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -15339,9 +18889,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_ /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -15356,7 +18906,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_ return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -15373,9 +18923,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_ /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -15390,7 +18940,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_ return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -15416,8 +18966,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -15435,8 +18989,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -15454,8 +19012,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_re case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -15473,8 +19035,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_re case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -15492,8 +19058,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_re case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -15511,8 +19081,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_re case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -15530,8 +19104,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_route_reflect case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -15549,8 +19127,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_route_server_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -15568,8 +19150,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_communit case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -15587,8 +19173,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_communit case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_EXT_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -15606,8 +19196,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_communit case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_LARGE_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -15625,8 +19219,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_soft_reconfig case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -15644,8 +19242,10 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_weight_modify(args); + break; } @@ -15659,8 +19259,10 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_weight_destroy(args); + break; } @@ -15765,6 +19367,63 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_optio case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; + case NB_EV_APPLY: + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/originate + */ +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_originate_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/route-map + */ +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: case NB_EV_APPLY: /* TODO: implement me. */ break; @@ -15784,8 +19443,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchange case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -15803,8 +19466,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchange case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -15822,8 +19489,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchange case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -15958,9 +19629,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ - break; + return bgp_neighbor_afi_safi_prefix_limit_list_destroy(args); } return NB_OK; @@ -15987,9 +19658,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_ /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/force-check */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -16004,7 +19675,26 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_ return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/warning-only + */ +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -16021,9 +19711,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_ /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/restart-timer */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -16038,7 +19728,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_ return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -16055,9 +19745,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_ /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -16072,7 +19762,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_ return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -16089,9 +19779,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_ /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -16106,7 +19796,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_ return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -16123,9 +19813,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_ /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -16140,7 +19830,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_ return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -16157,9 +19847,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_ /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -16174,7 +19864,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_ return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -16191,9 +19881,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_ /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -16208,7 +19898,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_ return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -16234,8 +19924,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -16253,8 +19947,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -16272,8 +19970,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_re case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -16291,8 +19993,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_re case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -16310,8 +20016,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_re case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -16329,8 +20039,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_re case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -16348,8 +20062,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_route_reflect case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -16367,8 +20085,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_route_server_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -16386,8 +20108,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_communit case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -16405,8 +20131,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_communit case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_EXT_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -16424,8 +20154,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_communit case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_LARGE_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -16443,8 +20177,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_soft_reconfig case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -16462,8 +20200,10 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_weight_modify(args); + break; } @@ -16477,8 +20217,10 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_weight_destroy(args); + break; } @@ -16583,8 +20325,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -16602,8 +20348,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -16621,8 +20371,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -16640,8 +20394,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -16674,9 +20432,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_di case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ - break; + return bgp_neighbor_afi_safi_prefix_limit_list_destroy(args); } return NB_OK; @@ -16703,9 +20461,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/force-check */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -16720,7 +20478,26 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_di return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/warning-only + */ +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -16737,9 +20514,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/restart-timer */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -16754,7 +20531,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_di return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -16771,9 +20548,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -16788,7 +20565,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_di return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -16805,9 +20582,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -16822,7 +20599,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_di return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -16839,9 +20616,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -16856,7 +20633,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_di return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -16873,9 +20650,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -16890,7 +20667,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_di return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -16907,9 +20684,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -16924,7 +20701,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_di return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -16950,8 +20727,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_ne case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -16969,8 +20750,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_ne case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -16988,8 +20773,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remo case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17007,8 +20796,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remo case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17026,8 +20819,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remo case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17045,8 +20842,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remo case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17064,8 +20865,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_reflector case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17083,8 +20888,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_server_ro case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17102,8 +20911,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17121,8 +20934,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_EXT_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17140,8 +20957,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_LARGE_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17159,8 +20980,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_soft_reconfigur case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17178,8 +21003,10 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_a case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_weight_modify(args); + break; } @@ -17193,8 +21020,10 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_a case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_weight_destroy(args); + break; } @@ -17299,8 +21128,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17318,8 +21151,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17337,8 +21174,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17356,8 +21197,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17390,9 +21235,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_di case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ - break; + return bgp_neighbor_afi_safi_prefix_limit_list_destroy(args); } return NB_OK; @@ -17419,9 +21264,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/force-check */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -17436,7 +21281,26 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_di return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/warning-only + */ +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -17453,9 +21317,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/restart-timer */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -17470,7 +21334,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_di return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -17487,9 +21351,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -17504,7 +21368,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_di return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -17521,9 +21385,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -17538,7 +21402,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_di return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -17555,9 +21419,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -17572,7 +21436,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_di return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -17589,9 +21453,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -17606,7 +21470,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_di return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -17623,9 +21487,9 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only */ -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -17640,7 +21504,7 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_di return NB_OK; } -int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -17666,8 +21530,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_ne case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17685,8 +21553,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_ne case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17704,8 +21576,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remo case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17723,8 +21599,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remo case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17742,8 +21622,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remo case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17761,8 +21645,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remo case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17780,8 +21668,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_reflector case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17799,8 +21691,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_server_ro case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17818,8 +21714,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17837,8 +21737,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_EXT_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17856,8 +21760,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_LARGE_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17875,8 +21783,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_soft_reconfigur case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -17894,8 +21806,10 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_a case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_weight_modify(args); + break; } @@ -17909,8 +21823,10 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_a case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_weight_destroy(args); + break; } @@ -17996,8 +21912,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_replace case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18015,8 +21935,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_as_path_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18034,8 +21958,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_next_hop case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18053,8 +21981,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_med_unch case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18072,8 +22004,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_s case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18091,8 +22027,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_s case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18110,8 +22050,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_route_reflector_route_r case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18129,8 +22073,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_route_server_route_serv case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18148,8 +22096,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_soft_reconfiguration_mo case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18167,8 +22119,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_route_reflector_rout case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18186,8 +22142,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_route_server_route_s case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18205,8 +22165,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_soft_reconfiguration case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18224,8 +22188,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_route_reflector_rout case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18243,8 +22211,12 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_route_server_route_s case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18262,14 +22234,49 @@ int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_soft_reconfiguration case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } return NB_OK; } +static int +bgp_unnumbered_neighbor_afi_safi_flag_modify(struct nb_cb_modify_args *args, + uint32_t flags, bool set) +{ + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + const struct lyd_node *nbr_dnode; + const struct lyd_node *nbr_af_dnode; + const char *af_name; + afi_t afi; + safi_t safi; + + nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi"); + af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name"); + yang_afi_safi_identity2value(af_name, &afi, &safi); + + nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "unnumbered-neighbor"); + bgp = nb_running_get_entry(nbr_dnode, NULL, true); + peer_str = yang_dnode_get_string(nbr_dnode, "./interface"); + peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + + if (peer_af_flag_modify_nb(peer, afi, safi, flags, set, args->errmsg, + args->errmsg_len) + < 0) + return NB_ERR_INCONSISTENCY; + + return NB_OK; +} + /* * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/add-paths/path-type @@ -18368,8 +22375,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_op case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18378,9 +22389,40 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_op /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate-options/send-default-route + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate + */ +void bgp_unnumbered_neighbor_afi_safi_default_originate_apply_finish( + struct nb_cb_apply_finish_args *args) +{ + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + const struct lyd_node *nbr_dnode; + const struct lyd_node *nbr_af_dnode; + const char *af_name; + afi_t afi; + safi_t safi; + + nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi"); + af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name"); + yang_afi_safi_identity2value(af_name, &afi, &safi); + + nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "unnumbered-neighbor"); + bgp = nb_running_get_entry(nbr_dnode, NULL, true); + peer_str = yang_dnode_get_string(nbr_dnode, "./interface"); + peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) + return; + + bgp_peer_afi_safi_default_originate_apply(args, peer, afi, safi); +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate/originate */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_options_send_default_route_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_originate_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -18397,9 +22439,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_or /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate-options/rmap-policy-export + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate/route-map */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_options_rmap_policy_export_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -18414,7 +22456,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_or return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_options_rmap_policy_export_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -18429,6 +22471,46 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_or return NB_OK; } +static int bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy( + struct nb_cb_destroy_args *args) +{ + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + const struct lyd_node *nbr_dnode; + const struct lyd_node *nbr_af_dnode; + const char *af_name; + afi_t afi; + safi_t safi; + int direction; + + nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi"); + af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name"); + yang_afi_safi_identity2value(af_name, &afi, &safi); + + nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "unnumbered-neighbor"); + bgp = nb_running_get_entry(nbr_dnode, NULL, true); + peer_str = yang_dnode_get_string(nbr_dnode, "./interface"); + peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) + return NB_ERR_INCONSISTENCY; + + direction = yang_dnode_get_enum(args->dnode, "./direction"); + + switch (direction) { + case 1: + peer_maximum_prefix_unset(peer, afi, safi); + break; + case 2: + UNSET_FLAG(peer->af_flags[afi][safi], PEER_FLAG_MAX_PREFIX_OUT); + peer->pmax_out[afi][safi] = 0; + break; + } + + return NB_OK; +} + /* * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list @@ -18455,14 +22537,42 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_lim case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ - break; + return bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy( + args); } return NB_OK; } +void bgp_unnumbered_neighbor_afi_safi_prefix_limit_apply_finish( + struct nb_cb_apply_finish_args *args) +{ + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + const struct lyd_node *nbr_dnode; + const struct lyd_node *nbr_af_dnode; + const char *af_name; + afi_t afi; + safi_t safi; + + nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi"); + af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name"); + yang_afi_safi_identity2value(af_name, &afi, &safi); + + nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "unnumbered-neighbor"); + bgp = nb_running_get_entry(nbr_dnode, NULL, true); + peer_str = yang_dnode_get_string(nbr_dnode, "./interface"); + peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + if (!peer) + return; + + bgp_peer_afi_safi_maximum_prefix_set(args, peer, afi, safi); +} + /* * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/max-prefixes @@ -18484,9 +22594,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_lim /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/force-check */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -18501,7 +22611,26 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_lim return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/warning-only + */ +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -18518,9 +22647,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_lim /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/restart-timer */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -18535,7 +22664,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_lim return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -18552,9 +22681,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_lim /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -18569,7 +22698,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_lim return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -18586,9 +22715,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_lim /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -18603,7 +22732,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_lim return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -18620,9 +22749,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_lim /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -18637,7 +22766,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_lim return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -18654,9 +22783,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_lim /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -18671,7 +22800,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_lim return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -18688,9 +22817,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_lim /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -18705,7 +22834,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_lim return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -18731,8 +22860,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_nexthop_se case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18750,8 +22883,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_nexthop_se case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18769,8 +22906,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18788,8 +22929,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18807,8 +22952,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18826,14 +22975,80 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } return NB_OK; } +static int +bgp_unnumbered_neighbor_afi_safi_weight_modify(struct nb_cb_modify_args *args) +{ + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + const struct lyd_node *nbr_dnode; + const char *af_name; + uint16_t weight; + afi_t afi; + safi_t safi; + const struct lyd_node *nbr_af_dnode; + int ret; + + nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi"); + af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name"); + yang_afi_safi_identity2value(af_name, &afi, &safi); + + nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "unnumbered-neighbor"); + bgp = nb_running_get_entry(nbr_dnode, NULL, true); + peer_str = yang_dnode_get_string(nbr_dnode, "./interface"); + peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + + weight = yang_dnode_get_uint16(args->dnode, NULL); + + ret = peer_weight_set(peer, afi, safi, weight); + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) < 0) + return NB_ERR_INCONSISTENCY; + + return NB_OK; +} + +static int +bgp_unnumbered_neighbor_afi_safi_weight_destroy(struct nb_cb_destroy_args *args) +{ + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + const struct lyd_node *nbr_dnode; + const struct lyd_node *nbr_af_dnode; + const char *af_name; + afi_t afi; + safi_t safi; + int ret; + + bgp = nb_running_get_entry(args->dnode, NULL, true); + nbr_dnode = yang_dnode_get_parent(args->dnode, "unnumbered-neighbor"); + peer_str = yang_dnode_get_string(nbr_dnode, "./interface"); + peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg, + args->errmsg_len); + nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi"); + af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name"); + yang_afi_safi_identity2value(af_name, &afi, &safi); + + ret = peer_weight_unset(peer, afi, safi); + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) < 0) + return NB_ERR_INCONSISTENCY; + + return NB_OK; +} + /* * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/weight/weight-attribute @@ -18845,8 +23060,10 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_weight_wei case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_weight_modify(args); + break; } @@ -18860,8 +23077,10 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_weight_wei case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_weight_destroy(args); + break; } @@ -18879,8 +23098,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_route_refl case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18898,8 +23121,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_route_serv case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18917,8 +23144,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_send_commu case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18936,8 +23167,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_send_commu case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_EXT_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18955,8 +23190,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_send_commu case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_LARGE_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18974,8 +23213,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_soft_recon case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -18993,8 +23236,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_uncha case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -19012,8 +23259,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_uncha case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -19031,8 +23282,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_uncha case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -19598,6 +23853,63 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_op case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; + case NB_EV_APPLY: + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/default-originate/originate + */ +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_originate_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/default-originate/route-map + */ +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: case NB_EV_APPLY: /* TODO: implement me. */ break; @@ -19617,8 +23929,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_uncha case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -19636,8 +23952,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_uncha case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -19655,8 +23975,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_uncha case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -19791,9 +24115,10 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_lim case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ - break; + return bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy( + args); } return NB_OK; @@ -19820,9 +24145,28 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_lim /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/force-check + */ +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_force_check_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/warning-only */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -19837,7 +24181,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_lim return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -19854,9 +24198,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_lim /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/restart-timer */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -19871,7 +24215,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_lim return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -19888,9 +24232,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_lim /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -19905,7 +24249,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_lim return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -19922,9 +24266,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_lim /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -19939,7 +24283,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_lim return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -19956,9 +24300,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_lim /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -19973,7 +24317,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_lim return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -19990,9 +24334,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_lim /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -20007,7 +24351,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_lim return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -20024,9 +24368,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_lim /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -20041,7 +24385,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_lim return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -20067,8 +24411,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_se case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -20086,8 +24434,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_se case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -20105,8 +24457,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -20124,8 +24480,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -20143,8 +24503,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -20162,8 +24526,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -20181,8 +24549,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_route_refl case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -20200,8 +24572,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_route_serv case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -20219,8 +24595,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_send_commu case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -20238,8 +24618,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_send_commu case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_EXT_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -20257,8 +24641,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_send_commu case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_LARGE_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -20276,8 +24664,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_soft_recon case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -20295,8 +24687,10 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_weight_wei case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_weight_modify(args); + break; } @@ -20310,8 +24704,10 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_weight_wei case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_weight_destroy(args); + break; } @@ -20416,6 +24812,63 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; + case NB_EV_APPLY: + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/default-originate/originate + */ +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_originate_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/default-originate/route-map + */ +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: case NB_EV_APPLY: /* TODO: implement me. */ break; @@ -20435,8 +24888,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unc case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -20454,8 +24911,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unc case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -20473,8 +24934,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unc case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -20609,9 +25074,10 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_l case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ - break; + return bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy( + args); } return NB_OK; @@ -20638,9 +25104,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_l /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/force-check */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -20655,7 +25121,26 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_l return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/warning-only + */ +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -20672,9 +25157,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_l /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/restart-timer */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -20689,7 +25174,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_l return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -20706,9 +25191,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_l /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -20723,7 +25208,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_l return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -20740,9 +25225,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_l /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -20757,7 +25242,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_l return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -20774,9 +25259,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_l /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-restart-timer */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -20791,7 +25276,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_l return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -20808,9 +25293,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_l /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -20825,7 +25310,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_l return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -20842,9 +25327,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_l /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-warning-only */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -20859,7 +25344,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_l return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -20885,8 +25370,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_nexthop_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -20904,8 +25393,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_nexthop_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -20923,8 +25416,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_private_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -20942,8 +25439,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_private_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -20961,8 +25462,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_private_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -20980,8 +25485,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_private_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -20999,8 +25508,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_route_re case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -21018,8 +25531,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_route_se case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -21037,8 +25554,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_send_com case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -21056,8 +25577,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_send_com case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_EXT_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -21075,8 +25600,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_send_com case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_LARGE_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -21094,8 +25623,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_soft_rec case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -21113,8 +25646,10 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_weight_w case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_weight_modify(args); + break; } @@ -21128,8 +25663,10 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_weight_w case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_weight_destroy(args); + break; } @@ -21234,6 +25771,63 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; + case NB_EV_APPLY: + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/default-originate/originate + */ +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_originate_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/default-originate/route-map + */ +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: case NB_EV_APPLY: /* TODO: implement me. */ break; @@ -21253,8 +25847,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unc case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -21272,8 +25870,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unc case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -21291,8 +25893,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unc case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -21427,9 +26033,10 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_l case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ - break; + return bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy( + args); } return NB_OK; @@ -21456,9 +26063,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_l /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/force-check */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -21473,7 +26080,26 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_l return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/warning-only + */ +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -21490,9 +26116,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_l /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/restart-timer */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -21507,7 +26133,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_l return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -21524,9 +26150,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_l /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -21541,7 +26167,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_l return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -21558,9 +26184,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_l /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -21575,7 +26201,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_l return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -21592,9 +26218,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_l /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-restart-timer */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -21609,7 +26235,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_l return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -21626,9 +26252,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_l /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -21643,7 +26269,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_l return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -21660,9 +26286,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_l /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-warning-only */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -21677,7 +26303,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_l return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -21703,8 +26329,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_nexthop_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -21722,8 +26352,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_nexthop_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -21741,8 +26375,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_private_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -21760,8 +26398,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_private_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -21779,8 +26421,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_private_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -21798,8 +26444,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_private_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -21817,8 +26467,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_route_re case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -21836,8 +26490,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_route_se case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -21855,8 +26513,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_send_com case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -21874,8 +26536,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_send_com case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_EXT_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -21893,8 +26559,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_send_com case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_LARGE_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -21912,8 +26582,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_soft_rec case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -21931,8 +26605,10 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_weight_w case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_weight_modify(args); + break; } @@ -21946,8 +26622,10 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_weight_w case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_weight_destroy(args); + break; } @@ -22052,6 +26730,63 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; + case NB_EV_APPLY: + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/originate + */ +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_originate_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/route-map + */ +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: case NB_EV_APPLY: /* TODO: implement me. */ break; @@ -22071,8 +26806,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_at case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -22090,8 +26829,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_at case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -22109,8 +26852,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_at case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -22245,9 +26992,10 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_pr case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ - break; + return bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy( + args); } return NB_OK; @@ -22274,9 +27022,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_pr /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/force-check */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -22291,7 +27039,26 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_pr return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/warning-only + */ +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -22308,9 +27075,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_pr /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/restart-timer */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -22325,7 +27092,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_pr return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -22342,9 +27109,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_pr /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -22359,7 +27126,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_pr return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -22376,9 +27143,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_pr /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -22393,7 +27160,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_pr return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -22410,9 +27177,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_pr /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -22427,7 +27194,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_pr return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -22444,9 +27211,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_pr /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -22461,7 +27228,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_pr return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -22478,9 +27245,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_pr /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -22495,7 +27262,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_pr return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -22521,8 +27288,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_ne case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -22540,8 +27311,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_ne case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -22559,8 +27334,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_pr case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -22578,8 +27357,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_pr case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -22597,8 +27380,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_pr case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -22616,8 +27403,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_pr case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -22635,8 +27426,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_ro case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -22654,8 +27449,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_ro case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -22673,8 +27472,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_se case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -22692,8 +27495,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_se case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_EXT_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -22711,8 +27518,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_se case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_LARGE_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -22730,8 +27541,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_so case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -22749,8 +27564,10 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_we case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_weight_modify(args); + break; } @@ -22764,8 +27581,10 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_we case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_weight_destroy(args); + break; } @@ -22870,6 +27689,63 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; + case NB_EV_APPLY: + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/originate + */ +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_originate_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/route-map + */ +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: case NB_EV_APPLY: /* TODO: implement me. */ break; @@ -22889,8 +27765,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_at case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -22908,8 +27788,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_at case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -22927,8 +27811,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_at case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -23063,9 +27951,10 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_pr case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ - break; + return bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy( + args); } return NB_OK; @@ -23092,9 +27981,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_pr /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/force-check */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -23109,7 +27998,26 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_pr return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/warning-only + */ +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -23126,9 +28034,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_pr /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/restart-timer */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -23143,7 +28051,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_pr return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -23160,9 +28068,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_pr /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -23177,7 +28085,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_pr return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -23194,9 +28102,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_pr /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -23211,7 +28119,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_pr return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -23228,9 +28136,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_pr /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -23245,7 +28153,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_pr return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -23262,9 +28170,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_pr /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -23279,7 +28187,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_pr return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -23296,9 +28204,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_pr /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -23313,7 +28221,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_pr return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -23339,8 +28247,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_ne case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -23358,8 +28270,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_ne case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -23377,8 +28293,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_pr case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -23396,8 +28316,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_pr case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -23415,8 +28339,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_pr case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -23434,8 +28362,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_pr case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -23453,8 +28385,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_ro case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -23472,8 +28408,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_ro case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -23491,8 +28431,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_se case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -23510,8 +28454,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_se case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_EXT_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -23529,8 +28477,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_se case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_LARGE_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -23548,8 +28500,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_so case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -23567,8 +28523,10 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_we case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_weight_modify(args); + break; } @@ -23582,8 +28540,10 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_we case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_weight_destroy(args); + break; } @@ -23688,8 +28648,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_p case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -23707,8 +28671,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -23726,8 +28694,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -23745,8 +28717,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -23779,9 +28755,10 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_pref case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ - break; + return bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy( + args); } return NB_OK; @@ -23808,9 +28785,28 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_pref /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/force-check + */ +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_force_check_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/warning-only */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -23825,7 +28821,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_pref return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -23842,9 +28838,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_pref /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/restart-timer */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -23859,7 +28855,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_pref return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -23876,9 +28872,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_pref /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -23893,7 +28889,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_pref return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -23910,9 +28906,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_pref /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -23927,7 +28923,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_pref return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -23944,9 +28940,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_pref /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -23961,7 +28957,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_pref return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -23978,9 +28974,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_pref /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -23995,7 +28991,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_pref return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -24012,9 +29008,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_pref /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -24029,7 +29025,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_pref return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -24055,8 +29051,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_next case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24074,8 +29074,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_next case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24093,8 +29097,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_priv case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24112,8 +29120,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_priv case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24131,8 +29143,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_priv case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24150,8 +29166,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_priv case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24169,8 +29189,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_rout case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24188,8 +29212,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_rout case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24207,8 +29235,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24226,8 +29258,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_EXT_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24245,8 +29281,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_LARGE_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24264,8 +29304,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_soft case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24283,8 +29327,10 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_weig case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_weight_modify(args); + break; } @@ -24298,8 +29344,10 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_weig case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_weight_destroy(args); + break; } @@ -24404,8 +29452,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_p case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24423,8 +29475,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24442,8 +29498,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24461,8 +29521,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24495,9 +29559,10 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_pref case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ - break; + return bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy( + args); } return NB_OK; @@ -24524,9 +29589,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_pref /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/force-check */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -24541,7 +29606,26 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_pref return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/warning-only + */ +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -24558,9 +29642,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_pref /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/restart-timer */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -24575,7 +29659,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_pref return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -24592,9 +29676,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_pref /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -24609,7 +29693,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_pref return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -24626,9 +29710,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_pref /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -24643,7 +29727,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_pref return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -24660,9 +29744,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_pref /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -24677,7 +29761,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_pref return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -24694,9 +29778,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_pref /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -24711,7 +29795,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_pref return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -24728,9 +29812,9 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_pref /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only */ -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -24745,7 +29829,7 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_pref return NB_OK; } -int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -24771,8 +29855,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_next case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24790,8 +29878,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_next case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24809,8 +29901,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_priv case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24828,8 +29924,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_priv case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24847,8 +29947,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_priv case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24866,8 +29970,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_priv case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24885,8 +29993,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_rout case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24904,8 +30016,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_rout case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24923,8 +30039,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24942,8 +30062,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_EXT_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24961,8 +30085,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SEND_LARGE_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24980,8 +30108,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_soft case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -24999,8 +30131,10 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_weig case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_weight_modify(args); + break; } @@ -25014,8 +30148,10 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_weig case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_weight_destroy(args); + break; } @@ -25101,8 +30237,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_opti case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -25120,8 +30260,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchang case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -25139,8 +30283,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchang case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -25158,8 +30306,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchang case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -25177,8 +30329,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_nexthop_self case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -25196,8 +30352,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_nexthop_self case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -25215,8 +30375,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_route_reflec case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -25234,8 +30398,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_route_server case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -25253,8 +30421,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_soft_reconfi case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -25272,8 +30444,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_route_ref case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -25291,8 +30467,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_route_ser case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -25310,8 +30490,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_soft_reco case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -25329,8 +30513,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_route_ref case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -25348,8 +30536,12 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_route_ser case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -25367,14 +30559,46 @@ int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_soft_reco case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_unnumbered_neighbor_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } return NB_OK; } +static int bgp_peer_group_afi_safi_flag_modify(struct nb_cb_modify_args *args, + uint32_t flags, bool set) +{ + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + const struct lyd_node *nbr_dnode; + const struct lyd_node *nbr_af_dnode; + const char *af_name; + afi_t afi; + safi_t safi; + + nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi"); + af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name"); + yang_afi_safi_identity2value(af_name, &afi, &safi); + nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "peer-group"); + bgp = nb_running_get_entry(nbr_dnode, NULL, true); + peer_str = yang_dnode_get_string(nbr_dnode, "./peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + + if (peer_af_flag_modify_nb(peer, afi, safi, flags, set, args->errmsg, + args->errmsg_len) + < 0) + return NB_ERR_INCONSISTENCY; + + return NB_OK; +} + /* * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/add-paths/path-type @@ -25473,8 +30697,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_as_path_options_r case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -25483,9 +30711,39 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_as_path_options_r /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/default-originate-options/send-default-route + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate + */ +void bgp_peer_group_afi_safi_default_originate_apply_finish( + struct nb_cb_apply_finish_args *args) +{ + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + const struct lyd_node *nbr_dnode; + const struct lyd_node *nbr_af_dnode; + const char *af_name; + afi_t afi; + safi_t safi; + + nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi"); + af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name"); + yang_afi_safi_identity2value(af_name, &afi, &safi); + + nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "peer-group"); + bgp = nb_running_get_entry(nbr_dnode, NULL, true); + peer_str = yang_dnode_get_string(nbr_dnode, "./peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + if (!peer) + return; + + bgp_peer_afi_safi_default_originate_apply(args, peer, afi, safi); +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/default-originate/originate */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_options_send_default_route_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_originate_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -25502,9 +30760,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/default-originate-options/rmap-policy-export + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/default-originate/route-map */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_options_rmap_policy_export_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -25519,7 +30777,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_options_rmap_policy_export_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -25534,6 +30792,44 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate return NB_OK; } +static int bgp_peer_group_afi_safi_prefix_limit_list_destroy( + struct nb_cb_destroy_args *args) +{ + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + const struct lyd_node *nbr_dnode; + const struct lyd_node *nbr_af_dnode; + const char *af_name; + afi_t afi; + safi_t safi; + int direction; + + nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi"); + af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name"); + yang_afi_safi_identity2value(af_name, &afi, &safi); + + nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "peer-group"); + bgp = nb_running_get_entry(nbr_dnode, NULL, true); + peer_str = yang_dnode_get_string(nbr_dnode, "./peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + if (!peer) + return NB_ERR_INCONSISTENCY; + + direction = yang_dnode_get_enum(args->dnode, "./direction"); + + switch (direction) { + case 1: + peer_maximum_prefix_unset(peer, afi, safi); + break; + case 2: + UNSET_FLAG(peer->af_flags[afi][safi], PEER_FLAG_MAX_PREFIX_OUT); + peer->pmax_out[afi][safi] = 0; + break; + } + + return NB_OK; +} /* * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list @@ -25560,14 +30856,39 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_dire case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ - break; + return bgp_peer_group_afi_safi_prefix_limit_list_destroy(args); } return NB_OK; } +void bgp_peer_group_afi_safi_prefix_limit_apply_finish( + struct nb_cb_apply_finish_args *args) +{ + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + const struct lyd_node *nbr_dnode; + const struct lyd_node *nbr_af_dnode; + const char *af_name; + afi_t afi; + safi_t safi; + + nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi"); + af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name"); + yang_afi_safi_identity2value(af_name, &afi, &safi); + + nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "peer-group"); + bgp = nb_running_get_entry(nbr_dnode, NULL, true); + peer_str = yang_dnode_get_string(nbr_dnode, "./peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + if (!peer) + return; + + bgp_peer_afi_safi_maximum_prefix_set(args, peer, afi, safi); +} /* * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/max-prefixes @@ -25589,9 +30910,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_dire /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/force-check */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -25606,7 +30927,26 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_dire return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/warning-only + */ +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -25623,9 +30963,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_dire /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/restart-timer */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -25640,7 +30980,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_dire return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -25657,9 +30997,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_dire /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -25674,7 +31014,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_dire return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -25691,9 +31031,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_dire /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -25708,7 +31048,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_dire return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -25725,9 +31065,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_dire /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -25742,7 +31082,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_dire return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -25759,9 +31099,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_dire /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -25776,7 +31116,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_dire return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -25793,9 +31133,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_dire /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -25810,7 +31150,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_dire return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -25836,8 +31176,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -25855,8 +31199,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -25874,8 +31222,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_private_as_remove case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -25893,8 +31245,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_private_as_remove case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -25912,8 +31268,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_private_as_remove case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -25931,14 +31291,77 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_private_as_remove case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } return NB_OK; } +static int bgp_peer_group_afi_safi_weight_modify(struct nb_cb_modify_args *args) +{ + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + const struct lyd_node *nbr_dnode; + const struct lyd_node *nbr_af_dnode; + const char *af_name; + uint16_t weight; + afi_t afi; + safi_t safi; + int ret; + + nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi"); + af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name"); + yang_afi_safi_identity2value(af_name, &afi, &safi); + + nbr_dnode = yang_dnode_get_parent(args->dnode, "peer-group"); + bgp = nb_running_get_entry(nbr_dnode, NULL, true); + peer_str = yang_dnode_get_string(nbr_dnode, "./peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + + weight = yang_dnode_get_uint16(args->dnode, NULL); + + ret = peer_weight_set(peer, afi, safi, weight); + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) < 0) + return NB_ERR_INCONSISTENCY; + + return NB_OK; +} + +static int +bgp_peer_group_afi_safi_weight_destroy(struct nb_cb_destroy_args *args) +{ + struct bgp *bgp; + const char *peer_str; + struct peer *peer; + const struct lyd_node *nbr_dnode; + const struct lyd_node *nbr_af_dnode; + const char *af_name; + afi_t afi; + safi_t safi; + int ret; + + nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi"); + af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name"); + yang_afi_safi_identity2value(af_name, &afi, &safi); + nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "peer-group"); + bgp = nb_running_get_entry(nbr_dnode, NULL, true); + peer_str = yang_dnode_get_string(nbr_dnode, "./peer-group-name"); + peer = bgp_peer_group_peer_lookup(bgp, peer_str); + + ret = peer_weight_unset(peer, afi, safi); + if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) < 0) + return NB_ERR_INCONSISTENCY; + + return NB_OK; +} + /* * XPath: * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/weight/weight-attribute @@ -25950,8 +31373,10 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_weight_weight_att case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_weight_modify(args); + break; } @@ -25965,8 +31390,10 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_weight_weight_att case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_weight_destroy(args); + break; } @@ -25984,8 +31411,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_route_reflector_r case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -26003,8 +31434,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_route_server_rout case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -26022,8 +31457,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_send_community_se case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SEND_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -26041,8 +31480,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_send_community_se case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SEND_EXT_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -26060,8 +31503,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_send_community_se case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SEND_LARGE_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -26079,8 +31526,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_soft_reconfigurat case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -26098,8 +31549,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_as case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -26117,8 +31572,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_ne case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -26136,8 +31595,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_me case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -26703,6 +32166,63 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_as_path_options_r case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; + case NB_EV_APPLY: + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/default-originate/originate + */ +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_default_originate_originate_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/default-originate/route-map + */ +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: case NB_EV_APPLY: /* TODO: implement me. */ break; @@ -26722,8 +32242,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_as case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -26741,8 +32265,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_ne case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -26760,8 +32288,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_me case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -26896,9 +32428,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_dire case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ - break; + return bgp_peer_group_afi_safi_prefix_limit_list_destroy(args); } return NB_OK; @@ -26925,9 +32457,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_dire /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/force-check */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -26942,7 +32474,26 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_dire return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/warning-only + */ +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -26959,9 +32510,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_dire /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/restart-timer */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -26976,7 +32527,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_dire return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -26993,9 +32544,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_dire /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -27010,7 +32561,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_dire return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -27027,9 +32578,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_dire /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -27044,7 +32595,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_dire return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -27061,9 +32612,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_dire /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -27078,7 +32629,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_dire return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -27095,9 +32646,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_dire /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -27112,7 +32663,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_dire return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -27129,9 +32680,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_dire /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -27146,7 +32697,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_dire return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -27172,8 +32723,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -27191,8 +32746,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -27210,8 +32769,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_private_as_remove case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -27229,8 +32792,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_private_as_remove case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -27248,8 +32815,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_private_as_remove case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -27267,8 +32838,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_private_as_remove case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -27286,8 +32861,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_route_reflector_r case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -27305,8 +32884,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_route_server_rout case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -27324,8 +32907,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_send_community_se case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SEND_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -27343,8 +32930,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_send_community_se case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SEND_EXT_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -27362,8 +32953,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_send_community_se case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SEND_LARGE_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -27381,8 +32976,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_soft_reconfigurat case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -27400,8 +32999,10 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_weight_weight_att case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_weight_modify(args); + break; } @@ -27415,8 +33016,10 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_weight_weight_att case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_weight_destroy(args); + break; } @@ -27521,6 +33124,63 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_as_path_options case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; + case NB_EV_APPLY: + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/default-originate/originate + */ +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_default_originate_originate_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/default-originate/route-map + */ +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: case NB_EV_APPLY: /* TODO: implement me. */ break; @@ -27540,8 +33200,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -27559,8 +33223,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -27578,8 +33246,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -27714,9 +33386,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_di case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ - break; + return bgp_peer_group_afi_safi_prefix_limit_list_destroy(args); } return NB_OK; @@ -27743,9 +33415,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/force-check */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -27760,7 +33432,26 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_di return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/warning-only + */ +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -27777,9 +33468,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/restart-timer */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -27794,7 +33485,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_di return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -27811,9 +33502,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -27828,7 +33519,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_di return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -27845,9 +33536,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -27862,7 +33553,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_di return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -27879,9 +33570,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-restart-timer */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -27896,7 +33587,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_di return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -27913,9 +33604,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -27930,7 +33621,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_di return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -27947,9 +33638,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-warning-only */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -27964,7 +33655,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_di return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -27990,8 +33681,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_nexthop_self_ne case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28009,8 +33704,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_nexthop_self_ne case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28028,8 +33727,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_private_as_remo case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28047,8 +33750,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_private_as_remo case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28066,8 +33773,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_private_as_remo case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28085,8 +33796,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_private_as_remo case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28104,8 +33819,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_route_reflector case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28123,8 +33842,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_route_server_ro case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28142,8 +33865,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_send_community_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SEND_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28161,8 +33888,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_send_community_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SEND_EXT_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28180,8 +33911,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_send_community_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SEND_LARGE_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28199,8 +33934,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_soft_reconfigur case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28218,8 +33957,10 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_weight_weight_a case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_weight_modify(args); + break; } @@ -28233,8 +33974,10 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_weight_weight_a case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_weight_destroy(args); + break; } @@ -28339,6 +34082,63 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_as_path_options case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; + case NB_EV_APPLY: + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/default-originate/originate + */ +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_default_originate_originate_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/default-originate/route-map + */ +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: case NB_EV_APPLY: /* TODO: implement me. */ break; @@ -28358,8 +34158,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28377,8 +34181,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28396,8 +34204,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28532,9 +34344,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_di case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ - break; + return bgp_peer_group_afi_safi_prefix_limit_list_destroy(args); } return NB_OK; @@ -28561,9 +34373,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/force-check */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -28578,7 +34390,26 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_di return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/warning-only + */ +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -28595,9 +34426,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/restart-timer */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -28612,7 +34443,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_di return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -28629,9 +34460,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -28646,7 +34477,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_di return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -28663,9 +34494,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -28680,7 +34511,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_di return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -28697,9 +34528,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-restart-timer */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -28714,7 +34545,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_di return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -28731,9 +34562,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -28748,7 +34579,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_di return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -28765,9 +34596,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_di /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-warning-only */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -28782,7 +34613,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_di return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -28808,8 +34639,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_nexthop_self_ne case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28827,8 +34662,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_nexthop_self_ne case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28846,8 +34685,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_private_as_remo case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28865,8 +34708,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_private_as_remo case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28884,8 +34731,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_private_as_remo case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28903,8 +34754,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_private_as_remo case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28922,8 +34777,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_route_reflector case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28941,8 +34800,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_route_server_ro case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28960,8 +34823,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_send_community_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SEND_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28979,8 +34846,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_send_community_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SEND_EXT_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -28998,8 +34869,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_send_community_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SEND_LARGE_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -29017,8 +34892,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_soft_reconfigur case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -29036,8 +34915,10 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_weight_weight_a case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_weight_modify(args); + break; } @@ -29051,8 +34932,10 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_weight_weight_a case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_weight_destroy(args); + break; } @@ -29157,6 +35040,63 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_o case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; + case NB_EV_APPLY: + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/originate + */ +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_originate_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/route-map + */ +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: case NB_EV_APPLY: /* TODO: implement me. */ break; @@ -29176,8 +35116,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unch case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -29195,8 +35139,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unch case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -29214,8 +35162,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unch case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -29350,9 +35302,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_li case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ - break; + return bgp_peer_group_afi_safi_prefix_limit_list_destroy(args); } return NB_OK; @@ -29379,9 +35331,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_li /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/force-check */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -29396,7 +35348,26 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_li return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/warning-only + */ +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -29413,9 +35384,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_li /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/restart-timer */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -29430,7 +35401,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_li return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -29447,9 +35418,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_li /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -29464,7 +35435,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_li return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -29481,9 +35452,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_li /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -29498,7 +35469,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_li return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -29515,9 +35486,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_li /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -29532,7 +35503,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_li return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -29549,9 +35520,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_li /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -29566,7 +35537,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_li return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -29583,9 +35554,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_li /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -29600,7 +35571,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_li return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -29626,8 +35597,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_s case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -29645,8 +35620,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_s case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -29664,8 +35643,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_private_a case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -29683,8 +35666,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_private_a case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -29702,8 +35689,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_private_a case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -29721,8 +35712,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_private_a case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -29740,8 +35735,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_route_ref case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -29759,8 +35758,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_route_ser case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -29778,8 +35781,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_send_comm case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SEND_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -29797,8 +35804,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_send_comm case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SEND_EXT_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -29816,8 +35827,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_send_comm case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SEND_LARGE_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -29835,8 +35850,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_soft_reco case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -29854,8 +35873,10 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_weight_we case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_weight_modify(args); + break; } @@ -29869,8 +35890,10 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_weight_we case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_weight_destroy(args); + break; } @@ -29975,6 +35998,63 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_o case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; + case NB_EV_APPLY: + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/originate + */ +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_originate_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/route-map + */ +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_destroy( + struct nb_cb_destroy_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: case NB_EV_APPLY: /* TODO: implement me. */ break; @@ -29994,8 +36074,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unch case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -30013,8 +36097,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unch case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -30032,8 +36120,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unch case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -30168,9 +36260,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_li case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ - break; + return bgp_peer_group_afi_safi_prefix_limit_list_destroy(args); } return NB_OK; @@ -30197,9 +36289,28 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_li /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/force-check + */ +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_force_check_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/warning-only */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -30214,7 +36325,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_li return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -30231,9 +36342,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_li /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/restart-timer */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -30248,7 +36359,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_li return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -30265,9 +36376,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_li /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -30282,7 +36393,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_li return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -30299,9 +36410,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_li /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -30316,7 +36427,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_li return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -30333,9 +36444,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_li /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -30350,7 +36461,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_li return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -30367,9 +36478,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_li /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -30384,7 +36495,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_li return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -30401,9 +36512,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_li /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -30418,7 +36529,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_li return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -30444,8 +36555,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_s case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -30463,8 +36578,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_s case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -30482,8 +36601,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_private_a case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -30501,8 +36624,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_private_a case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -30520,8 +36647,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_private_a case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -30539,8 +36670,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_private_a case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -30558,8 +36693,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_route_ref case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -30577,8 +36716,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_route_ser case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -30596,8 +36739,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_send_comm case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SEND_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -30615,8 +36762,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_send_comm case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SEND_EXT_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -30634,8 +36785,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_send_comm case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SEND_LARGE_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -30653,8 +36808,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_soft_reco case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -30672,8 +36831,10 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_weight_we case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_weight_modify(args); + break; } @@ -30687,8 +36848,10 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_weight_we case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_weight_destroy(args); + break; } @@ -30793,8 +36956,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_opt case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -30812,8 +36979,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchan case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -30831,8 +37002,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchan case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -30850,8 +37025,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchan case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -30884,9 +37063,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limi case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ - break; + return bgp_peer_group_afi_safi_prefix_limit_list_destroy(args); } return NB_OK; @@ -30913,9 +37092,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limi /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/force-check */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -30930,7 +37109,26 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limi return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/warning-only + */ +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -30947,9 +37145,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limi /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/restart-timer */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -30964,7 +37162,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limi return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -30981,9 +37179,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limi /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -30998,7 +37196,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limi return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -31015,9 +37213,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limi /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -31032,7 +37230,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limi return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -31049,9 +37247,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limi /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -31066,7 +37264,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limi return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -31083,9 +37281,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limi /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -31100,7 +37298,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limi return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -31117,9 +37315,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limi /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -31134,7 +37332,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limi return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -31160,8 +37358,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_sel case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -31179,8 +37381,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_sel case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -31198,8 +37404,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -31217,8 +37427,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -31236,8 +37450,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -31255,8 +37473,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -31274,8 +37496,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_refle case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -31293,8 +37519,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_serve case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -31312,8 +37542,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_commun case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SEND_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -31331,8 +37565,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_commun case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SEND_EXT_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -31350,8 +37588,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_commun case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SEND_LARGE_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -31369,8 +37611,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_soft_reconf case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -31388,8 +37634,10 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weig case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_weight_modify(args); + break; } @@ -31403,8 +37651,10 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weig case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_weight_destroy(args); + break; } @@ -31509,8 +37759,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_opt case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -31528,8 +37782,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchan case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -31547,8 +37805,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchan case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -31566,8 +37828,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchan case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -31600,9 +37866,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limi case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ - break; + return bgp_peer_group_afi_safi_prefix_limit_list_destroy(args); } return NB_OK; @@ -31629,9 +37895,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limi /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/force-check */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_force_check_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -31646,7 +37912,26 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limi return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_warning_only_destroy( +/* + * XPath: + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/warning-only + */ +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify( + struct nb_cb_modify_args *args) +{ + switch (args->event) { + case NB_EV_VALIDATE: + case NB_EV_PREPARE: + case NB_EV_ABORT: + case NB_EV_APPLY: + /* TODO: implement me. */ + break; + } + + return NB_OK; +} + +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -31663,9 +37948,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limi /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/restart-timer */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -31680,7 +37965,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limi return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -31697,9 +37982,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limi /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -31714,7 +37999,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limi return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -31731,9 +38016,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limi /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tr-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -31748,7 +38033,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limi return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -31765,9 +38050,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limi /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tr-restart-timer + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -31782,7 +38067,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limi return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tr_restart_timer_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -31799,9 +38084,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limi /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tw-shutdown-threshold-pct + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -31816,7 +38101,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limi return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_shutdown_threshold_pct_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -31833,9 +38118,9 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limi /* * XPath: - * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/prefix-limit-options/tw-warning-only + * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only */ -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_modify( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify( struct nb_cb_modify_args *args) { switch (args->event) { @@ -31850,7 +38135,7 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limi return NB_OK; } -int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_prefix_limit_options_tw_warning_only_destroy( +int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy( struct nb_cb_destroy_args *args) { switch (args->event) { @@ -31876,8 +38161,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_sel case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -31895,8 +38184,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_sel case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -31914,8 +38207,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -31933,8 +38230,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -31952,8 +38253,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -31971,8 +38276,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -31990,8 +38299,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_refle case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -32009,8 +38322,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_serve case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -32028,8 +38345,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_commun case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SEND_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -32047,8 +38368,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_commun case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SEND_EXT_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -32066,8 +38391,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_commun case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SEND_LARGE_COMMUNITY, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -32085,8 +38414,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_soft_reconf case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -32104,8 +38437,10 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weig case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_weight_modify(args); + break; } @@ -32119,8 +38454,10 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weig case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_weight_destroy(args); + break; } @@ -32206,8 +38543,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_as_path_options_rep case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_AS_OVERRIDE, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -32225,8 +38566,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_as_p case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_AS_PATH_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -32244,8 +38589,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_next case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -32263,8 +38612,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_med_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_MED_UNCHANGED, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -32282,8 +38635,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_h case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -32301,8 +38658,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_h case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_FORCE_NEXTHOP_SELF, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -32320,8 +38681,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_route_reflector_rou case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -32339,8 +38704,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_route_server_route_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -32358,8 +38727,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_soft_reconfiguratio case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -32377,8 +38750,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_route_reflector_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -32396,8 +38773,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_route_server_rou case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -32415,8 +38796,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_soft_reconfigura case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -32434,8 +38819,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_route_reflector_ case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_REFLECTOR_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -32453,8 +38842,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_route_server_rou case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_RSERVER_CLIENT, + yang_dnode_get_bool(args->dnode, NULL)); + break; } @@ -32472,8 +38865,12 @@ int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_soft_reconfigura case NB_EV_VALIDATE: case NB_EV_PREPARE: case NB_EV_ABORT: + return NB_OK; case NB_EV_APPLY: - /* TODO: implement me. */ + return bgp_peer_group_afi_safi_flag_modify( + args, PEER_FLAG_SOFT_RECONFIG, + yang_dnode_get_bool(args->dnode, NULL)); + break; } diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 566c5911e0..8a237e329e 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -371,14 +371,12 @@ static int bgp_dest_set_defer_flag(struct bgp_dest *dest, bool delete) */ if (set_flag && table) { if (bgp && (bgp->gr_info[afi][safi].t_select_deferral)) { + if (!CHECK_FLAG(dest->flags, BGP_NODE_SELECT_DEFER)) + bgp->gr_info[afi][safi].gr_deferred++; SET_FLAG(dest->flags, BGP_NODE_SELECT_DEFER); - if (dest->rt_node == NULL) - dest->rt_node = listnode_add( - bgp->gr_info[afi][safi].route_list, - dest); if (BGP_DEBUG(update, UPDATE_OUT)) - zlog_debug("DEFER route %pBD, dest %p, node %p", - dest, dest, dest->rt_node); + zlog_debug("DEFER route %pBD, dest %p", dest, + dest); return 0; } } @@ -562,6 +560,7 @@ static int bgp_path_info_cmp(struct bgp *bgp, struct bgp_path_info *new, bool same_esi; bool old_proxy; bool new_proxy; + bool new_origin, exist_origin; *paths_eq = 0; @@ -806,8 +805,12 @@ static int bgp_path_info_cmp(struct bgp *bgp, struct bgp_path_info *new, * - BGP_ROUTE_AGGREGATE * - BGP_ROUTE_REDISTRIBUTE */ - if (!(new->sub_type == BGP_ROUTE_NORMAL || - new->sub_type == BGP_ROUTE_IMPORTED)) { + new_origin = !(new->sub_type == BGP_ROUTE_NORMAL || + new->sub_type == BGP_ROUTE_IMPORTED); + exist_origin = !(exist->sub_type == BGP_ROUTE_NORMAL || + exist->sub_type == BGP_ROUTE_IMPORTED); + + if (new_origin && !exist_origin) { *reason = bgp_path_selection_local_route; if (debug) zlog_debug( @@ -816,8 +819,7 @@ static int bgp_path_info_cmp(struct bgp *bgp, struct bgp_path_info *new, return 1; } - if (!(exist->sub_type == BGP_ROUTE_NORMAL || - exist->sub_type == BGP_ROUTE_IMPORTED)) { + if (!new_origin && exist_origin) { *reason = bgp_path_selection_local_route; if (debug) zlog_debug( @@ -2916,37 +2918,39 @@ int bgp_best_path_select_defer(struct bgp *bgp, afi_t afi, safi_t safi) struct bgp_dest *dest; int cnt = 0; struct afi_safi_info *thread_info; - struct listnode *node = NULL, *nnode = NULL; - if (bgp->gr_info[afi][safi].t_route_select) + if (bgp->gr_info[afi][safi].t_route_select) { + struct thread *t = bgp->gr_info[afi][safi].t_route_select; + + thread_info = THREAD_ARG(t); + XFREE(MTYPE_TMP, thread_info); BGP_TIMER_OFF(bgp->gr_info[afi][safi].t_route_select); + } if (BGP_DEBUG(update, UPDATE_OUT)) { zlog_debug("%s: processing route for %s : cnt %d", __func__, get_afi_safi_str(afi, safi, false), - listcount(bgp->gr_info[afi][safi].route_list)); + bgp->gr_info[afi][safi].gr_deferred); } /* Process the route list */ - node = listhead(bgp->gr_info[afi][safi].route_list); - while (node) { - dest = listgetdata(node); - nnode = node->next; - list_delete_node(bgp->gr_info[afi][safi].route_list, node); - dest->rt_node = NULL; - - if (CHECK_FLAG(dest->flags, BGP_NODE_SELECT_DEFER)) { - UNSET_FLAG(dest->flags, BGP_NODE_SELECT_DEFER); - bgp_process_main_one(bgp, dest, afi, safi); - cnt++; - if (cnt >= BGP_MAX_BEST_ROUTE_SELECT) - break; + for (dest = bgp_table_top(bgp->rib[afi][safi]); dest; + dest = bgp_route_next(dest)) { + if (!CHECK_FLAG(dest->flags, BGP_NODE_SELECT_DEFER)) + continue; + + UNSET_FLAG(dest->flags, BGP_NODE_SELECT_DEFER); + bgp->gr_info[afi][safi].gr_deferred--; + bgp_process_main_one(bgp, dest, afi, safi); + cnt++; + if (cnt >= BGP_MAX_BEST_ROUTE_SELECT) { + bgp_dest_unlock_node(dest); + break; } - node = nnode; } /* Send EOR message when all routes are processed */ - if (list_isempty(bgp->gr_info[afi][safi].route_list)) { + if (bgp->gr_info[afi][safi].gr_deferred) { bgp_send_delayed_eor(bgp); /* Send route processing complete message to RIB */ bgp_zebra_update(afi, safi, bgp->vrf_id, @@ -3283,13 +3287,7 @@ void bgp_rib_remove(struct bgp_dest *dest, struct bgp_path_info *pi, if (CHECK_FLAG(dest->flags, BGP_NODE_SELECT_DEFER)) { UNSET_FLAG(dest->flags, BGP_NODE_SELECT_DEFER); bgp = pi->peer->bgp; - if ((dest->rt_node) - && (bgp->gr_info[afi][safi].route_list)) { - list_delete_node(bgp->gr_info[afi][safi] - .route_list, - dest->rt_node); - dest->rt_node = NULL; - } + bgp->gr_info[afi][safi].gr_deferred--; } } } @@ -12106,9 +12104,6 @@ static void bgp_table_stats_rn(struct bgp_dest *dest, struct bgp_dest *top, struct bgp_path_info *pi; const struct prefix *rn_p; - if (dest == top) - return; - if (!bgp_dest_has_bgp_path_info_data(dest)) return; diff --git a/bgpd/bgp_table.c b/bgpd/bgp_table.c index 70e226b01b..022a6413e2 100644 --- a/bgpd/bgp_table.c +++ b/bgpd/bgp_table.c @@ -154,13 +154,8 @@ void bgp_delete_listnode(struct bgp_node *node) if (bgp && rn && rn->lock == 1) { /* Delete the route from the selection pending list */ - if ((node->rt_node) - && (bgp->gr_info[afi][safi].route_list)) { - list_delete_node( - bgp->gr_info[afi][safi].route_list, - node->rt_node); - node->rt_node = NULL; - } + bgp->gr_info[afi][safi].gr_deferred--; + UNSET_FLAG(node->flags, BGP_NODE_SELECT_DEFER); } } } diff --git a/bgpd/bgp_table.h b/bgpd/bgp_table.h index 9dd27628ce..4e9abf863d 100644 --- a/bgpd/bgp_table.h +++ b/bgpd/bgp_table.h @@ -102,8 +102,7 @@ struct bgp_node { #define BGP_NODE_LABEL_CHANGED (1 << 2) #define BGP_NODE_REGISTERED_FOR_LABEL (1 << 3) #define BGP_NODE_SELECT_DEFER (1 << 4) - /* list node pointer */ - struct listnode *rt_node; + struct bgp_addpath_node_data tx_addpath; enum bgp_path_selection_reason reason; diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 00e781d804..fb4fae833d 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -154,6 +154,10 @@ static int bgp_show_neighbor_graceful_restart_afi_all(struct vty *vty, const char *ip_str, afi_t afi, bool use_json); +static int peer_and_group_lookup_nb(struct vty *vty, const char *peer_str, + char *base_xpath, int xpath_len, + char *abs_xpath); + static enum node_type bgp_node_type(afi_t afi, safi_t safi) { switch (afi) { @@ -587,7 +591,7 @@ int bgp_vty_find_and_parse_afi_safi_bgp(struct vty *vty, return *idx; } -static bool peer_address_self_check(struct bgp *bgp, union sockunion *su) +bool peer_address_self_check(struct bgp *bgp, union sockunion *su) { struct interface *ifp = NULL; @@ -604,49 +608,6 @@ static bool peer_address_self_check(struct bgp *bgp, union sockunion *su) return false; } -/* Utility function for looking up peer from VTY. */ -/* This is used only for configuration, so disallow if attempted on - * a dynamic neighbor. - */ -static struct peer *peer_lookup_vty(struct vty *vty, const char *ip_str) -{ - struct bgp *bgp = VTY_GET_CONTEXT(bgp); - int ret; - union sockunion su; - struct peer *peer; - - if (!bgp) { - return NULL; - } - - ret = str2sockunion(ip_str, &su); - if (ret < 0) { - peer = peer_lookup_by_conf_if(bgp, ip_str); - if (!peer) { - if ((peer = peer_lookup_by_hostname(bgp, ip_str)) - == NULL) { - vty_out(vty, - "%% Malformed address or name: %s\n", - ip_str); - return NULL; - } - } - } else { - peer = peer_lookup(bgp, &su); - if (!peer) { - vty_out(vty, - "%% Specify remote-as or peer-group commands first\n"); - return NULL; - } - if (peer_dynamic_neighbor(peer)) { - vty_out(vty, - "%% Operation not allowed on a dynamic neighbor\n"); - return NULL; - } - } - return peer; -} - /* Utility function for looking up peer or peer group. */ /* This is used only for configuration, so disallow if attempted on * a dynamic neighbor. @@ -693,6 +654,98 @@ struct peer *peer_and_group_lookup_vty(struct vty *vty, const char *peer_str) return NULL; } +int bgp_nb_errmsg_return(char *errmsg, size_t errmsg_len, int ret) +{ + const char *str = NULL; + + switch (ret) { + case BGP_ERR_INVALID_VALUE: + str = "Invalid value"; + break; + case BGP_ERR_INVALID_FLAG: + str = "Invalid flag"; + break; + case BGP_ERR_PEER_GROUP_SHUTDOWN: + str = "Peer-group has been shutdown. Activate the peer-group first"; + break; + case BGP_ERR_PEER_FLAG_CONFLICT: + str = "Can't set override-capability and strict-capability-match at the same time"; + break; + case BGP_ERR_PEER_GROUP_NO_REMOTE_AS: + str = "Specify remote-as or peer-group remote AS first"; + break; + case BGP_ERR_PEER_GROUP_CANT_CHANGE: + str = "Cannot change the peer-group. Deconfigure first"; + break; + case BGP_ERR_PEER_GROUP_MISMATCH: + str = "Peer is not a member of this peer-group"; + break; + case BGP_ERR_PEER_FILTER_CONFLICT: + str = "Prefix/distribute list can not co-exist"; + break; + case BGP_ERR_NOT_INTERNAL_PEER: + str = "Invalid command. Not an internal neighbor"; + break; + case BGP_ERR_REMOVE_PRIVATE_AS: + str = "remove-private-AS cannot be configured for IBGP peers"; + break; + case BGP_ERR_LOCAL_AS_ALLOWED_ONLY_FOR_EBGP: + str = "Local-AS allowed only for EBGP peers"; + break; + case BGP_ERR_CANNOT_HAVE_LOCAL_AS_SAME_AS: + str = "Cannot have local-as same as BGP AS number"; + break; + case BGP_ERR_TCPSIG_FAILED: + str = "Error while applying TCP-Sig to session(s)"; + break; + case BGP_ERR_NO_EBGP_MULTIHOP_WITH_TTLHACK: + str = "ebgp-multihop and ttl-security cannot be configured together"; + break; + case BGP_ERR_NO_IBGP_WITH_TTLHACK: + str = "ttl-security only allowed for EBGP peers"; + break; + case BGP_ERR_AS_OVERRIDE: + str = "as-override cannot be configured for IBGP peers"; + break; + case BGP_ERR_INVALID_DYNAMIC_NEIGHBORS_LIMIT: + str = "Invalid limit for number of dynamic neighbors"; + break; + case BGP_ERR_DYNAMIC_NEIGHBORS_RANGE_EXISTS: + str = "Dynamic neighbor listen range already exists"; + break; + case BGP_ERR_INVALID_FOR_DYNAMIC_PEER: + str = "Operation not allowed on a dynamic neighbor"; + break; + case BGP_ERR_INVALID_FOR_DIRECT_PEER: + str = "Operation not allowed on a directly connected neighbor"; + break; + case BGP_ERR_PEER_SAFI_CONFLICT: + str = GR_INVALID; + break; + case BGP_ERR_GR_INVALID_CMD: + str = "The Graceful Restart command used is not valid at this moment."; + break; + case BGP_ERR_GR_OPERATION_FAILED: + str = "The Graceful Restart Operation failed due to an err."; + break; + case BGP_GR_NO_OPERATION: + str = GR_NO_OPER; + break; + case BGP_ERR_PEER_GROUP_MEMBER: + str = "Peer-group member cannot override remote-as of peer-group"; + break; + case BGP_ERR_PEER_GROUP_PEER_TYPE_DIFFERENT: + str = "Peer-group members must be all internal or all external"; + break; + } + if (str) { + snprintf(errmsg, errmsg_len, "%s", str); + return -1; + } + + return 0; +} + int bgp_vty_return(struct vty *vty, int ret) { const char *str = NULL; @@ -4067,70 +4120,6 @@ void cli_show_router_global_ebgp_multihop_connected_route_check( vty_out(vty, " bgp disable-ebgp-connected-route-check\n"); } -static int peer_remote_as_vty(struct vty *vty, const char *peer_str, - const char *as_str, afi_t afi, safi_t safi) -{ - VTY_DECLVAR_CONTEXT(bgp, bgp); - int ret; - as_t as; - int as_type = AS_SPECIFIED; - union sockunion su; - - if (as_str[0] == 'i') { - as = 0; - as_type = AS_INTERNAL; - } else if (as_str[0] == 'e') { - as = 0; - as_type = AS_EXTERNAL; - } else { - /* Get AS number. */ - as = strtoul(as_str, NULL, 10); - } - - /* If peer is peer group or interface peer, call proper function. */ - ret = str2sockunion(peer_str, &su); - if (ret < 0) { - struct peer *peer; - - /* Check if existing interface peer */ - peer = peer_lookup_by_conf_if(bgp, peer_str); - - ret = peer_remote_as(bgp, NULL, peer_str, &as, as_type, afi, - safi); - - /* if not interface peer, check peer-group settings */ - if (ret < 0 && !peer) { - ret = peer_group_remote_as(bgp, peer_str, &as, as_type); - if (ret < 0) { - vty_out(vty, - "%% Create the peer-group or interface first\n"); - return CMD_WARNING_CONFIG_FAILED; - } - return CMD_SUCCESS; - } - } else { - if (peer_address_self_check(bgp, &su)) { - vty_out(vty, - "%% Can not configure the local system as neighbor\n"); - return CMD_WARNING_CONFIG_FAILED; - } - ret = peer_remote_as(bgp, &su, NULL, &as, as_type, afi, safi); - } - - /* This peer belongs to peer group. */ - switch (ret) { - case BGP_ERR_PEER_GROUP_MEMBER: - vty_out(vty, - "%% Peer-group member cannot override remote-as of peer-group\n"); - return CMD_WARNING_CONFIG_FAILED; - case BGP_ERR_PEER_GROUP_PEER_TYPE_DIFFERENT: - vty_out(vty, - "%% Peer-group members must be all internal or all external\n"); - return CMD_WARNING_CONFIG_FAILED; - } - return bgp_vty_return(vty, ret); -} - DEFUN_YANG(bgp_default_shutdown, bgp_default_shutdown_cmd, "[no] bgp default shutdown", @@ -4196,31 +4185,67 @@ ALIAS(no_bgp_shutdown, no_bgp_shutdown_msg_cmd, "Administrative shutdown of the BGP instance\n" "Add a shutdown message (RFC 8203)\n" "Shutdown message\n") -DEFUN (neighbor_remote_as, - neighbor_remote_as_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> remote-as <(1-4294967295)|internal|external>", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Specify a BGP neighbor\n" - AS_STR - "Internal BGP peer\n" - "External BGP peer\n") +DEFUN_YANG(neighbor_remote_as, + neighbor_remote_as_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> remote-as <(1-4294967295)|internal|external>", + NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Specify a BGP neighbor\n" AS_STR + "Internal BGP peer\n" + "External BGP peer\n") { int idx_peer = 1; int idx_remote_as = 3; - return peer_remote_as_vty(vty, argv[idx_peer]->arg, - argv[idx_remote_as]->arg, AFI_IP, - SAFI_UNICAST); + char base_xpath[XPATH_MAXLEN]; + char unnbr_xpath[XPATH_MAXLEN]; + char prgrp_xpath[XPATH_MAXLEN]; + union sockunion su; + const char *as_type_str = "as-specified"; + + if (str2sockunion(argv[idx_peer]->arg, &su) < 0) { + snprintf(unnbr_xpath, sizeof(unnbr_xpath), + FRR_BGP_NEIGHBOR_UNNUM_XPATH, argv[idx_peer]->arg, ""); + + snprintf(prgrp_xpath, sizeof(prgrp_xpath), + FRR_BGP_PEER_GROUP_XPATH, argv[idx_peer]->arg, ""); + + if (yang_dnode_exists(vty->candidate_config->dnode, "%s%s", + VTY_CURR_XPATH, unnbr_xpath + 1)) { + strlcpy(base_xpath, unnbr_xpath, sizeof(base_xpath)); + } else if (yang_dnode_exists(vty->candidate_config->dnode, + "%s%s", VTY_CURR_XPATH, + prgrp_xpath + 1)) { + snprintf(base_xpath, sizeof(base_xpath), + FRR_BGP_PEER_GROUP_XPATH, argv[idx_peer]->arg, + ""); + } else { + vty_out(vty, + "%% Create the peer-group or interface first\n"); + return CMD_WARNING_CONFIG_FAILED; + } + } else { + snprintf(base_xpath, sizeof(base_xpath), + FRR_BGP_NEIGHBOR_NUM_XPATH, argv[idx_peer]->arg, ""); + } + + if (argv[idx_remote_as]->arg[0] == 'i') { + as_type_str = "internal"; + } else if (argv[idx_remote_as]->arg[0] == 'e') { + as_type_str = "external"; + } else { + nb_cli_enqueue_change(vty, "./neighbor-remote-as/remote-as", + NB_OP_MODIFY, argv[idx_remote_as]->arg); + } + nb_cli_enqueue_change(vty, "./neighbor-remote-as/remote-as-type", + NB_OP_MODIFY, as_type_str); + + return nb_cli_apply_changes(vty, base_xpath); } -static int peer_conf_interface_get(struct vty *vty, const char *conf_if, - afi_t afi, safi_t safi, int v6only, - const char *peer_group_name, - const char *as_str) +int peer_conf_interface_create(struct bgp *bgp, const char *conf_if, afi_t afi, + safi_t safi, bool v6only, + const char *peer_group_name, int as_type, + as_t as, char *errmsg, size_t errmsg_len) { - VTY_DECLVAR_CONTEXT(bgp, bgp); - as_t as = 0; - int as_type = AS_UNSPECIFIED; struct peer *peer; struct peer_group *group; int ret = 0; @@ -4229,25 +4254,14 @@ static int peer_conf_interface_get(struct vty *vty, const char *conf_if, group = peer_group_lookup(bgp, conf_if); if (group) { - vty_out(vty, "%% Name conflict with peer-group \n"); - return CMD_WARNING_CONFIG_FAILED; - } - - if (as_str) { - if (as_str[0] == 'i') { - as_type = AS_INTERNAL; - } else if (as_str[0] == 'e') { - as_type = AS_EXTERNAL; - } else { - /* Get AS number. */ - as = strtoul(as_str, NULL, 10); - as_type = AS_SPECIFIED; - } + snprintf(errmsg, errmsg_len, + "Name conflict with peer-group \n"); + return -1; } peer = peer_lookup_by_conf_if(bgp, conf_if); if (peer) { - if (as_str) + if (as_type != AS_UNSPECIFIED) ret = peer_remote_as(bgp, NULL, conf_if, &as, as_type, afi, safi); } else { @@ -4260,8 +4274,9 @@ static int peer_conf_interface_get(struct vty *vty, const char *conf_if, as_type, afi, safi, NULL); if (!peer) { - vty_out(vty, "%% BGP failed to create peer\n"); - return CMD_WARNING_CONFIG_FAILED; + snprintf(errmsg, errmsg_len, + "BGP failed to create peer\n"); + return -1; } if (v6only) @@ -4304,122 +4319,156 @@ static int peer_conf_interface_get(struct vty *vty, const char *conf_if, if (peer_group_name) { group = peer_group_lookup(bgp, peer_group_name); if (!group) { - vty_out(vty, "%% Configure the peer-group first\n"); - return CMD_WARNING_CONFIG_FAILED; + snprintf(errmsg, errmsg_len, + "Configure the peer-group first\n"); + return -1; } ret = peer_group_bind(bgp, &su, peer, group, &as); } - return bgp_vty_return(vty, ret); + return bgp_nb_errmsg_return(errmsg, errmsg_len, ret); } -DEFUN (neighbor_interface_config, - neighbor_interface_config_cmd, - "neighbor WORD interface [peer-group PGNAME]", - NEIGHBOR_STR - "Interface name or neighbor tag\n" - "Enable BGP on interface\n" - "Member of the peer-group\n" - "Peer-group name\n") +DEFUN_YANG(neighbor_interface_config, neighbor_interface_config_cmd, + "neighbor WORD interface [peer-group PGNAME]", + NEIGHBOR_STR + "Interface name or neighbor tag\n" + "Enable BGP on interface\n" + "Member of the peer-group\n" + "Peer-group name\n") { int idx_word = 1; int idx_peer_group_word = 4; + char base_xpath[XPATH_MAXLEN]; + snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_NEIGHBOR_UNNUM_XPATH, + argv[idx_word]->arg, ""); + + nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL); if (argc > idx_peer_group_word) - return peer_conf_interface_get( - vty, argv[idx_word]->arg, AFI_IP, SAFI_UNICAST, 0, - argv[idx_peer_group_word]->arg, NULL); - else - return peer_conf_interface_get(vty, argv[idx_word]->arg, AFI_IP, - SAFI_UNICAST, 0, NULL, NULL); + nb_cli_enqueue_change(vty, "./peer-group", NB_OP_MODIFY, + argv[idx_peer_group_word]->arg); + + return nb_cli_apply_changes(vty, base_xpath); } -DEFUN (neighbor_interface_config_v6only, - neighbor_interface_config_v6only_cmd, - "neighbor WORD interface v6only [peer-group PGNAME]", - NEIGHBOR_STR - "Interface name or neighbor tag\n" - "Enable BGP on interface\n" - "Enable BGP with v6 link-local only\n" - "Member of the peer-group\n" - "Peer-group name\n") +DEFUN_YANG(neighbor_interface_config_v6only, + neighbor_interface_config_v6only_cmd, + "neighbor WORD interface v6only [peer-group PGNAME]", + NEIGHBOR_STR + "Interface name or neighbor tag\n" + "Enable BGP on interface\n" + "Enable BGP with v6 link-local only\n" + "Member of the peer-group\n" + "Peer-group name\n") { int idx_word = 1; int idx_peer_group_word = 5; + char base_xpath[XPATH_MAXLEN]; + + snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_NEIGHBOR_UNNUM_XPATH, + argv[idx_word]->arg, ""); + nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL); if (argc > idx_peer_group_word) - return peer_conf_interface_get( - vty, argv[idx_word]->arg, AFI_IP, SAFI_UNICAST, 1, - argv[idx_peer_group_word]->arg, NULL); + nb_cli_enqueue_change(vty, "./peer-group", NB_OP_MODIFY, + argv[idx_peer_group_word]->arg); + + nb_cli_enqueue_change(vty, "./v6only", NB_OP_MODIFY, "true"); - return peer_conf_interface_get(vty, argv[idx_word]->arg, AFI_IP, - SAFI_UNICAST, 1, NULL, NULL); + return nb_cli_apply_changes(vty, base_xpath); } -DEFUN (neighbor_interface_config_remote_as, - neighbor_interface_config_remote_as_cmd, - "neighbor WORD interface remote-as <(1-4294967295)|internal|external>", - NEIGHBOR_STR - "Interface name or neighbor tag\n" - "Enable BGP on interface\n" - "Specify a BGP neighbor\n" - AS_STR - "Internal BGP peer\n" - "External BGP peer\n") +DEFUN_YANG( + neighbor_interface_config_remote_as, + neighbor_interface_config_remote_as_cmd, + "neighbor WORD interface remote-as <(1-4294967295)|internal|external>", + NEIGHBOR_STR + "Interface name or neighbor tag\n" + "Enable BGP on interface\n" + "Specify a BGP neighbor\n" AS_STR + "Internal BGP peer\n" + "External BGP peer\n") { int idx_word = 1; int idx_remote_as = 4; - return peer_conf_interface_get(vty, argv[idx_word]->arg, AFI_IP, - SAFI_UNICAST, 0, NULL, - argv[idx_remote_as]->arg); + char base_xpath[XPATH_MAXLEN]; + const char *as_type_str = "as-specified"; + + snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_NEIGHBOR_UNNUM_XPATH, + argv[idx_word]->arg, ""); + + nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL); + + if (argv[idx_remote_as]->arg[0] == 'i') { + as_type_str = "internal"; + } else if (argv[idx_remote_as]->arg[0] == 'e') { + as_type_str = "external"; + } else { + nb_cli_enqueue_change(vty, "./neighbor-remote-as/remote-as", + NB_OP_MODIFY, argv[idx_remote_as]->arg); + } + nb_cli_enqueue_change(vty, "./neighbor-remote-as/remote-as-type", + NB_OP_MODIFY, as_type_str); + + return nb_cli_apply_changes(vty, base_xpath); } -DEFUN (neighbor_interface_v6only_config_remote_as, - neighbor_interface_v6only_config_remote_as_cmd, - "neighbor WORD interface v6only remote-as <(1-4294967295)|internal|external>", - NEIGHBOR_STR - "Interface name or neighbor tag\n" - "Enable BGP with v6 link-local only\n" - "Enable BGP on interface\n" - "Specify a BGP neighbor\n" - AS_STR - "Internal BGP peer\n" - "External BGP peer\n") +DEFUN_YANG( + neighbor_interface_v6only_config_remote_as, + neighbor_interface_v6only_config_remote_as_cmd, + "neighbor WORD interface v6only remote-as <(1-4294967295)|internal|external>", + NEIGHBOR_STR + "Interface name or neighbor tag\n" + "Enable BGP with v6 link-local only\n" + "Enable BGP on interface\n" + "Specify a BGP neighbor\n" AS_STR + "Internal BGP peer\n" + "External BGP peer\n") { int idx_word = 1; int idx_remote_as = 5; - return peer_conf_interface_get(vty, argv[idx_word]->arg, AFI_IP, - SAFI_UNICAST, 1, NULL, - argv[idx_remote_as]->arg); + char base_xpath[XPATH_MAXLEN]; + const char *as_type_str = "as-specified"; + + snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_NEIGHBOR_UNNUM_XPATH, + argv[idx_word]->arg, ""); + + nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL); + + nb_cli_enqueue_change(vty, "./v6only", NB_OP_MODIFY, "true"); + + if (argv[idx_remote_as]->arg[0] == 'i') { + as_type_str = "internal"; + } else if (argv[idx_remote_as]->arg[0] == 'e') { + as_type_str = "external"; + } else { + nb_cli_enqueue_change(vty, "./neighbor-remote-as/remote-as", + NB_OP_MODIFY, argv[idx_remote_as]->arg); + } + nb_cli_enqueue_change(vty, "./neighbor-remote-as/remote-as-type", + NB_OP_MODIFY, as_type_str); + + return nb_cli_apply_changes(vty, base_xpath); } -DEFUN (neighbor_peer_group, - neighbor_peer_group_cmd, - "neighbor WORD peer-group", - NEIGHBOR_STR - "Interface name or neighbor tag\n" - "Configure peer-group\n") +DEFUN_YANG(neighbor_peer_group, neighbor_peer_group_cmd, + "neighbor WORD peer-group", + NEIGHBOR_STR + "Interface name or neighbor tag\n" + "Configure peer-group\n") { - VTY_DECLVAR_CONTEXT(bgp, bgp); + char base_xpath[XPATH_MAXLEN]; int idx_word = 1; - struct peer *peer; - struct peer_group *group; - peer = peer_lookup_by_conf_if(bgp, argv[idx_word]->arg); - if (peer) { - vty_out(vty, "%% Name conflict with interface: \n"); - return CMD_WARNING_CONFIG_FAILED; - } + snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_PEER_GROUP_XPATH, + argv[idx_word]->arg, ""); - group = peer_group_get(bgp, argv[idx_word]->arg); - if (!group) { - vty_out(vty, "%% BGP failed to find or create peer-group\n"); - return CMD_WARNING_CONFIG_FAILED; - } + nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL); - return CMD_SUCCESS; + return nb_cli_apply_changes(vty, base_xpath); } DEFUN (no_neighbor, @@ -4433,245 +4482,227 @@ DEFUN (no_neighbor, "Internal BGP peer\n" "External BGP peer\n") { - VTY_DECLVAR_CONTEXT(bgp, bgp); int idx_peer = 2; - int ret; + char base_xpath[XPATH_MAXLEN]; + char num_xpath[XPATH_MAXLEN]; + char unnbr_xpath[XPATH_MAXLEN]; + char prgrp_xpath[XPATH_MAXLEN]; union sockunion su; - struct peer_group *group; - struct peer *peer; - struct peer *other; - ret = str2sockunion(argv[idx_peer]->arg, &su); - if (ret < 0) { - /* look up for neighbor by interface name config. */ - peer = peer_lookup_by_conf_if(bgp, argv[idx_peer]->arg); - if (peer) { - /* Request zebra to terminate IPv6 RAs on this - * interface. */ - if (peer->ifp) - bgp_zebra_terminate_radv(peer->bgp, peer); - peer_notify_unconfig(peer); - peer_delete(peer); - return CMD_SUCCESS; + if (str2sockunion(argv[idx_peer]->arg, &su) == 0) { + snprintf(num_xpath, sizeof(num_xpath), + FRR_BGP_NEIGHBOR_NUM_XPATH, argv[idx_peer]->arg, ""); + if (yang_dnode_exists(vty->candidate_config->dnode, "%s%s", + VTY_CURR_XPATH, num_xpath + 1)) { + strlcpy(base_xpath, num_xpath, sizeof(base_xpath)); } - - group = peer_group_lookup(bgp, argv[idx_peer]->arg); - if (group) { - peer_group_notify_unconfig(group); - peer_group_delete(group); + } else { + snprintf(unnbr_xpath, sizeof(unnbr_xpath), + FRR_BGP_NEIGHBOR_UNNUM_XPATH, argv[idx_peer]->arg, ""); + + snprintf(prgrp_xpath, sizeof(prgrp_xpath), + FRR_BGP_PEER_GROUP_XPATH, argv[idx_peer]->arg, ""); + + if (yang_dnode_exists(vty->candidate_config->dnode, "%s%s", + VTY_CURR_XPATH, unnbr_xpath + 1)) { + strlcpy(base_xpath, unnbr_xpath, sizeof(base_xpath)); + } else if (yang_dnode_exists(vty->candidate_config->dnode, + "%s%s", VTY_CURR_XPATH, + prgrp_xpath + 1)) { + strlcpy(base_xpath, prgrp_xpath, sizeof(base_xpath)); } else { - vty_out(vty, "%% Create the peer-group first\n"); + vty_out(vty, + "%% Create the peer-group or interface first\n"); return CMD_WARNING_CONFIG_FAILED; } - } else { - peer = peer_lookup(bgp, &su); - if (peer) { - if (peer_dynamic_neighbor(peer)) { - vty_out(vty, - "%% Operation not allowed on a dynamic neighbor\n"); - return CMD_WARNING_CONFIG_FAILED; - } - - other = peer->doppelganger; - - if (CHECK_FLAG(peer->flags, PEER_FLAG_CAPABILITY_ENHE)) - bgp_zebra_terminate_radv(peer->bgp, peer); - - peer_notify_unconfig(peer); - peer_delete(peer); - if (other && other->status != Deleted) { - peer_notify_unconfig(other); - peer_delete(other); - } - } } - return CMD_SUCCESS; + nb_cli_enqueue_change(vty, base_xpath, NB_OP_DESTROY, NULL); + + return nb_cli_apply_changes(vty, NULL); } -DEFUN (no_neighbor_interface_config, - no_neighbor_interface_config_cmd, - "no neighbor WORD interface [v6only] [peer-group PGNAME] [remote-as <(1-4294967295)|internal|external>]", - NO_STR - NEIGHBOR_STR - "Interface name\n" - "Configure BGP on interface\n" - "Enable BGP with v6 link-local only\n" - "Member of the peer-group\n" - "Peer-group name\n" - "Specify a BGP neighbor\n" - AS_STR - "Internal BGP peer\n" - "External BGP peer\n") +DEFUN_YANG(no_neighbor_interface_config, + no_neighbor_interface_config_cmd, + "no neighbor WORD interface [v6only] [peer-group PGNAME] [remote-as <(1-4294967295)|internal|external>]", + NO_STR NEIGHBOR_STR + "Interface name\n" + "Configure BGP on interface\n" + "Enable BGP with v6 link-local only\n" + "Member of the peer-group\n" + "Peer-group name\n" + "Specify a BGP neighbor\n" AS_STR + "Internal BGP peer\n" + "External BGP peer\n") { - VTY_DECLVAR_CONTEXT(bgp, bgp); int idx_word = 2; - struct peer *peer; + char base_xpath[XPATH_MAXLEN]; - /* look up for neighbor by interface name config. */ - peer = peer_lookup_by_conf_if(bgp, argv[idx_word]->arg); - if (peer) { - /* Request zebra to terminate IPv6 RAs on this interface. */ - if (peer->ifp) - bgp_zebra_terminate_radv(peer->bgp, peer); - peer_notify_unconfig(peer); - peer_delete(peer); - } else { - vty_out(vty, "%% Create the bgp interface first\n"); - return CMD_WARNING_CONFIG_FAILED; - } - return CMD_SUCCESS; + snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_NEIGHBOR_UNNUM_XPATH, + argv[idx_word]->arg, ""); + + nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL); + + return nb_cli_apply_changes(vty, base_xpath); } -DEFUN (no_neighbor_peer_group, - no_neighbor_peer_group_cmd, - "no neighbor WORD peer-group", - NO_STR - NEIGHBOR_STR - "Neighbor tag\n" - "Configure peer-group\n") +DEFUN_YANG(no_neighbor_peer_group, + no_neighbor_peer_group_cmd, + "no neighbor WORD peer-group", + NO_STR NEIGHBOR_STR + "Neighbor tag\n" + "Configure peer-group\n") { - VTY_DECLVAR_CONTEXT(bgp, bgp); + char base_xpath[XPATH_MAXLEN]; int idx_word = 2; - struct peer_group *group; - group = peer_group_lookup(bgp, argv[idx_word]->arg); - if (group) { - peer_group_notify_unconfig(group); - peer_group_delete(group); - } else { - vty_out(vty, "%% Create the peer-group first\n"); - return CMD_WARNING_CONFIG_FAILED; - } - return CMD_SUCCESS; + snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_PEER_GROUP_XPATH, + argv[idx_word]->arg, ""); + + nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL); + + return nb_cli_apply_changes(vty, base_xpath); } -DEFUN (no_neighbor_interface_peer_group_remote_as, - no_neighbor_interface_peer_group_remote_as_cmd, - "no neighbor WORD remote-as <(1-4294967295)|internal|external>", - NO_STR - NEIGHBOR_STR - "Interface name or neighbor tag\n" - "Specify a BGP neighbor\n" - AS_STR - "Internal BGP peer\n" - "External BGP peer\n") +DEFUN_YANG(no_neighbor_interface_peer_group_remote_as, + no_neighbor_interface_peer_group_remote_as_cmd, + "no neighbor WORD remote-as <(1-4294967295)|internal|external>", + NO_STR NEIGHBOR_STR + "Interface name or neighbor tag\n" + "Specify a BGP neighbor\n" AS_STR + "Internal BGP peer\n" + "External BGP peer\n") { - VTY_DECLVAR_CONTEXT(bgp, bgp); - int idx_word = 2; - struct peer_group *group; - struct peer *peer; + int idx_peer = 2; + char base_xpath[XPATH_MAXLEN]; + char unnbr_xpath[XPATH_MAXLEN]; + char prgrp_xpath[XPATH_MAXLEN]; - /* look up for neighbor by interface name config. */ - peer = peer_lookup_by_conf_if(bgp, argv[idx_word]->arg); - if (peer) { - peer_as_change(peer, 0, AS_UNSPECIFIED); - return CMD_SUCCESS; - } + snprintf(unnbr_xpath, sizeof(unnbr_xpath), FRR_BGP_NEIGHBOR_UNNUM_XPATH, + argv[idx_peer]->arg, ""); - group = peer_group_lookup(bgp, argv[idx_word]->arg); - if (group) - peer_group_remote_as_delete(group); - else { + snprintf(prgrp_xpath, sizeof(prgrp_xpath), FRR_BGP_PEER_GROUP_XPATH, + argv[idx_peer]->arg, ""); + + if (yang_dnode_exists(vty->candidate_config->dnode, "%s%s", + VTY_CURR_XPATH, unnbr_xpath + 1)) { + strlcpy(base_xpath, unnbr_xpath, sizeof(base_xpath)); + } else if (yang_dnode_exists(vty->candidate_config->dnode, "%s%s", + VTY_CURR_XPATH, prgrp_xpath + 1)) { + strlcpy(base_xpath, prgrp_xpath, sizeof(base_xpath)); + } else { vty_out(vty, "%% Create the peer-group or interface first\n"); return CMD_WARNING_CONFIG_FAILED; } - return CMD_SUCCESS; + + strlcat(base_xpath, "/neighbor-remote-as/remote-as-type", + sizeof(base_xpath)); + + nb_cli_enqueue_change(vty, base_xpath, NB_OP_DESTROY, NULL); + + return nb_cli_apply_changes(vty, NULL); } -DEFUN (neighbor_local_as, - neighbor_local_as_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> local-as (1-4294967295)", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Specify a local-as number\n" - "AS number used as local AS\n") +DEFUN_YANG(neighbor_local_as, + neighbor_local_as_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> local-as (1-4294967295)", + NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Specify a local-as number\n" + "AS number used as local AS\n") { int idx_peer = 1; int idx_number = 3; - struct peer *peer; - int ret; - as_t as; + char base_xpath[XPATH_MAXLEN]; - peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg); - if (!peer) + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) return CMD_WARNING_CONFIG_FAILED; - as = strtoul(argv[idx_number]->arg, NULL, 10); - ret = peer_local_as_set(peer, as, 0, 0); - return bgp_vty_return(vty, ret); + nb_cli_enqueue_change(vty, "./local-as/local-as", NB_OP_MODIFY, + argv[idx_number]->arg); + + return nb_cli_apply_changes(vty, base_xpath); } -DEFUN (neighbor_local_as_no_prepend, - neighbor_local_as_no_prepend_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> local-as (1-4294967295) no-prepend", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Specify a local-as number\n" - "AS number used as local AS\n" - "Do not prepend local-as to updates from ebgp peers\n") +DEFUN_YANG( + neighbor_local_as_no_prepend, neighbor_local_as_no_prepend_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> local-as (1-4294967295) no-prepend", + NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Specify a local-as number\n" + "AS number used as local AS\n" + "Do not prepend local-as to updates from ebgp peers\n") { int idx_peer = 1; int idx_number = 3; - struct peer *peer; - int ret; - as_t as; + char base_xpath[XPATH_MAXLEN]; - peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg); - if (!peer) + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) return CMD_WARNING_CONFIG_FAILED; - as = strtoul(argv[idx_number]->arg, NULL, 10); - ret = peer_local_as_set(peer, as, 1, 0); - return bgp_vty_return(vty, ret); + nb_cli_enqueue_change(vty, "./local-as/local-as", NB_OP_MODIFY, + argv[idx_number]->arg); + nb_cli_enqueue_change(vty, "./local-as/no-prepend", NB_OP_MODIFY, + "true"); + + return nb_cli_apply_changes(vty, base_xpath); } -DEFUN (neighbor_local_as_no_prepend_replace_as, - neighbor_local_as_no_prepend_replace_as_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> local-as (1-4294967295) no-prepend replace-as", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Specify a local-as number\n" - "AS number used as local AS\n" - "Do not prepend local-as to updates from ebgp peers\n" - "Do not prepend local-as to updates from ibgp peers\n") +DEFUN_YANG( + neighbor_local_as_no_prepend_replace_as, + neighbor_local_as_no_prepend_replace_as_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> local-as (1-4294967295) no-prepend replace-as", + NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Specify a local-as number\n" + "AS number used as local AS\n" + "Do not prepend local-as to updates from ebgp peers\n" + "Do not prepend local-as to updates from ibgp peers\n") { int idx_peer = 1; int idx_number = 3; - struct peer *peer; - int ret; - as_t as; + char base_xpath[XPATH_MAXLEN]; - peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg); - if (!peer) + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) return CMD_WARNING_CONFIG_FAILED; - as = strtoul(argv[idx_number]->arg, NULL, 10); - ret = peer_local_as_set(peer, as, 1, 1); - return bgp_vty_return(vty, ret); + nb_cli_enqueue_change(vty, "./local-as/local-as", NB_OP_MODIFY, + argv[idx_number]->arg); + nb_cli_enqueue_change(vty, "./local-as/no-prepend", NB_OP_MODIFY, + "true"); + nb_cli_enqueue_change(vty, "./local-as/no-replace-as", NB_OP_MODIFY, + "true"); + + return nb_cli_apply_changes(vty, base_xpath); } -DEFUN (no_neighbor_local_as, - no_neighbor_local_as_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> local-as [(1-4294967295) [no-prepend [replace-as]]]", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Specify a local-as number\n" - "AS number used as local AS\n" - "Do not prepend local-as to updates from ebgp peers\n" - "Do not prepend local-as to updates from ibgp peers\n") +DEFUN_YANG(no_neighbor_local_as, + no_neighbor_local_as_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> local-as [(1-4294967295) [no-prepend [replace-as]]]", + NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Specify a local-as number\n" + "AS number used as local AS\n" + "Do not prepend local-as to updates from ebgp peers\n" + "Do not prepend local-as to updates from ibgp peers\n") { int idx_peer = 2; - struct peer *peer; - int ret; + char base_xpath[XPATH_MAXLEN]; - peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg); - if (!peer) + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) return CMD_WARNING_CONFIG_FAILED; - ret = peer_local_as_unset(peer); - return bgp_vty_return(vty, ret); + nb_cli_enqueue_change(vty, "./local-as/local-as", NB_OP_DESTROY, NULL); + nb_cli_enqueue_change(vty, "./local-as/no-prepend", NB_OP_MODIFY, + "false"); + nb_cli_enqueue_change(vty, "./local-as/no-replace-as", NB_OP_MODIFY, + "false"); + + return nb_cli_apply_changes(vty, base_xpath); } @@ -4714,65 +4745,79 @@ DEFUN (no_neighbor_solo, return bgp_vty_return(vty, ret); } -DEFUN (neighbor_password, - neighbor_password_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> password LINE", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Set a password\n" - "The password\n") +DEFUN_YANG(neighbor_password, + neighbor_password_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> password LINE", + NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Set a password\n" + "The password\n") { int idx_peer = 1; int idx_line = 3; - struct peer *peer; - int ret; + char base_xpath[XPATH_MAXLEN]; - peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg); - if (!peer) + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) return CMD_WARNING_CONFIG_FAILED; - ret = peer_password_set(peer, argv[idx_line]->arg); - return bgp_vty_return(vty, ret); + nb_cli_enqueue_change(vty, "./password", NB_OP_MODIFY, + argv[idx_line]->arg); + + return nb_cli_apply_changes(vty, base_xpath); } -DEFUN (no_neighbor_password, - no_neighbor_password_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> password [LINE]", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Set a password\n" - "The password\n") +DEFUN_YANG(no_neighbor_password, + no_neighbor_password_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> password [LINE]", + NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Set a password\n" + "The password\n") { int idx_peer = 2; - struct peer *peer; - int ret; + char base_xpath[XPATH_MAXLEN]; - peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg); - if (!peer) + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) return CMD_WARNING_CONFIG_FAILED; - ret = peer_password_unset(peer); - return bgp_vty_return(vty, ret); + nb_cli_enqueue_change(vty, "./password", NB_OP_DESTROY, NULL); + + return nb_cli_apply_changes(vty, base_xpath); } -DEFUN (neighbor_activate, - neighbor_activate_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> activate", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Enable the Address Family for this Neighbor\n") +DEFUN_YANG(neighbor_activate, + neighbor_activate_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> activate", + NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Enable the Address Family for this Neighbor\n") { int idx_peer = 1; - int ret; - struct peer *peer; + char base_xpath[XPATH_MAXLEN]; + char abs_xpath[XPATH_MAXLEN]; + char nbr_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); - peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg); - if (!peer) + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, nbr_xpath, + sizeof(nbr_xpath), af_xpath) + < 0) return CMD_WARNING_CONFIG_FAILED; - ret = peer_activate(peer, bgp_node_afi(vty), bgp_node_safi(vty)); - return bgp_vty_return(vty, ret); + snprintf(base_xpath, sizeof(base_xpath), "%s%s", VTY_CURR_XPATH, + nbr_xpath + 1); + + snprintf(abs_xpath, sizeof(abs_xpath), "%s%s/enabled", VTY_CURR_XPATH, + nbr_xpath + 1); + + nb_cli_enqueue_change(vty, abs_xpath, NB_OP_MODIFY, "true"); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(neighbor_activate, neighbor_activate_hidden_cmd, @@ -4780,25 +4825,30 @@ ALIAS_HIDDEN(neighbor_activate, neighbor_activate_hidden_cmd, NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Enable the Address Family for this Neighbor\n") -DEFUN (no_neighbor_activate, - no_neighbor_activate_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> activate", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Enable the Address Family for this Neighbor\n") +DEFUN_YANG(no_neighbor_activate, + no_neighbor_activate_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> activate", + NO_STR NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Enable the Address Family for this Neighbor\n") { int idx_peer = 2; - int ret; - struct peer *peer; + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); - /* Lookup peer. */ - peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg); - if (!peer) + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) return CMD_WARNING_CONFIG_FAILED; - ret = peer_deactivate(peer, bgp_node_afi(vty), bgp_node_safi(vty)); - return bgp_vty_return(vty, ret); + nb_cli_enqueue_change(vty, "./enabled", NB_OP_MODIFY, "false"); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(no_neighbor_activate, no_neighbor_activate_hidden_cmd, @@ -4806,63 +4856,27 @@ ALIAS_HIDDEN(no_neighbor_activate, no_neighbor_activate_hidden_cmd, NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Enable the Address Family for this Neighbor\n") -DEFUN (neighbor_set_peer_group, - neighbor_set_peer_group_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> peer-group PGNAME", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Member of the peer-group\n" - "Peer-group name\n") +DEFUN_YANG (neighbor_set_peer_group, + neighbor_set_peer_group_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> peer-group PGNAME", + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Member of the peer-group\n" + "Peer-group name\n") { - VTY_DECLVAR_CONTEXT(bgp, bgp); int idx_peer = 1; int idx_word = 3; - int ret; - as_t as; - union sockunion su; - struct peer *peer; - struct peer_group *group; - - ret = str2sockunion(argv[idx_peer]->arg, &su); - if (ret < 0) { - peer = peer_lookup_by_conf_if(bgp, argv[idx_peer]->arg); - if (!peer) { - vty_out(vty, "%% Malformed address or name: %s\n", - argv[idx_peer]->arg); - return CMD_WARNING_CONFIG_FAILED; - } - } else { - if (peer_address_self_check(bgp, &su)) { - vty_out(vty, - "%% Can not configure the local system as neighbor\n"); - return CMD_WARNING_CONFIG_FAILED; - } - - /* Disallow for dynamic neighbor. */ - peer = peer_lookup(bgp, &su); - if (peer && peer_dynamic_neighbor(peer)) { - vty_out(vty, - "%% Operation not allowed on a dynamic neighbor\n"); - return CMD_WARNING_CONFIG_FAILED; - } - } + char base_xpath[XPATH_MAXLEN]; - group = peer_group_lookup(bgp, argv[idx_word]->arg); - if (!group) { - vty_out(vty, "%% Configure the peer-group first\n"); + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) return CMD_WARNING_CONFIG_FAILED; - } - ret = peer_group_bind(bgp, &su, peer, group, &as); - - if (ret == BGP_ERR_PEER_GROUP_PEER_TYPE_DIFFERENT) { - vty_out(vty, - "%% Peer with AS %u cannot be in this peer-group, members must be all internal or all external\n", - as); - return CMD_WARNING_CONFIG_FAILED; - } + nb_cli_enqueue_change(vty, "./peer-group", NB_OP_MODIFY, + argv[idx_word]->arg); - return bgp_vty_return(vty, ret); + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(neighbor_set_peer_group, neighbor_set_peer_group_hidden_cmd, @@ -4871,39 +4885,26 @@ ALIAS_HIDDEN(neighbor_set_peer_group, neighbor_set_peer_group_hidden_cmd, "Member of the peer-group\n" "Peer-group name\n") -DEFUN (no_neighbor_set_peer_group, - no_neighbor_set_peer_group_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> peer-group PGNAME", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Member of the peer-group\n" - "Peer-group name\n") +DEFUN_YANG (no_neighbor_set_peer_group, + no_neighbor_set_peer_group_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> peer-group PGNAME", + NO_STR + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Member of the peer-group\n" + "Peer-group name\n") { - VTY_DECLVAR_CONTEXT(bgp, bgp); int idx_peer = 2; - int idx_word = 4; - int ret; - struct peer *peer; - struct peer_group *group; - - peer = peer_lookup_vty(vty, argv[idx_peer]->arg); - if (!peer) - return CMD_WARNING_CONFIG_FAILED; + char base_xpath[XPATH_MAXLEN]; - group = peer_group_lookup(bgp, argv[idx_word]->arg); - if (!group) { - vty_out(vty, "%% Configure the peer-group first\n"); + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) return CMD_WARNING_CONFIG_FAILED; - } - if (CHECK_FLAG(peer->flags, PEER_FLAG_CAPABILITY_ENHE)) - bgp_zebra_terminate_radv(peer->bgp, peer); + nb_cli_enqueue_change(vty, "./peer-group", NB_OP_DESTROY, NULL); - peer_notify_unconfig(peer); - ret = peer_delete(peer); - - return bgp_vty_return(vty, ret); + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(no_neighbor_set_peer_group, no_neighbor_set_peer_group_hidden_cmd, @@ -4955,55 +4956,105 @@ static int peer_flag_unset_vty(struct vty *vty, const char *ip_str, return peer_flag_modify_vty(vty, ip_str, flag, 0); } +int peer_flag_modify_nb(struct bgp *bgp, const char *ip_str, struct peer *peer, + uint32_t flag, bool set, char *errmsg, + size_t errmsg_len) +{ + int ret; + + /* + * If 'neighbor <interface>', then this is for directly connected peers, + * we should not accept disable-connected-check. + */ + if (peer->conf_if && (flag == PEER_FLAG_DISABLE_CONNECTED_CHECK)) { + snprintf( + errmsg, errmsg_len, + "%s is directly connected peer, cannot accept disable-connected-check\n", + ip_str); + return -1; + } + + if (!set && flag == PEER_FLAG_SHUTDOWN) + peer_tx_shutdown_message_unset(peer); + + if (set) + ret = peer_flag_set(peer, flag); + else + ret = peer_flag_unset(peer, flag); + + return bgp_nb_errmsg_return(errmsg, errmsg_len, ret); +} + /* neighbor passive. */ -DEFUN (neighbor_passive, - neighbor_passive_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> passive", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Don't send open messages to this neighbor\n") +DEFUN_YANG(neighbor_passive, + neighbor_passive_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> passive", + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Don't send open messages to this neighbor\n") { int idx_peer = 1; - return peer_flag_set_vty(vty, argv[idx_peer]->arg, PEER_FLAG_PASSIVE); + char base_xpath[XPATH_MAXLEN]; + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + nb_cli_enqueue_change(vty, "./passive-mode", NB_OP_MODIFY, "true"); + + return nb_cli_apply_changes(vty, base_xpath); } -DEFUN (no_neighbor_passive, - no_neighbor_passive_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> passive", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Don't send open messages to this neighbor\n") +DEFUN_YANG(no_neighbor_passive, + no_neighbor_passive_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> passive", + NO_STR NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Don't send open messages to this neighbor\n") { int idx_peer = 2; - return peer_flag_unset_vty(vty, argv[idx_peer]->arg, PEER_FLAG_PASSIVE); + char base_xpath[XPATH_MAXLEN]; + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + nb_cli_enqueue_change(vty, "./passive-mode", NB_OP_MODIFY, "false"); + + return nb_cli_apply_changes(vty, base_xpath); } /* neighbor shutdown. */ -DEFUN (neighbor_shutdown_msg, - neighbor_shutdown_msg_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> shutdown message MSG...", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Administratively shut down this neighbor\n" - "Add a shutdown message (RFC 8203)\n" - "Shutdown message\n") +DEFUN_YANG(neighbor_shutdown_msg, + neighbor_shutdown_msg_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> shutdown message MSG...", + NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Administratively shut down this neighbor\n" + "Add a shutdown message (RFC 8203)\n" + "Shutdown message\n") { int idx_peer = 1; + char base_xpath[XPATH_MAXLEN]; + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) + return CMD_WARNING_CONFIG_FAILED; if (argc >= 5) { - struct peer *peer = - peer_and_group_lookup_vty(vty, argv[idx_peer]->arg); char *message; - if (!peer) - return CMD_WARNING_CONFIG_FAILED; message = argv_concat(argv, argc, 4); - peer_tx_shutdown_message_set(peer, message); - XFREE(MTYPE_TMP, message); + nb_cli_enqueue_change(vty, "./admin-shutdown/message", + NB_OP_MODIFY, message); } - return peer_flag_set_vty(vty, argv[idx_peer]->arg, PEER_FLAG_SHUTDOWN); + nb_cli_enqueue_change(vty, "./admin-shutdown/enable", NB_OP_MODIFY, + "true"); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS(neighbor_shutdown_msg, neighbor_shutdown_cmd, @@ -5011,20 +5062,27 @@ ALIAS(neighbor_shutdown_msg, neighbor_shutdown_cmd, NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Administratively shut down this neighbor\n") -DEFUN (no_neighbor_shutdown_msg, - no_neighbor_shutdown_msg_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> shutdown message MSG...", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Administratively shut down this neighbor\n" - "Remove a shutdown message (RFC 8203)\n" - "Shutdown message\n") +DEFUN_YANG(no_neighbor_shutdown_msg, + no_neighbor_shutdown_msg_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> shutdown message MSG...", + NO_STR NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Administratively shut down this neighbor\n" + "Remove a shutdown message (RFC 8203)\n" + "Shutdown message\n") { int idx_peer = 2; + char base_xpath[XPATH_MAXLEN]; - return peer_flag_unset_vty(vty, argv[idx_peer]->arg, - PEER_FLAG_SHUTDOWN); + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + nb_cli_enqueue_change(vty, "./admin-shutdown/enable", NB_OP_MODIFY, + "false"); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS(no_neighbor_shutdown_msg, no_neighbor_shutdown_cmd, @@ -5091,31 +5149,49 @@ DEFUN(no_neighbor_shutdown_rtt, } /* neighbor capability dynamic. */ -DEFUN (neighbor_capability_dynamic, - neighbor_capability_dynamic_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> capability dynamic", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Advertise capability to the peer\n" - "Advertise dynamic capability to this neighbor\n") +DEFUN_YANG (neighbor_capability_dynamic, + neighbor_capability_dynamic_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> capability dynamic", + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Advertise capability to the peer\n" + "Advertise dynamic capability to this neighbor\n") { int idx_peer = 1; - return peer_flag_set_vty(vty, argv[idx_peer]->arg, - PEER_FLAG_DYNAMIC_CAPABILITY); + char base_xpath[XPATH_MAXLEN]; + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + nb_cli_enqueue_change(vty, "./capability-options/dynamic-capability", + NB_OP_MODIFY, "true"); + + return nb_cli_apply_changes(vty, base_xpath); } -DEFUN (no_neighbor_capability_dynamic, - no_neighbor_capability_dynamic_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> capability dynamic", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Advertise capability to the peer\n" - "Advertise dynamic capability to this neighbor\n") +DEFUN_YANG (no_neighbor_capability_dynamic, + no_neighbor_capability_dynamic_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> capability dynamic", + NO_STR + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Advertise capability to the peer\n" + "Advertise dynamic capability to this neighbor\n") { int idx_peer = 2; - return peer_flag_unset_vty(vty, argv[idx_peer]->arg, - PEER_FLAG_DYNAMIC_CAPABILITY); + char base_xpath[XPATH_MAXLEN]; + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + nb_cli_enqueue_change(vty, "./capability-options/dynamic-capability", + NB_OP_MODIFY, "false"); + + return nb_cli_apply_changes(vty, base_xpath); } /* neighbor dont-capability-negotiate */ @@ -5145,31 +5221,65 @@ DEFUN (no_neighbor_dont_capability_negotiate, } /* neighbor capability extended next hop encoding */ -DEFUN (neighbor_capability_enhe, - neighbor_capability_enhe_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> capability extended-nexthop", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Advertise capability to the peer\n" - "Advertise extended next-hop capability to the peer\n") +DEFUN_YANG (neighbor_capability_enhe, + neighbor_capability_enhe_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> capability extended-nexthop", + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Advertise capability to the peer\n" + "Advertise extended next-hop capability to the peer\n") { int idx_peer = 1; - return peer_flag_set_vty(vty, argv[idx_peer]->arg, - PEER_FLAG_CAPABILITY_ENHE); + char base_xpath[XPATH_MAXLEN]; + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + nb_cli_enqueue_change( + vty, "./capability-options/extended-nexthop-capability", + NB_OP_MODIFY, "true"); + + return nb_cli_apply_changes(vty, base_xpath); } -DEFUN (no_neighbor_capability_enhe, - no_neighbor_capability_enhe_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> capability extended-nexthop", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Advertise capability to the peer\n" - "Advertise extended next-hop capability to the peer\n") +DEFUN_YANG (no_neighbor_capability_enhe, + no_neighbor_capability_enhe_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> capability extended-nexthop", + NO_STR + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Advertise capability to the peer\n" + "Advertise extended next-hop capability to the peer\n") { int idx_peer = 2; - return peer_flag_unset_vty(vty, argv[idx_peer]->arg, - PEER_FLAG_CAPABILITY_ENHE); + char base_xpath[XPATH_MAXLEN]; + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + nb_cli_enqueue_change( + vty, "./capability-options/extended-nexthop-capability", + NB_OP_MODIFY, "false"); + + return nb_cli_apply_changes(vty, base_xpath); +} + +int peer_af_flag_modify_nb(struct peer *peer, afi_t afi, safi_t safi, + uint32_t flag, int set, char *errmsg, + size_t errmsg_len) +{ + int ret; + + if (set) + ret = peer_af_flag_set(peer, afi, safi, flag); + else + ret = peer_af_flag_unset(peer, afi, safi, flag); + + return bgp_nb_errmsg_return(errmsg, errmsg_len, ret); } static int peer_af_flag_modify_vty(struct vty *vty, const char *peer_str, @@ -5308,16 +5418,36 @@ ALIAS_HIDDEN( "Capability to SEND the ORF to this neighbor\n") /* neighbor next-hop-self. */ -DEFUN (neighbor_nexthop_self, - neighbor_nexthop_self_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> next-hop-self", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Disable the next hop calculation for this neighbor\n") +DEFUN_YANG (neighbor_nexthop_self, + neighbor_nexthop_self_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> next-hop-self", + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Disable the next hop calculation for this neighbor\n") { int idx_peer = 1; - return peer_af_flag_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty), - bgp_node_safi(vty), PEER_FLAG_NEXTHOP_SELF); + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + snprintf(attr_xpath, sizeof(attr_xpath), + "./%s/nexthop-self/next-hop-self", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "true"); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(neighbor_nexthop_self, neighbor_nexthop_self_hidden_cmd, @@ -5326,18 +5456,37 @@ ALIAS_HIDDEN(neighbor_nexthop_self, neighbor_nexthop_self_hidden_cmd, "Disable the next hop calculation for this neighbor\n") /* neighbor next-hop-self. */ -DEFUN (neighbor_nexthop_self_force, - neighbor_nexthop_self_force_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> next-hop-self force", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Disable the next hop calculation for this neighbor\n" - "Set the next hop to self for reflected routes\n") +DEFUN_YANG(neighbor_nexthop_self_force, + neighbor_nexthop_self_force_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> next-hop-self force", + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Disable the next hop calculation for this neighbor\n" + "Set the next hop to self for reflected routes\n") { int idx_peer = 1; - return peer_af_flag_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty), - bgp_node_safi(vty), - PEER_FLAG_FORCE_NEXTHOP_SELF); + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + snprintf(attr_xpath, sizeof(attr_xpath), + "./%s/nexthop-self/next-hop-self-force", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "true"); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(neighbor_nexthop_self_force, @@ -5354,18 +5503,36 @@ ALIAS_HIDDEN(neighbor_nexthop_self_force, "Disable the next hop calculation for this neighbor\n" "Set the next hop to self for reflected routes\n") -DEFUN (no_neighbor_nexthop_self, - no_neighbor_nexthop_self_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> next-hop-self", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Disable the next hop calculation for this neighbor\n") +DEFUN_YANG (no_neighbor_nexthop_self, + no_neighbor_nexthop_self_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> next-hop-self", + NO_STR + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Disable the next hop calculation for this neighbor\n") { int idx_peer = 2; - return peer_af_flag_unset_vty(vty, argv[idx_peer]->arg, - bgp_node_afi(vty), bgp_node_safi(vty), - PEER_FLAG_NEXTHOP_SELF); + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + snprintf(attr_xpath, sizeof(attr_xpath), + "./%s/nexthop-self/next-hop-self", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "false"); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(no_neighbor_nexthop_self, no_neighbor_nexthop_self_hidden_cmd, @@ -5373,19 +5540,38 @@ ALIAS_HIDDEN(no_neighbor_nexthop_self, no_neighbor_nexthop_self_hidden_cmd, NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Disable the next hop calculation for this neighbor\n") -DEFUN (no_neighbor_nexthop_self_force, - no_neighbor_nexthop_self_force_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> next-hop-self force", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Disable the next hop calculation for this neighbor\n" - "Set the next hop to self for reflected routes\n") +DEFUN_YANG (no_neighbor_nexthop_self_force, + no_neighbor_nexthop_self_force_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> next-hop-self force", + NO_STR + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Disable the next hop calculation for this neighbor\n" + "Set the next hop to self for reflected routes\n") { int idx_peer = 2; - return peer_af_flag_unset_vty(vty, argv[idx_peer]->arg, - bgp_node_afi(vty), bgp_node_safi(vty), - PEER_FLAG_FORCE_NEXTHOP_SELF); + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + snprintf(attr_xpath, sizeof(attr_xpath), + "./%s/nexthop-self/next-hop-self-force", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "false"); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(no_neighbor_nexthop_self_force, @@ -5403,16 +5589,35 @@ ALIAS_HIDDEN(no_neighbor_nexthop_self_force, "Set the next hop to self for reflected routes\n") /* neighbor as-override */ -DEFUN (neighbor_as_override, - neighbor_as_override_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> as-override", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Override ASNs in outbound updates if aspath equals remote-as\n") +DEFUN_YANG (neighbor_as_override, + neighbor_as_override_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> as-override", + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Override ASNs in outbound updates if aspath equals remote-as\n") { int idx_peer = 1; - return peer_af_flag_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty), - bgp_node_safi(vty), PEER_FLAG_AS_OVERRIDE); + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + snprintf(attr_xpath, sizeof(attr_xpath), + "./%s/as-path-options/replace-peer-as", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "true"); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(neighbor_as_override, neighbor_as_override_hidden_cmd, @@ -5420,18 +5625,36 @@ ALIAS_HIDDEN(neighbor_as_override, neighbor_as_override_hidden_cmd, NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Override ASNs in outbound updates if aspath equals remote-as\n") -DEFUN (no_neighbor_as_override, - no_neighbor_as_override_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> as-override", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Override ASNs in outbound updates if aspath equals remote-as\n") +DEFUN_YANG (no_neighbor_as_override, + no_neighbor_as_override_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> as-override", + NO_STR + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Override ASNs in outbound updates if aspath equals remote-as\n") { int idx_peer = 2; - return peer_af_flag_unset_vty(vty, argv[idx_peer]->arg, - bgp_node_afi(vty), bgp_node_safi(vty), - PEER_FLAG_AS_OVERRIDE); + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + snprintf(attr_xpath, sizeof(attr_xpath), + "./%s/as-path-options/replace-peer-as", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "false"); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(no_neighbor_as_override, no_neighbor_as_override_hidden_cmd, @@ -5440,17 +5663,35 @@ ALIAS_HIDDEN(no_neighbor_as_override, no_neighbor_as_override_hidden_cmd, "Override ASNs in outbound updates if aspath equals remote-as\n") /* neighbor remove-private-AS. */ -DEFUN (neighbor_remove_private_as, - neighbor_remove_private_as_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Remove private ASNs in outbound updates\n") +DEFUN_YANG (neighbor_remove_private_as, + neighbor_remove_private_as_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS", + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Remove private ASNs in outbound updates\n") { int idx_peer = 1; - return peer_af_flag_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty), - bgp_node_safi(vty), - PEER_FLAG_REMOVE_PRIVATE_AS); + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + snprintf(attr_xpath, sizeof(attr_xpath), + "./%s/private-as/remove-private-as", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "true"); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(neighbor_remove_private_as, neighbor_remove_private_as_hidden_cmd, @@ -5458,18 +5699,37 @@ ALIAS_HIDDEN(neighbor_remove_private_as, neighbor_remove_private_as_hidden_cmd, NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Remove private ASNs in outbound updates\n") -DEFUN (neighbor_remove_private_as_all, - neighbor_remove_private_as_all_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS all", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Remove private ASNs in outbound updates\n" - "Apply to all AS numbers\n") +DEFUN_YANG (neighbor_remove_private_as_all, + neighbor_remove_private_as_all_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS all", + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Remove private ASNs in outbound updates\n" + "Apply to all AS numbers\n") { int idx_peer = 1; - return peer_af_flag_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty), - bgp_node_safi(vty), - PEER_FLAG_REMOVE_PRIVATE_AS_ALL); + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + snprintf(attr_xpath, sizeof(attr_xpath), + "./%s/private-as/remove-private-as-all", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "true"); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(neighbor_remove_private_as_all, @@ -5479,18 +5739,37 @@ ALIAS_HIDDEN(neighbor_remove_private_as_all, "Remove private ASNs in outbound updates\n" "Apply to all AS numbers") -DEFUN (neighbor_remove_private_as_replace_as, - neighbor_remove_private_as_replace_as_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS replace-AS", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Remove private ASNs in outbound updates\n" - "Replace private ASNs with our ASN in outbound updates\n") +DEFUN_YANG (neighbor_remove_private_as_replace_as, + neighbor_remove_private_as_replace_as_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS replace-AS", + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Remove private ASNs in outbound updates\n" + "Replace private ASNs with our ASN in outbound updates\n") { int idx_peer = 1; - return peer_af_flag_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty), - bgp_node_safi(vty), - PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE); + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + snprintf(attr_xpath, sizeof(attr_xpath), + "./%s/private-as/remove-private-as-replace", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "true"); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(neighbor_remove_private_as_replace_as, @@ -5500,19 +5779,38 @@ ALIAS_HIDDEN(neighbor_remove_private_as_replace_as, "Remove private ASNs in outbound updates\n" "Replace private ASNs with our ASN in outbound updates\n") -DEFUN (neighbor_remove_private_as_all_replace_as, - neighbor_remove_private_as_all_replace_as_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS all replace-AS", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Remove private ASNs in outbound updates\n" - "Apply to all AS numbers\n" - "Replace private ASNs with our ASN in outbound updates\n") +DEFUN_YANG (neighbor_remove_private_as_all_replace_as, + neighbor_remove_private_as_all_replace_as_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS all replace-AS", + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Remove private ASNs in outbound updates\n" + "Apply to all AS numbers\n" + "Replace private ASNs with our ASN in outbound updates\n") { int idx_peer = 1; - return peer_af_flag_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty), - bgp_node_safi(vty), - PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE); + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + snprintf(attr_xpath, sizeof(attr_xpath), + "./%s/private-as/remove-private-as-all-replace", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "true"); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN( @@ -5524,18 +5822,36 @@ ALIAS_HIDDEN( "Apply to all AS numbers\n" "Replace private ASNs with our ASN in outbound updates\n") -DEFUN (no_neighbor_remove_private_as, - no_neighbor_remove_private_as_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Remove private ASNs in outbound updates\n") +DEFUN_YANG (no_neighbor_remove_private_as, + no_neighbor_remove_private_as_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS", + NO_STR + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Remove private ASNs in outbound updates\n") { int idx_peer = 2; - return peer_af_flag_unset_vty(vty, argv[idx_peer]->arg, - bgp_node_afi(vty), bgp_node_safi(vty), - PEER_FLAG_REMOVE_PRIVATE_AS); + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + snprintf(attr_xpath, sizeof(attr_xpath), + "./%s/private-as/remove-private-as", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "false"); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(no_neighbor_remove_private_as, @@ -5544,19 +5860,38 @@ ALIAS_HIDDEN(no_neighbor_remove_private_as, NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Remove private ASNs in outbound updates\n") -DEFUN (no_neighbor_remove_private_as_all, - no_neighbor_remove_private_as_all_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS all", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Remove private ASNs in outbound updates\n" - "Apply to all AS numbers\n") +DEFUN_YANG (no_neighbor_remove_private_as_all, + no_neighbor_remove_private_as_all_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS all", + NO_STR + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Remove private ASNs in outbound updates\n" + "Apply to all AS numbers\n") { int idx_peer = 2; - return peer_af_flag_unset_vty(vty, argv[idx_peer]->arg, - bgp_node_afi(vty), bgp_node_safi(vty), - PEER_FLAG_REMOVE_PRIVATE_AS_ALL); + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + snprintf(attr_xpath, sizeof(attr_xpath), + "./%s/private-as/remove-private-as-all", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "false"); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(no_neighbor_remove_private_as_all, @@ -5566,19 +5901,38 @@ ALIAS_HIDDEN(no_neighbor_remove_private_as_all, "Remove private ASNs in outbound updates\n" "Apply to all AS numbers\n") -DEFUN (no_neighbor_remove_private_as_replace_as, - no_neighbor_remove_private_as_replace_as_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS replace-AS", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Remove private ASNs in outbound updates\n" - "Replace private ASNs with our ASN in outbound updates\n") +DEFUN_YANG (no_neighbor_remove_private_as_replace_as, + no_neighbor_remove_private_as_replace_as_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS replace-AS", + NO_STR + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Remove private ASNs in outbound updates\n" + "Replace private ASNs with our ASN in outbound updates\n") { int idx_peer = 2; - return peer_af_flag_unset_vty(vty, argv[idx_peer]->arg, - bgp_node_afi(vty), bgp_node_safi(vty), - PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE); + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + snprintf(attr_xpath, sizeof(attr_xpath), + "./%s/private-as/remove-private-as-replace", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "false"); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(no_neighbor_remove_private_as_replace_as, @@ -5588,20 +5942,39 @@ ALIAS_HIDDEN(no_neighbor_remove_private_as_replace_as, "Remove private ASNs in outbound updates\n" "Replace private ASNs with our ASN in outbound updates\n") -DEFUN (no_neighbor_remove_private_as_all_replace_as, - no_neighbor_remove_private_as_all_replace_as_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS all replace-AS", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Remove private ASNs in outbound updates\n" - "Apply to all AS numbers\n" - "Replace private ASNs with our ASN in outbound updates\n") +DEFUN_YANG (no_neighbor_remove_private_as_all_replace_as, + no_neighbor_remove_private_as_all_replace_as_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS all replace-AS", + NO_STR + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Remove private ASNs in outbound updates\n" + "Apply to all AS numbers\n" + "Replace private ASNs with our ASN in outbound updates\n") { int idx_peer = 2; - return peer_af_flag_unset_vty(vty, argv[idx_peer]->arg, - bgp_node_afi(vty), bgp_node_safi(vty), - PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE); + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + snprintf(attr_xpath, sizeof(attr_xpath), + "./%s/private-as/remove-private-as-all-replace", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "false"); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN( @@ -5615,12 +5988,12 @@ ALIAS_HIDDEN( /* neighbor send-community. */ -DEFUN (neighbor_send_community, - neighbor_send_community_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> send-community", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Send Community attribute to this neighbor\n") +DEFUN_YANG (neighbor_send_community, + neighbor_send_community_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> send-community", + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Send Community attribute to this neighbor\n") { int idx_peer = 1; @@ -5634,13 +6007,13 @@ ALIAS_HIDDEN(neighbor_send_community, neighbor_send_community_hidden_cmd, NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Send Community attribute to this neighbor\n") -DEFUN (no_neighbor_send_community, - no_neighbor_send_community_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> send-community", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Send Community attribute to this neighbor\n") +DEFUN_YANG (no_neighbor_send_community, + no_neighbor_send_community_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> send-community", + NO_STR + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Send Community attribute to this neighbor\n") { int idx_peer = 2; @@ -5655,52 +6028,95 @@ ALIAS_HIDDEN(no_neighbor_send_community, no_neighbor_send_community_hidden_cmd, "Send Community attribute to this neighbor\n") /* neighbor send-community extended. */ -DEFUN (neighbor_send_community_type, - neighbor_send_community_type_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> send-community <both|all|extended|standard|large>", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Send Community attribute to this neighbor\n" - "Send Standard and Extended Community attributes\n" - "Send Standard, Large and Extended Community attributes\n" - "Send Extended Community attributes\n" - "Send Standard Community attributes\n" - "Send Large Community attributes\n") +DEFUN_YANG (neighbor_send_community_type, + neighbor_send_community_type_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> send-community <both|all|extended|standard|large>", + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Send Community attribute to this neighbor\n" + "Send Standard and Extended Community attributes\n" + "Send Standard, Large and Extended Community attributes\n" + "Send Extended Community attributes\n" + "Send Standard Community attributes\n" + "Send Large Community attributes\n") { const char *type = argv[argc - 1]->text; char *peer_str = argv[1]->arg; - struct peer *peer; + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char std_xpath[XPATH_MAXLEN]; + char ext_xpath[XPATH_MAXLEN]; + char lrg_xpath[XPATH_MAXLEN]; afi_t afi = bgp_node_afi(vty); safi_t safi = bgp_node_safi(vty); - peer = peer_and_group_lookup_vty(vty, peer_str); - if (!peer) + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, peer_str, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) return CMD_WARNING_CONFIG_FAILED; - if (strmatch(type, "standard")) - return peer_af_flag_set_vty(vty, peer_str, afi, safi, - PEER_FLAG_SEND_COMMUNITY); + if (strmatch(type, "standard")) { + snprintf(std_xpath, sizeof(std_xpath), + "./%s/send-community/send-community", + bgp_afi_safi_get_container_str(afi, safi)); - if (strmatch(type, "extended")) - return peer_af_flag_set_vty(vty, peer_str, afi, safi, - PEER_FLAG_SEND_EXT_COMMUNITY); + nb_cli_enqueue_change(vty, std_xpath, NB_OP_MODIFY, "true"); + } - if (strmatch(type, "large")) - return peer_af_flag_set_vty(vty, peer_str, afi, safi, - PEER_FLAG_SEND_LARGE_COMMUNITY); + if (strmatch(type, "extended")) { + snprintf(ext_xpath, sizeof(ext_xpath), + "./%s/send-community/send-ext-community", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, ext_xpath, NB_OP_MODIFY, "true"); + } + + if (strmatch(type, "large")) { + snprintf(lrg_xpath, sizeof(lrg_xpath), + "./%s/send-community/send-large-community", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, lrg_xpath, NB_OP_MODIFY, "true"); + } if (strmatch(type, "both")) { - return peer_af_flag_set_vty(vty, peer_str, afi, safi, - PEER_FLAG_SEND_COMMUNITY) - | peer_af_flag_set_vty(vty, peer_str, afi, safi, - PEER_FLAG_SEND_EXT_COMMUNITY); + snprintf(std_xpath, sizeof(std_xpath), + "./%s/send-community/send-community", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, std_xpath, NB_OP_MODIFY, "true"); + + snprintf(ext_xpath, sizeof(ext_xpath), + "./%s/send-community/send-ext-community", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, ext_xpath, NB_OP_MODIFY, "true"); + } + + if (strmatch(type, "all")) { + snprintf(std_xpath, sizeof(std_xpath), + "./%s/send-community/send-community", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, std_xpath, NB_OP_MODIFY, "true"); + + snprintf(ext_xpath, sizeof(ext_xpath), + "./%s/send-community/send-ext-community", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, ext_xpath, NB_OP_MODIFY, "true"); + + snprintf(lrg_xpath, sizeof(lrg_xpath), + "./%s/send-community/send-large-community", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, lrg_xpath, NB_OP_MODIFY, "true"); } - return peer_af_flag_set_vty(vty, peer_str, afi, safi, - PEER_FLAG_SEND_COMMUNITY) - | peer_af_flag_set_vty(vty, peer_str, afi, safi, - PEER_FLAG_SEND_EXT_COMMUNITY) - | peer_af_flag_set_vty(vty, peer_str, afi, safi, - PEER_FLAG_SEND_LARGE_COMMUNITY); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN( @@ -5714,55 +6130,96 @@ ALIAS_HIDDEN( "Send Standard Community attributes\n" "Send Large Community attributes\n") -DEFUN (no_neighbor_send_community_type, - no_neighbor_send_community_type_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> send-community <both|all|extended|standard|large>", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Send Community attribute to this neighbor\n" - "Send Standard and Extended Community attributes\n" - "Send Standard, Large and Extended Community attributes\n" - "Send Extended Community attributes\n" - "Send Standard Community attributes\n" - "Send Large Community attributes\n") +DEFUN_YANG (no_neighbor_send_community_type, + no_neighbor_send_community_type_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> send-community <both|all|extended|standard|large>", + NO_STR + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Send Community attribute to this neighbor\n" + "Send Standard and Extended Community attributes\n" + "Send Standard, Large and Extended Community attributes\n" + "Send Extended Community attributes\n" + "Send Standard Community attributes\n" + "Send Large Community attributes\n") { const char *type = argv[argc - 1]->text; char *peer_str = argv[2]->arg; - struct peer *peer; + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char std_xpath[XPATH_MAXLEN]; + char ext_xpath[XPATH_MAXLEN]; + char lrg_xpath[XPATH_MAXLEN]; afi_t afi = bgp_node_afi(vty); safi_t safi = bgp_node_safi(vty); - peer = peer_and_group_lookup_vty(vty, peer_str); - if (!peer) + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, peer_str, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) return CMD_WARNING_CONFIG_FAILED; - if (strmatch(type, "standard")) - return peer_af_flag_unset_vty(vty, peer_str, afi, safi, - PEER_FLAG_SEND_COMMUNITY); + if (strmatch(type, "standard")) { + snprintf(std_xpath, sizeof(std_xpath), + "./%s/send-community/send-community", + bgp_afi_safi_get_container_str(afi, safi)); - if (strmatch(type, "extended")) - return peer_af_flag_unset_vty(vty, peer_str, afi, safi, - PEER_FLAG_SEND_EXT_COMMUNITY); + nb_cli_enqueue_change(vty, std_xpath, NB_OP_MODIFY, "false"); + } - if (strmatch(type, "large")) - return peer_af_flag_unset_vty(vty, peer_str, afi, safi, - PEER_FLAG_SEND_LARGE_COMMUNITY); + if (strmatch(type, "extended")) { + snprintf(ext_xpath, sizeof(ext_xpath), + "./%s/send-community/send-ext-community", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, ext_xpath, NB_OP_MODIFY, "false"); + } + + if (strmatch(type, "large")) { + snprintf(lrg_xpath, sizeof(lrg_xpath), + "./%s/send-community/send-large-community", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, lrg_xpath, NB_OP_MODIFY, "false"); + } if (strmatch(type, "both")) { + snprintf(std_xpath, sizeof(std_xpath), + "./%s/send-community/send-community", + bgp_afi_safi_get_container_str(afi, safi)); - return peer_af_flag_unset_vty(vty, peer_str, afi, safi, - PEER_FLAG_SEND_COMMUNITY) - | peer_af_flag_unset_vty(vty, peer_str, afi, safi, - PEER_FLAG_SEND_EXT_COMMUNITY); + nb_cli_enqueue_change(vty, std_xpath, NB_OP_MODIFY, "false"); + + snprintf(ext_xpath, sizeof(ext_xpath), + "./%s/send-community/send-ext-community", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, ext_xpath, NB_OP_MODIFY, "false"); } - return peer_af_flag_unset_vty(vty, peer_str, afi, safi, - PEER_FLAG_SEND_COMMUNITY) - | peer_af_flag_unset_vty(vty, peer_str, afi, safi, - PEER_FLAG_SEND_EXT_COMMUNITY) - | peer_af_flag_unset_vty(vty, peer_str, afi, safi, - PEER_FLAG_SEND_LARGE_COMMUNITY); + if (strmatch(type, "all")) { + snprintf(std_xpath, sizeof(std_xpath), + "./%s/send-community/send-community", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, std_xpath, NB_OP_MODIFY, "false"); + + snprintf(ext_xpath, sizeof(ext_xpath), + "./%s/send-community/send-ext-community", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, ext_xpath, NB_OP_MODIFY, "false"); + + snprintf(lrg_xpath, sizeof(lrg_xpath), + "./%s/send-community/send-large-community", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, lrg_xpath, NB_OP_MODIFY, "false"); + } + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN( @@ -5778,18 +6235,35 @@ ALIAS_HIDDEN( "Send Large Community attributes\n") /* neighbor soft-reconfig. */ -DEFUN (neighbor_soft_reconfiguration, - neighbor_soft_reconfiguration_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> soft-reconfiguration inbound", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Per neighbor soft reconfiguration\n" - "Allow inbound soft reconfiguration for this neighbor\n") +DEFUN_YANG (neighbor_soft_reconfiguration, + neighbor_soft_reconfiguration_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> soft-reconfiguration inbound", + NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Per neighbor soft reconfiguration\n" + "Allow inbound soft reconfiguration for this neighbor\n") { int idx_peer = 1; - return peer_af_flag_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty), - bgp_node_safi(vty), - PEER_FLAG_SOFT_RECONFIG); + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char soft_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + snprintf(soft_xpath, sizeof(soft_xpath), "./%s/soft-reconfiguration", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, soft_xpath, NB_OP_MODIFY, "true"); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(neighbor_soft_reconfiguration, @@ -5799,19 +6273,34 @@ ALIAS_HIDDEN(neighbor_soft_reconfiguration, "Per neighbor soft reconfiguration\n" "Allow inbound soft reconfiguration for this neighbor\n") -DEFUN (no_neighbor_soft_reconfiguration, - no_neighbor_soft_reconfiguration_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> soft-reconfiguration inbound", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Per neighbor soft reconfiguration\n" - "Allow inbound soft reconfiguration for this neighbor\n") +DEFUN_YANG (no_neighbor_soft_reconfiguration, + no_neighbor_soft_reconfiguration_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> soft-reconfiguration inbound", + NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Per neighbor soft reconfiguration\n" + "Allow inbound soft reconfiguration for this neighbor\n") { int idx_peer = 2; - return peer_af_flag_unset_vty(vty, argv[idx_peer]->arg, - bgp_node_afi(vty), bgp_node_safi(vty), - PEER_FLAG_SOFT_RECONFIG); + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char soft_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + snprintf(soft_xpath, sizeof(soft_xpath), "./%s/soft-reconfiguration", + bgp_afi_safi_get_container_str(afi, safi)); + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + nb_cli_enqueue_change(vty, soft_xpath, NB_OP_MODIFY, "false"); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(no_neighbor_soft_reconfiguration, @@ -5821,24 +6310,35 @@ ALIAS_HIDDEN(no_neighbor_soft_reconfiguration, "Per neighbor soft reconfiguration\n" "Allow inbound soft reconfiguration for this neighbor\n") -DEFUN (neighbor_route_reflector_client, - neighbor_route_reflector_client_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> route-reflector-client", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Configure a neighbor as Route Reflector client\n") +DEFUN_YANG (neighbor_route_reflector_client, + neighbor_route_reflector_client_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> route-reflector-client", + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Configure a neighbor as Route Reflector client\n") { int idx_peer = 1; - struct peer *peer; + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); - peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg); - if (!peer) + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) return CMD_WARNING_CONFIG_FAILED; - return peer_af_flag_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty), - bgp_node_safi(vty), - PEER_FLAG_REFLECTOR_CLIENT); + snprintf(attr_xpath, sizeof(attr_xpath), + "./%s/route-reflector/route-reflector-client", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "true"); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(neighbor_route_reflector_client, @@ -5847,18 +6347,36 @@ ALIAS_HIDDEN(neighbor_route_reflector_client, NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Configure a neighbor as Route Reflector client\n") -DEFUN (no_neighbor_route_reflector_client, - no_neighbor_route_reflector_client_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> route-reflector-client", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Configure a neighbor as Route Reflector client\n") +DEFUN_YANG (no_neighbor_route_reflector_client, + no_neighbor_route_reflector_client_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> route-reflector-client", + NO_STR + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Configure a neighbor as Route Reflector client\n") { int idx_peer = 2; - return peer_af_flag_unset_vty(vty, argv[idx_peer]->arg, - bgp_node_afi(vty), bgp_node_safi(vty), - PEER_FLAG_REFLECTOR_CLIENT); + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + snprintf(attr_xpath, sizeof(attr_xpath), + "./%s/route-reflector/route-reflector-client", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "false"); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(no_neighbor_route_reflector_client, @@ -5868,22 +6386,35 @@ ALIAS_HIDDEN(no_neighbor_route_reflector_client, "Configure a neighbor as Route Reflector client\n") /* neighbor route-server-client. */ -DEFUN (neighbor_route_server_client, - neighbor_route_server_client_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> route-server-client", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Configure a neighbor as Route Server client\n") +DEFUN_YANG (neighbor_route_server_client, + neighbor_route_server_client_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> route-server-client", + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Configure a neighbor as Route Server client\n") { int idx_peer = 1; - struct peer *peer; + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); - peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg); - if (!peer) + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) return CMD_WARNING_CONFIG_FAILED; - return peer_af_flag_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty), - bgp_node_safi(vty), - PEER_FLAG_RSERVER_CLIENT); + + snprintf(attr_xpath, sizeof(attr_xpath), + "./%s/route-server/route-server-client", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "true"); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(neighbor_route_server_client, @@ -5892,18 +6423,36 @@ ALIAS_HIDDEN(neighbor_route_server_client, NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Configure a neighbor as Route Server client\n") -DEFUN (no_neighbor_route_server_client, - no_neighbor_route_server_client_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> route-server-client", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Configure a neighbor as Route Server client\n") +DEFUN_YANG (no_neighbor_route_server_client, + no_neighbor_route_server_client_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> route-server-client", + NO_STR + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Configure a neighbor as Route Server client\n") { int idx_peer = 2; - return peer_af_flag_unset_vty(vty, argv[idx_peer]->arg, - bgp_node_afi(vty), bgp_node_safi(vty), - PEER_FLAG_RSERVER_CLIENT); + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + snprintf(attr_xpath, sizeof(attr_xpath), + "./%s/route-server/route-server-client", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "false"); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(no_neighbor_route_server_client, @@ -5941,28 +6490,35 @@ DEFUN (no_neighbor_nexthop_local_unchanged, PEER_FLAG_NEXTHOP_LOCAL_UNCHANGED); } -DEFUN (neighbor_attr_unchanged, - neighbor_attr_unchanged_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> attribute-unchanged [{as-path|next-hop|med}]", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "BGP attribute is propagated unchanged to this neighbor\n" - "As-path attribute\n" - "Nexthop attribute\n" - "Med attribute\n") +DEFUN_YANG (neighbor_attr_unchanged, + neighbor_attr_unchanged_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> attribute-unchanged [{as-path|next-hop|med}]", + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "BGP attribute is propagated unchanged to this neighbor\n" + "As-path attribute\n" + "Nexthop attribute\n" + "Med attribute\n") { int idx = 0; char *peer_str = argv[1]->arg; - struct peer *peer; bool aspath = false; bool nexthop = false; bool med = false; afi_t afi = bgp_node_afi(vty); safi_t safi = bgp_node_safi(vty); - int ret = 0; + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char as_xpath[XPATH_MAXLEN]; + char nxthop_xpath[XPATH_MAXLEN]; + char med_xpath[XPATH_MAXLEN]; - peer = peer_and_group_lookup_vty(vty, peer_str); - if (!peer) + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, peer_str, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) return CMD_WARNING_CONFIG_FAILED; if (argv_find(argv, argc, "as-path", &idx)) @@ -5976,52 +6532,45 @@ DEFUN (neighbor_attr_unchanged, if (argv_find(argv, argc, "med", &idx)) med = true; + snprintf(as_xpath, sizeof(as_xpath), + "./%s/attr-unchanged/as-path-unchanged", + bgp_afi_safi_get_container_str(afi, safi)); + snprintf(nxthop_xpath, sizeof(nxthop_xpath), + "./%s/attr-unchanged/next-hop-unchanged", + bgp_afi_safi_get_container_str(afi, safi)); + snprintf(med_xpath, sizeof(med_xpath), + "./%s/attr-unchanged/med-unchanged", + bgp_afi_safi_get_container_str(afi, safi)); + /* no flags means all of them! */ if (!aspath && !nexthop && !med) { - ret = peer_af_flag_set_vty(vty, peer_str, afi, safi, - PEER_FLAG_AS_PATH_UNCHANGED); - ret |= peer_af_flag_set_vty(vty, peer_str, afi, safi, - PEER_FLAG_NEXTHOP_UNCHANGED); - ret |= peer_af_flag_set_vty(vty, peer_str, afi, safi, - PEER_FLAG_MED_UNCHANGED); + nb_cli_enqueue_change(vty, as_xpath, NB_OP_MODIFY, "true"); + nb_cli_enqueue_change(vty, nxthop_xpath, NB_OP_MODIFY, "true"); + nb_cli_enqueue_change(vty, med_xpath, NB_OP_MODIFY, "true"); } else { - if (!aspath) { - if (peer_af_flag_check(peer, afi, safi, - PEER_FLAG_AS_PATH_UNCHANGED)) { - ret |= peer_af_flag_unset_vty( - vty, peer_str, afi, safi, - PEER_FLAG_AS_PATH_UNCHANGED); - } - } else - ret |= peer_af_flag_set_vty( - vty, peer_str, afi, safi, - PEER_FLAG_AS_PATH_UNCHANGED); - - if (!nexthop) { - if (peer_af_flag_check(peer, afi, safi, - PEER_FLAG_NEXTHOP_UNCHANGED)) { - ret |= peer_af_flag_unset_vty( - vty, peer_str, afi, safi, - PEER_FLAG_NEXTHOP_UNCHANGED); - } - } else - ret |= peer_af_flag_set_vty( - vty, peer_str, afi, safi, - PEER_FLAG_NEXTHOP_UNCHANGED); + if (!aspath) + nb_cli_enqueue_change(vty, as_xpath, NB_OP_MODIFY, + "false"); + else + nb_cli_enqueue_change(vty, as_xpath, NB_OP_MODIFY, + "true"); - if (!med) { - if (peer_af_flag_check(peer, afi, safi, - PEER_FLAG_MED_UNCHANGED)) { - ret |= peer_af_flag_unset_vty( - vty, peer_str, afi, safi, - PEER_FLAG_MED_UNCHANGED); - } - } else - ret |= peer_af_flag_set_vty(vty, peer_str, afi, safi, - PEER_FLAG_MED_UNCHANGED); + if (!nexthop) + nb_cli_enqueue_change(vty, nxthop_xpath, NB_OP_MODIFY, + "false"); + else + nb_cli_enqueue_change(vty, nxthop_xpath, NB_OP_MODIFY, + "true"); + + if (!med) + nb_cli_enqueue_change(vty, med_xpath, NB_OP_MODIFY, + "false"); + else + nb_cli_enqueue_change(vty, med_xpath, NB_OP_MODIFY, + "true"); } - return ret; + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN( @@ -6033,29 +6582,36 @@ ALIAS_HIDDEN( "Nexthop attribute\n" "Med attribute\n") -DEFUN (no_neighbor_attr_unchanged, - no_neighbor_attr_unchanged_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> attribute-unchanged [{as-path|next-hop|med}]", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "BGP attribute is propagated unchanged to this neighbor\n" - "As-path attribute\n" - "Nexthop attribute\n" - "Med attribute\n") +DEFUN_YANG (no_neighbor_attr_unchanged, + no_neighbor_attr_unchanged_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> attribute-unchanged [{as-path|next-hop|med}]", + NO_STR + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "BGP attribute is propagated unchanged to this neighbor\n" + "As-path attribute\n" + "Nexthop attribute\n" + "Med attribute\n") { int idx = 0; char *peer_str = argv[2]->arg; - struct peer *peer; bool aspath = false; bool nexthop = false; bool med = false; afi_t afi = bgp_node_afi(vty); safi_t safi = bgp_node_safi(vty); - int ret = 0; + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char as_xpath[XPATH_MAXLEN]; + char nxthop_xpath[XPATH_MAXLEN]; + char med_xpath[XPATH_MAXLEN]; - peer = peer_and_group_lookup_vty(vty, peer_str); - if (!peer) + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, peer_str, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) return CMD_WARNING_CONFIG_FAILED; if (argv_find(argv, argc, "as-path", &idx)) @@ -6069,27 +6625,33 @@ DEFUN (no_neighbor_attr_unchanged, if (argv_find(argv, argc, "med", &idx)) med = true; - if (!aspath && !nexthop && !med) // no flags means all of them! - return peer_af_flag_unset_vty(vty, peer_str, afi, safi, - PEER_FLAG_AS_PATH_UNCHANGED) - | peer_af_flag_unset_vty(vty, peer_str, afi, safi, - PEER_FLAG_NEXTHOP_UNCHANGED) - | peer_af_flag_unset_vty(vty, peer_str, afi, safi, - PEER_FLAG_MED_UNCHANGED); + snprintf(as_xpath, sizeof(as_xpath), + "./%s/attr-unchanged/as-path-unchanged", + bgp_afi_safi_get_container_str(afi, safi)); + snprintf(nxthop_xpath, sizeof(nxthop_xpath), + "./%s/attr-unchanged/next-hop-unchanged", + bgp_afi_safi_get_container_str(afi, safi)); + snprintf(med_xpath, sizeof(med_xpath), + "./%s/attr-unchanged/med-unchanged", + bgp_afi_safi_get_container_str(afi, safi)); + + /* no flags means all of them! */ + if (!aspath && !nexthop && !med) { + nb_cli_enqueue_change(vty, as_xpath, NB_OP_MODIFY, "false"); + nb_cli_enqueue_change(vty, nxthop_xpath, NB_OP_MODIFY, "false"); + nb_cli_enqueue_change(vty, med_xpath, NB_OP_MODIFY, "false"); + } if (aspath) - ret |= peer_af_flag_unset_vty(vty, peer_str, afi, safi, - PEER_FLAG_AS_PATH_UNCHANGED); + nb_cli_enqueue_change(vty, as_xpath, NB_OP_MODIFY, "false"); if (nexthop) - ret |= peer_af_flag_unset_vty(vty, peer_str, afi, safi, - PEER_FLAG_NEXTHOP_UNCHANGED); + nb_cli_enqueue_change(vty, nxthop_xpath, NB_OP_MODIFY, "false"); if (med) - ret |= peer_af_flag_unset_vty(vty, peer_str, afi, safi, - PEER_FLAG_MED_UNCHANGED); + nb_cli_enqueue_change(vty, med_xpath, NB_OP_MODIFY, "false"); - return ret; + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN( @@ -6101,181 +6663,257 @@ ALIAS_HIDDEN( "Nexthop attribute\n" "Med attribute\n") -/* EBGP multihop configuration. */ -static int peer_ebgp_multihop_set_vty(struct vty *vty, const char *ip_str, - const char *ttl_str) +/* neighbor ebgp-multihop. */ +DEFUN_YANG (neighbor_ebgp_multihop, + neighbor_ebgp_multihop_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> ebgp-multihop", + NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Allow EBGP neighbors not on directly connected networks\n") { - struct peer *peer; - unsigned int ttl; + int idx_peer = 1; + char base_xpath[XPATH_MAXLEN]; - peer = peer_and_group_lookup_vty(vty, ip_str); - if (!peer) + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) return CMD_WARNING_CONFIG_FAILED; - if (peer->conf_if) - return bgp_vty_return(vty, BGP_ERR_INVALID_FOR_DIRECT_PEER); - - if (!ttl_str) - ttl = MAXTTL; - else - ttl = strtoul(ttl_str, NULL, 10); + nb_cli_enqueue_change(vty, "./ebgp-multihop/enabled", NB_OP_MODIFY, + "true"); - return bgp_vty_return(vty, peer_ebgp_multihop_set(peer, ttl)); + return nb_cli_apply_changes(vty, base_xpath); } -static int peer_ebgp_multihop_unset_vty(struct vty *vty, const char *ip_str) +DEFUN_YANG (neighbor_ebgp_multihop_ttl, + neighbor_ebgp_multihop_ttl_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> ebgp-multihop (1-255)", + NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Allow EBGP neighbors not on directly connected networks\n" + "maximum hop count\n") { - struct peer *peer; + int idx_peer = 1; + int idx_number = 3; + char base_xpath[XPATH_MAXLEN]; - peer = peer_and_group_lookup_vty(vty, ip_str); - if (!peer) + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) return CMD_WARNING_CONFIG_FAILED; - return bgp_vty_return(vty, peer_ebgp_multihop_unset(peer)); -} - -/* neighbor ebgp-multihop. */ -DEFUN (neighbor_ebgp_multihop, - neighbor_ebgp_multihop_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> ebgp-multihop", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Allow EBGP neighbors not on directly connected networks\n") -{ - int idx_peer = 1; - return peer_ebgp_multihop_set_vty(vty, argv[idx_peer]->arg, NULL); -} + nb_cli_enqueue_change(vty, "./ebgp-multihop/multihop-ttl", NB_OP_MODIFY, + argv[idx_number]->arg); -DEFUN (neighbor_ebgp_multihop_ttl, - neighbor_ebgp_multihop_ttl_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> ebgp-multihop (1-255)", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Allow EBGP neighbors not on directly connected networks\n" - "maximum hop count\n") -{ - int idx_peer = 1; - int idx_number = 3; - return peer_ebgp_multihop_set_vty(vty, argv[idx_peer]->arg, - argv[idx_number]->arg); + return nb_cli_apply_changes(vty, base_xpath); } -DEFUN (no_neighbor_ebgp_multihop, - no_neighbor_ebgp_multihop_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> ebgp-multihop [(1-255)]", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Allow EBGP neighbors not on directly connected networks\n" - "maximum hop count\n") +DEFUN_YANG (no_neighbor_ebgp_multihop, + no_neighbor_ebgp_multihop_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> ebgp-multihop [(1-255)]", + NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Allow EBGP neighbors not on directly connected networks\n" + "maximum hop count\n") { int idx_peer = 2; - return peer_ebgp_multihop_unset_vty(vty, argv[idx_peer]->arg); + char base_xpath[XPATH_MAXLEN]; + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + if (argc > 4) + nb_cli_enqueue_change(vty, "./ebgp-multihop/multihop-ttl", + NB_OP_DESTROY, NULL); + else + nb_cli_enqueue_change(vty, "./ebgp-multihop/enabled", + NB_OP_MODIFY, "false"); + + return nb_cli_apply_changes(vty, base_xpath); } /* disable-connected-check */ -DEFUN (neighbor_disable_connected_check, - neighbor_disable_connected_check_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> <disable-connected-check|enforce-multihop>", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "one-hop away EBGP peer using loopback address\n" - "Enforce EBGP neighbors perform multihop\n") +DEFUN_YANG (neighbor_disable_connected_check, + neighbor_disable_connected_check_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> <disable-connected-check|enforce-multihop>", + NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "one-hop away EBGP peer using loopback address\n" + "Enforce EBGP neighbors perform multihop\n") { int idx_peer = 1; - return peer_flag_set_vty(vty, argv[idx_peer]->arg, - PEER_FLAG_DISABLE_CONNECTED_CHECK); + char base_xpath[XPATH_MAXLEN]; + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + nb_cli_enqueue_change(vty, "./ebgp-multihop/disable-connected-check", + NB_OP_MODIFY, "true"); + + return nb_cli_apply_changes(vty, base_xpath); } -DEFUN (no_neighbor_disable_connected_check, - no_neighbor_disable_connected_check_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> <disable-connected-check|enforce-multihop>", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "one-hop away EBGP peer using loopback address\n" - "Enforce EBGP neighbors perform multihop\n") +DEFUN_YANG (no_neighbor_disable_connected_check, + no_neighbor_disable_connected_check_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> <disable-connected-check|enforce-multihop>", + NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "one-hop away EBGP peer using loopback address\n" + "Enforce EBGP neighbors perform multihop\n") { int idx_peer = 2; - return peer_flag_unset_vty(vty, argv[idx_peer]->arg, - PEER_FLAG_DISABLE_CONNECTED_CHECK); + char base_xpath[XPATH_MAXLEN]; + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + nb_cli_enqueue_change(vty, "./ebgp-multihop/disable-connected-check", + NB_OP_MODIFY, "false"); + + return nb_cli_apply_changes(vty, base_xpath); } /* enforce-first-as */ -DEFUN (neighbor_enforce_first_as, - neighbor_enforce_first_as_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> enforce-first-as", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Enforce the first AS for EBGP routes\n") +DEFUN_YANG (neighbor_enforce_first_as, + neighbor_enforce_first_as_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> enforce-first-as", + NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Enforce the first AS for EBGP routes\n") { int idx_peer = 1; + char base_xpath[XPATH_MAXLEN]; - return peer_flag_set_vty(vty, argv[idx_peer]->arg, - PEER_FLAG_ENFORCE_FIRST_AS); + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + nb_cli_enqueue_change(vty, "./enforce-first-as", NB_OP_MODIFY, "true"); + + return nb_cli_apply_changes(vty, base_xpath); } -DEFUN (no_neighbor_enforce_first_as, - no_neighbor_enforce_first_as_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> enforce-first-as", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Enforce the first AS for EBGP routes\n") +DEFUN_YANG (no_neighbor_enforce_first_as, + no_neighbor_enforce_first_as_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> enforce-first-as", + NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Enforce the first AS for EBGP routes\n") { int idx_peer = 2; + char base_xpath[XPATH_MAXLEN]; - return peer_flag_unset_vty(vty, argv[idx_peer]->arg, - PEER_FLAG_ENFORCE_FIRST_AS); + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + nb_cli_enqueue_change(vty, "./enforce-first-as", NB_OP_MODIFY, "false"); + + return nb_cli_apply_changes(vty, base_xpath); } +static int peer_and_group_lookup_nb(struct vty *vty, const char *peer_str, + char *base_xpath, int xpath_len, + char *xpath) +{ + union sockunion su; + char num_xpath[XPATH_MAXLEN]; + char unnbr_xpath[XPATH_MAXLEN]; + char prgrp_xpath[XPATH_MAXLEN]; + + if (str2sockunion(peer_str, &su) == 0) { + snprintf(num_xpath, sizeof(num_xpath), + "/neighbors/neighbor[remote-address='%s']", peer_str); + if (yang_dnode_exists(vty->candidate_config->dnode, "%s%s", + VTY_CURR_XPATH, num_xpath)) { + snprintf(base_xpath, xpath_len, + FRR_BGP_NEIGHBOR_NUM_XPATH, peer_str, + xpath ? xpath : ""); + } else { + vty_out(vty, + "%% Specify remote-as or peer-group commands first\n"); + return -1; + } -DEFUN (neighbor_description, - neighbor_description_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> description LINE...", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Neighbor specific description\n" - "Up to 80 characters describing this neighbor\n") + } else { + snprintf(unnbr_xpath, sizeof(unnbr_xpath), + "/neighbors/unnumbered-neighbor[interface='%s']", + peer_str); + + snprintf(prgrp_xpath, sizeof(prgrp_xpath), + "/peer-groups/peer-group[peer-group-name='%s']", + peer_str); + + if (yang_dnode_exists(vty->candidate_config->dnode, "%s%s", + VTY_CURR_XPATH, unnbr_xpath)) { + snprintf(base_xpath, xpath_len, + FRR_BGP_NEIGHBOR_UNNUM_XPATH, peer_str, + xpath ? xpath : ""); + } else if (yang_dnode_exists(vty->candidate_config->dnode, + "%s%s", VTY_CURR_XPATH, + prgrp_xpath)) { + snprintf(base_xpath, xpath_len, + FRR_BGP_PEER_GROUP_XPATH, peer_str, + xpath ? xpath : ""); + } else { + vty_out(vty, + "%% Create the peer-group or interface first\n"); + return -1; + } + } + + return 0; +} + +DEFUN_YANG (neighbor_description, + neighbor_description_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> description LINE...", + NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Neighbor specific description\n" + "Up to 80 characters describing this neighbor\n") { int idx_peer = 1; int idx_line = 3; - struct peer *peer; + int ret; + char base_xpath[XPATH_MAXLEN]; char *str; - peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg); - if (!peer) + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) return CMD_WARNING_CONFIG_FAILED; str = argv_concat(argv, argc, idx_line); - peer_description_set(peer, str); + nb_cli_enqueue_change(vty, "./description", NB_OP_MODIFY, str); + + ret = nb_cli_apply_changes(vty, base_xpath); XFREE(MTYPE_TMP, str); - return CMD_SUCCESS; + return ret; } -DEFUN (no_neighbor_description, - no_neighbor_description_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> description", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Neighbor specific description\n") +DEFUN_YANG (no_neighbor_description, + no_neighbor_description_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> description", + NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Neighbor specific description\n") { int idx_peer = 2; - struct peer *peer; + char base_xpath[XPATH_MAXLEN]; - peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg); - if (!peer) + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) return CMD_WARNING_CONFIG_FAILED; - peer_description_unset(peer); + nb_cli_enqueue_change(vty, "./description", NB_OP_DESTROY, NULL); - return CMD_SUCCESS; + return nb_cli_apply_changes(vty, base_xpath); } ALIAS(no_neighbor_description, no_neighbor_description_comment_cmd, @@ -6284,68 +6922,73 @@ ALIAS(no_neighbor_description, no_neighbor_description_comment_cmd, "Neighbor specific description\n" "Up to 80 characters describing this neighbor\n") -/* Neighbor update-source. */ -static int peer_update_source_vty(struct vty *vty, const char *peer_str, - const char *source_str) -{ - struct peer *peer; - struct prefix p; - union sockunion su; - - peer = peer_and_group_lookup_vty(vty, peer_str); - if (!peer) - return CMD_WARNING_CONFIG_FAILED; - - if (peer->conf_if) - return CMD_WARNING; - - if (source_str) { - if (str2sockunion(source_str, &su) == 0) - peer_update_source_addr_set(peer, &su); - else { - if (str2prefix(source_str, &p)) { - vty_out(vty, - "%% Invalid update-source, remove prefix length \n"); - return CMD_WARNING_CONFIG_FAILED; - } else - peer_update_source_if_set(peer, source_str); - } - } else - peer_update_source_unset(peer); - - return CMD_SUCCESS; -} - #define BGP_UPDATE_SOURCE_HELP_STR \ "IPv4 address\n" \ "IPv6 address\n" \ "Interface name (requires zebra to be running)\n" -DEFUN (neighbor_update_source, - neighbor_update_source_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> update-source <A.B.C.D|X:X::X:X|WORD>", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Source of routing updates\n" - BGP_UPDATE_SOURCE_HELP_STR) +DEFUN_YANG (neighbor_update_source, + neighbor_update_source_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> update-source <A.B.C.D|X:X::X:X|WORD>", + NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Source of routing updates\n" + BGP_UPDATE_SOURCE_HELP_STR) { int idx_peer = 1; int idx_peer_2 = 3; - return peer_update_source_vty(vty, argv[idx_peer]->arg, + union sockunion su; + char base_xpath[XPATH_MAXLEN]; + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + // NOTE: Check source_str prefix address + if (str2sockunion(argv[idx_peer_2]->arg, &su) == 0) + nb_cli_enqueue_change(vty, "./update-source/ip", NB_OP_MODIFY, argv[idx_peer_2]->arg); + else + nb_cli_enqueue_change(vty, "./update-source/interface", + NB_OP_MODIFY, argv[idx_peer_2]->arg); + + return nb_cli_apply_changes(vty, base_xpath); } -DEFUN (no_neighbor_update_source, - no_neighbor_update_source_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> update-source [<A.B.C.D|X:X::X:X|WORD>]", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Source of routing updates\n" - BGP_UPDATE_SOURCE_HELP_STR) +DEFUN_YANG (no_neighbor_update_source, + no_neighbor_update_source_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> update-source [<A.B.C.D|X:X::X:X|WORD>]", + NO_STR NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Source of routing updates\n" + BGP_UPDATE_SOURCE_HELP_STR) { int idx_peer = 2; - return peer_update_source_vty(vty, argv[idx_peer]->arg, NULL); + char base_xpath[XPATH_MAXLEN]; + char abs_xpath_ip[XPATH_MAXLEN]; + char abs_xpath_intf[XPATH_MAXLEN]; + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + snprintf(abs_xpath_ip, sizeof(abs_xpath_ip), "%s%s/update-source/ip", + VTY_CURR_XPATH, base_xpath + 1); + snprintf(abs_xpath_intf, sizeof(abs_xpath_intf), + "%s%s/update-source/interface", VTY_CURR_XPATH, + base_xpath + 1); + + if (yang_dnode_exists(vty->candidate_config->dnode, abs_xpath_ip)) { + nb_cli_enqueue_change(vty, "./update-source/ip", NB_OP_DESTROY, + NULL); + } else if (yang_dnode_exists(vty->candidate_config->dnode, + abs_xpath_intf)) { + nb_cli_enqueue_change(vty, "./update-source/interface", + NB_OP_DESTROY, NULL); + } + + return nb_cli_apply_changes(vty, base_xpath); } static int peer_default_originate_set_vty(struct vty *vty, const char *peer_str, @@ -6440,103 +7083,76 @@ ALIAS_HIDDEN( "route-map name\n") -/* Set neighbor's BGP port. */ -static int peer_port_vty(struct vty *vty, const char *ip_str, int afi, - const char *port_str) -{ - struct peer *peer; - uint16_t port; - struct servent *sp; - - peer = peer_lookup_vty(vty, ip_str); - if (!peer) - return CMD_WARNING_CONFIG_FAILED; - - if (!port_str) { - sp = getservbyname("bgp", "tcp"); - port = (sp == NULL) ? BGP_PORT_DEFAULT : ntohs(sp->s_port); - } else { - port = strtoul(port_str, NULL, 10); - } - - peer_port_set(peer, port); - - return CMD_SUCCESS; -} - /* Set specified peer's BGP port. */ -DEFUN (neighbor_port, - neighbor_port_cmd, - "neighbor <A.B.C.D|X:X::X:X> port (0-65535)", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR - "Neighbor's BGP port\n" - "TCP port number\n") +DEFUN_YANG (neighbor_port, + neighbor_port_cmd, + "neighbor <A.B.C.D|X:X::X:X> port (0-65535)", + NEIGHBOR_STR + NEIGHBOR_ADDR_STR + "Neighbor's BGP port\n" + "TCP port number\n") { int idx_ip = 1; int idx_number = 3; - return peer_port_vty(vty, argv[idx_ip]->arg, AFI_IP, - argv[idx_number]->arg); -} + char base_xpath[XPATH_MAXLEN]; -DEFUN (no_neighbor_port, - no_neighbor_port_cmd, - "no neighbor <A.B.C.D|X:X::X:X> port [(0-65535)]", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR - "Neighbor's BGP port\n" - "TCP port number\n") -{ - int idx_ip = 2; - return peer_port_vty(vty, argv[idx_ip]->arg, AFI_IP, NULL); -} + snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_NEIGHBOR_NUM_XPATH, + argv[idx_ip]->arg, ""); + + nb_cli_enqueue_change(vty, "./local-port", NB_OP_MODIFY, + argv[idx_number]->arg); + return nb_cli_apply_changes(vty, base_xpath); +} -/* neighbor weight. */ -static int peer_weight_set_vty(struct vty *vty, const char *ip_str, afi_t afi, - safi_t safi, const char *weight_str) +DEFUN_YANG (no_neighbor_port, + no_neighbor_port_cmd, + "no neighbor <A.B.C.D|X:X::X:X> port [(0-65535)]", + NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR + "Neighbor's BGP port\n" + "TCP port number\n") { - int ret; - struct peer *peer; - unsigned long weight; + int idx_ip = 2; + char base_xpath[XPATH_MAXLEN]; - peer = peer_and_group_lookup_vty(vty, ip_str); - if (!peer) - return CMD_WARNING_CONFIG_FAILED; + snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_NEIGHBOR_NUM_XPATH, + argv[idx_ip]->arg, ""); - weight = strtoul(weight_str, NULL, 10); + nb_cli_enqueue_change(vty, "./local-port", NB_OP_DESTROY, NULL); - ret = peer_weight_set(peer, afi, safi, weight); - return bgp_vty_return(vty, ret); + return nb_cli_apply_changes(vty, base_xpath); } -static int peer_weight_unset_vty(struct vty *vty, const char *ip_str, afi_t afi, - safi_t safi) +DEFUN_YANG (neighbor_weight, + neighbor_weight_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> weight (0-65535)", + NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Set default weight for routes from this neighbor\n" + "default weight\n") { - int ret; - struct peer *peer; + int idx_peer = 1; + int idx_number = 3; + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); - peer = peer_and_group_lookup_vty(vty, ip_str); - if (!peer) + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) return CMD_WARNING_CONFIG_FAILED; - ret = peer_weight_unset(peer, afi, safi); - return bgp_vty_return(vty, ret); -} + snprintf(attr_xpath, sizeof(attr_xpath), "./%s/weight/weight-attribute", + bgp_afi_safi_get_container_str(afi, safi)); -DEFUN (neighbor_weight, - neighbor_weight_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> weight (0-65535)", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Set default weight for routes from this neighbor\n" - "default weight\n") -{ - int idx_peer = 1; - int idx_number = 3; - return peer_weight_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty), - bgp_node_safi(vty), argv[idx_number]->arg); + nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, + argv[idx_number]->arg); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(neighbor_weight, neighbor_weight_hidden_cmd, @@ -6545,18 +7161,34 @@ ALIAS_HIDDEN(neighbor_weight, neighbor_weight_hidden_cmd, "Set default weight for routes from this neighbor\n" "default weight\n") -DEFUN (no_neighbor_weight, - no_neighbor_weight_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> weight [(0-65535)]", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Set default weight for routes from this neighbor\n" - "default weight\n") +DEFUN_YANG (no_neighbor_weight, + no_neighbor_weight_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> weight [(0-65535)]", + NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Set default weight for routes from this neighbor\n" + "default weight\n") { int idx_peer = 2; - return peer_weight_unset_vty(vty, argv[idx_peer]->arg, - bgp_node_afi(vty), bgp_node_safi(vty)); + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + snprintf(attr_xpath, sizeof(attr_xpath), "./%s/weight/weight-attribute", + bgp_afi_safi_get_container_str(afi, safi)); + + nb_cli_enqueue_change(vty, attr_xpath, NB_OP_DESTROY, NULL); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(no_neighbor_weight, no_neighbor_weight_hidden_cmd, @@ -6567,233 +7199,232 @@ ALIAS_HIDDEN(no_neighbor_weight, no_neighbor_weight_hidden_cmd, /* Override capability negotiation. */ -DEFUN (neighbor_override_capability, - neighbor_override_capability_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> override-capability", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Override capability negotiation result\n") +DEFUN_YANG (neighbor_override_capability, + neighbor_override_capability_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> override-capability", + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Override capability negotiation result\n") { int idx_peer = 1; - return peer_flag_set_vty(vty, argv[idx_peer]->arg, - PEER_FLAG_OVERRIDE_CAPABILITY); -} + char base_xpath[XPATH_MAXLEN]; -DEFUN (no_neighbor_override_capability, - no_neighbor_override_capability_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> override-capability", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Override capability negotiation result\n") -{ - int idx_peer = 2; - return peer_flag_unset_vty(vty, argv[idx_peer]->arg, - PEER_FLAG_OVERRIDE_CAPABILITY); -} + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) + return CMD_WARNING_CONFIG_FAILED; -DEFUN (neighbor_strict_capability, - neighbor_strict_capability_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> strict-capability-match", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Strict capability negotiation match\n") -{ - int idx_peer = 1; + nb_cli_enqueue_change( + vty, "./capability-options/override-capability", + NB_OP_MODIFY, "true"); - return peer_flag_set_vty(vty, argv[idx_peer]->arg, - PEER_FLAG_STRICT_CAP_MATCH); + return nb_cli_apply_changes(vty, base_xpath); } -DEFUN (no_neighbor_strict_capability, - no_neighbor_strict_capability_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> strict-capability-match", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Strict capability negotiation match\n") +DEFUN_YANG (no_neighbor_override_capability, + no_neighbor_override_capability_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> override-capability", + NO_STR + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Override capability negotiation result\n") { int idx_peer = 2; + char base_xpath[XPATH_MAXLEN]; - return peer_flag_unset_vty(vty, argv[idx_peer]->arg, - PEER_FLAG_STRICT_CAP_MATCH); + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + nb_cli_enqueue_change( + vty, "./capability-options/override-capability", + NB_OP_MODIFY, "false"); + + return nb_cli_apply_changes(vty, base_xpath); } -static int peer_timers_set_vty(struct vty *vty, const char *ip_str, - const char *keep_str, const char *hold_str) +DEFUN_YANG (neighbor_strict_capability, + neighbor_strict_capability_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> strict-capability-match", + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Strict capability negotiation match\n") { - int ret; - struct peer *peer; - uint32_t keepalive; - uint32_t holdtime; + int idx_peer = 1; + char base_xpath[XPATH_MAXLEN]; - peer = peer_and_group_lookup_vty(vty, ip_str); - if (!peer) + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) return CMD_WARNING_CONFIG_FAILED; - keepalive = strtoul(keep_str, NULL, 10); - holdtime = strtoul(hold_str, NULL, 10); - - ret = peer_timers_set(peer, keepalive, holdtime); + nb_cli_enqueue_change( + vty, "./capability-options/strict-capability", + NB_OP_MODIFY, "true"); - return bgp_vty_return(vty, ret); + return nb_cli_apply_changes(vty, base_xpath); } -static int peer_timers_unset_vty(struct vty *vty, const char *ip_str) +DEFUN_YANG (no_neighbor_strict_capability, + no_neighbor_strict_capability_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> strict-capability-match", + NO_STR + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "Strict capability negotiation match\n") { - int ret; - struct peer *peer; + int idx_peer = 2; + char base_xpath[XPATH_MAXLEN]; - peer = peer_and_group_lookup_vty(vty, ip_str); - if (!peer) + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) return CMD_WARNING_CONFIG_FAILED; - ret = peer_timers_unset(peer); + nb_cli_enqueue_change( + vty, "./capability-options/strict-capability", + NB_OP_MODIFY, "false"); - return bgp_vty_return(vty, ret); + return nb_cli_apply_changes(vty, base_xpath); } -DEFUN (neighbor_timers, - neighbor_timers_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> timers (0-65535) (0-65535)", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "BGP per neighbor timers\n" - "Keepalive interval\n" - "Holdtime\n") +DEFUN_YANG (neighbor_timers, + neighbor_timers_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> timers (0-65535) (0-65535)", + NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "BGP per neighbor timers\n" + "Keepalive interval\n" + "Holdtime\n") { int idx_peer = 1; int idx_number = 3; int idx_number_2 = 4; - return peer_timers_set_vty(vty, argv[idx_peer]->arg, - argv[idx_number]->arg, - argv[idx_number_2]->arg); -} - -DEFUN (no_neighbor_timers, - no_neighbor_timers_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> timers [(0-65535) (0-65535)]", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "BGP per neighbor timers\n" - "Keepalive interval\n" - "Holdtime\n") -{ - int idx_peer = 2; - return peer_timers_unset_vty(vty, argv[idx_peer]->arg); -} - - -static int peer_timers_connect_set_vty(struct vty *vty, const char *ip_str, - const char *time_str) -{ - int ret; - struct peer *peer; - uint32_t connect; + char base_xpath[XPATH_MAXLEN]; - peer = peer_and_group_lookup_vty(vty, ip_str); - if (!peer) + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) return CMD_WARNING_CONFIG_FAILED; - connect = strtoul(time_str, NULL, 10); + nb_cli_enqueue_change(vty, "./timers/keepalive", NB_OP_MODIFY, + argv[idx_number]->arg); - ret = peer_timers_connect_set(peer, connect); + nb_cli_enqueue_change(vty, "./timers/hold-time", NB_OP_MODIFY, + argv[idx_number_2]->arg); - return bgp_vty_return(vty, ret); + return nb_cli_apply_changes(vty, base_xpath); } -static int peer_timers_connect_unset_vty(struct vty *vty, const char *ip_str) +DEFUN_YANG (no_neighbor_timers, + no_neighbor_timers_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> timers [(0-65535) (0-65535)]", + NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "BGP per neighbor timers\n" + "Keepalive interval\n" + "Holdtime\n") { - int ret; - struct peer *peer; + int idx_peer = 2; + char base_xpath[XPATH_MAXLEN]; - peer = peer_and_group_lookup_vty(vty, ip_str); - if (!peer) + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) return CMD_WARNING_CONFIG_FAILED; - ret = peer_timers_connect_unset(peer); + nb_cli_enqueue_change(vty, "./timers/hold-time", NB_OP_DESTROY, NULL); - return bgp_vty_return(vty, ret); + nb_cli_enqueue_change(vty, "./timers/keepalive", NB_OP_DESTROY, NULL); + + return nb_cli_apply_changes(vty, base_xpath); } -DEFUN (neighbor_timers_connect, - neighbor_timers_connect_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> timers connect (1-65535)", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "BGP per neighbor timers\n" - "BGP connect timer\n" - "Connect timer\n") +DEFUN_YANG (neighbor_timers_connect, + neighbor_timers_connect_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> timers connect (1-65535)", + NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "BGP per neighbor timers\n" + "BGP connect timer\n" + "Connect timer\n") { int idx_peer = 1; int idx_number = 4; - return peer_timers_connect_set_vty(vty, argv[idx_peer]->arg, - argv[idx_number]->arg); -} + char base_xpath[XPATH_MAXLEN]; -DEFUN (no_neighbor_timers_connect, - no_neighbor_timers_connect_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> timers connect [(1-65535)]", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "BGP per neighbor timers\n" - "BGP connect timer\n" - "Connect timer\n") -{ - int idx_peer = 2; - return peer_timers_connect_unset_vty(vty, argv[idx_peer]->arg); -} + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + nb_cli_enqueue_change(vty, "./timers/connect-time", NB_OP_MODIFY, + argv[idx_number]->arg); + return nb_cli_apply_changes(vty, base_xpath); +} -static int peer_advertise_interval_vty(struct vty *vty, const char *ip_str, - const char *time_str, int set) +DEFUN_YANG (no_neighbor_timers_connect, + no_neighbor_timers_connect_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> timers connect [(1-65535)]", + NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "BGP per neighbor timers\n" + "BGP connect timer\n" + "Connect timer\n") { - int ret; - struct peer *peer; - uint32_t routeadv = 0; + int idx_peer = 2; + char base_xpath[XPATH_MAXLEN]; - peer = peer_and_group_lookup_vty(vty, ip_str); - if (!peer) + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) return CMD_WARNING_CONFIG_FAILED; - if (time_str) - routeadv = strtoul(time_str, NULL, 10); - - if (set) - ret = peer_advertise_interval_set(peer, routeadv); - else - ret = peer_advertise_interval_unset(peer); + nb_cli_enqueue_change(vty, "./timers/connect-time", NB_OP_DESTROY, + NULL); - return bgp_vty_return(vty, ret); + return nb_cli_apply_changes(vty, base_xpath); } -DEFUN (neighbor_advertise_interval, - neighbor_advertise_interval_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> advertisement-interval (0-600)", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Minimum interval between sending BGP routing updates\n" - "time in seconds\n") +DEFUN_YANG (neighbor_advertise_interval, + neighbor_advertise_interval_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> advertisement-interval (0-600)", + NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Minimum interval between sending BGP routing updates\n" + "time in seconds\n") { int idx_peer = 1; int idx_number = 3; - return peer_advertise_interval_vty(vty, argv[idx_peer]->arg, - argv[idx_number]->arg, 1); + char base_xpath[XPATH_MAXLEN]; + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + nb_cli_enqueue_change(vty, "./timers/advertise-interval", NB_OP_MODIFY, + argv[idx_number]->arg); + + return nb_cli_apply_changes(vty, base_xpath); } -DEFUN (no_neighbor_advertise_interval, - no_neighbor_advertise_interval_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> advertisement-interval [(0-600)]", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Minimum interval between sending BGP routing updates\n" - "time in seconds\n") +DEFUN_YANG (no_neighbor_advertise_interval, + no_neighbor_advertise_interval_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> advertisement-interval [(0-600)]", + NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Minimum interval between sending BGP routing updates\n" + "time in seconds\n") { int idx_peer = 2; - return peer_advertise_interval_vty(vty, argv[idx_peer]->arg, NULL, 0); + char base_xpath[XPATH_MAXLEN]; + + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + nb_cli_enqueue_change(vty, "./timers/advertise-interval", NB_OP_DESTROY, + NULL); + + return nb_cli_apply_changes(vty, base_xpath); } @@ -6845,50 +7476,42 @@ DEFUN (no_bgp_set_route_map_delay_timer, return CMD_SUCCESS; } -/* neighbor interface */ -static int peer_interface_vty(struct vty *vty, const char *ip_str, - const char *str) +DEFUN_YANG (neighbor_interface, + neighbor_interface_cmd, + "neighbor <A.B.C.D|X:X::X:X> interface WORD", + NEIGHBOR_STR NEIGHBOR_ADDR_STR + "Interface\n" + "Interface name\n") { - struct peer *peer; - - peer = peer_lookup_vty(vty, ip_str); - if (!peer || peer->conf_if) { - vty_out(vty, "%% BGP invalid peer %s\n", ip_str); - return CMD_WARNING_CONFIG_FAILED; - } + int idx_ip = 1; + int idx_word = 3; + char base_xpath[XPATH_MAXLEN]; - if (str) - peer_interface_set(peer, str); - else - peer_interface_unset(peer); + snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_NEIGHBOR_NUM_XPATH, + argv[idx_ip]->arg, ""); - return CMD_SUCCESS; -} + nb_cli_enqueue_change(vty, "./local-interface", NB_OP_MODIFY, + argv[idx_word]->arg); -DEFUN (neighbor_interface, - neighbor_interface_cmd, - "neighbor <A.B.C.D|X:X::X:X> interface WORD", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR - "Interface\n" - "Interface name\n") -{ - int idx_ip = 1; - int idx_word = 3; - return peer_interface_vty(vty, argv[idx_ip]->arg, argv[idx_word]->arg); + return nb_cli_apply_changes(vty, base_xpath); } -DEFUN (no_neighbor_interface, - no_neighbor_interface_cmd, - "no neighbor <A.B.C.D|X:X::X:X|WORD> interface WORD", - NO_STR - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "Interface\n" - "Interface name\n") +DEFUN_YANG (no_neighbor_interface, + no_neighbor_interface_cmd, + "no neighbor <A.B.C.D|X:X::X:X|WORD> interface WORD", + NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 + "Interface\n" + "Interface name\n") { int idx_peer = 2; - return peer_interface_vty(vty, argv[idx_peer]->arg, NULL); + char base_xpath[XPATH_MAXLEN]; + + snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_NEIGHBOR_NUM_XPATH, + argv[idx_peer]->arg, ""); + + nb_cli_enqueue_change(vty, "./local-interface", NB_OP_DESTROY, NULL); + + return nb_cli_apply_changes(vty, base_xpath); } DEFUN (neighbor_distribute_list, @@ -7415,55 +8038,6 @@ ALIAS_HIDDEN(no_neighbor_unsuppress_map, no_neighbor_unsuppress_map_hidden_cmd, "Route-map to selectively unsuppress suppressed routes\n" "Name of route map\n") -static int peer_maximum_prefix_set_vty(struct vty *vty, const char *ip_str, - afi_t afi, safi_t safi, - const char *num_str, - const char *threshold_str, int warning, - const char *restart_str, - const char *force_str) -{ - int ret; - struct peer *peer; - uint32_t max; - uint8_t threshold; - uint16_t restart; - - peer = peer_and_group_lookup_vty(vty, ip_str); - if (!peer) - return CMD_WARNING_CONFIG_FAILED; - - max = strtoul(num_str, NULL, 10); - if (threshold_str) - threshold = atoi(threshold_str); - else - threshold = MAXIMUM_PREFIX_THRESHOLD_DEFAULT; - - if (restart_str) - restart = atoi(restart_str); - else - restart = 0; - - ret = peer_maximum_prefix_set(peer, afi, safi, max, threshold, warning, - restart, force_str ? true : false); - - return bgp_vty_return(vty, ret); -} - -static int peer_maximum_prefix_unset_vty(struct vty *vty, const char *ip_str, - afi_t afi, safi_t safi) -{ - int ret; - struct peer *peer; - - peer = peer_and_group_lookup_vty(vty, ip_str); - if (!peer) - return CMD_WARNING_CONFIG_FAILED; - - ret = peer_maximum_prefix_unset(peer, afi, safi); - - return bgp_vty_return(vty, ret); -} - /* Maximum number of prefix to be sent to the neighbor. */ DEFUN(neighbor_maximum_prefix_out, neighbor_maximum_prefix_out_cmd, @@ -7473,23 +8047,32 @@ DEFUN(neighbor_maximum_prefix_out, "Maximum number of prefixes to be sent to this peer\n" "Maximum no. of prefix limit\n") { + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; int idx_peer = 1; int idx_number = 3; - struct peer *peer; - uint32_t max; afi_t afi = bgp_node_afi(vty); safi_t safi = bgp_node_safi(vty); - peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg); - if (!peer) + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) return CMD_WARNING_CONFIG_FAILED; - max = strtoul(argv[idx_number]->arg, NULL, 10); + snprintf(attr_xpath, sizeof(attr_xpath), + "/%s/prefix-limit/direction-list[direction='out']", + bgp_afi_safi_get_container_str(afi, safi)); + strlcat(base_xpath, attr_xpath, sizeof(base_xpath)); - SET_FLAG(peer->af_flags[afi][safi], PEER_FLAG_MAX_PREFIX_OUT); - peer->pmax_out[afi][safi] = max; + nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL); - return CMD_SUCCESS; + nb_cli_enqueue_change(vty, "./max-prefixes", NB_OP_MODIFY, + argv[idx_number]->arg); + + return nb_cli_apply_changes(vty, base_xpath); } DEFUN(no_neighbor_maximum_prefix_out, @@ -7500,19 +8083,28 @@ DEFUN(no_neighbor_maximum_prefix_out, NEIGHBOR_ADDR_STR2 "Maximum number of prefixes to be sent to this peer\n") { + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; int idx_peer = 2; - struct peer *peer; afi_t afi = bgp_node_afi(vty); safi_t safi = bgp_node_safi(vty); - peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg); - if (!peer) + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) return CMD_WARNING_CONFIG_FAILED; - UNSET_FLAG(peer->af_flags[afi][safi], PEER_FLAG_MAX_PREFIX_OUT); - peer->pmax_out[afi][safi] = 0; + snprintf(attr_xpath, sizeof(attr_xpath), + "/%s/prefix-limit/direction-list[direction='out']", + bgp_afi_safi_get_container_str(afi, safi)); + strlcat(base_xpath, attr_xpath, sizeof(base_xpath)); - return CMD_SUCCESS; + nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL); + + return nb_cli_apply_changes(vty, base_xpath); } /* Maximum number of prefix configuration. Prefix count is different @@ -7530,14 +8122,33 @@ DEFUN (neighbor_maximum_prefix, int idx_peer = 1; int idx_number = 3; int idx_force = 0; - char *force = NULL; + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + snprintf(attr_xpath, sizeof(attr_xpath), + "/%s/prefix-limit/direction-list[direction='in']", + bgp_afi_safi_get_container_str(afi, safi)); + strlcat(base_xpath, attr_xpath, sizeof(base_xpath)); + + nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL); + + nb_cli_enqueue_change(vty, "./max-prefixes", NB_OP_MODIFY, + argv[idx_number]->arg); if (argv_find(argv, argc, "force", &idx_force)) - force = argv[idx_force]->arg; + nb_cli_enqueue_change(vty, "./force-check", NB_OP_MODIFY, + "true"); - return peer_maximum_prefix_set_vty( - vty, argv[idx_peer]->arg, bgp_node_afi(vty), bgp_node_safi(vty), - argv[idx_number]->arg, NULL, 0, NULL, force); + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN(neighbor_maximum_prefix, neighbor_maximum_prefix_hidden_cmd, @@ -7561,14 +8172,37 @@ DEFUN (neighbor_maximum_prefix_threshold, int idx_number = 3; int idx_number_2 = 4; int idx_force = 0; - char *force = NULL; + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + snprintf(attr_xpath, sizeof(attr_xpath), + "/%s/prefix-limit/direction-list[direction='in']", + bgp_afi_safi_get_container_str(afi, safi)); + strlcat(base_xpath, attr_xpath, sizeof(base_xpath)); + + nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL); + + nb_cli_enqueue_change(vty, "./max-prefixes", NB_OP_MODIFY, + argv[idx_number]->arg); + + nb_cli_enqueue_change(vty, "./options/shutdown-threshold-pct", + NB_OP_MODIFY, argv[idx_number_2]->arg); if (argv_find(argv, argc, "force", &idx_force)) - force = argv[idx_force]->arg; + nb_cli_enqueue_change(vty, "./force-check", NB_OP_MODIFY, + "true"); - return peer_maximum_prefix_set_vty( - vty, argv[idx_peer]->arg, bgp_node_afi(vty), bgp_node_safi(vty), - argv[idx_number]->arg, argv[idx_number_2]->arg, 0, NULL, force); + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN( @@ -7594,14 +8228,36 @@ DEFUN (neighbor_maximum_prefix_warning, int idx_peer = 1; int idx_number = 3; int idx_force = 0; - char *force = NULL; + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + snprintf(attr_xpath, sizeof(attr_xpath), + "/%s/prefix-limit/direction-list[direction='in']", + bgp_afi_safi_get_container_str(afi, safi)); + strlcat(base_xpath, attr_xpath, sizeof(base_xpath)); + + nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL); + + nb_cli_enqueue_change(vty, "./max-prefixes", NB_OP_MODIFY, + argv[idx_number]->arg); + + nb_cli_enqueue_change(vty, "./options/warning-only", NB_OP_MODIFY, + "true"); if (argv_find(argv, argc, "force", &idx_force)) - force = argv[idx_force]->arg; + nb_cli_enqueue_change(vty, "./force-check", NB_OP_MODIFY, + "true"); - return peer_maximum_prefix_set_vty( - vty, argv[idx_peer]->arg, bgp_node_afi(vty), bgp_node_safi(vty), - argv[idx_number]->arg, NULL, 1, NULL, force); + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN( @@ -7629,14 +8285,37 @@ DEFUN (neighbor_maximum_prefix_threshold_warning, int idx_number = 3; int idx_number_2 = 4; int idx_force = 0; - char *force = NULL; + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + snprintf(attr_xpath, sizeof(attr_xpath), + "/%s/prefix-limit/direction-list[direction='in']", + bgp_afi_safi_get_container_str(afi, safi)); + strlcat(base_xpath, attr_xpath, sizeof(base_xpath)); + + nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL); + + nb_cli_enqueue_change(vty, "./max-prefixes", NB_OP_MODIFY, + argv[idx_number]->arg); + nb_cli_enqueue_change(vty, "./options/tw-shutdown-threshold-pct", + NB_OP_MODIFY, argv[idx_number_2]->arg); + nb_cli_enqueue_change(vty, "./options/tw-warning-only", NB_OP_MODIFY, + "true"); if (argv_find(argv, argc, "force", &idx_force)) - force = argv[idx_force]->arg; + nb_cli_enqueue_change(vty, "./force-check", NB_OP_MODIFY, + "true"); - return peer_maximum_prefix_set_vty( - vty, argv[idx_peer]->arg, bgp_node_afi(vty), bgp_node_safi(vty), - argv[idx_number]->arg, argv[idx_number_2]->arg, 1, NULL, force); + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN( @@ -7665,14 +8344,35 @@ DEFUN (neighbor_maximum_prefix_restart, int idx_number = 3; int idx_number_2 = 5; int idx_force = 0; - char *force = NULL; + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + snprintf(attr_xpath, sizeof(attr_xpath), + "/%s/prefix-limit/direction-list[direction='in']", + bgp_afi_safi_get_container_str(afi, safi)); + strlcat(base_xpath, attr_xpath, sizeof(base_xpath)); + + nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL); + nb_cli_enqueue_change(vty, "./max-prefixes", NB_OP_MODIFY, + argv[idx_number]->arg); + nb_cli_enqueue_change(vty, "./options/restart-timer", NB_OP_MODIFY, + argv[idx_number_2]->arg); if (argv_find(argv, argc, "force", &idx_force)) - force = argv[idx_force]->arg; + nb_cli_enqueue_change(vty, "./force-check", NB_OP_MODIFY, + "true"); - return peer_maximum_prefix_set_vty( - vty, argv[idx_peer]->arg, bgp_node_afi(vty), bgp_node_safi(vty), - argv[idx_number]->arg, NULL, 0, argv[idx_number_2]->arg, force); + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN( @@ -7703,15 +8403,37 @@ DEFUN (neighbor_maximum_prefix_threshold_restart, int idx_number_2 = 4; int idx_number_3 = 6; int idx_force = 0; - char *force = NULL; + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + snprintf(attr_xpath, sizeof(attr_xpath), + "/%s/prefix-limit/direction-list[direction='in']", + bgp_afi_safi_get_container_str(afi, safi)); + strlcat(base_xpath, attr_xpath, sizeof(base_xpath)); + + nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL); + + nb_cli_enqueue_change(vty, "./max-prefixes", NB_OP_MODIFY, + argv[idx_number]->arg); + nb_cli_enqueue_change(vty, "./options/tr-shutdown-threshold-pct", + NB_OP_MODIFY, argv[idx_number_2]->arg); + nb_cli_enqueue_change(vty, "./options/tr-restart-timer", NB_OP_MODIFY, + argv[idx_number_3]->arg); if (argv_find(argv, argc, "force", &idx_force)) - force = argv[idx_force]->arg; + nb_cli_enqueue_change(vty, "./force-check", NB_OP_MODIFY, + "true"); - return peer_maximum_prefix_set_vty( - vty, argv[idx_peer]->arg, bgp_node_afi(vty), bgp_node_safi(vty), - argv[idx_number]->arg, argv[idx_number_2]->arg, 0, - argv[idx_number_3]->arg, force); + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN( @@ -7741,9 +8463,27 @@ DEFUN (no_neighbor_maximum_prefix, "Force checking all received routes not only accepted\n") { int idx_peer = 2; - return peer_maximum_prefix_unset_vty(vty, argv[idx_peer]->arg, - bgp_node_afi(vty), - bgp_node_safi(vty)); + char base_xpath[XPATH_MAXLEN]; + char af_xpath[XPATH_MAXLEN]; + char attr_xpath[XPATH_MAXLEN]; + afi_t afi = bgp_node_afi(vty); + safi_t safi = bgp_node_safi(vty); + + snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH, + yang_afi_safi_value2identity(afi, safi)); + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), af_xpath) + < 0) + return CMD_WARNING_CONFIG_FAILED; + + snprintf(attr_xpath, sizeof(attr_xpath), + "/%s/prefix-limit/direction-list[direction='in']", + bgp_afi_safi_get_container_str(afi, safi)); + strlcat(base_xpath, attr_xpath, sizeof(base_xpath)); + + nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL); + + return nb_cli_apply_changes(vty, base_xpath); } ALIAS_HIDDEN( @@ -7835,38 +8575,28 @@ ALIAS_HIDDEN( "Number of occurrences of AS number\n" "Only accept my AS in the as-path if the route was originated in my AS\n") -DEFUN (neighbor_ttl_security, - neighbor_ttl_security_cmd, - "neighbor <A.B.C.D|X:X::X:X|WORD> ttl-security hops (1-254)", - NEIGHBOR_STR - NEIGHBOR_ADDR_STR2 - "BGP ttl-security parameters\n" - "Specify the maximum number of hops to the BGP peer\n" - "Number of hops to BGP peer\n") +DEFUN_YANG (neighbor_ttl_security, + neighbor_ttl_security_cmd, + "neighbor <A.B.C.D|X:X::X:X|WORD> ttl-security hops (1-254)", + NEIGHBOR_STR + NEIGHBOR_ADDR_STR2 + "BGP ttl-security parameters\n" + "Specify the maximum number of hops to the BGP peer\n" + "Number of hops to BGP peer\n") { int idx_peer = 1; int idx_number = 4; - struct peer *peer; - int gtsm_hops; + char base_xpath[XPATH_MAXLEN]; - peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg); - if (!peer) + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) return CMD_WARNING_CONFIG_FAILED; - gtsm_hops = strtoul(argv[idx_number]->arg, NULL, 10); - - /* - * If 'neighbor swpX', then this is for directly connected peers, - * we should not accept a ttl-security hops value greater than 1. - */ - if (peer->conf_if && (gtsm_hops > BGP_GTSM_HOPS_CONNECTED)) { - vty_out(vty, - "%s is directly connected peer, hops cannot exceed 1\n", - argv[idx_peer]->arg); - return CMD_WARNING_CONFIG_FAILED; - } + nb_cli_enqueue_change(vty, "./ttl-security", NB_OP_MODIFY, + argv[idx_number]->arg); - return bgp_vty_return(vty, peer_ttl_security_hops_set(peer, gtsm_hops)); + return nb_cli_apply_changes(vty, base_xpath); } DEFUN (no_neighbor_ttl_security, @@ -7880,13 +8610,16 @@ DEFUN (no_neighbor_ttl_security, "Number of hops to BGP peer\n") { int idx_peer = 2; - struct peer *peer; + char base_xpath[XPATH_MAXLEN]; - peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg); - if (!peer) + if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath, + sizeof(base_xpath), NULL) + < 0) return CMD_WARNING_CONFIG_FAILED; - return bgp_vty_return(vty, peer_ttl_security_hops_unset(peer)); + nb_cli_enqueue_change(vty, "./ttl-security", NB_OP_DESTROY, NULL); + + return nb_cli_apply_changes(vty, base_xpath); } DEFUN (neighbor_addpath_tx_all_paths, diff --git a/bgpd/bgp_vty.h b/bgpd/bgp_vty.h index 349efbac45..07f61ab0ea 100644 --- a/bgpd/bgp_vty.h +++ b/bgpd/bgp_vty.h @@ -194,5 +194,20 @@ extern const char *bgp_afi_safi_get_container_str(afi_t afi, safi_t safi); extern bool vpn_policy_check_import(struct bgp *bgp, afi_t afi, safi_t safi, bool v2vimport, char *errmsg, size_t errmsg_len); +extern int bgp_nb_errmsg_return(char *errmsg, size_t errmsg_len, int ret); +extern bool peer_address_self_check(struct bgp *bgp, union sockunion *su); +extern int peer_local_interface_cfg(struct bgp *bgp, const char *ip_str, + const char *str, char *errmsg, + size_t errmsg_len); +extern int peer_conf_interface_create(struct bgp *bgp, const char *conf_if, + afi_t afi, safi_t safi, bool v6only, + const char *peer_group_name, int as_type, + as_t as, char *errmsg, size_t errmsg_len); +extern int peer_flag_modify_nb(struct bgp *bgp, const char *ip_str, + struct peer *peer, uint32_t flag, bool set, + char *errmsg, size_t errmsg_len); +extern int peer_af_flag_modify_nb(struct peer *peer, afi_t afi, safi_t safi, + uint32_t flag, int set, char *errmsg, + size_t errmsg_len); #endif /* _QUAGGA_BGP_VTY_H */ diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 00213b4239..957db4cbc1 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -2390,6 +2390,7 @@ static void bgp_encode_pbr_rule_action(struct stream *s, { struct prefix pfx; uint8_t fam = AF_INET; + char ifname[INTERFACE_NAMSIZ]; if (pbra->nh.type == NEXTHOP_TYPE_IPV6) fam = AF_INET6; @@ -2431,7 +2432,7 @@ static void bgp_encode_pbr_rule_action(struct stream *s, stream_put(s, &pfx.u.prefix, prefix_blen(&pfx)); stream_putw(s, 0); /* dst port */ - + stream_putc(s, 0); /* dsfield */ /* if pbr present, fwmark is not used */ if (pbr) stream_putl(s, 0); @@ -2440,7 +2441,8 @@ static void bgp_encode_pbr_rule_action(struct stream *s, stream_putl(s, pbra->table_id); - stream_putl(s, 0); /* ifindex unused */ + memset(ifname, 0, sizeof(ifname)); + stream_put(s, ifname, INTERFACE_NAMSIZ); /* ifname unused */ } static void bgp_encode_pbr_ipset_match(struct stream *s, diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index cf16378de1..df453dd993 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -3022,7 +3022,7 @@ static struct bgp *bgp_create(as_t *as, const char *name, bgp->gr_info[afi][safi].eor_received = 0; bgp->gr_info[afi][safi].t_select_deferral = NULL; bgp->gr_info[afi][safi].t_route_select = NULL; - bgp->gr_info[afi][safi].route_list = list_new(); + bgp->gr_info[afi][safi].gr_deferred = 0; } bgp->v_update_delay = bm->v_update_delay; @@ -3394,14 +3394,21 @@ int bgp_delete(struct bgp *bgp) /* Delete the graceful restart info */ FOREACH_AFI_SAFI (afi, safi) { + struct thread *t; + gr_info = &bgp->gr_info[afi][safi]; if (!gr_info) continue; BGP_TIMER_OFF(gr_info->t_select_deferral); + + t = gr_info->t_route_select; + if (t) { + void *info = THREAD_ARG(t); + + XFREE(MTYPE_TMP, info); + } BGP_TIMER_OFF(gr_info->t_route_select); - if (gr_info->route_list) - list_delete(&gr_info->route_list); } if (BGP_DEBUG(zebra, ZEBRA)) { @@ -5478,8 +5485,8 @@ int peer_allowas_in_unset(struct peer *peer, afi_t afi, safi_t safi) return 0; } -int peer_local_as_set(struct peer *peer, as_t as, int no_prepend, - int replace_as) +int peer_local_as_set(struct peer *peer, as_t as, bool no_prepend, + bool replace_as) { bool old_no_prepend, old_replace_as; struct bgp *bgp = peer->bgp; diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h index 74828e91df..287aeca143 100644 --- a/bgpd/bgpd.h +++ b/bgpd/bgpd.h @@ -265,8 +265,8 @@ struct graceful_restart_info { uint32_t eor_received; /* Deferral Timer */ struct thread *t_select_deferral; - /* Route list */ - struct list *route_list; + /* Routes Deferred */ + uint32_t gr_deferred; /* Best route select */ struct thread *t_route_select; /* AFI, SAFI enabled */ @@ -1949,7 +1949,8 @@ extern int peer_distribute_unset(struct peer *, afi_t, safi_t, int); extern int peer_allowas_in_set(struct peer *, afi_t, safi_t, int, int); extern int peer_allowas_in_unset(struct peer *, afi_t, safi_t); -extern int peer_local_as_set(struct peer *, as_t, int, int); +extern int peer_local_as_set(struct peer *, as_t, bool no_prepend, + bool replace_as); extern int peer_local_as_unset(struct peer *); extern int peer_prefix_list_set(struct peer *, afi_t, safi_t, int, diff --git a/doc/user/ospfd.rst b/doc/user/ospfd.rst index b66774ca0e..31b0df70ae 100644 --- a/doc/user/ospfd.rst +++ b/doc/user/ospfd.rst @@ -905,59 +905,63 @@ Showing Information .. _show-ip-ospf: -.. index:: show ip ospf -.. clicmd:: show ip ospf +.. index:: show ip ospf [json] +.. clicmd:: show ip ospf [json] Show information on a variety of general OSPF and area state and configuration information. -.. index:: show ip ospf interface [INTERFACE] -.. clicmd:: show ip ospf interface [INTERFACE] +.. index:: show ip ospf interface [INTERFACE] [json] +.. clicmd:: show ip ospf interface [INTERFACE] [json] Show state and configuration of OSPF the specified interface, or all interfaces if no interface is given. -.. index:: show ip ospf neighbor -.. clicmd:: show ip ospf neighbor +.. index:: show ip ospf neighbor [json] +.. clicmd:: show ip ospf neighbor [json] -.. index:: show ip ospf neighbor INTERFACE -.. clicmd:: show ip ospf neighbor INTERFACE +.. index:: show ip ospf neighbor INTERFACE [json] +.. clicmd:: show ip ospf neighbor INTERFACE [json] -.. index:: show ip ospf neighbor detail -.. clicmd:: show ip ospf neighbor detail +.. index:: show ip ospf neighbor detail [json] +.. clicmd:: show ip ospf neighbor detail [json] -.. index:: show ip ospf neighbor INTERFACE detail -.. clicmd:: show ip ospf neighbor INTERFACE detail +.. index:: show ip ospf neighbor INTERFACE detail [json] +.. clicmd:: show ip ospf neighbor INTERFACE detail [json] -.. index:: show ip ospf database -.. clicmd:: show ip ospf database + Display lsa information of LSDB. + Json o/p of this command covers base route information + i.e all LSAs except opaque lsa info. -.. index:: show ip ospf database (asbr-summary|external|network|router|summary) -.. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) +.. index:: show ip ospf database [json] +.. clicmd:: show ip ospf database [json] -.. index:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID -.. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID +.. index:: show ip ospf database (asbr-summary|external|network|router|summary) [json] +.. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) [json] -.. index:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID adv-router ADV-ROUTER -.. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID adv-router ADV-ROUTER +.. index:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID [json] +.. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID [json] -.. index:: show ip ospf database (asbr-summary|external|network|router|summary) adv-router ADV-ROUTER -.. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) adv-router ADV-ROUTER +.. index:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID adv-router ADV-ROUTER [json] +.. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID adv-router ADV-ROUTER [json] -.. index:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID self-originate -.. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID self-originate +.. index:: show ip ospf database (asbr-summary|external|network|router|summary) adv-router ADV-ROUTER [json] +.. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) adv-router ADV-ROUTER [json] -.. index:: show ip ospf database (asbr-summary|external|network|router|summary) self-originate -.. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) self-originate +.. index:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID self-originate [json] +.. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) LINK-STATE-ID self-originate [json] -.. index:: show ip ospf database max-age -.. clicmd:: show ip ospf database max-age +.. index:: show ip ospf database (asbr-summary|external|network|router|summary) self-originate [json] +.. clicmd:: show ip ospf database (asbr-summary|external|network|router|summary) self-originate [json] -.. index:: show ip ospf database self-originate -.. clicmd:: show ip ospf database self-originate +.. index:: show ip ospf database max-age [json] +.. clicmd:: show ip ospf database max-age [json] -.. index:: show ip ospf route -.. clicmd:: show ip ospf route +.. index:: show ip ospf database self-originate [json] +.. clicmd:: show ip ospf database self-originate [json] + +.. index:: show ip ospf route [json] +.. clicmd:: show ip ospf route [json] Show the OSPF routing table, as determined by the most recent SPF calculation. @@ -1177,6 +1181,41 @@ dataplane. self router. Optional JSON output can be obtained by appending 'json' to the end of the command. +External Route Summarisation +============================ +This feature summarises originated external LSAs(Type-5 and Type-7). +Summary Route will be originated on-behalf of all matched external LSAs. + +.. index:: [no] summary-address A.B.C.D/M [tag (1-4294967295)] +.. clicmd:: [no] summary-address A.B.C.D/M [tag (1-4294967295)] + + This command enable/disables summarisation for the configured address + range. Tag is the optional parameter. If tag configured Summary route + will be originated with the configured tag. + +.. index:: [no] summary-address A.B.C.D/M no-advertise +.. clicmd:: [no] summary-address A.B.C.D/M no-advertise + + This command to ensure not advertise the summary lsa for the matched + external LSAs. + +.. index:: aggregation timer (5-1800) +.. clicmd:: aggregation timer (5-1800) + + Configure aggregation delay timer interval. Summarisation starts only after + this delay timer expiry. By default, delay interval is 5 secs. + +.. index:: no aggregation timer +.. clicmd:: no aggregation timer + + Resetting the aggregation delay interval to default value. + +.. index:: show ip ospf [vrf <NAME|all>] summary-address [detail] [json] +.. clicmd:: show ip ospf [vrf <NAME|all>] summary-address [detail] [json] + + Show configuration for display all configured summary routes with + matching external LSA information. + Debugging OSPF ============== @@ -1279,6 +1318,11 @@ Debugging OSPF .. index:: show debugging ospf .. clicmd:: show debugging ospf +.. index:: [no] debug ospf lsa aggregate +.. clicmd:: [no] debug ospf lsa aggregate + + Debug commnd to enable/disable external route summarisation specific debugs. + OSPF Configuration Examples =========================== diff --git a/lib/yang_wrappers.c b/lib/yang_wrappers.c index 4c658c1bfb..98f8fea0fe 100644 --- a/lib/yang_wrappers.c +++ b/lib/yang_wrappers.c @@ -1236,6 +1236,10 @@ const char *yang_afi_safi_value2identity(afi_t afi, safi_t safi) return "frr-routing:ipv4-labeled-unicast"; if (afi == AFI_IP6 && safi == SAFI_LABELED_UNICAST) return "frr-routing:ipv6-labeled-unicast"; + if (afi == AFI_IP && safi == SAFI_FLOWSPEC) + return "frr-routing:ipv4-flowspec"; + if (afi == AFI_IP6 && safi == SAFI_FLOWSPEC) + return "frr-routing:ipv6-flowspec"; return NULL; } @@ -1269,6 +1273,12 @@ void yang_afi_safi_identity2value(const char *key, afi_t *afi, safi_t *safi) } else if (strmatch(key, "frr-routing:l2vpn-evpn")) { *afi = AFI_L2VPN; *safi = SAFI_EVPN; + } else if (strmatch(key, "frr-routing:ipv4-flowspec")) { + *afi = AFI_IP; + *safi = SAFI_FLOWSPEC; + } else if (strmatch(key, "frr-routing:ipv6-flowspec")) { + *afi = AFI_IP6; + *safi = SAFI_FLOWSPEC; } else { *afi = AFI_UNSPEC; *safi = SAFI_UNSPEC; diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c index cbb80b668d..f087289df6 100644 --- a/ospf6d/ospf6_abr.c +++ b/ospf6d/ospf6_abr.c @@ -82,10 +82,10 @@ static int ospf6_abr_nexthops_belong_to_area(struct ospf6_route *route, static void ospf6_abr_delete_route(struct ospf6_route *range, struct ospf6_route *summary, struct ospf6_route_table *summary_table, - struct ospf6_lsa *old) + struct ospf6_lsa *old, struct ospf6 *ospf6) { if (summary) { - ospf6_route_remove(summary, summary_table); + ospf6_route_remove(summary, summary_table, ospf6); } if (old && !OSPF6_LSA_IS_MAXAGE(old)) @@ -117,7 +117,7 @@ void ospf6_abr_disable_area(struct ospf6_area *area) area->ospf6->router_id, area->lsdb); if (old) ospf6_lsa_purge(old); - ospf6_route_remove(ro, area->summary_prefix); + ospf6_route_remove(ro, area->summary_prefix, area->ospf6); } /* Withdraw all summary router-routes previously originated */ @@ -128,7 +128,7 @@ void ospf6_abr_disable_area(struct ospf6_area *area) area->ospf6->router_id, area->lsdb); if (old) ospf6_lsa_purge(old); - ospf6_route_remove(ro, area->summary_router); + ospf6_route_remove(ro, area->summary_router, area->ospf6); } /* Schedule Router-LSA for each area (ABR status may change) */ @@ -273,10 +273,11 @@ int ospf6_abr_originate_summary_to_area(struct ospf6_route *route, "The range is not active. withdraw"); ospf6_abr_delete_route(route, summary, - summary_table, old); + summary_table, old, + area->ospf6); } } else if (old) { - ospf6_route_remove(summary, summary_table); + ospf6_route_remove(summary, summary_table, area->ospf6); ospf6_lsa_purge(old); } return 0; @@ -287,7 +288,8 @@ int ospf6_abr_originate_summary_to_area(struct ospf6_route *route, zlog_debug( "Area has been stubbed, purge Inter-Router LSA"); - ospf6_abr_delete_route(route, summary, summary_table, old); + ospf6_abr_delete_route(route, summary, summary_table, old, + area->ospf6); return 0; } @@ -296,7 +298,8 @@ int ospf6_abr_originate_summary_to_area(struct ospf6_route *route, if (is_debug) zlog_debug("Area has been stubbed, purge prefix LSA"); - ospf6_abr_delete_route(route, summary, summary_table, old); + ospf6_abr_delete_route(route, summary, summary_table, old, + area->ospf6); return 0; } @@ -332,7 +335,7 @@ int ospf6_abr_originate_summary_to_area(struct ospf6_route *route, zlog_debug( "This is the secondary path to the ASBR, ignore"); ospf6_abr_delete_route(route, summary, summary_table, - old); + old, area->ospf6); return 0; } @@ -363,7 +366,7 @@ int ospf6_abr_originate_summary_to_area(struct ospf6_route *route, "Suppressed by range %pFX of area %s", &range->prefix, route_area->name); ospf6_abr_delete_route(route, summary, summary_table, - old); + old, area->ospf6); return 0; } } @@ -376,7 +379,7 @@ int ospf6_abr_originate_summary_to_area(struct ospf6_route *route, zlog_debug( "This is the range with DoNotAdvertise set. ignore"); ospf6_abr_delete_route(route, summary, summary_table, - old); + old, area->ospf6); return 0; } @@ -385,7 +388,7 @@ int ospf6_abr_originate_summary_to_area(struct ospf6_route *route, if (is_debug) zlog_debug("The range is not active. withdraw"); ospf6_abr_delete_route(route, summary, summary_table, - old); + old, area->ospf6); return 0; } } @@ -437,7 +440,7 @@ int ospf6_abr_originate_summary_to_area(struct ospf6_route *route, summary->path.origin.type, summary->path.origin.adv_router, area->lsdb); } - summary = ospf6_route_add(summary, summary_table); + summary = ospf6_route_add(summary, summary_table, area->ospf6); } else { summary->type = route->type; monotime(&summary->changed); @@ -576,7 +579,8 @@ ospf6_abr_range_summary_needs_update(struct ospf6_route *range, uint32_t cost) return (redo_summary); } -static void ospf6_abr_range_update(struct ospf6_route *range) +static void ospf6_abr_range_update(struct ospf6_route *range, + struct ospf6 *ospf6) { uint32_t cost = 0; struct listnode *node, *nnode; @@ -615,7 +619,7 @@ static void ospf6_abr_range_update(struct ospf6_route *range) if (IS_OSPF6_DEBUG_ABR) zlog_debug("Add discard route"); - ospf6_zebra_add_discard(range); + ospf6_zebra_add_discard(range, ospf6); } } else { /* Summary removed or no summary generated as no @@ -625,18 +629,19 @@ static void ospf6_abr_range_update(struct ospf6_route *range) if (IS_OSPF6_DEBUG_ABR) zlog_debug("Delete discard route"); - ospf6_zebra_delete_discard(range); + ospf6_zebra_delete_discard(range, ospf6); } } } } -void ospf6_abr_originate_summary(struct ospf6_route *route) +void ospf6_abr_originate_summary(struct ospf6_route *route, struct ospf6 *ospf6) { struct listnode *node, *nnode; struct ospf6_area *oa; struct ospf6_route *range = NULL; + if (route->type == OSPF6_DEST_TYPE_NETWORK) { oa = ospf6_area_lookup(route->path.area_id, ospf6); if (!oa) { @@ -647,7 +652,7 @@ void ospf6_abr_originate_summary(struct ospf6_route *route) range = ospf6_route_lookup_bestmatch(&route->prefix, oa->range_table); if (range) { - ospf6_abr_range_update(range); + ospf6_abr_range_update(range, ospf6); } } @@ -674,7 +679,7 @@ void ospf6_abr_defaults_to_stub(struct ospf6 *o) def->path.subtype = OSPF6_PATH_SUBTYPE_DEFAULT_RT; def->path.area_id = o->backbone->area_id; - for (ALL_LIST_ELEMENTS(ospf6->area_list, node, nnode, oa)) { + for (ALL_LIST_ELEMENTS(o->area_list, node, nnode, oa)) { if (!IS_AREA_STUB(oa)) { /* withdraw defaults when an area switches from stub to * non-stub */ @@ -704,7 +709,8 @@ void ospf6_abr_defaults_to_stub(struct ospf6 *o) void ospf6_abr_old_path_update(struct ospf6_route *old_route, struct ospf6_route *route, - struct ospf6_route_table *table) + struct ospf6_route_table *table, + struct ospf6 *ospf6) { struct ospf6_path *o_path = NULL; struct listnode *anode, *anext; @@ -751,7 +757,7 @@ void ospf6_abr_old_path_update(struct ospf6_route *old_route, : 0); if (table->hook_add) - (*table->hook_add)(old_route); + (*table->hook_add)(old_route, ospf6); if (old_route->path.origin.id == route->path.origin.id && old_route->path.origin.adv_router == @@ -768,9 +774,9 @@ void ospf6_abr_old_path_update(struct ospf6_route *old_route, } } -void ospf6_abr_old_route_remove(struct ospf6_lsa *lsa, - struct ospf6_route *old, - struct ospf6_route_table *table) +void ospf6_abr_old_route_remove(struct ospf6_lsa *lsa, struct ospf6_route *old, + struct ospf6_route_table *table, + struct ospf6 *ospf6) { if (listcount(old->paths) > 1) { struct listnode *anode, *anext, *nnode, *rnode, *rnext; @@ -807,7 +813,7 @@ void ospf6_abr_old_route_remove(struct ospf6_lsa *lsa, : 0); if (table->hook_add) - (*table->hook_add)(old); + (*table->hook_add)(old, ospf6); if ((old->path.origin.id == lsa->header->id) && (old->path.origin.adv_router @@ -824,11 +830,10 @@ void ospf6_abr_old_route_remove(struct ospf6_lsa *lsa, h_path->origin.adv_router; } } else - ospf6_route_remove(old, table); + ospf6_route_remove(old, table, ospf6); } } else - ospf6_route_remove(old, table); - + ospf6_route_remove(old, table, ospf6); } /* RFC 2328 16.2. Calculating the inter-area routes */ @@ -943,7 +948,7 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) if (is_debug) zlog_debug("cost is LS_INFINITY, ignore"); if (old) - ospf6_abr_old_route_remove(lsa, old, table); + ospf6_abr_old_route_remove(lsa, old, table, oa->ospf6); return; } if (OSPF6_LSA_IS_MAXAGE(lsa)) { @@ -951,7 +956,7 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) zlog_debug("%s: LSA %s is MaxAge, ignore", __func__, lsa->name); if (old) - ospf6_abr_old_route_remove(lsa, old, table); + ospf6_abr_old_route_remove(lsa, old, table, oa->ospf6); return; } @@ -961,7 +966,7 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) zlog_debug("LSA %s is self-originated, ignore", lsa->name); if (old) - ospf6_route_remove(old, table); + ospf6_route_remove(old, table, oa->ospf6); return; } @@ -977,7 +982,7 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) zlog_debug( "Prefix is equal to address range, ignore"); if (old) - ospf6_route_remove(old, table); + ospf6_route_remove(old, table, oa->ospf6); return; } @@ -988,7 +993,7 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) if (is_debug) zlog_debug("Prefix has NU/LA bit set, ignore"); if (old) - ospf6_route_remove(old, table); + ospf6_route_remove(old, table, oa->ospf6); return; } } @@ -1001,7 +1006,7 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) if (is_debug) zlog_debug("Prefix has NU/LA bit set, ignore"); if (old) - ospf6_route_remove(old, table); + ospf6_route_remove(old, table, oa->ospf6); return; } @@ -1015,7 +1020,7 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) "Ignorning Inter-Router LSA for an ABR (%s)", buf); if (old) - ospf6_route_remove(old, table); + ospf6_route_remove(old, table, oa->ospf6); return; } @@ -1043,7 +1048,7 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) zlog_debug( "%s: remove old entry: %s %p ", __func__, buf, (void *)old); - ospf6_route_remove(old, table); + ospf6_route_remove(old, table, oa->ospf6); } } return; @@ -1062,7 +1067,8 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) zlog_debug( "Prefix was denied by import-list"); if (old) - ospf6_route_remove(old, table); + ospf6_route_remove(old, table, + oa->ospf6); return; } } @@ -1074,7 +1080,7 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) if (is_debug) zlog_debug("Prefix was denied by prefix-list"); if (old) - ospf6_route_remove(old, table); + ospf6_route_remove(old, table, oa->ospf6); return; } } @@ -1127,7 +1133,7 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) */ if (listcount(old_route->paths) > 1) ospf6_abr_old_path_update(old_route, route, - table); + table, oa->ospf6); continue; } @@ -1195,7 +1201,7 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) * For Inter-Router trigger summary update */ if (table->hook_add) - (*table->hook_add)(old_route); + (*table->hook_add)(old_route, oa->ospf6); /* Delete new route */ ospf6_route_delete(route); @@ -1214,23 +1220,19 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) path = ospf6_path_dup(&route->path); ospf6_copy_nexthops(path->nh_list, abr_entry->nh_list); listnode_add_sort(route->paths, path); - /* ospf6_ia_add_nw_route (table, &prefix, route); */ - ospf6_route_add(route, table); + ospf6_route_add(route, table, oa->ospf6); } } -void ospf6_abr_examin_brouter(uint32_t router_id) +void ospf6_abr_examin_brouter(uint32_t router_id, struct ospf6_route *route, + struct ospf6 *ospf6) { struct ospf6_lsa *lsa; struct ospf6_area *oa; uint16_t type; - if (ospf6_is_router_abr(ospf6)) - oa = ospf6->backbone; - else - oa = listgetdata(listhead(ospf6->area_list)); - + oa = ospf6_area_lookup(route->path.area_id, ospf6); /* * It is possible to designate a non backbone * area first. If that is the case safely @@ -1271,7 +1273,7 @@ void ospf6_abr_prefix_resummarize(struct ospf6 *o) for (route = ospf6_route_head(o->route_table); route; route = ospf6_route_next(route)) - ospf6_abr_originate_summary(route); + ospf6_abr_originate_summary(route, o); if (IS_OSPF6_DEBUG_ABR) zlog_debug("Finished re-examining Inter-Prefix Summaries"); diff --git a/ospf6d/ospf6_abr.h b/ospf6d/ospf6_abr.h index e40d155037..8ad51a4f82 100644 --- a/ospf6d/ospf6_abr.h +++ b/ospf6d/ospf6_abr.h @@ -64,11 +64,14 @@ extern void ospf6_abr_disable_area(struct ospf6_area *oa); extern int ospf6_abr_originate_summary_to_area(struct ospf6_route *route, struct ospf6_area *area); -extern void ospf6_abr_originate_summary(struct ospf6_route *route); +extern void ospf6_abr_originate_summary(struct ospf6_route *route, + struct ospf6 *ospf6); extern void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa); extern void ospf6_abr_defaults_to_stub(struct ospf6 *); -extern void ospf6_abr_examin_brouter(uint32_t router_id); +extern void ospf6_abr_examin_brouter(uint32_t router_id, + struct ospf6_route *route, + struct ospf6 *ospf6); extern void ospf6_abr_reimport(struct ospf6_area *oa); extern void ospf6_abr_range_reset_cost(struct ospf6 *ospf6); extern void ospf6_abr_prefix_resummarize(struct ospf6 *ospf6); @@ -78,10 +81,12 @@ extern void install_element_ospf6_debug_abr(void); extern int ospf6_abr_config_write(struct vty *vty); extern void ospf6_abr_old_route_remove(struct ospf6_lsa *lsa, struct ospf6_route *old, - struct ospf6_route_table *table); + struct ospf6_route_table *table, + struct ospf6 *ospf6); extern void ospf6_abr_old_path_update(struct ospf6_route *old_route, struct ospf6_route *route, - struct ospf6_route_table *table); + struct ospf6_route_table *table, + struct ospf6 *ospf6); extern void ospf6_abr_init(void); #endif /*OSPF6_ABR_H*/ diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c index 866bc7e189..e98764cd26 100644 --- a/ospf6d/ospf6_area.c +++ b/ospf6d/ospf6_area.c @@ -115,21 +115,23 @@ static void ospf6_area_lsdb_hook_remove(struct ospf6_lsa *lsa) } } -static void ospf6_area_route_hook_add(struct ospf6_route *route) +static void ospf6_area_route_hook_add(struct ospf6_route *route, + struct ospf6 *ospf6) { struct ospf6_route *copy; copy = ospf6_route_copy(route); - ospf6_route_add(copy, ospf6->route_table); + ospf6_route_add(copy, ospf6->route_table, ospf6); } -static void ospf6_area_route_hook_remove(struct ospf6_route *route) +static void ospf6_area_route_hook_remove(struct ospf6_route *route, + struct ospf6 *ospf6) { struct ospf6_route *copy; copy = ospf6_route_lookup_identical(route, ospf6->route_table); if (copy) - ospf6_route_remove(copy, ospf6->route_table); + ospf6_route_remove(copy, ospf6->route_table, ospf6); } static void ospf6_area_stub_update(struct ospf6_area *area) @@ -282,13 +284,13 @@ void ospf6_area_delete(struct ospf6_area *oa) ospf6_lsdb_delete(oa->lsdb_self); ospf6_lsdb_delete(oa->temp_router_lsa_lsdb); - ospf6_spf_table_finish(oa->spf_table); - ospf6_route_table_delete(oa->spf_table); - ospf6_route_table_delete(oa->route_table); + ospf6_spf_table_finish(oa->spf_table, oa->ospf6); + ospf6_route_table_delete(oa->spf_table, oa->ospf6); + ospf6_route_table_delete(oa->route_table, oa->ospf6); - ospf6_route_table_delete(oa->range_table); - ospf6_route_table_delete(oa->summary_prefix); - ospf6_route_table_delete(oa->summary_router); + ospf6_route_table_delete(oa->range_table, oa->ospf6); + ospf6_route_table_delete(oa->summary_prefix, oa->ospf6); + ospf6_route_table_delete(oa->summary_router, oa->ospf6); listnode_delete(oa->ospf6->area_list, oa); oa->ospf6 = NULL; @@ -297,6 +299,20 @@ void ospf6_area_delete(struct ospf6_area *oa) XFREE(MTYPE_OSPF6_AREA, oa); } +struct ospf6_area *ospf6_area_lookup_by_area_id(uint32_t area_id) +{ + struct ospf6_area *oa; + struct listnode *n, *node, *nnode; + struct ospf6 *ospf6; + + for (ALL_LIST_ELEMENTS(om6->ospf6, node, nnode, ospf6)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, n, oa)) + if (oa->area_id == area_id) + return oa; + } + return (struct ospf6_area *)NULL; +} + struct ospf6_area *ospf6_area_lookup(uint32_t area_id, struct ospf6 *ospf6) { struct ospf6_area *oa; @@ -335,8 +351,8 @@ void ospf6_area_disable(struct ospf6_area *oa) ospf6_lsdb_remove_all(oa->lsdb); ospf6_lsdb_remove_all(oa->lsdb_self); - ospf6_spf_table_finish(oa->spf_table); - ospf6_route_remove_all(oa->route_table); + ospf6_spf_table_finish(oa->spf_table, oa->ospf6); + ospf6_route_remove_all(oa->route_table, oa->ospf6); THREAD_OFF(oa->thread_router_lsa); THREAD_OFF(oa->thread_intra_prefix_lsa); @@ -401,7 +417,9 @@ DEFUN (area_range, struct ospf6_route *range; uint32_t cost = OSPF_AREA_RANGE_COST_UNSPEC; - OSPF6_CMD_AREA_GET(argv[idx_ipv4]->arg, oa); + VTY_DECLVAR_CONTEXT(ospf6, ospf6); + + OSPF6_CMD_AREA_GET(argv[idx_ipv4]->arg, oa, ospf6); ret = str2prefix(argv[idx_ipv6_prefixlen]->arg, &prefix); if (ret != 1 || prefix.family != AF_INET6) { @@ -436,7 +454,7 @@ DEFUN (area_range, zlog_debug("%s: for prefix %s, flag = %x", __func__, argv[idx_ipv6_prefixlen]->arg, range->flag); if (range->rnode == NULL) { - ospf6_route_add(range, oa->range_table); + ospf6_route_add(range, oa->range_table, oa->ospf6); } if (ospf6_is_router_abr(ospf6)) { @@ -468,7 +486,9 @@ DEFUN (no_area_range, struct prefix prefix; struct ospf6_route *range, *route; - OSPF6_CMD_AREA_GET(argv[idx_ipv4]->arg, oa); + VTY_DECLVAR_CONTEXT(ospf6, ospf6); + + OSPF6_CMD_AREA_GET(argv[idx_ipv4]->arg, oa, ospf6); ret = str2prefix(argv[idx_ipv6]->arg, &prefix); if (ret != 1 || prefix.family != AF_INET6) { @@ -488,19 +508,19 @@ DEFUN (no_area_range, SET_FLAG(range->flag, OSPF6_ROUTE_REMOVE); /* Redo summaries if required */ - for (route = ospf6_route_head(ospf6->route_table); route; + for (route = ospf6_route_head(oa->ospf6->route_table); route; route = ospf6_route_next(route)) - ospf6_abr_originate_summary(route); + ospf6_abr_originate_summary(route, oa->ospf6); /* purge the old aggregated summary LSA */ - ospf6_abr_originate_summary(range); + ospf6_abr_originate_summary(range, oa->ospf6); } - ospf6_route_remove(range, oa->range_table); + ospf6_route_remove(range, oa->range_table, oa->ospf6); return CMD_SUCCESS; } -void ospf6_area_config_write(struct vty *vty) +void ospf6_area_config_write(struct vty *vty, struct ospf6 *ospf6) { struct listnode *node; struct ospf6_area *oa; @@ -566,7 +586,9 @@ DEFUN (area_filter_list, struct ospf6_area *area; struct prefix_list *plist; - OSPF6_CMD_AREA_GET(areaid, area); + VTY_DECLVAR_CONTEXT(ospf6, ospf6); + + OSPF6_CMD_AREA_GET(areaid, area, ospf6); plist = prefix_list_lookup(AFI_IP6, plistname); if (strmatch(inout, "in")) { @@ -605,7 +627,8 @@ DEFUN (no_area_filter_list, struct ospf6_area *area; - OSPF6_CMD_AREA_GET(areaid, area); + VTY_DECLVAR_CONTEXT(ospf6, ospf6); + OSPF6_CMD_AREA_GET(areaid, area, ospf6); if (strmatch(inout, "in")) { if (PREFIX_NAME_IN(area)) @@ -629,18 +652,25 @@ DEFUN (no_area_filter_list, void ospf6_area_plist_update(struct prefix_list *plist, int add) { + struct listnode *node, *nnode; struct ospf6_area *oa; struct listnode *n; const char *name = prefix_list_name(plist); + struct ospf6 *ospf6 = NULL; + - if (!ospf6) + if (!om6->ospf6) return; - for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, n, oa)) { - if (PREFIX_NAME_IN(oa) && !strcmp(PREFIX_NAME_IN(oa), name)) - PREFIX_LIST_IN(oa) = add ? plist : NULL; - if (PREFIX_NAME_OUT(oa) && !strcmp(PREFIX_NAME_OUT(oa), name)) - PREFIX_LIST_OUT(oa) = add ? plist : NULL; + for (ALL_LIST_ELEMENTS(om6->ospf6, node, nnode, ospf6)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, n, oa)) { + if (PREFIX_NAME_IN(oa) + && !strcmp(PREFIX_NAME_IN(oa), name)) + PREFIX_LIST_IN(oa) = add ? plist : NULL; + if (PREFIX_NAME_OUT(oa) + && !strcmp(PREFIX_NAME_OUT(oa), name)) + PREFIX_LIST_OUT(oa) = add ? plist : NULL; + } } } @@ -658,7 +688,9 @@ DEFUN (area_import_list, struct ospf6_area *area; struct access_list *list; - OSPF6_CMD_AREA_GET(argv[idx_ipv4]->arg, area); + VTY_DECLVAR_CONTEXT(ospf6, ospf6); + + OSPF6_CMD_AREA_GET(argv[idx_ipv4]->arg, area, ospf6); list = access_list_lookup(AFI_IP6, argv[idx_name]->arg); @@ -686,7 +718,9 @@ DEFUN (no_area_import_list, int idx_ipv4 = 2; struct ospf6_area *area; - OSPF6_CMD_AREA_GET(argv[idx_ipv4]->arg, area); + VTY_DECLVAR_CONTEXT(ospf6, ospf6); + + OSPF6_CMD_AREA_GET(argv[idx_ipv4]->arg, area, ospf6); IMPORT_LIST(area) = 0; @@ -713,7 +747,9 @@ DEFUN (area_export_list, struct ospf6_area *area; struct access_list *list; - OSPF6_CMD_AREA_GET(argv[idx_ipv4]->arg, area); + VTY_DECLVAR_CONTEXT(ospf6, ospf6); + + OSPF6_CMD_AREA_GET(argv[idx_ipv4]->arg, area, ospf6); list = access_list_lookup(AFI_IP6, argv[idx_name]->arg); @@ -741,7 +777,9 @@ DEFUN (no_area_export_list, int idx_ipv4 = 2; struct ospf6_area *area; - OSPF6_CMD_AREA_GET(argv[idx_ipv4]->arg, area); + VTY_DECLVAR_CONTEXT(ospf6, ospf6); + + OSPF6_CMD_AREA_GET(argv[idx_ipv4]->arg, area, ospf6); EXPORT_LIST(area) = 0; @@ -768,9 +806,10 @@ DEFUN (show_ipv6_ospf6_spf_tree, struct ospf6_vertex *root; struct ospf6_route *route; struct prefix prefix; + struct ospf6 *ospf6; - OSPF6_CMD_CHECK_RUNNING(); - + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); ospf6_linkstate_prefix(ospf6->router_id, htonl(0), &prefix); for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, node, oa)) { @@ -804,8 +843,11 @@ DEFUN (show_ipv6_ospf6_area_spf_tree, struct ospf6_vertex *root; struct ospf6_route *route; struct prefix prefix; + struct ospf6 *ospf6; + + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); - OSPF6_CMD_CHECK_RUNNING(); + OSPF6_CMD_CHECK_RUNNING(ospf6); ospf6_linkstate_prefix(ospf6->router_id, htonl(0), &prefix); @@ -853,8 +895,11 @@ DEFUN (show_ipv6_ospf6_simulate_spf_tree_root, uint32_t router_id; struct ospf6_route_table *spf_table; unsigned char tmp_debug_ospf6_spf = 0; + struct ospf6 *ospf6; - OSPF6_CMD_CHECK_RUNNING(); + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + + OSPF6_CMD_CHECK_RUNNING(ospf6); inet_pton(AF_INET, argv[idx_ipv4]->arg, &router_id); ospf6_linkstate_prefix(router_id, htonl(0), &prefix); @@ -879,15 +924,15 @@ DEFUN (show_ipv6_ospf6_simulate_spf_tree_root, route = ospf6_route_lookup(&prefix, spf_table); if (route == NULL) { - ospf6_spf_table_finish(spf_table); - ospf6_route_table_delete(spf_table); + ospf6_spf_table_finish(spf_table, ospf6); + ospf6_route_table_delete(spf_table, ospf6); return CMD_SUCCESS; } root = (struct ospf6_vertex *)route->route_option; ospf6_spf_display_subtree(vty, "", 0, root); - ospf6_spf_table_finish(spf_table); - ospf6_route_table_delete(spf_table); + ospf6_spf_table_finish(spf_table, ospf6); + ospf6_route_table_delete(spf_table, ospf6); return CMD_SUCCESS; } @@ -903,7 +948,9 @@ DEFUN (ospf6_area_stub, int idx_ipv4_number = 1; struct ospf6_area *area; - OSPF6_CMD_AREA_GET(argv[idx_ipv4_number]->arg, area); + VTY_DECLVAR_CONTEXT(ospf6, ospf6); + + OSPF6_CMD_AREA_GET(argv[idx_ipv4_number]->arg, area, ospf6); if (!ospf6_area_stub_set(ospf6, area)) { vty_out(vty, @@ -928,7 +975,9 @@ DEFUN (ospf6_area_stub_no_summary, int idx_ipv4_number = 1; struct ospf6_area *area; - OSPF6_CMD_AREA_GET(argv[idx_ipv4_number]->arg, area); + VTY_DECLVAR_CONTEXT(ospf6, ospf6); + + OSPF6_CMD_AREA_GET(argv[idx_ipv4_number]->arg, area, ospf6); if (!ospf6_area_stub_set(ospf6, area)) { vty_out(vty, @@ -953,7 +1002,9 @@ DEFUN (no_ospf6_area_stub, int idx_ipv4_number = 2; struct ospf6_area *area; - OSPF6_CMD_AREA_GET(argv[idx_ipv4_number]->arg, area); + VTY_DECLVAR_CONTEXT(ospf6, ospf6); + + OSPF6_CMD_AREA_GET(argv[idx_ipv4_number]->arg, area, ospf6); ospf6_area_stub_unset(ospf6, area); ospf6_area_no_summary_unset(ospf6, area); @@ -974,7 +1025,9 @@ DEFUN (no_ospf6_area_stub_no_summary, int idx_ipv4_number = 2; struct ospf6_area *area; - OSPF6_CMD_AREA_GET(argv[idx_ipv4_number]->arg, area); + VTY_DECLVAR_CONTEXT(ospf6, ospf6); + + OSPF6_CMD_AREA_GET(argv[idx_ipv4_number]->arg, area, ospf6); ospf6_area_stub_unset(ospf6, area); ospf6_area_no_summary_unset(ospf6, area); @@ -1009,11 +1062,12 @@ void ospf6_area_interface_delete(struct ospf6_interface *oi) { struct ospf6_area *oa; struct listnode *node, *nnode; + struct ospf6 *ospf6; - if (!ospf6) + if (!om6->ospf6) return; - for (ALL_LIST_ELEMENTS(ospf6->area_list, node, nnode, oa)) - if(listnode_lookup(oa->if_list, oi)) - listnode_delete(oa->if_list, oi); - + for (ALL_LIST_ELEMENTS(om6->ospf6, node, nnode, ospf6)) + for (ALL_LIST_ELEMENTS(ospf6->area_list, node, nnode, oa)) + if (listnode_lookup(oa->if_list, oi)) + listnode_delete(oa->if_list, oi); } diff --git a/ospf6d/ospf6_area.h b/ospf6d/ospf6_area.h index f6287660d6..2097ef6e43 100644 --- a/ospf6d/ospf6_area.h +++ b/ospf6d/ospf6_area.h @@ -117,7 +117,7 @@ struct ospf6_area { #define IS_AREA_TRANSIT(oa) (CHECK_FLAG ((oa)->flag, OSPF6_AREA_TRANSIT)) #define IS_AREA_STUB(oa) (CHECK_FLAG ((oa)->flag, OSPF6_AREA_STUB)) -#define OSPF6_CMD_AREA_GET(str, oa) \ +#define OSPF6_CMD_AREA_GET(str, oa, ospf6) \ { \ char *ep; \ uint32_t area_id = htonl(strtoul(str, &ep, 10)); \ @@ -138,6 +138,7 @@ extern int ospf6_area_cmp(void *va, void *vb); extern struct ospf6_area *ospf6_area_create(uint32_t, struct ospf6 *, int); extern void ospf6_area_delete(struct ospf6_area *); extern struct ospf6_area *ospf6_area_lookup(uint32_t, struct ospf6 *); +extern struct ospf6_area *ospf6_area_lookup_by_area_id(uint32_t area_id); extern void ospf6_area_enable(struct ospf6_area *); extern void ospf6_area_disable(struct ospf6_area *); @@ -145,7 +146,7 @@ extern void ospf6_area_disable(struct ospf6_area *); extern void ospf6_area_show(struct vty *, struct ospf6_area *); extern void ospf6_area_plist_update(struct prefix_list *plist, int add); -extern void ospf6_area_config_write(struct vty *vty); +extern void ospf6_area_config_write(struct vty *vty, struct ospf6 *ospf6); extern void ospf6_area_init(void); struct ospf6_interface; extern void ospf6_area_interface_delete(struct ospf6_interface *oi); diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index 80a3c1005d..c053716f26 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -43,6 +43,7 @@ #include "ospf6_interface.h" #include "ospf6_neighbor.h" #include "ospf6_asbr.h" +#include "ospf6_abr.h" #include "ospf6_intra.h" #include "ospf6_flood.h" #include "ospf6d.h" @@ -55,7 +56,8 @@ unsigned char conf_debug_ospf6_asbr = 0; #define ZROUTE_NAME(x) zebra_route_string(x) /* AS External LSA origination */ -static void ospf6_as_external_lsa_originate(struct ospf6_route *route) +static void ospf6_as_external_lsa_originate(struct ospf6_route *route, + struct ospf6 *ospf6) { char buffer[OSPF6_MAX_LSASIZE]; struct ospf6_lsa_header *lsa_header; @@ -163,7 +165,8 @@ int ospf6_orig_as_external_lsa(struct thread *thread) type = htons(OSPF6_LSTYPE_AS_EXTERNAL); adv_router = oi->area->ospf6->router_id; - for (ALL_LSDB_TYPED_ADVRTR(ospf6->lsdb, type, adv_router, lsa)) { + for (ALL_LSDB_TYPED_ADVRTR(oi->area->ospf6->lsdb, type, adv_router, + lsa)) { if (IS_OSPF6_DEBUG_ASBR) zlog_debug( "%s: Send update of AS-External LSA %s seq 0x%x", @@ -202,7 +205,8 @@ static route_tag_t ospf6_as_external_lsa_get_tag(struct ospf6_lsa *lsa) } void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old, - struct ospf6_route *route) + struct ospf6_route *route, + struct ospf6 *ospf6) { struct ospf6_route *old_route; struct ospf6_path *ecmp_path, *o_path = NULL; @@ -281,8 +285,8 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old, * nh_list */ if (ospf6->route_table->hook_add) - (*ospf6->route_table->hook_add) - (old_route); + (*ospf6->route_table->hook_add)( + old_route, ospf6); if (old_route->path.origin.id == route->path.origin.id @@ -310,7 +314,7 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old, route->path.cost); } ospf6_route_remove(old_route, - ospf6->route_table); + ospf6->route_table, ospf6); } } if (route_updated) @@ -420,7 +424,8 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old, /* Update RIB/FIB */ if (ospf6->route_table->hook_add) - (*ospf6->route_table->hook_add)(old_route); + (*ospf6->route_table->hook_add)(old_route, + ospf6); /* Delete the new route its info added to existing * route. @@ -433,11 +438,11 @@ void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old, if (!route_found) { /* Add new route to existing node in ospf6 route table. */ - ospf6_route_add(route, ospf6->route_table); + ospf6_route_add(route, ospf6->route_table, ospf6); } } -void ospf6_asbr_lsa_add(struct ospf6_lsa *lsa) +void ospf6_asbr_lsa_add(struct ospf6_lsa *lsa, struct ospf6 *ospf6) { struct ospf6_as_external_lsa *external; struct prefix asbr_id; @@ -525,14 +530,14 @@ void ospf6_asbr_lsa_add(struct ospf6_lsa *lsa) old = ospf6_route_lookup(&route->prefix, ospf6->route_table); if (!old) { /* Add the new route to ospf6 instance route table. */ - ospf6_route_add(route, ospf6->route_table); + ospf6_route_add(route, ospf6->route_table, ospf6); } else { /* RFC 2328 16.4 (6) * ECMP: Keep new equal preference path in current * route's path list, update zebra with new effective * list along with addition of ECMP path. */ - ospf6_asbr_update_route_ecmp_path(old, route); + ospf6_asbr_update_route_ecmp_path(old, route, ospf6); } } @@ -542,6 +547,8 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa, struct ospf6_as_external_lsa *external; struct prefix prefix; struct ospf6_route *route, *nroute, *route_to_del; + struct ospf6_area *oa = NULL; + struct ospf6 *ospf6; external = (struct ospf6_as_external_lsa *)OSPF6_LSA_HEADER_END( lsa->header); @@ -549,7 +556,16 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa, if (IS_OSPF6_DEBUG_EXAMIN(AS_EXTERNAL)) zlog_debug("Withdraw AS-External route for %s", lsa->name); - if (lsa->header->adv_router == ospf6->router_id) { + ospf6 = ospf6_get_by_lsdb(lsa); + if (ospf6_is_router_abr(ospf6)) + oa = ospf6->backbone; + else + oa = listgetdata(listhead(ospf6->area_list)); + + if (oa == NULL) + return; + + if (lsa->header->adv_router == oa->ospf6->router_id) { if (IS_OSPF6_DEBUG_EXAMIN(AS_EXTERNAL)) zlog_debug("Ignore self-originated AS-External-LSA"); return; @@ -588,7 +604,7 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa, prefix.prefixlen = external->prefix.prefix_length; ospf6_prefix_in6_addr(&prefix.u.prefix6, external, &external->prefix); - route = ospf6_route_lookup(&prefix, ospf6->route_table); + route = ospf6_route_lookup(&prefix, oa->ospf6->route_table); if (route == NULL) { if (IS_OSPF6_DEBUG_EXAMIN(AS_EXTERNAL)) { zlog_debug("AS-External route %pFX not found", &prefix); @@ -714,9 +730,10 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa, /* Update RIB/FIB with effective * nh_list */ - if (ospf6->route_table->hook_add) - (*ospf6->route_table->hook_add) - (route); + if (oa->ospf6->route_table->hook_add) + (*oa->ospf6->route_table + ->hook_add)( + route, oa->ospf6); /* route's primary path is similar * to LSA, replace route's primary @@ -739,8 +756,9 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa, h_path->origin.adv_router; } } else { - ospf6_route_remove(route, - ospf6->route_table); + ospf6_route_remove( + route, oa->ospf6->route_table, + oa->ospf6); } } continue; @@ -780,7 +798,7 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa, &route->prefix, route->path.cost, route->path.u.cost_e2, listcount(route->nh_list)); } - ospf6_route_remove(route, ospf6->route_table); + ospf6_route_remove(route, oa->ospf6->route_table, oa->ospf6); } if (route != NULL) ospf6_route_unlock(route); @@ -788,7 +806,7 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa, ospf6_route_delete(route_to_del); } -void ospf6_asbr_lsentry_add(struct ospf6_route *asbr_entry) +void ospf6_asbr_lsentry_add(struct ospf6_route *asbr_entry, struct ospf6 *ospf6) { struct ospf6_lsa *lsa; uint16_t type; @@ -806,11 +824,12 @@ void ospf6_asbr_lsentry_add(struct ospf6_route *asbr_entry) router = ospf6_linkstate_prefix_adv_router(&asbr_entry->prefix); for (ALL_LSDB_TYPED_ADVRTR(ospf6->lsdb, type, router, lsa)) { if (!OSPF6_LSA_IS_MAXAGE(lsa)) - ospf6_asbr_lsa_add(lsa); + ospf6_asbr_lsa_add(lsa, ospf6); } } -void ospf6_asbr_lsentry_remove(struct ospf6_route *asbr_entry) +void ospf6_asbr_lsentry_remove(struct ospf6_route *asbr_entry, + struct ospf6 *ospf6) { struct ospf6_lsa *lsa; uint16_t type; @@ -825,8 +844,16 @@ void ospf6_asbr_lsentry_remove(struct ospf6_route *asbr_entry) /* redistribute function */ -static void ospf6_asbr_routemap_set(int type, const char *mapname) +static void ospf6_asbr_routemap_set(int type, const char *mapname, + uint32_t vrf_id) { + struct ospf6 *ospf6 = NULL; + + ospf6 = ospf6_lookup_by_vrf_id(vrf_id); + + if (ospf6 == NULL) + return; + if (ospf6->rmap[type].name) { route_map_counter_decrement(ospf6->rmap[type].map); free(ospf6->rmap[type].name); @@ -836,7 +863,7 @@ static void ospf6_asbr_routemap_set(int type, const char *mapname) route_map_counter_increment(ospf6->rmap[type].map); } -static void ospf6_asbr_routemap_unset(int type) +static void ospf6_asbr_routemap_unset(int type, struct ospf6 *ospf6) { if (ospf6->rmap[type].name) free(ospf6->rmap[type].name); @@ -851,8 +878,10 @@ static int ospf6_asbr_routemap_update_timer(struct thread *thread) { void **arg; int arg_type; + struct ospf6 *ospf6; arg = THREAD_ARG(thread); + ospf6 = (struct ospf6 *)arg[0]; arg_type = (int)(intptr_t)arg[1]; ospf6->t_distribute_update = NULL; @@ -874,7 +903,7 @@ static int ospf6_asbr_routemap_update_timer(struct thread *thread) return 0; } -void ospf6_asbr_distribute_list_update(int type) +void ospf6_asbr_distribute_list_update(int type, struct ospf6 *ospf6) { void **args = NULL; @@ -899,62 +928,75 @@ void ospf6_asbr_distribute_list_update(int type) static void ospf6_asbr_routemap_update(const char *mapname) { int type; + struct listnode *node, *nnode; + struct ospf6 *ospf6 = NULL; - if (ospf6 == NULL) + if (om6 == NULL) return; - for (type = 0; type < ZEBRA_ROUTE_MAX; type++) { - if (ospf6->rmap[type].name) { + for (ALL_LIST_ELEMENTS(om6->ospf6, node, nnode, ospf6)) { + for (type = 0; type < ZEBRA_ROUTE_MAX; type++) { + if (ospf6->rmap[type].name == NULL) + continue; ospf6->rmap[type].map = route_map_lookup_by_name( - ospf6->rmap[type].name); + ospf6->rmap[type].name); - if (mapname - && (strcmp(ospf6->rmap[type].name, mapname) == 0)) { - if (ospf6->rmap[type].map) { - if (IS_OSPF6_DEBUG_ASBR) - zlog_debug( + if (mapname == NULL || strcmp(ospf6->rmap[type].name, mapname)) + continue; + if (ospf6->rmap[type].map) { + if (IS_OSPF6_DEBUG_ASBR) + zlog_debug( "%s: route-map %s update, reset redist %s", - __func__, mapname, - ZROUTE_NAME(type)); + __func__, + mapname, + ZROUTE_NAME( + type)); route_map_counter_increment( - ospf6->rmap[type].map); + ospf6->rmap[type].map); - ospf6_asbr_distribute_list_update(type); - } else { - /* - * if the mapname matches a route-map on - * ospf6 but the map doesn't exist, it - * is being deleted. flush and then - * readvertise - */ - if (IS_OSPF6_DEBUG_ASBR) - zlog_debug( + ospf6_asbr_distribute_list_update( + type, ospf6); + } else { + /* + * if the mapname matches a + * route-map on ospf6 but the + * map doesn't exist, it is + * being deleted. flush and then + * readvertise + */ + if (IS_OSPF6_DEBUG_ASBR) + zlog_debug( "%s: route-map %s deleted, reset redist %s", - __func__, mapname, - ZROUTE_NAME(type)); - ospf6_asbr_redistribute_unset( + __func__, + mapname, + ZROUTE_NAME( + type)); + ospf6_asbr_redistribute_unset( type, ospf6->vrf_id); - ospf6_asbr_routemap_set(type, mapname); - ospf6_asbr_redistribute_set( + ospf6_asbr_routemap_set( + type, mapname, + ospf6->vrf_id); + ospf6_asbr_redistribute_set( type, ospf6->vrf_id); - } } - } else - ospf6->rmap[type].map = NULL; + } } } static void ospf6_asbr_routemap_event(const char *name) { int type; + struct listnode *node, *nnode; + struct ospf6 *ospf6; - if (ospf6 == NULL) + if (om6 == NULL) return; - for (type = 0; type < ZEBRA_ROUTE_MAX; type++) { - if ((ospf6->rmap[type].name) - && (strcmp(ospf6->rmap[type].name, name) == 0)) { - ospf6_asbr_distribute_list_update(type); + for (ALL_LIST_ELEMENTS(om6->ospf6, node, nnode, ospf6)) { + for (type = 0; type < ZEBRA_ROUTE_MAX; type++) { + if ((ospf6->rmap[type].name) + && (strcmp(ospf6->rmap[type].name, name) == 0)) + ospf6_asbr_distribute_list_update(type, ospf6); } } } @@ -973,6 +1015,12 @@ static void ospf6_asbr_redistribute_unset(int type, vrf_id_t vrf_id) { struct ospf6_route *route; struct ospf6_external_info *info; + struct ospf6 *ospf6 = NULL; + + ospf6 = ospf6_lookup_by_vrf_id(vrf_id); + + if (ospf6 == NULL) + return; ospf6_zebra_no_redistribute(type, vrf_id); @@ -982,10 +1030,11 @@ static void ospf6_asbr_redistribute_unset(int type, vrf_id_t vrf_id) if (info->type != type) continue; - ospf6_asbr_redistribute_remove(info->type, 0, &route->prefix); + ospf6_asbr_redistribute_remove(info->type, 0, &route->prefix, + ospf6); } - ospf6_asbr_routemap_unset(type); + ospf6_asbr_routemap_unset(type, ospf6); } /* When an area is unstubified, flood all the external LSAs in the area */ @@ -1005,7 +1054,8 @@ void ospf6_asbr_send_externals_to_area(struct ospf6_area *oa) void ospf6_asbr_redistribute_add(int type, ifindex_t ifindex, struct prefix *prefix, unsigned int nexthop_num, - struct in6_addr *nexthop, route_tag_t tag) + struct in6_addr *nexthop, route_tag_t tag, + struct ospf6 *ospf6) { route_map_result_t ret; struct ospf6_route troute; @@ -1051,7 +1101,8 @@ void ospf6_asbr_redistribute_add(int type, ifindex_t ifindex, if (IS_OSPF6_DEBUG_ASBR) zlog_debug("Denied by route-map \"%s\"", ospf6->rmap[type].name); - ospf6_asbr_redistribute_remove(type, ifindex, prefix); + ospf6_asbr_redistribute_remove(type, ifindex, prefix, + ospf6); return; } } @@ -1098,7 +1149,7 @@ void ospf6_asbr_redistribute_add(int type, ifindex_t ifindex, } match->path.origin.id = htonl(info->id); - ospf6_as_external_lsa_originate(match); + ospf6_as_external_lsa_originate(match, ospf6); return; } @@ -1140,7 +1191,7 @@ void ospf6_asbr_redistribute_add(int type, ifindex_t ifindex, node = route_node_get(ospf6->external_id_table, &prefix_id); node->info = route; - route = ospf6_route_add(route, ospf6->external_table); + route = ospf6_route_add(route, ospf6->external_table, ospf6); route->route_option = info; if (IS_OSPF6_DEBUG_ASBR) { @@ -1151,7 +1202,7 @@ void ospf6_asbr_redistribute_add(int type, ifindex_t ifindex, } route->path.origin.id = htonl(info->id); - ospf6_as_external_lsa_originate(route); + ospf6_as_external_lsa_originate(route, ospf6); /* Router-Bit (ASBR Flag) may have to be updated */ for (ALL_LIST_ELEMENTS(ospf6->area_list, lnode, lnnode, oa)) @@ -1159,7 +1210,7 @@ void ospf6_asbr_redistribute_add(int type, ifindex_t ifindex, } void ospf6_asbr_redistribute_remove(int type, ifindex_t ifindex, - struct prefix *prefix) + struct prefix *prefix, struct ospf6 *ospf6) { struct ospf6_route *match; struct ospf6_external_info *info = NULL; @@ -1206,7 +1257,7 @@ void ospf6_asbr_redistribute_remove(int type, ifindex_t ifindex, route_unlock_node(node); /* to free the lookup lock */ route_unlock_node(node); /* to free the original lock */ - ospf6_route_remove(match, ospf6->external_table); + ospf6_route_remove(match, ospf6->external_table, ospf6); XFREE(MTYPE_OSPF6_EXTERNAL_INFO, info); /* Router-Bit (ASBR Flag) may have to be updated */ @@ -1222,8 +1273,8 @@ DEFUN (ospf6_redistribute, { int type; - OSPF6_CMD_CHECK_RUNNING(); - + VTY_DECLVAR_CONTEXT(ospf6, ospf6); + OSPF6_CMD_CHECK_RUNNING(ospf6); char *proto = argv[argc - 1]->text; type = proto_redistnum(AFI_IP6, proto); if (type < 0) @@ -1246,7 +1297,8 @@ DEFUN (ospf6_redistribute_routemap, int idx_word = 3; int type; - OSPF6_CMD_CHECK_RUNNING(); + VTY_DECLVAR_CONTEXT(ospf6, ospf6); + OSPF6_CMD_CHECK_RUNNING(ospf6); char *proto = argv[idx_protocol]->text; type = proto_redistnum(AFI_IP6, proto); @@ -1254,7 +1306,7 @@ DEFUN (ospf6_redistribute_routemap, return CMD_WARNING_CONFIG_FAILED; ospf6_asbr_redistribute_unset(type, ospf6->vrf_id); - ospf6_asbr_routemap_set(type, argv[idx_word]->arg); + ospf6_asbr_routemap_set(type, argv[idx_word]->arg, ospf6->vrf_id); ospf6_asbr_redistribute_set(type, ospf6->vrf_id); return CMD_SUCCESS; } @@ -1271,7 +1323,9 @@ DEFUN (no_ospf6_redistribute, int idx_protocol = 2; int type; - OSPF6_CMD_CHECK_RUNNING(); + VTY_DECLVAR_CONTEXT(ospf6, ospf6); + + OSPF6_CMD_CHECK_RUNNING(ospf6); char *proto = argv[idx_protocol]->text; type = proto_redistnum(AFI_IP6, proto); @@ -1283,7 +1337,7 @@ DEFUN (no_ospf6_redistribute, return CMD_SUCCESS; } -int ospf6_redistribute_config_write(struct vty *vty) +int ospf6_redistribute_config_write(struct vty *vty, struct ospf6 *ospf6) { int type; @@ -1303,7 +1357,7 @@ int ospf6_redistribute_config_write(struct vty *vty) return 0; } -static void ospf6_redistribute_show_config(struct vty *vty) +static void ospf6_redistribute_show_config(struct vty *vty, struct ospf6 *ospf6) { int type; int nroute[ZEBRA_ROUTE_MAX]; @@ -1831,10 +1885,12 @@ DEFUN (show_ipv6_ospf6_redistribute, ) { struct ospf6_route *route; + struct ospf6 *ospf6 = NULL; - OSPF6_CMD_CHECK_RUNNING(); + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); - ospf6_redistribute_show_config(vty); + ospf6_redistribute_show_config(vty, ospf6); for (route = ospf6_route_head(ospf6->external_table); route; route = ospf6_route_next(route)) diff --git a/ospf6d/ospf6_asbr.h b/ospf6d/ospf6_asbr.h index 41b1ac70e9..46c99706ac 100644 --- a/ospf6d/ospf6_asbr.h +++ b/ospf6d/ospf6_asbr.h @@ -70,22 +70,26 @@ struct ospf6_as_external_lsa { (E)->bits_metric |= htonl(0x00ffffff) & htonl(C); \ } -extern void ospf6_asbr_lsa_add(struct ospf6_lsa *lsa); +extern void ospf6_asbr_lsa_add(struct ospf6_lsa *lsa, struct ospf6 *ospf6); extern void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa, struct ospf6_route *asbr_entry); -extern void ospf6_asbr_lsentry_add(struct ospf6_route *asbr_entry); -extern void ospf6_asbr_lsentry_remove(struct ospf6_route *asbr_entry); +extern void ospf6_asbr_lsentry_add(struct ospf6_route *asbr_entry, + struct ospf6 *ospf6); +extern void ospf6_asbr_lsentry_remove(struct ospf6_route *asbr_entry, + struct ospf6 *ospf6); extern int ospf6_asbr_is_asbr(struct ospf6 *o); extern void ospf6_asbr_redistribute_add(int type, ifindex_t ifindex, struct prefix *prefix, unsigned int nexthop_num, struct in6_addr *nexthop, - route_tag_t tag); + route_tag_t tag, struct ospf6 *ospf6); extern void ospf6_asbr_redistribute_remove(int type, ifindex_t ifindex, - struct prefix *prefix); + struct prefix *prefix, + struct ospf6 *ospf6); -extern int ospf6_redistribute_config_write(struct vty *vty); +extern int ospf6_redistribute_config_write(struct vty *vty, + struct ospf6 *ospf6); extern void ospf6_asbr_init(void); extern void ospf6_asbr_redistribute_reset(vrf_id_t vrf_id); @@ -95,7 +99,8 @@ extern void ospf6_asbr_send_externals_to_area(struct ospf6_area *); extern int config_write_ospf6_debug_asbr(struct vty *vty); extern void install_element_ospf6_debug_asbr(void); extern void ospf6_asbr_update_route_ecmp_path(struct ospf6_route *old, - struct ospf6_route *route); -extern void ospf6_asbr_distribute_list_update(int type); + struct ospf6_route *route, + struct ospf6 *ospf6); +extern void ospf6_asbr_distribute_list_update(int type, struct ospf6 *ospf6); #endif /* OSPF6_ASBR_H */ diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c index 56aac0f21f..0662cfd683 100644 --- a/ospf6d/ospf6_flood.c +++ b/ospf6d/ospf6_flood.c @@ -370,7 +370,7 @@ void ospf6_flood_interface(struct ospf6_neighbor *from, struct ospf6_lsa *lsa, continue; } - if (ospf6->inst_shutdown) { + if (oi->area->ospf6->inst_shutdown) { if (is_debug) zlog_debug( "%s: Send LSA %s (age %d) update now", @@ -486,6 +486,12 @@ static void ospf6_flood_process(struct ospf6_neighbor *from, void ospf6_flood(struct ospf6_neighbor *from, struct ospf6_lsa *lsa) { + struct ospf6 *ospf6; + + ospf6 = ospf6_get_by_lsdb(lsa); + if (ospf6 == NULL) + return; + ospf6_flood_process(from, lsa, ospf6); } @@ -555,6 +561,9 @@ static void ospf6_flood_clear_process(struct ospf6_lsa *lsa, void ospf6_flood_clear(struct ospf6_lsa *lsa) { + struct ospf6 *ospf6; + + ospf6 = ospf6_get_by_lsdb(lsa); ospf6_flood_clear_process(lsa, ospf6); } diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index a724157737..75917b9d85 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -118,7 +118,7 @@ static uint32_t ospf6_interface_get_cost(struct ospf6_interface *oi) /* If all else fails, use default OSPF cost */ uint32_t cost; uint32_t bw, refbw; - + struct ospf6 *ospf6; /* interface speed and bw can be 0 in some platforms, * use ospf default bw. If bw is configured then it would * be used. @@ -130,6 +130,7 @@ static uint32_t ospf6_interface_get_cost(struct ospf6_interface *oi) : OSPF6_INTERFACE_BANDWIDTH; } + ospf6 = ospf6_lookup_by_vrf_id(oi->interface->vrf_id); refbw = ospf6 ? ospf6->ref_bandwidth : OSPF6_REFERENCE_BANDWIDTH; /* A specifed ip ospf cost overrides a calculated one. */ @@ -259,7 +260,7 @@ void ospf6_interface_delete(struct ospf6_interface *oi) ospf6_lsdb_delete(oi->lsupdate_list); ospf6_lsdb_delete(oi->lsack_list); - ospf6_route_table_delete(oi->route_connected); + ospf6_route_table_delete(oi->route_connected, oi->area->ospf6); /* cut link */ oi->interface->info = NULL; @@ -415,7 +416,7 @@ void ospf6_interface_connected_route_update(struct interface *ifp) return; /* update "route to advertise" interface route table */ - ospf6_route_remove_all(oi->route_connected); + ospf6_route_remove_all(oi->route_connected, oi->area->ospf6); for (ALL_LIST_ELEMENTS(oi->interface->connected, node, nnode, c)) { if (c->address->family != AF_INET6) @@ -459,7 +460,7 @@ void ospf6_interface_connected_route_update(struct interface *ifp) inet_pton(AF_INET6, "::1", &nh_addr); ospf6_route_add_nexthop(route, oi->interface->ifindex, &nh_addr); - ospf6_route_add(route, oi->route_connected); + ospf6_route_add(route, oi->route_connected, oi->area->ospf6); } /* create new Link-LSA */ @@ -472,6 +473,7 @@ static void ospf6_interface_state_change(uint8_t next_state, struct ospf6_interface *oi) { uint8_t prev_state; + struct ospf6 *ospf6; prev_state = oi->state; oi->state = next_state; @@ -487,20 +489,21 @@ static void ospf6_interface_state_change(uint8_t next_state, ospf6_interface_state_str[next_state]); } oi->state_change++; + ospf6 = ospf6_lookup_by_vrf_id(oi->interface->vrf_id); if ((prev_state == OSPF6_INTERFACE_DR || prev_state == OSPF6_INTERFACE_BDR) && (next_state != OSPF6_INTERFACE_DR && next_state != OSPF6_INTERFACE_BDR)) ospf6_sso(oi->interface->ifindex, &alldrouters6, - IPV6_LEAVE_GROUP); + IPV6_LEAVE_GROUP, ospf6->fd); if ((prev_state != OSPF6_INTERFACE_DR && prev_state != OSPF6_INTERFACE_BDR) && (next_state == OSPF6_INTERFACE_DR || next_state == OSPF6_INTERFACE_BDR)) ospf6_sso(oi->interface->ifindex, &alldrouters6, - IPV6_JOIN_GROUP); + IPV6_JOIN_GROUP, ospf6->fd); OSPF6_ROUTER_LSA_SCHEDULE(oi->area); if (next_state == OSPF6_INTERFACE_DOWN) { @@ -677,6 +680,7 @@ static uint8_t dr_election(struct ospf6_interface *oi) int interface_up(struct thread *thread) { struct ospf6_interface *oi; + struct ospf6 *ospf6; oi = (struct ospf6_interface *)THREAD_ARG(thread); assert(oi && oi->interface); @@ -747,9 +751,14 @@ int interface_up(struct thread *thread) return 0; } #endif /* __FreeBSD__ */ + if (oi->area->ospf6) + ospf6 = oi->area->ospf6; + else + ospf6 = ospf6_lookup_by_vrf_id(oi->interface->vrf_id); /* Join AllSPFRouters */ - if (ospf6_sso(oi->interface->ifindex, &allspfrouters6, IPV6_JOIN_GROUP) + if (ospf6_sso(oi->interface->ifindex, &allspfrouters6, IPV6_JOIN_GROUP, + ospf6->fd) < 0) { if (oi->sso_try_cnt++ < OSPF6_INTERFACE_SSO_RETRY_MAX) { zlog_info( @@ -846,6 +855,7 @@ int interface_down(struct thread *thread) struct ospf6_interface *oi; struct listnode *node, *nnode; struct ospf6_neighbor *on; + struct ospf6 *ospf6; oi = (struct ospf6_interface *)THREAD_ARG(thread); assert(oi && oi->interface); @@ -859,11 +869,11 @@ int interface_down(struct thread *thread) /* Stop trying to set socket options. */ THREAD_OFF(oi->thread_sso); - + ospf6 = ospf6_lookup_by_vrf_id(oi->interface->vrf_id); /* Leave AllSPFRouters */ if (oi->state > OSPF6_INTERFACE_DOWN) ospf6_sso(oi->interface->ifindex, &allspfrouters6, - IPV6_LEAVE_GROUP); + IPV6_LEAVE_GROUP, ospf6->fd); ospf6_interface_state_change(OSPF6_INTERFACE_DOWN, oi); diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c index 733b9cffb1..f84a7cfe9a 100644 --- a/ospf6d/ospf6_intra.c +++ b/ospf6d/ospf6_intra.c @@ -147,7 +147,7 @@ static void ospf6_router_lsa_options_set(struct ospf6_area *oa, OSPF6_OPT_CLEAR_ALL(router_lsa->options); memcpy(router_lsa->options, oa->options, 3); - if (ospf6_is_router_abr(ospf6)) + if (ospf6_is_router_abr(oa->ospf6)) SET_FLAG(router_lsa->bits, OSPF6_ROUTER_BIT_B); else UNSET_FLAG(router_lsa->bits, OSPF6_ROUTER_BIT_B); @@ -987,7 +987,7 @@ int ospf6_intra_prefix_lsa_originate_stub(struct thread *thread) if (IS_OSPF6_DEBUG_ORIGINATE(INTRA_PREFIX)) zlog_debug(" include %pFX", &route->prefix); ospf6_route_add(ospf6_route_copy(route), - route_advertise); + route_advertise, oa->ospf6); } } @@ -1008,7 +1008,7 @@ int ospf6_intra_prefix_lsa_originate_stub(struct thread *thread) oa->lsdb); } } - ospf6_route_table_delete(route_advertise); + ospf6_route_table_delete(route_advertise, oa->ospf6); return 0; } @@ -1088,7 +1088,7 @@ int ospf6_intra_prefix_lsa_originate_stub(struct thread *thread) op = OSPF6_PREFIX_NEXT(op); } - ospf6_route_table_delete(route_advertise); + ospf6_route_table_delete(route_advertise, oa->ospf6); if (prefix_num == 0) { if (IS_OSPF6_DEBUG_ORIGINATE(INTRA_PREFIX)) @@ -1254,7 +1254,8 @@ int ospf6_intra_prefix_lsa_originate_transit(struct thread *thread) if (IS_OSPF6_DEBUG_ORIGINATE(INTRA_PREFIX)) zlog_debug(" include %pFX", &route->prefix); - ospf6_route_add(route, route_advertise); + ospf6_route_add(route, route_advertise, + oi->area->ospf6); prefix_num--; } if (current != end && IS_OSPF6_DEBUG_ORIGINATE(INTRA_PREFIX)) @@ -1276,7 +1277,7 @@ int ospf6_intra_prefix_lsa_originate_transit(struct thread *thread) prefix_num++; } - ospf6_route_table_delete(route_advertise); + ospf6_route_table_delete(route_advertise, oi->area->ospf6); if (prefix_num == 0) { if (IS_OSPF6_DEBUG_ORIGINATE(INTRA_PREFIX)) @@ -1309,14 +1310,14 @@ int ospf6_intra_prefix_lsa_originate_transit(struct thread *thread) return 0; } -static void ospf6_intra_prefix_update_route_origin(struct ospf6_route *oa_route) +static void ospf6_intra_prefix_update_route_origin(struct ospf6_route *oa_route, + struct ospf6 *ospf6) { struct ospf6_path *h_path; struct ospf6_route *g_route, *nroute; /* Update Global ospf6 route path */ - g_route = ospf6_route_lookup(&oa_route->prefix, - ospf6->route_table); + g_route = ospf6_route_lookup(&oa_route->prefix, ospf6->route_table); assert(g_route); @@ -1362,7 +1363,7 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa, struct ospf6_nexthop *nh, *rnh; char buf[PREFIX2STR_BUFFER]; bool route_found = false; - struct interface *ifp; + struct interface *ifp = NULL; struct ospf6_lsa *lsa; struct ospf6_intra_prefix_lsa *intra_prefix_lsa; @@ -1436,15 +1437,15 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa, * nh_list */ if (oa->route_table->hook_add) - (*oa->route_table->hook_add) - (old_route); + (*oa->route_table->hook_add)( + old_route, oa->ospf6); if (old_route->path.origin.id == route->path.origin.id && old_route->path.origin.adv_router == route->path.origin.adv_router) { ospf6_intra_prefix_update_route_origin( - old_route); + old_route, oa->ospf6); } break; } @@ -1458,7 +1459,8 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa, } if (oa->route_table->hook_remove) ospf6_route_remove(old_route, - oa->route_table); + oa->route_table, + oa->ospf6); else SET_FLAG(old_route->flag, OSPF6_ROUTE_REMOVE); @@ -1563,12 +1565,20 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa, ifp = if_lookup_prefix( &old_route->prefix, oa->ospf6->vrf_id); - if (ifp) - ospf6_route_add_nexthop( - old_route, + } + + if (ifp) { + /* Nexthop interface found */ + ospf6_route_add_nexthop(old_route, ifp->ifindex, NULL); } else { + /* The connected interfaces between + * routers can be in different networks. + * In this case the matching interface + * is not found. Copy nexthops from the + * link state entry + */ ospf6_route_merge_nexthops(old_route, ls_entry); } @@ -1591,7 +1601,8 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa, SET_FLAG(old_route->flag, OSPF6_ROUTE_ADD); /* Update ospf6 route table and RIB/FIB */ if (oa->route_table->hook_add) - (*oa->route_table->hook_add)(old_route); + (*oa->route_table->hook_add)(old_route, + oa->ospf6); /* Delete the new route its info added to existing * route. */ @@ -1603,7 +1614,7 @@ void ospf6_intra_prefix_route_ecmp_path(struct ospf6_area *oa, if (!route_found) { /* Add new route to existing node in ospf6 route table. */ - ospf6_route_add(route, oa->route_table); + ospf6_route_add(route, oa->route_table, oa->ospf6); } } @@ -1617,7 +1628,7 @@ void ospf6_intra_prefix_lsa_add(struct ospf6_lsa *lsa) struct ospf6_prefix *op; char *start, *current, *end; char buf[PREFIX2STR_BUFFER]; - struct interface *ifp; + struct interface *ifp = NULL; int direct_connect = 0; struct ospf6_path *path; @@ -1707,10 +1718,17 @@ void ospf6_intra_prefix_lsa_add(struct ospf6_lsa *lsa) if (direct_connect) { ifp = if_lookup_prefix(&route->prefix, oa->ospf6->vrf_id); - if (ifp) - ospf6_route_add_nexthop(route, ifp->ifindex, - NULL); + } + + if (ifp) { + /* Nexthop interface found */ + ospf6_route_add_nexthop(route, ifp->ifindex, NULL); } else { + /* The connected interfaces between routers can be in + * different networks. In this case the matching + * interface is not found. Copy nexthops from the + * link state entry + */ ospf6_route_copy_nexthops(route, ls_entry); } @@ -1739,7 +1757,7 @@ void ospf6_intra_prefix_lsa_add(struct ospf6_lsa *lsa) listcount(route->paths), listcount(route->nh_list)); } - ospf6_route_add(route, oa->route_table); + ospf6_route_add(route, oa->route_table, oa->ospf6); } prefix_num--; } @@ -1821,7 +1839,7 @@ static void ospf6_intra_prefix_lsa_remove_update_route(struct ospf6_lsa *lsa, * nh_list */ if (oa->route_table->hook_add) - (*oa->route_table->hook_add)(route); + (*oa->route_table->hook_add)(route, oa->ospf6); /* route's primary path is similar * to LSA, replace route's primary @@ -1831,7 +1849,8 @@ static void ospf6_intra_prefix_lsa_remove_update_route(struct ospf6_lsa *lsa, if ((route->path.origin.id == lsa->header->id) && (route->path.origin.adv_router == lsa->header->adv_router)) { - ospf6_intra_prefix_update_route_origin(route); + ospf6_intra_prefix_update_route_origin(route, + oa->ospf6); } } @@ -1913,7 +1932,8 @@ void ospf6_intra_prefix_lsa_remove(struct ospf6_lsa *lsa) listcount(route->paths), listcount(route->nh_list)); } - ospf6_route_remove(route, oa->route_table); + ospf6_route_remove(route, oa->route_table, + oa->ospf6); } } if (route) @@ -1929,8 +1949,8 @@ void ospf6_intra_route_calculation(struct ospf6_area *oa) struct ospf6_route *route, *nroute; uint16_t type; struct ospf6_lsa *lsa; - void (*hook_add)(struct ospf6_route *) = NULL; - void (*hook_remove)(struct ospf6_route *) = NULL; + void (*hook_add)(struct ospf6_route *, struct ospf6 *) = NULL; + void (*hook_remove)(struct ospf6_route *, struct ospf6 *) = NULL; if (IS_OSPF6_DEBUG_EXAMIN(INTRA_PREFIX)) zlog_debug("Re-examin intra-routes for area %s", oa->name); @@ -1960,15 +1980,15 @@ void ospf6_intra_route_calculation(struct ospf6_area *oa) } if (CHECK_FLAG(route->flag, OSPF6_ROUTE_REMOVE)) - ospf6_route_remove(route, oa->route_table); + ospf6_route_remove(route, oa->route_table, oa->ospf6); else if (CHECK_FLAG(route->flag, OSPF6_ROUTE_ADD) || CHECK_FLAG(route->flag, OSPF6_ROUTE_CHANGE)) { if (hook_add) - (*hook_add)(route); + (*hook_add)(route, oa->ospf6); route->flag = 0; } else { /* Redo the summaries as things might have changed */ - ospf6_abr_originate_summary(route); + ospf6_abr_originate_summary(route, oa->ospf6); route->flag = 0; } } @@ -2036,8 +2056,8 @@ static void ospf6_brouter_debug_print(struct ospf6_route *brouter) void ospf6_intra_brouter_calculation(struct ospf6_area *oa) { struct ospf6_route *brouter, *nbrouter, *copy; - void (*hook_add)(struct ospf6_route *) = NULL; - void (*hook_remove)(struct ospf6_route *) = NULL; + void (*hook_add)(struct ospf6_route *, struct ospf6 *) = NULL; + void (*hook_remove)(struct ospf6_route *, struct ospf6 *) = NULL; uint32_t brouter_id; char brouter_name[16]; @@ -2095,7 +2115,7 @@ void ospf6_intra_brouter_calculation(struct ospf6_area *oa) copy = ospf6_route_copy(brouter); copy->type = OSPF6_DEST_TYPE_ROUTER; copy->path.area_id = oa->area_id; - ospf6_route_add(copy, oa->ospf6->brouter_table); + ospf6_route_add(copy, oa->ospf6->brouter_table, oa->ospf6); if (IS_OSPF6_DEBUG_BROUTER_SPECIFIC_ROUTER_ID(brouter_id) || IS_OSPF6_DEBUG_ROUTE(MEMORY)) { @@ -2181,7 +2201,8 @@ void ospf6_intra_brouter_calculation(struct ospf6_area *oa) * removes brouters which are marked for remove. */ oa->intra_brouter_calc = 1; - ospf6_route_remove(brouter, oa->ospf6->brouter_table); + ospf6_route_remove(brouter, oa->ospf6->brouter_table, + oa->ospf6); brouter = NULL; } else if (CHECK_FLAG(brouter->flag, OSPF6_ROUTE_ADD) || CHECK_FLAG(brouter->flag, OSPF6_ROUTE_CHANGE)) { @@ -2195,7 +2216,7 @@ void ospf6_intra_brouter_calculation(struct ospf6_area *oa) /* newly added */ if (hook_add) - (*hook_add)(brouter); + (*hook_add)(brouter, oa->ospf6); } else { if (IS_OSPF6_DEBUG_BROUTER_SPECIFIC_ROUTER_ID( brouter_id) @@ -2204,7 +2225,7 @@ void ospf6_intra_brouter_calculation(struct ospf6_area *oa) zlog_info("brouter %s still exists via area %s", brouter_name, oa->name); /* But re-originate summaries */ - ospf6_abr_originate_summary(brouter); + ospf6_abr_originate_summary(brouter, oa->ospf6); } if (brouter) { diff --git a/ospf6d/ospf6_lsa.c b/ospf6d/ospf6_lsa.c index 058284f5e9..29141ee7f8 100644 --- a/ospf6d/ospf6_lsa.c +++ b/ospf6d/ospf6_lsa.c @@ -45,6 +45,27 @@ vector ospf6_lsa_handler_vector; +struct ospf6 *ospf6_get_by_lsdb(struct ospf6_lsa *lsa) +{ + struct ospf6 *ospf6 = NULL; + + switch (OSPF6_LSA_SCOPE(lsa->header->type)) { + case OSPF6_SCOPE_LINKLOCAL: + ospf6 = OSPF6_INTERFACE(lsa->lsdb->data)->area->ospf6; + break; + case OSPF6_SCOPE_AREA: + ospf6 = OSPF6_AREA(lsa->lsdb->data)->ospf6; + break; + case OSPF6_SCOPE_AS: + ospf6 = OSPF6_PROCESS(lsa->lsdb->data); + break; + default: + assert(0); + break; + } + return ospf6; +} + static int ospf6_unknown_lsa_show(struct vty *vty, struct ospf6_lsa *lsa) { uint8_t *start, *end, *current; @@ -626,6 +647,7 @@ struct ospf6_lsa *ospf6_lsa_unlock(struct ospf6_lsa *lsa) int ospf6_lsa_expire(struct thread *thread) { struct ospf6_lsa *lsa; + struct ospf6 *ospf6; lsa = (struct ospf6_lsa *)THREAD_ARG(thread); @@ -642,7 +664,7 @@ int ospf6_lsa_expire(struct thread *thread) if (CHECK_FLAG(lsa->flag, OSPF6_LSA_HEADERONLY)) return 0; /* dbexchange will do something ... */ - + ospf6 = ospf6_get_by_lsdb(lsa); /* reinstall lsa */ ospf6_install_lsa(lsa); @@ -703,7 +725,7 @@ int ospf6_lsa_refresh(struct thread *thread) return 0; } -void ospf6_flush_self_originated_lsas_now(void) +void ospf6_flush_self_originated_lsas_now(struct ospf6 *ospf6) { struct listnode *node; struct ospf6_area *oa; diff --git a/ospf6d/ospf6_lsa.h b/ospf6d/ospf6_lsa.h index f8f0780baa..814e276796 100644 --- a/ospf6d/ospf6_lsa.h +++ b/ospf6d/ospf6_lsa.h @@ -20,6 +20,7 @@ #ifndef OSPF6_LSA_H #define OSPF6_LSA_H +#include "ospf6_top.h" /* Debug option */ #define OSPF6_LSA_DEBUG 0x01 @@ -236,6 +237,6 @@ extern void ospf6_lsa_terminate(void); extern int config_write_ospf6_debug_lsa(struct vty *vty); extern void install_element_ospf6_debug_lsa(void); extern void ospf6_lsa_age_set(struct ospf6_lsa *lsa); -extern void ospf6_flush_self_originated_lsas_now(void); - +extern void ospf6_flush_self_originated_lsas_now(struct ospf6 *ospf6); +extern struct ospf6 *ospf6_get_by_lsdb(struct ospf6_lsa *lsa); #endif /* OSPF6_LSA_H */ diff --git a/ospf6d/ospf6_main.c b/ospf6d/ospf6_main.c index 8533c1b12c..4ed6e2a604 100644 --- a/ospf6d/ospf6_main.c +++ b/ospf6d/ospf6_main.c @@ -81,22 +81,23 @@ static void __attribute__((noreturn)) ospf6_exit(int status) { struct vrf *vrf; struct interface *ifp; + struct ospf6 *ospf6; + struct listnode *node, *nnode; frr_early_fini(); - if (ospf6) { + for (ALL_LIST_ELEMENTS(om6->ospf6, node, nnode, ospf6)) { vrf = vrf_lookup_by_id(ospf6->vrf_id); ospf6_serv_close(&ospf6->fd); + FOR_ALL_INTERFACES (vrf, ifp) + if (ifp->info != NULL) + ospf6_interface_delete(ifp->info); ospf6_delete(ospf6); ospf6 = NULL; - } else - vrf = vrf_lookup_by_id(VRF_DEFAULT); + } bfd_gbl_exit(); - FOR_ALL_INTERFACES (vrf, ifp) - if (ifp->info != NULL) - ospf6_interface_delete(ifp->info); ospf6_message_terminate(); ospf6_asbr_terminate(); @@ -216,17 +217,17 @@ int main(int argc, char *argv[], char *envp[]) } /* OSPF6 master init. */ - ospf6_master_init(); + ospf6_master_init(frr_init()); /* thread master */ - master = frr_init(); + master = om6->master; vrf_init(NULL, NULL, NULL, NULL, NULL); access_list_init(); prefix_list_init(); /* initialize ospf6 */ - ospf6_init(); + ospf6_init(master); frr_config_fork(); frr_run(master); diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c index 853e2714cb..5f9953782c 100644 --- a/ospf6d/ospf6_message.c +++ b/ospf6d/ospf6_message.c @@ -781,9 +781,9 @@ static void ospf6_dbdesc_recv(struct in6_addr *src, struct in6_addr *dst, oi->db_desc_in++; - if (ntohl(oh->router_id) < ntohl(ospf6->router_id)) + if (ntohl(oh->router_id) < ntohl(oi->area->ospf6->router_id)) ospf6_dbdesc_recv_master(oh, on); - else if (ntohl(ospf6->router_id) < ntohl(oh->router_id)) + else if (ntohl(oi->area->ospf6->router_id) < ntohl(oh->router_id)) ospf6_dbdesc_recv_slave(oh, on); else { if (IS_OSPF6_DEBUG_MESSAGE(oh->type, RECV)) diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c index f8676e0c13..9f13ecffa1 100644 --- a/ospf6d/ospf6_neighbor.c +++ b/ospf6d/ospf6_neighbor.c @@ -786,8 +786,11 @@ DEFUN (show_ipv6_ospf6_neighbor, struct ospf6_area *oa; struct listnode *i, *j, *k; void (*showfunc)(struct vty *, struct ospf6_neighbor *); + struct ospf6 *ospf6; - OSPF6_CMD_CHECK_RUNNING(); + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + + OSPF6_CMD_CHECK_RUNNING(ospf6); showfunc = ospf6_neighbor_show; if (argc == 5) { @@ -831,8 +834,10 @@ DEFUN (show_ipv6_ospf6_neighbor_one, struct listnode *i, *j, *k; void (*showfunc)(struct vty *, struct ospf6_neighbor *); uint32_t router_id; + struct ospf6 *ospf6; - OSPF6_CMD_CHECK_RUNNING(); + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); showfunc = ospf6_neighbor_show_detail; if ((inet_pton(AF_INET, argv[idx_ipv4]->arg, &router_id)) != 1) { diff --git a/ospf6d/ospf6_network.c b/ospf6d/ospf6_network.c index 94e80b0f28..76f98fecdd 100644 --- a/ospf6d/ospf6_network.c +++ b/ospf6d/ospf6_network.c @@ -124,21 +124,20 @@ int ospf6_serv_sock(struct ospf6 *ospf6) } /* ospf6 set socket option */ -int ospf6_sso(ifindex_t ifindex, struct in6_addr *group, int option) +int ospf6_sso(ifindex_t ifindex, struct in6_addr *group, int option, int sockfd) { struct ipv6_mreq mreq6; int ret; int bufsize = (8 * 1024 * 1024); - if (ospf6->fd == -1) + if (sockfd == -1) return -1; assert(ifindex); mreq6.ipv6mr_interface = ifindex; memcpy(&mreq6.ipv6mr_multiaddr, group, sizeof(struct in6_addr)); - ret = setsockopt(ospf6->fd, IPPROTO_IPV6, option, &mreq6, - sizeof(mreq6)); + ret = setsockopt(sockfd, IPPROTO_IPV6, option, &mreq6, sizeof(mreq6)); if (ret < 0) { flog_err_sys( EC_LIB_SOCKET, @@ -147,8 +146,8 @@ int ospf6_sso(ifindex_t ifindex, struct in6_addr *group, int option) return ret; } - setsockopt_so_sendbuf(ospf6->fd, bufsize); - setsockopt_so_recvbuf(ospf6->fd, bufsize); + setsockopt_so_sendbuf(sockfd, bufsize); + setsockopt_so_recvbuf(sockfd, bufsize); return 0; } diff --git a/ospf6d/ospf6_network.h b/ospf6d/ospf6_network.h index 0ec7975e14..08d8be4445 100644 --- a/ospf6d/ospf6_network.h +++ b/ospf6d/ospf6_network.h @@ -26,7 +26,8 @@ extern struct in6_addr alldrouters6; extern int ospf6_serv_sock(struct ospf6 *ospf6); extern void ospf6_serv_close(int *ospf6_sock); -extern int ospf6_sso(ifindex_t ifindex, struct in6_addr *group, int option); +extern int ospf6_sso(ifindex_t ifindex, struct in6_addr *group, int option, + int sockfd); extern int ospf6_sendmsg(struct in6_addr *src, struct in6_addr *dst, ifindex_t ifindex, struct iovec *message, diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c index 1cd6b8cff4..2602854f33 100644 --- a/ospf6d/ospf6_route.c +++ b/ospf6d/ospf6_route.c @@ -296,25 +296,24 @@ void ospf6_route_zebra_copy_nexthops(struct ospf6_route *route, { struct ospf6_nexthop *nh; struct listnode *node; + struct interface *ifp; char buf[64]; int i; if (route) { i = 0; for (ALL_LIST_ELEMENTS_RO(route->nh_list, node, nh)) { + ifp = if_lookup_by_index_all_vrf(nh->ifindex); if (IS_OSPF6_DEBUG_ZEBRA(SEND)) { - const char *ifname; inet_ntop(AF_INET6, &nh->address, buf, sizeof(buf)); - ifname = ifindex2ifname(nh->ifindex, - ospf6->vrf_id); zlog_debug(" nexthop: %s%%%.*s(%d)", buf, - IFNAMSIZ, ifname, nh->ifindex); + IFNAMSIZ, ifp->name, nh->ifindex); } if (i >= entries) return; - nexthops[i].vrf_id = ospf6->vrf_id; + nexthops[i].vrf_id = ifp->vrf_id; nexthops[i].ifindex = nh->ifindex; if (!IN6_IS_ADDR_UNSPECIFIED(&nh->address)) { nexthops[i].gate.ipv6 = nh->address; @@ -591,7 +590,8 @@ static void route_table_assert(struct ospf6_route_table *table) #endif /*DEBUG*/ struct ospf6_route *ospf6_route_add(struct ospf6_route *route, - struct ospf6_route_table *table) + struct ospf6_route_table *table, + struct ospf6 *ospf6) { struct route_node *node, *nextnode, *prevnode; struct ospf6_route *current = NULL; @@ -700,7 +700,7 @@ struct ospf6_route *ospf6_route_add(struct ospf6_route *route, ospf6_route_table_assert(table); if (table->hook_add) - (*table->hook_add)(route); + (*table->hook_add)(route, ospf6); return route; } @@ -755,7 +755,7 @@ struct ospf6_route *ospf6_route_add(struct ospf6_route *route, SET_FLAG(route->flag, OSPF6_ROUTE_ADD); if (table->hook_add) - (*table->hook_add)(route); + (*table->hook_add)(route, ospf6); return route; } @@ -821,13 +821,13 @@ struct ospf6_route *ospf6_route_add(struct ospf6_route *route, SET_FLAG(route->flag, OSPF6_ROUTE_ADD); if (table->hook_add) - (*table->hook_add)(route); + (*table->hook_add)(route, ospf6); return route; } void ospf6_route_remove(struct ospf6_route *route, - struct ospf6_route_table *table) + struct ospf6_route_table *table, struct ospf6 *ospf6) { struct route_node *node; struct ospf6_route *current; @@ -882,7 +882,7 @@ void ospf6_route_remove(struct ospf6_route *route, /* Note hook_remove may call ospf6_route_remove */ if (table->hook_remove) - (*table->hook_remove)(route); + (*table->hook_remove)(route, ospf6); ospf6_route_unlock(route); } @@ -1002,12 +1002,13 @@ struct ospf6_route *ospf6_route_match_next(struct prefix *prefix, return next; } -void ospf6_route_remove_all(struct ospf6_route_table *table) +void ospf6_route_remove_all(struct ospf6_route_table *table, + struct ospf6 *ospf6) { struct ospf6_route *route; for (route = ospf6_route_head(table); route; route = ospf6_route_next(route)) - ospf6_route_remove(route, table); + ospf6_route_remove(route, table, ospf6); } struct ospf6_route_table *ospf6_route_table_create(int s, int t) @@ -1020,9 +1021,10 @@ struct ospf6_route_table *ospf6_route_table_create(int s, int t) return new; } -void ospf6_route_table_delete(struct ospf6_route_table *table) +void ospf6_route_table_delete(struct ospf6_route_table *table, + struct ospf6 *ospf6) { - ospf6_route_remove_all(table); + ospf6_route_remove_all(table, ospf6); bf_free(table->idspace); route_table_finish(table->table); XFREE(MTYPE_OSPF6_ROUTE, table); @@ -1035,12 +1037,11 @@ void ospf6_route_show(struct vty *vty, struct ospf6_route *route) int i; char destination[PREFIX2STR_BUFFER], nexthop[64]; char duration[64]; - const char *ifname; struct timeval now, res; struct listnode *node; struct ospf6_nexthop *nh; - if (ospf6 == NULL) { + if (om6->ospf6 == NULL) { vty_out(vty, "OSPFv3 is not running\n"); return; } @@ -1061,35 +1062,34 @@ void ospf6_route_show(struct vty *vty, struct ospf6_route *route) i = 0; for (ALL_LIST_ELEMENTS_RO(route->nh_list, node, nh)) { + struct interface *ifp; /* nexthop */ inet_ntop(AF_INET6, &nh->address, nexthop, sizeof(nexthop)); - ifname = ifindex2ifname(nh->ifindex, ospf6->vrf_id); - + ifp = if_lookup_by_index_all_vrf(nh->ifindex); if (!i) { vty_out(vty, "%c%1s %2s %-30s %-25s %6.*s %s\n", (ospf6_route_is_best(route) ? '*' : ' '), OSPF6_DEST_TYPE_SUBSTR(route->type), OSPF6_PATH_TYPE_SUBSTR(route->path.type), - destination, nexthop, IFNAMSIZ, ifname, + destination, nexthop, IFNAMSIZ, ifp->name, duration); i++; } else vty_out(vty, "%c%1s %2s %-30s %-25s %6.*s %s\n", ' ', - "", "", "", nexthop, IFNAMSIZ, ifname, ""); + "", "", "", nexthop, IFNAMSIZ, ifp->name, ""); } } void ospf6_route_show_detail(struct vty *vty, struct ospf6_route *route) { - const char *ifname; - char destination[PREFIX2STR_BUFFER], nexthop[64]; + char destination[PREFIX2STR_BUFFER]; char area_id[16], id[16], adv_router[16], capa[16], options[16]; struct timeval now, res; char duration[64]; struct listnode *node; struct ospf6_nexthop *nh; - if (ospf6 == NULL) { + if (om6->ospf6 == NULL) { vty_out(vty, "OSPFv3 is not running\n"); return; } @@ -1166,10 +1166,11 @@ void ospf6_route_show_detail(struct vty *vty, struct ospf6_route *route) /* Nexthops */ vty_out(vty, "Nexthop:\n"); for (ALL_LIST_ELEMENTS_RO(route->nh_list, node, nh)) { + struct interface *ifp; /* nexthop */ - inet_ntop(AF_INET6, &nh->address, nexthop, sizeof(nexthop)); - ifname = ifindex2ifname(nh->ifindex, ospf6->vrf_id); - vty_out(vty, " %s %.*s\n", nexthop, IFNAMSIZ, ifname); + + ifp = if_lookup_by_index_all_vrf(nh->ifindex); + vty_out(vty, " %pI6 %.*s\n", &nh->address, IFNAMSIZ, ifp->name); } vty_out(vty, "\n"); } diff --git a/ospf6d/ospf6_route.h b/ospf6d/ospf6_route.h index 95ba983e6b..0b984400b5 100644 --- a/ospf6d/ospf6_route.h +++ b/ospf6d/ospf6_route.h @@ -178,6 +178,7 @@ struct ospf6_route { #define OSPF6_ROUTE_DO_NOT_ADVERTISE 0x20 #define OSPF6_ROUTE_WAS_REMOVED 0x40 #define OSPF6_ROUTE_BLACKHOLE_ADDED 0x80 +struct ospf6; struct ospf6_route_table { int scope_type; @@ -192,9 +193,9 @@ struct ospf6_route_table { bitfield_t idspace; /* hooks */ - void (*hook_add)(struct ospf6_route *); + void (*hook_add)(struct ospf6_route *, struct ospf6 *); void (*hook_change)(struct ospf6_route *); - void (*hook_remove)(struct ospf6_route *); + void (*hook_remove)(struct ospf6_route *, struct ospf6 *); }; #define OSPF6_SCOPE_TYPE_NONE 0 @@ -296,7 +297,6 @@ extern int ospf6_route_cmp(struct ospf6_route *ra, struct ospf6_route *rb); extern void ospf6_route_lock(struct ospf6_route *route); extern void ospf6_route_unlock(struct ospf6_route *route); - extern struct ospf6_route *ospf6_route_lookup(struct prefix *prefix, struct ospf6_route_table *table); extern struct ospf6_route * @@ -307,9 +307,11 @@ ospf6_route_lookup_bestmatch(struct prefix *prefix, struct ospf6_route_table *table); extern struct ospf6_route *ospf6_route_add(struct ospf6_route *route, - struct ospf6_route_table *table); + struct ospf6_route_table *table, + struct ospf6 *ospf6); extern void ospf6_route_remove(struct ospf6_route *route, - struct ospf6_route_table *table); + struct ospf6_route_table *table, + struct ospf6 *ospf6); extern struct ospf6_route *ospf6_route_head(struct ospf6_route_table *table); extern struct ospf6_route *ospf6_route_next(struct ospf6_route *route); @@ -320,9 +322,10 @@ ospf6_route_match_head(struct prefix *prefix, struct ospf6_route_table *table); extern struct ospf6_route *ospf6_route_match_next(struct prefix *prefix, struct ospf6_route *route); -extern void ospf6_route_remove_all(struct ospf6_route_table *); +extern void ospf6_route_remove_all(struct ospf6_route_table *, struct ospf6 *); extern struct ospf6_route_table *ospf6_route_table_create(int s, int t); -extern void ospf6_route_table_delete(struct ospf6_route_table *); +extern void ospf6_route_table_delete(struct ospf6_route_table *, + struct ospf6 *); extern void ospf6_route_dump(struct ospf6_route_table *table); @@ -341,7 +344,6 @@ extern void ospf6_brouter_show(struct vty *vty, struct ospf6_route *route); extern int config_write_ospf6_debug_route(struct vty *vty); extern void install_element_ospf6_debug_route(void); extern void ospf6_route_init(void); -extern void ospf6_clean(void); extern void ospf6_path_free(struct ospf6_path *op); extern struct ospf6_path *ospf6_path_dup(struct ospf6_path *path); extern void ospf6_copy_paths(struct list *dst, struct list *src); diff --git a/ospf6d/ospf6_snmp.c b/ospf6d/ospf6_snmp.c index 6e24be6a1e..3aeba3b609 100644 --- a/ospf6d/ospf6_snmp.c +++ b/ospf6d/ospf6_snmp.c @@ -638,7 +638,9 @@ static uint8_t *ospfv3GeneralGroup(struct variable *v, oid *name, uint16_t sum; uint32_t count; struct ospf6_lsa *lsa = NULL, *lsanext; + struct ospf6 *ospf6; + ospf6 = ospf6_lookup_by_vrf_id(VRF_DEFAULT); /* Check whether the instance identifier is valid */ if (smux_header_generic(v, name, length, exact, var_len, write_method) == MATCH_FAILED) @@ -741,6 +743,9 @@ static uint8_t *ospfv3AreaEntry(struct variable *v, oid *name, size_t *length, unsigned int len; char a[16]; struct ospf6_route *ro; + struct ospf6 *ospf6; + + ospf6 = ospf6_lookup_by_vrf_id(VRF_DEFAULT); if (ospf6 == NULL) return NULL; @@ -850,6 +855,9 @@ static uint8_t *ospfv3WwLsdbEntry(struct variable *v, oid *name, size_t *length, struct interface *iif; struct ospf6_interface *oi = NULL; struct list *ifslist; + struct ospf6 *ospf6; + + ospf6 = ospf6_lookup_by_vrf_id(VRF_DEFAULT); if (smux_header_table(v, name, length, exact, var_len, write_method) == MATCH_FAILED) @@ -1051,6 +1059,9 @@ static uint8_t *ospfv3IfEntry(struct variable *v, oid *name, size_t *length, oid *offset; int offsetlen, len; uint32_t sum; + struct ospf6 *ospf6; + + ospf6 = ospf6_lookup_by_vrf_id(VRF_DEFAULT); if (smux_header_table(v, name, length, exact, var_len, write_method) == MATCH_FAILED) @@ -1205,6 +1216,9 @@ static uint8_t *ospfv3NbrEntry(struct variable *v, oid *name, size_t *length, struct list *ifslist; oid *offset; int offsetlen, len; + struct ospf6 *ospf6; + + ospf6 = ospf6_lookup_by_vrf_id(VRF_DEFAULT); if (smux_header_table(v, name, length, exact, var_len, write_method) == MATCH_FAILED) diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c index d3a330c3c7..4dd1d5a462 100644 --- a/ospf6d/ospf6_spf.c +++ b/ospf6d/ospf6_spf.c @@ -258,7 +258,7 @@ static char *ospf6_lsdesc_backlink(struct ospf6_lsa *lsa, caddr_t lsdesc, } static void ospf6_nexthop_calc(struct ospf6_vertex *w, struct ospf6_vertex *v, - caddr_t lsdesc) + caddr_t lsdesc, struct ospf6 *ospf6) { int i; ifindex_t ifindex; @@ -316,7 +316,8 @@ static void ospf6_nexthop_calc(struct ospf6_vertex *w, struct ospf6_vertex *v, } static int ospf6_spf_install(struct ospf6_vertex *v, - struct ospf6_route_table *result_table) + struct ospf6_route_table *result_table, + struct ospf6 *ospf6) { struct ospf6_route *route, *parent_route; struct ospf6_vertex *prev; @@ -416,11 +417,12 @@ static int ospf6_spf_install(struct ospf6_vertex *v, listnode_add_sort(v->parent->child_list, v); route->route_option = v; - ospf6_route_add(route, result_table); + ospf6_route_add(route, result_table, ospf6); return 0; } -void ospf6_spf_table_finish(struct ospf6_route_table *result_table) +void ospf6_spf_table_finish(struct ospf6_route_table *result_table, + struct ospf6 *ospf6) { struct ospf6_route *route, *nroute; struct ospf6_vertex *v; @@ -428,7 +430,7 @@ void ospf6_spf_table_finish(struct ospf6_route_table *result_table) nroute = ospf6_route_next(route); v = (struct ospf6_vertex *)route->route_option; ospf6_vertex_delete(v); - ospf6_route_remove(route, result_table); + ospf6_route_remove(route, result_table, ospf6); } } @@ -466,7 +468,7 @@ void ospf6_spf_calculation(uint32_t router_id, struct ospf6_lsa *lsa; struct in6_addr address; - ospf6_spf_table_finish(result_table); + ospf6_spf_table_finish(result_table, oa->ospf6); /* Install the calculating router itself as the root of the SPF tree */ /* construct root vertex */ @@ -495,7 +497,7 @@ void ospf6_spf_calculation(uint32_t router_id, while ((v = vertex_pqueue_pop(&candidate_list))) { /* installing may result in merging or rejecting of the vertex */ - if (ospf6_spf_install(v, result_table) < 0) + if (ospf6_spf_install(v, result_table, oa->ospf6) < 0) continue; /* Skip overloaded routers */ @@ -541,7 +543,7 @@ void ospf6_spf_calculation(uint32_t router_id, w->nh_list, ROUTER_LSDESC_GET_IFID(lsdesc), NULL); else if (w->hops == 1 && v->hops == 0) - ospf6_nexthop_calc(w, v, lsdesc); + ospf6_nexthop_calc(w, v, lsdesc, oa->ospf6); else ospf6_copy_nexthops(w->nh_list, v->nh_list); @@ -912,7 +914,7 @@ int config_write_ospf6_debug_spf(struct vty *vty) return 0; } -void ospf6_spf_config_write(struct vty *vty) +void ospf6_spf_config_write(struct vty *vty, struct ospf6 *ospf6) { if (ospf6->spf_delay != OSPF_SPF_DELAY_DEFAULT diff --git a/ospf6d/ospf6_spf.h b/ospf6d/ospf6_spf.h index a387d40a57..f288f91f57 100644 --- a/ospf6d/ospf6_spf.h +++ b/ospf6d/ospf6_spf.h @@ -139,7 +139,8 @@ static inline unsigned int ospf6_lsremove_to_spf_reason(struct ospf6_lsa *lsa) return (reason); } -extern void ospf6_spf_table_finish(struct ospf6_route_table *result_table); +extern void ospf6_spf_table_finish(struct ospf6_route_table *result_table, + struct ospf6 *ospf6); extern void ospf6_spf_calculation(uint32_t router_id, struct ospf6_route_table *result_table, struct ospf6_area *oa); @@ -148,7 +149,7 @@ extern void ospf6_spf_schedule(struct ospf6 *ospf, unsigned int reason); extern void ospf6_spf_display_subtree(struct vty *vty, const char *prefix, int rest, struct ospf6_vertex *v); -extern void ospf6_spf_config_write(struct vty *vty); +extern void ospf6_spf_config_write(struct vty *vty, struct ospf6 *ospf6); extern int config_write_ospf6_debug_spf(struct vty *vty); extern void install_element_ospf6_debug_spf(void); extern void ospf6_spf_init(void); diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index 1f906cadd1..95c72290d0 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -59,17 +59,76 @@ FRR_CFG_DEFAULT_BOOL(OSPF6_LOG_ADJACENCY_CHANGES, ) /* global ospf6d variable */ -struct ospf6 *ospf6; static struct ospf6_master ospf6_master; struct ospf6_master *om6; static void ospf6_disable(struct ospf6 *o); +static void ospf6_add(struct ospf6 *ospf6) +{ + listnode_add(om6->ospf6, ospf6); +} + +static void ospf6_del(struct ospf6 *ospf6) +{ + listnode_delete(om6->ospf6, ospf6); +} + +const char *ospf6_vrf_id_to_name(vrf_id_t vrf_id) +{ + struct vrf *vrf = vrf_lookup_by_id(vrf_id); + + return vrf ? vrf->name : "NIL"; +} + +/* Link OSPF instance to VRF. */ +void ospf6_vrf_link(struct ospf6 *ospf6, struct vrf *vrf) +{ + ospf6->vrf_id = vrf->vrf_id; + if (vrf->info != (void *)ospf6) + vrf->info = (void *)ospf6; +} + +/* Unlink OSPF instance from VRF. */ +void ospf6_vrf_unlink(struct ospf6 *ospf6, struct vrf *vrf) +{ + if (vrf->info == (void *)ospf6) + vrf->info = NULL; + ospf6->vrf_id = VRF_UNKNOWN; +} + +struct ospf6 *ospf6_lookup_by_vrf_id(vrf_id_t vrf_id) +{ + struct vrf *vrf = NULL; + + vrf = vrf_lookup_by_id(vrf_id); + if (!vrf) + return NULL; + return (vrf->info) ? (struct ospf6 *)vrf->info : NULL; +} + +struct ospf6 *ospf6_lookup_by_vrf_name(const char *name) +{ + struct ospf6 *o = NULL; + struct listnode *node, *nnode; + + for (ALL_LIST_ELEMENTS(om6->ospf6, node, nnode, o)) { + if (((o->name == NULL && name == NULL) + || (o->name && name && strcmp(o->name, name) == 0))) + return o; + } + return NULL; +} + + static void ospf6_top_lsdb_hook_add(struct ospf6_lsa *lsa) { + struct ospf6 *ospf6 = NULL; + switch (ntohs(lsa->header->type)) { case OSPF6_LSTYPE_AS_EXTERNAL: - ospf6_asbr_lsa_add(lsa); + ospf6 = ospf6_get_by_lsdb(lsa); + ospf6_asbr_lsa_add(lsa, ospf6); break; default: @@ -89,20 +148,23 @@ static void ospf6_top_lsdb_hook_remove(struct ospf6_lsa *lsa) } } -static void ospf6_top_route_hook_add(struct ospf6_route *route) +static void ospf6_top_route_hook_add(struct ospf6_route *route, + struct ospf6 *ospf6) { - ospf6_abr_originate_summary(route); - ospf6_zebra_route_update_add(route); + ospf6_abr_originate_summary(route, ospf6); + ospf6_zebra_route_update_add(route, ospf6); } -static void ospf6_top_route_hook_remove(struct ospf6_route *route) +static void ospf6_top_route_hook_remove(struct ospf6_route *route, + struct ospf6 *ospf6) { route->flag |= OSPF6_ROUTE_REMOVE; - ospf6_abr_originate_summary(route); - ospf6_zebra_route_update_remove(route); + ospf6_abr_originate_summary(route, ospf6); + ospf6_zebra_route_update_remove(route, ospf6); } -static void ospf6_top_brouter_hook_add(struct ospf6_route *route) +static void ospf6_top_brouter_hook_add(struct ospf6_route *route, + struct ospf6 *ospf6) { if (IS_OSPF6_DEBUG_EXAMIN(AS_EXTERNAL) || IS_OSPF6_DEBUG_BROUTER) { @@ -117,12 +179,14 @@ static void ospf6_top_brouter_hook_add(struct ospf6_route *route) route->path.origin.adv_router, listcount(route->nh_list)); } - ospf6_abr_examin_brouter(ADV_ROUTER_IN_PREFIX(&route->prefix)); - ospf6_asbr_lsentry_add(route); - ospf6_abr_originate_summary(route); + ospf6_abr_examin_brouter(ADV_ROUTER_IN_PREFIX(&route->prefix), route, + ospf6); + ospf6_asbr_lsentry_add(route, ospf6); + ospf6_abr_originate_summary(route, ospf6); } -static void ospf6_top_brouter_hook_remove(struct ospf6_route *route) +static void ospf6_top_brouter_hook_remove(struct ospf6_route *route, + struct ospf6 *ospf6) { if (IS_OSPF6_DEBUG_EXAMIN(AS_EXTERNAL) || IS_OSPF6_DEBUG_BROUTER) { @@ -138,9 +202,10 @@ static void ospf6_top_brouter_hook_remove(struct ospf6_route *route) listcount(route->nh_list)); } route->flag |= OSPF6_ROUTE_REMOVE; - ospf6_abr_examin_brouter(ADV_ROUTER_IN_PREFIX(&route->prefix)); - ospf6_asbr_lsentry_remove(route); - ospf6_abr_originate_summary(route); + ospf6_abr_examin_brouter(ADV_ROUTER_IN_PREFIX(&route->prefix), route, + ospf6); + ospf6_asbr_lsentry_remove(route, ospf6); + ospf6_abr_originate_summary(route, ospf6); } static struct ospf6 *ospf6_create(const char *name) @@ -153,9 +218,16 @@ static struct ospf6 *ospf6_create(const char *name) vrf = vrf_lookup_by_name(name); if (vrf) { o->vrf_id = vrf->vrf_id; - /* Freed in ospf6_delete */ - o->name = XSTRDUP(MTYPE_OSPF6_TOP, name); - } + } else + o->vrf_id = VRF_UNKNOWN; + + /* Freed in ospf6_delete */ + o->name = XSTRDUP(MTYPE_OSPF6_TOP, name); + if (vrf) + ospf6_vrf_link(o, vrf); + + ospf6_zebra_vrf_register(o); + /* initialize */ monotime(&o->starttime); o->area_list = list_new(); @@ -201,16 +273,20 @@ static struct ospf6 *ospf6_create(const char *name) return o; } -void ospf6_instance_create(const char *name) +struct ospf6 *ospf6_instance_create(const char *name) { + struct ospf6 *ospf6; + ospf6 = ospf6_create(name); if (DFLT_OSPF6_LOG_ADJACENCY_CHANGES) SET_FLAG(ospf6->config_flags, OSPF6_LOG_ADJACENCY_CHANGES); if (ospf6->router_id == 0) - ospf6_router_id_update(); - + ospf6_router_id_update(ospf6); + ospf6_add(ospf6); thread_add_read(master, ospf6_receive, ospf6, ospf6->fd, &ospf6->t_ospf6_receive); + + return ospf6; } void ospf6_delete(struct ospf6 *o) @@ -220,8 +296,9 @@ void ospf6_delete(struct ospf6 *o) QOBJ_UNREG(o); - ospf6_flush_self_originated_lsas_now(); - ospf6_disable(ospf6); + ospf6_flush_self_originated_lsas_now(o); + ospf6_disable(o); + ospf6_del(o); for (ALL_LIST_ELEMENTS(o->area_list, node, nnode, oa)) ospf6_area_delete(oa); @@ -232,10 +309,10 @@ void ospf6_delete(struct ospf6 *o) ospf6_lsdb_delete(o->lsdb); ospf6_lsdb_delete(o->lsdb_self); - ospf6_route_table_delete(o->route_table); - ospf6_route_table_delete(o->brouter_table); + ospf6_route_table_delete(o->route_table, o); + ospf6_route_table_delete(o->brouter_table, o); - ospf6_route_table_delete(o->external_table); + ospf6_route_table_delete(o->external_table, o); route_table_finish(o->external_id_table); ospf6_distance_reset(o); @@ -260,8 +337,8 @@ static void ospf6_disable(struct ospf6 *o) ospf6_asbr_redistribute_reset(o->vrf_id); ospf6_lsdb_remove_all(o->lsdb); - ospf6_route_remove_all(o->route_table); - ospf6_route_remove_all(o->brouter_table); + ospf6_route_remove_all(o->route_table, o); + ospf6_route_remove_all(o->brouter_table, o); THREAD_OFF(o->maxage_remover); THREAD_OFF(o->t_spf_calc); @@ -271,11 +348,13 @@ static void ospf6_disable(struct ospf6 *o) } } -void ospf6_master_init(void) +void ospf6_master_init(struct thread_master *master) { memset(&ospf6_master, 0, sizeof(struct ospf6_master)); om6 = &ospf6_master; + om6->ospf6 = list_new(); + om6->master = master; } static int ospf6_maxage_remover(struct thread *thread) @@ -333,7 +412,7 @@ void ospf6_maxage_remove(struct ospf6 *o) &o->maxage_remover); } -void ospf6_router_id_update(void) +void ospf6_router_id_update(struct ospf6 *ospf6) { if (!ospf6) return; @@ -351,8 +430,11 @@ DEFUN_NOSH (router_ospf6, ROUTER_STR OSPF6_STR) { + struct ospf6 *ospf6; + + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); if (ospf6 == NULL) - ospf6_instance_create(VRF_DEFAULT_NAME); + ospf6 = ospf6_instance_create(VRF_DEFAULT_NAME); /* set current ospf point. */ VTY_PUSH_CONTEXT(OSPF6_NODE, ospf6); @@ -368,6 +450,9 @@ DEFUN (no_router_ospf6, ROUTER_STR OSPF6_STR) { + struct ospf6 *ospf6; + + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); if (ospf6 == NULL) vty_out(vty, "OSPFv3 is not configured\n"); else { @@ -672,13 +757,14 @@ DEFUN (ospf6_interface_area, "OSPF6 area ID in decimal notation\n" ) { - VTY_DECLVAR_CONTEXT(ospf6, o); int idx_ifname = 1; int idx_ipv4 = 3; struct ospf6_area *oa; struct ospf6_interface *oi; struct interface *ifp; + VTY_DECLVAR_CONTEXT(ospf6, ospf6); + /* find/create ospf6 interface */ ifp = if_get_by_name(argv[idx_ifname]->arg, VRF_DEFAULT); oi = (struct ospf6_interface *)ifp->info; @@ -691,7 +777,7 @@ DEFUN (ospf6_interface_area, } /* parse Area-ID */ - OSPF6_CMD_AREA_GET(argv[idx_ipv4]->arg, oa); + OSPF6_CMD_AREA_GET(argv[idx_ipv4]->arg, oa, ospf6); /* attach interface to area */ listnode_add(oa->if_list, oi); /* sort ?? */ @@ -700,14 +786,14 @@ DEFUN (ospf6_interface_area, SET_FLAG(oa->flag, OSPF6_AREA_ENABLE); /* ospf6 process is currently disabled, not much more to do */ - if (CHECK_FLAG(o->flag, OSPF6_DISABLED)) + if (CHECK_FLAG(ospf6->flag, OSPF6_DISABLED)) return CMD_SUCCESS; /* start up */ ospf6_interface_enable(oi); /* If the router is ABR, originate summary routes */ - if (ospf6_is_router_abr(o)) + if (ospf6_is_router_abr(ospf6)) ospf6_abr_enable_area(oa); return CMD_SUCCESS; @@ -783,6 +869,8 @@ DEFUN (ospf6_stub_router_admin, struct listnode *node; struct ospf6_area *oa; + VTY_DECLVAR_CONTEXT(ospf6, ospf6); + if (!CHECK_FLAG(ospf6->flag, OSPF6_STUB_ROUTER)) { for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, node, oa)) { OSPF6_OPT_CLEAR(oa->options, OSPF6_OPT_V6); @@ -805,6 +893,7 @@ DEFUN (no_ospf6_stub_router_admin, struct listnode *node; struct ospf6_area *oa; + VTY_DECLVAR_CONTEXT(ospf6, ospf6); if (CHECK_FLAG(ospf6->flag, OSPF6_STUB_ROUTER)) { for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, node, oa)) { OSPF6_OPT_SET(oa->options, OSPF6_OPT_V6); @@ -944,8 +1033,10 @@ DEFUN (show_ipv6_ospf6, IP6_STR OSPF6_STR) { - OSPF6_CMD_CHECK_RUNNING(); + struct ospf6 *ospf6; + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); ospf6_show(vty, ospf6); return CMD_SUCCESS; } @@ -966,7 +1057,10 @@ DEFUN (show_ipv6_ospf6_route, "Detailed information\n" "Summary of route table\n") { - OSPF6_CMD_CHECK_RUNNING(); + struct ospf6 *ospf6; + + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); ospf6_route_table_show(vty, 4, argc, argv, ospf6->route_table); return CMD_SUCCESS; @@ -983,9 +1077,13 @@ DEFUN (show_ipv6_ospf6_route_match, "Display routes which match the specified route\n" "Display routes longer than the specified route\n") { - OSPF6_CMD_CHECK_RUNNING(); + struct ospf6 *ospf6; + + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); ospf6_route_table_show(vty, 4, argc, argv, ospf6->route_table); + return CMD_SUCCESS; } @@ -1001,7 +1099,10 @@ DEFUN (show_ipv6_ospf6_route_match_detail, "Detailed information\n" ) { - OSPF6_CMD_CHECK_RUNNING(); + struct ospf6 *ospf6; + + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); ospf6_route_table_show(vty, 4, argc, argv, ospf6->route_table); return CMD_SUCCESS; @@ -1022,13 +1123,16 @@ DEFUN (show_ipv6_ospf6_route_type_detail, "Detailed information\n" ) { - OSPF6_CMD_CHECK_RUNNING(); + struct ospf6 *ospf6; + + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); ospf6_route_table_show(vty, 4, argc, argv, ospf6->route_table); return CMD_SUCCESS; } -static void ospf6_stub_router_config_write(struct vty *vty) +static void ospf6_stub_router_config_write(struct vty *vty, struct ospf6 *ospf6) { if (CHECK_FLAG(ospf6->flag, OSPF6_STUB_ROUTER)) { vty_out(vty, " stub-router administrative\n"); @@ -1036,7 +1140,7 @@ static void ospf6_stub_router_config_write(struct vty *vty) return; } -static int ospf6_distance_config_write(struct vty *vty) +static int ospf6_distance_config_write(struct vty *vty, struct ospf6 *ospf6) { struct route_node *rn; struct ospf6_distance *odistance; @@ -1070,52 +1174,56 @@ static int ospf6_distance_config_write(struct vty *vty) /* OSPF configuration write function. */ static int config_write_ospf6(struct vty *vty) { - char router_id[16]; struct listnode *j, *k; struct ospf6_area *oa; struct ospf6_interface *oi; + struct ospf6 *ospf6; + struct listnode *node, *nnode; /* OSPFv3 configuration. */ - if (ospf6 == NULL) + if (om6 == NULL) return CMD_SUCCESS; - inet_ntop(AF_INET, &ospf6->router_id_static, router_id, - sizeof(router_id)); - vty_out(vty, "router ospf6\n"); - if (ospf6->router_id_static != 0) - vty_out(vty, " ospf6 router-id %s\n", router_id); - - /* log-adjacency-changes flag print. */ - if (CHECK_FLAG(ospf6->config_flags, OSPF6_LOG_ADJACENCY_CHANGES)) { - if (CHECK_FLAG(ospf6->config_flags, OSPF6_LOG_ADJACENCY_DETAIL)) - vty_out(vty, " log-adjacency-changes detail\n"); - else if (!SAVE_OSPF6_LOG_ADJACENCY_CHANGES) - vty_out(vty, " log-adjacency-changes\n"); - } else if (SAVE_OSPF6_LOG_ADJACENCY_CHANGES) { - vty_out(vty, " no log-adjacency-changes\n"); - } + for (ALL_LIST_ELEMENTS(om6->ospf6, node, nnode, ospf6)) { + vty_out(vty, "router ospf6\n"); + if (ospf6->router_id_static != 0) + vty_out(vty, " ospf6 router-id %pI4\n", + &ospf6->router_id_static); + + /* log-adjacency-changes flag print. */ + if (CHECK_FLAG(ospf6->config_flags, + OSPF6_LOG_ADJACENCY_CHANGES)) { + if (CHECK_FLAG(ospf6->config_flags, + OSPF6_LOG_ADJACENCY_DETAIL)) + vty_out(vty, " log-adjacency-changes detail\n"); + else if (!SAVE_OSPF6_LOG_ADJACENCY_CHANGES) + vty_out(vty, " log-adjacency-changes\n"); + } else if (SAVE_OSPF6_LOG_ADJACENCY_CHANGES) { + vty_out(vty, " no log-adjacency-changes\n"); + } - if (ospf6->ref_bandwidth != OSPF6_REFERENCE_BANDWIDTH) - vty_out(vty, " auto-cost reference-bandwidth %d\n", - ospf6->ref_bandwidth); - - /* LSA timers print. */ - if (ospf6->lsa_minarrival != OSPF_MIN_LS_ARRIVAL) - vty_out(vty, " timers lsa min-arrival %d\n", - ospf6->lsa_minarrival); - - ospf6_stub_router_config_write(vty); - ospf6_redistribute_config_write(vty); - ospf6_area_config_write(vty); - ospf6_spf_config_write(vty); - ospf6_distance_config_write(vty); - - for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, j, oa)) { - for (ALL_LIST_ELEMENTS_RO(oa->if_list, k, oi)) - vty_out(vty, " interface %s area %s\n", - oi->interface->name, oa->name); + if (ospf6->ref_bandwidth != OSPF6_REFERENCE_BANDWIDTH) + vty_out(vty, " auto-cost reference-bandwidth %d\n", + ospf6->ref_bandwidth); + + /* LSA timers print. */ + if (ospf6->lsa_minarrival != OSPF_MIN_LS_ARRIVAL) + vty_out(vty, " timers lsa min-arrival %d\n", + ospf6->lsa_minarrival); + + ospf6_stub_router_config_write(vty, ospf6); + ospf6_redistribute_config_write(vty, ospf6); + ospf6_area_config_write(vty, ospf6); + ospf6_spf_config_write(vty, ospf6); + ospf6_distance_config_write(vty, ospf6); + + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, j, oa)) { + for (ALL_LIST_ELEMENTS_RO(oa->if_list, k, oi)) + vty_out(vty, " interface %s area %s\n", + oi->interface->name, oa->name); + } + vty_out(vty, "!\n"); } - vty_out(vty, "!\n"); return 0; } diff --git a/ospf6d/ospf6_top.h b/ospf6d/ospf6_top.h index a78b05d565..52e1d7ee2b 100644 --- a/ospf6d/ospf6_top.h +++ b/ospf6d/ospf6_top.h @@ -23,9 +23,12 @@ #include "qobj.h" #include "routemap.h" - struct ospf6_master { + /* OSPFv3 instance. */ + struct list *ospf6; + /* OSPFv3 thread master. */ + struct thread_master *master; in_addr_t zebra_router_id; }; @@ -128,12 +131,17 @@ extern struct ospf6 *ospf6; extern struct ospf6_master *om6; /* prototypes */ -extern void ospf6_master_init(void); +extern void ospf6_master_init(struct thread_master *master); extern void ospf6_top_init(void); extern void ospf6_delete(struct ospf6 *o); -extern void ospf6_router_id_update(void); +extern void ospf6_router_id_update(struct ospf6 *ospf6); extern void ospf6_maxage_remove(struct ospf6 *o); -extern void ospf6_instance_create(const char *name); +extern struct ospf6 *ospf6_instance_create(const char *name); +void ospf6_vrf_link(struct ospf6 *ospf6, struct vrf *vrf); +void ospf6_vrf_unlink(struct ospf6 *ospf6, struct vrf *vrf); +struct ospf6 *ospf6_lookup_by_vrf_id(vrf_id_t vrf_id); +struct ospf6 *ospf6_lookup_by_vrf_name(const char *name); +const char *ospf6_vrf_id_to_name(vrf_id_t vrf_id); #endif /* OSPF6_TOP_H */ diff --git a/ospf6d/ospf6_zebra.c b/ospf6d/ospf6_zebra.c index c5c8ca27b9..b6c712176a 100644 --- a/ospf6d/ospf6_zebra.c +++ b/ospf6d/ospf6_zebra.c @@ -39,6 +39,7 @@ #include "ospf6_asbr.h" #include "ospf6_zebra.h" #include "ospf6d.h" +#include "ospf6_area.h" DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_DISTANCE, "OSPF6 distance") @@ -47,16 +48,49 @@ unsigned char conf_debug_ospf6_zebra = 0; /* information about zebra. */ struct zclient *zclient = NULL; +void ospf6_zebra_vrf_register(struct ospf6 *ospf6) +{ + if (!zclient || zclient->sock < 0 || !ospf6) + return; + + if (ospf6->vrf_id != VRF_UNKNOWN) { + if (IS_OSPF6_DEBUG_ZEBRA(RECV)) { + zlog_debug("%s: Register VRF %s id %u", __func__, + ospf6_vrf_id_to_name(ospf6->vrf_id), + ospf6->vrf_id); + } + zclient_send_reg_requests(zclient, ospf6->vrf_id); + } +} + +void ospf6_zebra_vrf_deregister(struct ospf6 *ospf6) +{ + if (!zclient || zclient->sock < 0 || !ospf6) + return; + + if (ospf6->vrf_id != VRF_DEFAULT && ospf6->vrf_id != VRF_UNKNOWN) { + if (IS_OSPF6_DEBUG_ZEBRA(RECV)) { + zlog_debug("%s: De-Register VRF %s id %u to Zebra.", + __func__, + ospf6_vrf_id_to_name(ospf6->vrf_id), + ospf6->vrf_id); + } + /* Deregister for router-id, interfaces, + * redistributed routes. */ + zclient_send_dereg_requests(zclient, ospf6->vrf_id); + } +} + /* Router-id update message from zebra. */ static int ospf6_router_id_update_zebra(ZAPI_CALLBACK_ARGS) { struct prefix router_id; - struct ospf6 *o = ospf6; + struct ospf6 *o; zebra_router_id_update_read(zclient->ibuf, &router_id); om6->zebra_router_id = router_id.u.prefix4.s_addr; - + o = ospf6_lookup_by_vrf_id(vrf_id); if (o == NULL) return 0; @@ -69,7 +103,7 @@ static int ospf6_router_id_update_zebra(ZAPI_CALLBACK_ARGS) INET_ADDRSTRLEN)); } - ospf6_router_id_update(); + ospf6_router_id_update(o); return 0; } @@ -146,6 +180,9 @@ static int ospf6_zebra_read_route(ZAPI_CALLBACK_ARGS) struct zapi_route api; unsigned long ifindex; struct in6_addr *nexthop; + struct ospf6 *ospf6; + + ospf6 = ospf6_lookup_by_vrf_id(vrf_id); if (ospf6 == NULL) return 0; @@ -173,9 +210,11 @@ static int ospf6_zebra_read_route(ZAPI_CALLBACK_ARGS) if (cmd == ZEBRA_REDISTRIBUTE_ROUTE_ADD) ospf6_asbr_redistribute_add(api.type, ifindex, &api.prefix, - api.nexthop_num, nexthop, api.tag); + api.nexthop_num, nexthop, api.tag, + ospf6); else - ospf6_asbr_redistribute_remove(api.type, ifindex, &api.prefix); + ospf6_asbr_redistribute_remove(api.type, ifindex, &api.prefix, + ospf6); return 0; } @@ -210,7 +249,8 @@ DEFUN (show_zebra, #define ADD 0 #define REM 1 -static void ospf6_zebra_route_update(int type, struct ospf6_route *request) +static void ospf6_zebra_route_update(int type, struct ospf6_route *request, + struct ospf6 *ospf6) { struct zapi_route api; int nhcount; @@ -280,8 +320,8 @@ static void ospf6_zebra_route_update(int type, struct ospf6_route *request) } SET_FLAG(api.message, ZAPI_MESSAGE_DISTANCE); - api.distance = - ospf6_distance_apply((struct prefix_ipv6 *)dest, request); + api.distance = ospf6_distance_apply((struct prefix_ipv6 *)dest, request, + ospf6); if (type == REM) ret = zclient_route_send(ZEBRA_ROUTE_DELETE, zclient, &api); @@ -297,17 +337,19 @@ static void ospf6_zebra_route_update(int type, struct ospf6_route *request) return; } -void ospf6_zebra_route_update_add(struct ospf6_route *request) +void ospf6_zebra_route_update_add(struct ospf6_route *request, + struct ospf6 *ospf6) { - ospf6_zebra_route_update(ADD, request); + ospf6_zebra_route_update(ADD, request, ospf6); } -void ospf6_zebra_route_update_remove(struct ospf6_route *request) +void ospf6_zebra_route_update_remove(struct ospf6_route *request, + struct ospf6 *ospf6) { - ospf6_zebra_route_update(REM, request); + ospf6_zebra_route_update(REM, request, ospf6); } -void ospf6_zebra_add_discard(struct ospf6_route *request) +void ospf6_zebra_add_discard(struct ospf6_route *request, struct ospf6 *ospf6) { struct zapi_route api; struct prefix *dest = &request->prefix; @@ -334,7 +376,8 @@ void ospf6_zebra_add_discard(struct ospf6_route *request) } } -void ospf6_zebra_delete_discard(struct ospf6_route *request) +void ospf6_zebra_delete_discard(struct ospf6_route *request, + struct ospf6 *ospf6) { struct zapi_route api; struct prefix *dest = &request->prefix; @@ -462,7 +505,8 @@ void ospf6_distance_reset(struct ospf6 *o) } } -uint8_t ospf6_distance_apply(struct prefix_ipv6 *p, struct ospf6_route * or) +uint8_t ospf6_distance_apply(struct prefix_ipv6 *p, struct ospf6_route * or, + struct ospf6 *ospf6) { struct ospf6 *o; diff --git a/ospf6d/ospf6_zebra.h b/ospf6d/ospf6_zebra.h index d23268303a..5f340924b9 100644 --- a/ospf6d/ospf6_zebra.h +++ b/ospf6d/ospf6_zebra.h @@ -41,21 +41,26 @@ struct ospf6_distance { }; extern struct zclient *zclient; +struct ospf6; -extern void ospf6_zebra_route_update_add(struct ospf6_route *request); -extern void ospf6_zebra_route_update_remove(struct ospf6_route *request); +extern void ospf6_zebra_route_update_add(struct ospf6_route *request, + struct ospf6 *ospf6); +extern void ospf6_zebra_route_update_remove(struct ospf6_route *request, + struct ospf6 *ospf6); extern void ospf6_zebra_redistribute(int, vrf_id_t vrf_id); extern void ospf6_zebra_no_redistribute(int, vrf_id_t vrf_id); #define ospf6_zebra_is_redistribute(type, vrf_id) \ vrf_bitmap_check(zclient->redist[AFI_IP6][type], vrf_id) extern void ospf6_zebra_init(struct thread_master *); -extern void ospf6_zebra_add_discard(struct ospf6_route *request); -extern void ospf6_zebra_delete_discard(struct ospf6_route *request); +extern void ospf6_zebra_add_discard(struct ospf6_route *request, + struct ospf6 *ospf6); +extern void ospf6_zebra_delete_discard(struct ospf6_route *request, + struct ospf6 *ospf6); -struct ospf6; extern void ospf6_distance_reset(struct ospf6 *); -extern uint8_t ospf6_distance_apply(struct prefix_ipv6 *, struct ospf6_route *); +extern uint8_t ospf6_distance_apply(struct prefix_ipv6 *, struct ospf6_route *, + struct ospf6 *); extern int ospf6_distance_set(struct vty *, struct ospf6 *, const char *, const char *, const char *); @@ -64,5 +69,6 @@ extern int ospf6_distance_unset(struct vty *, struct ospf6 *, const char *, extern int config_write_ospf6_debug_zebra(struct vty *vty); extern void install_element_ospf6_debug_zebra(void); - +extern void ospf6_zebra_vrf_register(struct ospf6 *ospf6); +extern void ospf6_zebra_vrf_deregister(struct ospf6 *ospf6); #endif /*OSPF6_ZEBRA_H*/ diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c index 151ed2bf29..fe519d0a26 100644 --- a/ospf6d/ospf6d.c +++ b/ospf6d/ospf6d.c @@ -168,20 +168,22 @@ DEFUN (show_ipv6_ospf6_database, int idx_level = 4; int level; struct listnode *i, *j; - struct ospf6 *o = ospf6; + struct ospf6 *ospf6; struct ospf6_area *oa; struct ospf6_interface *oi; - OSPF6_CMD_CHECK_RUNNING(); + + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); level = parse_show_level(idx_level, argc, argv); - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { vty_out(vty, AREA_LSDB_TITLE_FORMAT, oa->name); ospf6_lsdb_show(vty, level, NULL, NULL, NULL, oa->lsdb); } - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { for (ALL_LIST_ELEMENTS_RO(oa->if_list, j, oi)) { vty_out(vty, IF_LSDB_TITLE_FORMAT, oi->interface->name, oa->name); @@ -190,7 +192,7 @@ DEFUN (show_ipv6_ospf6_database, } vty_out(vty, AS_LSDB_TITLE_FORMAT); - ospf6_lsdb_show(vty, level, NULL, NULL, NULL, o->lsdb); + ospf6_lsdb_show(vty, level, NULL, NULL, NULL, ospf6->lsdb); vty_out(vty, "\n"); return CMD_SUCCESS; @@ -221,19 +223,21 @@ DEFUN (show_ipv6_ospf6_database_type, int idx_level = 5; int level; struct listnode *i, *j; - struct ospf6 *o = ospf6; + struct ospf6 *ospf6; struct ospf6_area *oa; struct ospf6_interface *oi; uint16_t type = 0; - OSPF6_CMD_CHECK_RUNNING(); + + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); type = parse_type_spec(idx_lsa, argc, argv); level = parse_show_level(idx_level, argc, argv); switch (OSPF6_LSA_SCOPE(type)) { case OSPF6_SCOPE_AREA: - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { vty_out(vty, AREA_LSDB_TITLE_FORMAT, oa->name); ospf6_lsdb_show(vty, level, &type, NULL, NULL, oa->lsdb); @@ -241,7 +245,7 @@ DEFUN (show_ipv6_ospf6_database_type, break; case OSPF6_SCOPE_LINKLOCAL: - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { for (ALL_LIST_ELEMENTS_RO(oa->if_list, j, oi)) { vty_out(vty, IF_LSDB_TITLE_FORMAT, oi->interface->name, oa->name); @@ -253,7 +257,7 @@ DEFUN (show_ipv6_ospf6_database_type, case OSPF6_SCOPE_AS: vty_out(vty, AS_LSDB_TITLE_FORMAT); - ospf6_lsdb_show(vty, level, &type, NULL, NULL, o->lsdb); + ospf6_lsdb_show(vty, level, &type, NULL, NULL, ospf6->lsdb); break; default: @@ -283,24 +287,26 @@ DEFUN (show_ipv6_ospf6_database_id, int idx_level = 6; int level; struct listnode *i, *j; - struct ospf6 *o = ospf6; + struct ospf6 *ospf6; struct ospf6_area *oa; struct ospf6_interface *oi; uint32_t id = 0; - OSPF6_CMD_CHECK_RUNNING(); + + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); if (argv[idx_ipv4]->type == IPV4_TKN) inet_pton(AF_INET, argv[idx_ipv4]->arg, &id); level = parse_show_level(idx_level, argc, argv); - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { vty_out(vty, AREA_LSDB_TITLE_FORMAT, oa->name); ospf6_lsdb_show(vty, level, NULL, &id, NULL, oa->lsdb); } - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { for (ALL_LIST_ELEMENTS_RO(oa->if_list, j, oi)) { vty_out(vty, IF_LSDB_TITLE_FORMAT, oi->interface->name, oa->name); @@ -309,7 +315,7 @@ DEFUN (show_ipv6_ospf6_database_id, } vty_out(vty, AS_LSDB_TITLE_FORMAT); - ospf6_lsdb_show(vty, level, NULL, &id, NULL, o->lsdb); + ospf6_lsdb_show(vty, level, NULL, &id, NULL, ospf6->lsdb); vty_out(vty, "\n"); return CMD_SUCCESS; @@ -334,21 +340,23 @@ DEFUN (show_ipv6_ospf6_database_router, int idx_level = 7; int level; struct listnode *i, *j; - struct ospf6 *o = ospf6; + struct ospf6 *ospf6; struct ospf6_area *oa; struct ospf6_interface *oi; uint32_t adv_router = 0; - OSPF6_CMD_CHECK_RUNNING(); + + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); inet_pton(AF_INET, argv[idx_ipv4]->arg, &adv_router); level = parse_show_level(idx_level, argc, argv); - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { vty_out(vty, AREA_LSDB_TITLE_FORMAT, oa->name); ospf6_lsdb_show(vty, level, NULL, NULL, &adv_router, oa->lsdb); } - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { for (ALL_LIST_ELEMENTS_RO(oa->if_list, j, oi)) { vty_out(vty, IF_LSDB_TITLE_FORMAT, oi->interface->name, oa->name); @@ -358,7 +366,7 @@ DEFUN (show_ipv6_ospf6_database_router, } vty_out(vty, AS_LSDB_TITLE_FORMAT); - ospf6_lsdb_show(vty, level, NULL, NULL, &adv_router, o->lsdb); + ospf6_lsdb_show(vty, level, NULL, NULL, &adv_router, ospf6->lsdb); vty_out(vty, "\n"); return CMD_SUCCESS; @@ -379,15 +387,18 @@ DEFUN_HIDDEN (show_ipv6_ospf6_database_aggr_router, uint16_t type = htons(OSPF6_LSTYPE_ROUTER); int idx_ipv4 = 6; struct listnode *i; - struct ospf6 *o = ospf6; + struct ospf6 *ospf6; struct ospf6_area *oa; struct ospf6_lsdb *lsdb; uint32_t adv_router = 0; + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); + inet_pton(AF_INET, argv[idx_ipv4]->arg, &adv_router); - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { - if (adv_router == o->router_id) + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { + if (adv_router == ospf6->router_id) lsdb = oa->lsdb_self; else lsdb = oa->lsdb; @@ -435,13 +446,15 @@ DEFUN (show_ipv6_ospf6_database_type_id, int idx_level = 7; int level; struct listnode *i, *j; - struct ospf6 *o = ospf6; + struct ospf6 *ospf6; struct ospf6_area *oa; struct ospf6_interface *oi; uint16_t type = 0; uint32_t id = 0; - OSPF6_CMD_CHECK_RUNNING(); + + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); type = parse_type_spec(idx_lsa, argc, argv); inet_pton(AF_INET, argv[idx_ipv4]->arg, &id); @@ -449,14 +462,14 @@ DEFUN (show_ipv6_ospf6_database_type_id, switch (OSPF6_LSA_SCOPE(type)) { case OSPF6_SCOPE_AREA: - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { vty_out(vty, AREA_LSDB_TITLE_FORMAT, oa->name); ospf6_lsdb_show(vty, level, &type, &id, NULL, oa->lsdb); } break; case OSPF6_SCOPE_LINKLOCAL: - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { for (ALL_LIST_ELEMENTS_RO(oa->if_list, j, oi)) { vty_out(vty, IF_LSDB_TITLE_FORMAT, oi->interface->name, oa->name); @@ -468,7 +481,7 @@ DEFUN (show_ipv6_ospf6_database_type_id, case OSPF6_SCOPE_AS: vty_out(vty, AS_LSDB_TITLE_FORMAT); - ospf6_lsdb_show(vty, level, &type, &id, NULL, o->lsdb); + ospf6_lsdb_show(vty, level, &type, &id, NULL, ospf6->lsdb); break; default: @@ -509,21 +522,22 @@ DEFUN (show_ipv6_ospf6_database_type_router, int idx_level = 7; int level; struct listnode *i, *j; - struct ospf6 *o = ospf6; + struct ospf6 *ospf6; struct ospf6_area *oa; struct ospf6_interface *oi; uint16_t type = 0; uint32_t adv_router = 0; - OSPF6_CMD_CHECK_RUNNING(); + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); type = parse_type_spec(idx_lsa, argc, argv); inet_pton(AF_INET, argv[idx_ipv4]->arg, &adv_router); level = parse_show_level(idx_level, argc, argv); switch (OSPF6_LSA_SCOPE(type)) { case OSPF6_SCOPE_AREA: - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { vty_out(vty, AREA_LSDB_TITLE_FORMAT, oa->name); ospf6_lsdb_show(vty, level, &type, NULL, &adv_router, oa->lsdb); @@ -531,7 +545,7 @@ DEFUN (show_ipv6_ospf6_database_type_router, break; case OSPF6_SCOPE_LINKLOCAL: - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { for (ALL_LIST_ELEMENTS_RO(oa->if_list, j, oi)) { vty_out(vty, IF_LSDB_TITLE_FORMAT, oi->interface->name, oa->name); @@ -543,7 +557,8 @@ DEFUN (show_ipv6_ospf6_database_type_router, case OSPF6_SCOPE_AS: vty_out(vty, AS_LSDB_TITLE_FORMAT); - ospf6_lsdb_show(vty, level, &type, NULL, &adv_router, o->lsdb); + ospf6_lsdb_show(vty, level, &type, NULL, &adv_router, + ospf6->lsdb); break; default: @@ -576,23 +591,24 @@ DEFUN (show_ipv6_ospf6_database_id_router, int idx_level = 7; int level; struct listnode *i, *j; - struct ospf6 *o = ospf6; + struct ospf6 *ospf6; struct ospf6_area *oa; struct ospf6_interface *oi; uint32_t id = 0; uint32_t adv_router = 0; - OSPF6_CMD_CHECK_RUNNING(); + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); inet_pton(AF_INET, argv[idx_ls_id]->arg, &id); inet_pton(AF_INET, argv[idx_adv_rtr]->arg, &adv_router); level = parse_show_level(idx_level, argc, argv); - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { vty_out(vty, AREA_LSDB_TITLE_FORMAT, oa->name); ospf6_lsdb_show(vty, level, NULL, &id, &adv_router, oa->lsdb); } - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { for (ALL_LIST_ELEMENTS_RO(oa->if_list, j, oi)) { vty_out(vty, IF_LSDB_TITLE_FORMAT, oi->interface->name, oa->name); @@ -602,7 +618,7 @@ DEFUN (show_ipv6_ospf6_database_id_router, } vty_out(vty, AS_LSDB_TITLE_FORMAT); - ospf6_lsdb_show(vty, level, NULL, &id, &adv_router, o->lsdb); + ospf6_lsdb_show(vty, level, NULL, &id, &adv_router, ospf6->lsdb); vty_out(vty, "\n"); return CMD_SUCCESS; @@ -629,23 +645,25 @@ DEFUN (show_ipv6_ospf6_database_adv_router_linkstate_id, int idx_level = 8; int level; struct listnode *i, *j; - struct ospf6 *o = ospf6; + struct ospf6 *ospf6; struct ospf6_area *oa; struct ospf6_interface *oi; uint32_t id = 0; uint32_t adv_router = 0; - OSPF6_CMD_CHECK_RUNNING(); + + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); inet_pton(AF_INET, argv[idx_adv_rtr]->arg, &adv_router); inet_pton(AF_INET, argv[idx_ls_id]->arg, &id); level = parse_show_level(idx_level, argc, argv); - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { vty_out(vty, AREA_LSDB_TITLE_FORMAT, oa->name); ospf6_lsdb_show(vty, level, NULL, &id, &adv_router, oa->lsdb); } - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { for (ALL_LIST_ELEMENTS_RO(oa->if_list, j, oi)) { vty_out(vty, IF_LSDB_TITLE_FORMAT, oi->interface->name, oa->name); @@ -655,7 +673,7 @@ DEFUN (show_ipv6_ospf6_database_adv_router_linkstate_id, } vty_out(vty, AS_LSDB_TITLE_FORMAT); - ospf6_lsdb_show(vty, level, NULL, &id, &adv_router, o->lsdb); + ospf6_lsdb_show(vty, level, NULL, &id, &adv_router, ospf6->lsdb); vty_out(vty, "\n"); return CMD_SUCCESS; @@ -688,14 +706,16 @@ DEFUN (show_ipv6_ospf6_database_type_id_router, int idx_level = 7; int level; struct listnode *i, *j; - struct ospf6 *o = ospf6; + struct ospf6 *ospf6; struct ospf6_area *oa; struct ospf6_interface *oi; uint16_t type = 0; uint32_t id = 0; uint32_t adv_router = 0; - OSPF6_CMD_CHECK_RUNNING(); + + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); type = parse_type_spec(idx_lsa, argc, argv); inet_pton(AF_INET, argv[idx_ls_id]->arg, &id); @@ -704,7 +724,7 @@ DEFUN (show_ipv6_ospf6_database_type_id_router, switch (OSPF6_LSA_SCOPE(type)) { case OSPF6_SCOPE_AREA: - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { vty_out(vty, AREA_LSDB_TITLE_FORMAT, oa->name); ospf6_lsdb_show(vty, level, &type, &id, &adv_router, oa->lsdb); @@ -712,7 +732,7 @@ DEFUN (show_ipv6_ospf6_database_type_id_router, break; case OSPF6_SCOPE_LINKLOCAL: - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { for (ALL_LIST_ELEMENTS_RO(oa->if_list, j, oi)) { vty_out(vty, IF_LSDB_TITLE_FORMAT, oi->interface->name, oa->name); @@ -724,7 +744,8 @@ DEFUN (show_ipv6_ospf6_database_type_id_router, case OSPF6_SCOPE_AS: vty_out(vty, AS_LSDB_TITLE_FORMAT); - ospf6_lsdb_show(vty, level, &type, &id, &adv_router, o->lsdb); + ospf6_lsdb_show(vty, level, &type, &id, &adv_router, + ospf6->lsdb); break; default: @@ -766,14 +787,16 @@ DEFUN (show_ipv6_ospf6_database_type_adv_router_linkstate_id, int idx_level = 9; int level; struct listnode *i, *j; - struct ospf6 *o = ospf6; + struct ospf6 *ospf6; struct ospf6_area *oa; struct ospf6_interface *oi; uint16_t type = 0; uint32_t id = 0; uint32_t adv_router = 0; - OSPF6_CMD_CHECK_RUNNING(); + + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); type = parse_type_spec(idx_lsa, argc, argv); inet_pton(AF_INET, argv[idx_adv_rtr]->arg, &adv_router); @@ -782,7 +805,7 @@ DEFUN (show_ipv6_ospf6_database_type_adv_router_linkstate_id, switch (OSPF6_LSA_SCOPE(type)) { case OSPF6_SCOPE_AREA: - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { vty_out(vty, AREA_LSDB_TITLE_FORMAT, oa->name); ospf6_lsdb_show(vty, level, &type, &id, &adv_router, oa->lsdb); @@ -790,7 +813,7 @@ DEFUN (show_ipv6_ospf6_database_type_adv_router_linkstate_id, break; case OSPF6_SCOPE_LINKLOCAL: - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { for (ALL_LIST_ELEMENTS_RO(oa->if_list, j, oi)) { vty_out(vty, IF_LSDB_TITLE_FORMAT, oi->interface->name, oa->name); @@ -802,7 +825,8 @@ DEFUN (show_ipv6_ospf6_database_type_adv_router_linkstate_id, case OSPF6_SCOPE_AS: vty_out(vty, AS_LSDB_TITLE_FORMAT); - ospf6_lsdb_show(vty, level, &type, &id, &adv_router, o->lsdb); + ospf6_lsdb_show(vty, level, &type, &id, &adv_router, + ospf6->lsdb); break; default: @@ -829,21 +853,22 @@ DEFUN (show_ipv6_ospf6_database_self_originated, int idx_level = 5; int level; struct listnode *i, *j; - struct ospf6 *o = ospf6; + struct ospf6 *ospf6; struct ospf6_area *oa; struct ospf6_interface *oi; uint32_t adv_router = 0; - OSPF6_CMD_CHECK_RUNNING(); + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); level = parse_show_level(idx_level, argc, argv); - adv_router = o->router_id; + adv_router = ospf6->router_id; - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { vty_out(vty, AREA_LSDB_TITLE_FORMAT, oa->name); ospf6_lsdb_show(vty, level, NULL, NULL, &adv_router, oa->lsdb); } - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { for (ALL_LIST_ELEMENTS_RO(oa->if_list, j, oi)) { vty_out(vty, IF_LSDB_TITLE_FORMAT, oi->interface->name, oa->name); @@ -853,7 +878,7 @@ DEFUN (show_ipv6_ospf6_database_self_originated, } vty_out(vty, AS_LSDB_TITLE_FORMAT); - ospf6_lsdb_show(vty, level, NULL, NULL, &adv_router, o->lsdb); + ospf6_lsdb_show(vty, level, NULL, NULL, &adv_router, ospf6->lsdb); vty_out(vty, "\n"); return CMD_SUCCESS; @@ -885,22 +910,22 @@ DEFUN (show_ipv6_ospf6_database_type_self_originated, int idx_level = 6; int level; struct listnode *i, *j; - struct ospf6 *o = ospf6; + struct ospf6 *ospf6; struct ospf6_area *oa; struct ospf6_interface *oi; uint16_t type = 0; uint32_t adv_router = 0; - OSPF6_CMD_CHECK_RUNNING(); - + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); type = parse_type_spec(idx_lsa, argc, argv); level = parse_show_level(idx_level, argc, argv); - adv_router = o->router_id; + adv_router = ospf6->router_id; switch (OSPF6_LSA_SCOPE(type)) { case OSPF6_SCOPE_AREA: - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { vty_out(vty, AREA_LSDB_TITLE_FORMAT, oa->name); ospf6_lsdb_show(vty, level, &type, NULL, &adv_router, oa->lsdb); @@ -908,7 +933,7 @@ DEFUN (show_ipv6_ospf6_database_type_self_originated, break; case OSPF6_SCOPE_LINKLOCAL: - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { for (ALL_LIST_ELEMENTS_RO(oa->if_list, j, oi)) { vty_out(vty, IF_LSDB_TITLE_FORMAT, oi->interface->name, oa->name); @@ -920,7 +945,8 @@ DEFUN (show_ipv6_ospf6_database_type_self_originated, case OSPF6_SCOPE_AS: vty_out(vty, AS_LSDB_TITLE_FORMAT); - ospf6_lsdb_show(vty, level, &type, NULL, &adv_router, o->lsdb); + ospf6_lsdb_show(vty, level, &type, NULL, &adv_router, + ospf6->lsdb); break; default: @@ -960,23 +986,23 @@ DEFUN (show_ipv6_ospf6_database_type_self_originated_linkstate_id, int idx_level = 8; int level; struct listnode *i, *j; - struct ospf6 *o = ospf6; + struct ospf6 *ospf6; struct ospf6_area *oa; struct ospf6_interface *oi; uint16_t type = 0; uint32_t adv_router = 0; uint32_t id = 0; - OSPF6_CMD_CHECK_RUNNING(); - + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); type = parse_type_spec(idx_lsa, argc, argv); inet_pton(AF_INET, argv[idx_ls_id]->arg, &id); level = parse_show_level(idx_level, argc, argv); - adv_router = o->router_id; + adv_router = ospf6->router_id; switch (OSPF6_LSA_SCOPE(type)) { case OSPF6_SCOPE_AREA: - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { vty_out(vty, AREA_LSDB_TITLE_FORMAT, oa->name); ospf6_lsdb_show(vty, level, &type, &id, &adv_router, oa->lsdb); @@ -984,7 +1010,7 @@ DEFUN (show_ipv6_ospf6_database_type_self_originated_linkstate_id, break; case OSPF6_SCOPE_LINKLOCAL: - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { for (ALL_LIST_ELEMENTS_RO(oa->if_list, j, oi)) { vty_out(vty, IF_LSDB_TITLE_FORMAT, oi->interface->name, oa->name); @@ -996,7 +1022,8 @@ DEFUN (show_ipv6_ospf6_database_type_self_originated_linkstate_id, case OSPF6_SCOPE_AS: vty_out(vty, AS_LSDB_TITLE_FORMAT); - ospf6_lsdb_show(vty, level, &type, &id, &adv_router, o->lsdb); + ospf6_lsdb_show(vty, level, &type, &id, &adv_router, + ospf6->lsdb); break; default: @@ -1035,23 +1062,23 @@ DEFUN (show_ipv6_ospf6_database_type_id_self_originated, int idx_level = 7; int level; struct listnode *i, *j; - struct ospf6 *o = ospf6; + struct ospf6 *ospf6; struct ospf6_area *oa; struct ospf6_interface *oi; uint16_t type = 0; uint32_t adv_router = 0; uint32_t id = 0; - OSPF6_CMD_CHECK_RUNNING(); - + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); type = parse_type_spec(idx_lsa, argc, argv); inet_pton(AF_INET, argv[idx_ls_id]->arg, &id); level = parse_show_level(idx_level, argc, argv); - adv_router = o->router_id; + adv_router = ospf6->router_id; switch (OSPF6_LSA_SCOPE(type)) { case OSPF6_SCOPE_AREA: - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { vty_out(vty, AREA_LSDB_TITLE_FORMAT, oa->name); ospf6_lsdb_show(vty, level, &type, &id, &adv_router, oa->lsdb); @@ -1059,7 +1086,7 @@ DEFUN (show_ipv6_ospf6_database_type_id_self_originated, break; case OSPF6_SCOPE_LINKLOCAL: - for (ALL_LIST_ELEMENTS_RO(o->area_list, i, oa)) { + for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa)) { for (ALL_LIST_ELEMENTS_RO(oa->if_list, j, oi)) { vty_out(vty, IF_LSDB_TITLE_FORMAT, oi->interface->name, oa->name); @@ -1071,7 +1098,8 @@ DEFUN (show_ipv6_ospf6_database_type_id_self_originated, case OSPF6_SCOPE_AS: vty_out(vty, AS_LSDB_TITLE_FORMAT); - ospf6_lsdb_show(vty, level, &type, &id, &adv_router, o->lsdb); + ospf6_lsdb_show(vty, level, &type, &id, &adv_router, + ospf6->lsdb); break; default: @@ -1097,9 +1125,11 @@ DEFUN (show_ipv6_ospf6_border_routers, uint32_t adv_router; struct ospf6_route *ro; struct prefix prefix; + struct ospf6 *ospf6 = NULL; - OSPF6_CMD_CHECK_RUNNING(); + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); if (argc == 5) { if (strmatch(argv[idx_ipv4]->text, "detail")) { for (ro = ospf6_route_head(ospf6->brouter_table); ro; @@ -1148,9 +1178,10 @@ DEFUN (show_ipv6_ospf6_linkstate, int idx_ipv4 = 5; struct listnode *node; struct ospf6_area *oa; + struct ospf6 *ospf6 = NULL; - OSPF6_CMD_CHECK_RUNNING(); - + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, node, oa)) { vty_out(vty, "\n SPF Result in Area %s\n\n", oa->name); ospf6_linkstate_table_show(vty, idx_ipv4, argc, argv, @@ -1174,8 +1205,10 @@ DEFUN (show_ipv6_ospf6_linkstate_detail, int idx_detail = 4; struct listnode *node; struct ospf6_area *oa; + struct ospf6 *ospf6 = NULL; - OSPF6_CMD_CHECK_RUNNING(); + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); + OSPF6_CMD_CHECK_RUNNING(ospf6); for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, node, oa)) { vty_out(vty, "\n SPF Result in Area %s\n\n", oa->name); @@ -1202,8 +1235,10 @@ static void ospf6_plist_del(struct prefix_list *plist) } /* Install ospf related commands. */ -void ospf6_init(void) +void ospf6_init(struct thread_master *master) { + struct ospf6 *ospf6; + ospf6_top_init(); ospf6_area_init(); ospf6_interface_init(); @@ -1268,16 +1303,7 @@ void ospf6_init(void) &show_ipv6_ospf6_database_type_self_originated_linkstate_id_cmd); install_element(VIEW_NODE, &show_ipv6_ospf6_database_aggr_router_cmd); + ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME); if (ospf6 == NULL) ospf6_instance_create(VRF_DEFAULT_NAME); } - -void ospf6_clean(void) -{ - if (!ospf6) - return; - if (ospf6->route_table) - ospf6_route_remove_all(ospf6->route_table); - if (ospf6->brouter_table) - ospf6_route_remove_all(ospf6->brouter_table); -} diff --git a/ospf6d/ospf6d.h b/ospf6d/ospf6d.h index 36f3c2233f..d85ff40f32 100644 --- a/ospf6d/ospf6d.h +++ b/ospf6d/ospf6d.h @@ -88,7 +88,7 @@ extern struct thread_master *master; #define OSPF6_ROUTER_ID_STR "Specify Router-ID\n" #define OSPF6_LS_ID_STR "Specify Link State ID\n" -#define OSPF6_CMD_CHECK_RUNNING() \ +#define OSPF6_CMD_CHECK_RUNNING(ospf6) \ if (ospf6 == NULL) { \ vty_out(vty, "OSPFv3 is not running\n"); \ return CMD_SUCCESS; \ @@ -100,6 +100,6 @@ extern struct zebra_privs_t ospf6d_privs; extern struct route_node *route_prev(struct route_node *node); extern void ospf6_debug(void); -extern void ospf6_init(void); +extern void ospf6_init(struct thread_master *master); #endif /* OSPF6D_H */ diff --git a/ospfd/ospf_asbr.c b/ospfd/ospf_asbr.c index fd9b166433..94fa1b5b44 100644 --- a/ospfd/ospf_asbr.c +++ b/ospfd/ospf_asbr.c @@ -42,7 +42,7 @@ #include "ospfd/ospf_route.h" #include "ospfd/ospf_zebra.h" #include "ospfd/ospf_dump.h" - +#include "ospfd/ospf_errors.h" /* Remove external route. */ void ospf_external_route_remove(struct ospf *ospf, struct prefix_ipv4 *p) @@ -80,6 +80,7 @@ struct external_info *ospf_external_info_new(uint8_t type, new = XCALLOC(MTYPE_OSPF_EXTERNAL_INFO, sizeof(struct external_info)); new->type = type; new->instance = instance; + new->to_be_processed = 0; ospf_reset_route_map_set_values(&new->route_map_set); return new; @@ -147,6 +148,7 @@ ospf_external_info_add(struct ospf *ospf, uint8_t type, unsigned short instance, new->nexthop = nexthop; new->tag = tag; new->orig_tag = tag; + new->aggr_route = NULL; /* we don't unlock rn from the get() because we're attaching the info */ if (rn) @@ -327,3 +329,890 @@ void ospf_redistribute_withdraw(struct ospf *ospf, uint8_t type, rn->info = NULL; } } + +/* External Route Aggregator Handlers */ +bool is_valid_summary_addr(struct prefix_ipv4 *p) +{ + /* Default prefix validation*/ + if (p->prefix.s_addr == INADDR_ANY) + return false; + + /*Host route shouldn't be configured as summary addres*/ + if (p->prefixlen == IPV4_MAX_PREFIXLEN) + return false; + + return true; +} +void ospf_asbr_external_aggregator_init(struct ospf *instance) +{ + instance->rt_aggr_tbl = route_table_init(); + + instance->t_external_aggr = NULL; + + instance->aggr_action = 0; + + instance->aggr_delay_interval = OSPF_EXTL_AGGR_DEFAULT_DELAY; +} + +static unsigned int ospf_external_rt_hash_key(const void *data) +{ + const struct external_info *ei = data; + unsigned int key = 0; + + key = prefix_hash_key(&ei->p); + return key; +} + +static bool ospf_external_rt_hash_cmp(const void *d1, const void *d2) +{ + const struct external_info *ei1 = d1; + const struct external_info *ei2 = d2; + + return prefix_same((struct prefix *)&ei1->p, (struct prefix *)&ei2->p); +} + +static struct ospf_external_aggr_rt * +ospf_external_aggregator_new(struct prefix_ipv4 *p) +{ + struct ospf_external_aggr_rt *aggr; + + aggr = (struct ospf_external_aggr_rt *)XCALLOC( + MTYPE_OSPF_EXTERNAL_RT_AGGR, + sizeof(struct ospf_external_aggr_rt)); + + if (!aggr) + return NULL; + + aggr->p.family = p->family; + aggr->p.prefix = p->prefix; + aggr->p.prefixlen = p->prefixlen; + aggr->match_extnl_hash = hash_create(ospf_external_rt_hash_key, + ospf_external_rt_hash_cmp, + "Ospf external route hash"); + return aggr; +} + +static void ospf_aggr_handle_external_info(void *data) +{ + struct external_info *ei = (struct external_info *)data; + struct ospf_external_aggr_rt *aggr = NULL; + struct ospf *ospf = NULL; + struct ospf_lsa *lsa = NULL; + + ei->aggr_route = NULL; + + ei->to_be_processed = true; + + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug("%s: Handle extrenal route(%pI4/%d)", __func__, + &ei->p.prefix, ei->p.prefixlen); + + ospf = ospf_lookup_instance(ei->instance); + + assert(ospf); + + if (!ospf_redistribute_check(ospf, ei, NULL)) + return; + + aggr = ospf_external_aggr_match(ospf, &ei->p); + if (aggr) { + (void)ospf_originate_summary_lsa(ospf, aggr, ei); + return; + } + + lsa = ospf_external_info_find_lsa(ospf, &ei->p); + if (lsa) + ospf_external_lsa_refresh(ospf, lsa, ei, LSA_REFRESH_FORCE, 1); + else + (void)ospf_external_lsa_originate(ospf, ei); +} + +static void ospf_aggr_unlink_external_info(void *data) +{ + struct external_info *ei = (struct external_info *)data; + + ei->aggr_route = NULL; + + ei->to_be_processed = true; +} + +void ospf_external_aggregator_free(struct ospf_external_aggr_rt *aggr) +{ + if (OSPF_EXTERNAL_RT_COUNT(aggr)) + hash_clean(aggr->match_extnl_hash, + (void *)ospf_aggr_unlink_external_info); + + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug("%s: Release the aggregator Address(%pI4/%d)", + __func__, &aggr->p.prefix, aggr->p.prefixlen); + hash_free(aggr->match_extnl_hash); + aggr->match_extnl_hash = NULL; + + XFREE(MTYPE_OSPF_EXTERNAL_RT_AGGR, aggr); +} + +static void ospf_external_aggr_add(struct ospf *ospf, + struct ospf_external_aggr_rt *aggr) +{ + struct route_node *rn; + + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug("%s: Adding Aggregate route to Aggr table (%pI4/%d)", + __func__, &aggr->p.prefix, aggr->p.prefixlen); + rn = route_node_get(ospf->rt_aggr_tbl, (struct prefix *)&aggr->p); + if (rn->info) + route_unlock_node(rn); + else + rn->info = aggr; +} + +static void ospf_external_aggr_delete(struct ospf *ospf, struct route_node *rn) +{ + struct ospf_external_aggr_rt *aggr = rn->info; + + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug("%s: Deleting Aggregate route (%pI4/%d)", __func__, + &aggr->p.prefix, aggr->p.prefixlen); + + /* Sent a Max age LSA if it is already originated. */ + if (CHECK_FLAG(aggr->flags, OSPF_EXTERNAL_AGGRT_ORIGINATED)) { + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug("%s: Flushing Aggregate route (%pI4/%d)", + __func__, &aggr->p.prefix, + aggr->p.prefixlen); + ospf_external_lsa_flush(ospf, 0, &aggr->p, 0); + } + + rn->info = NULL; + route_unlock_node(rn); + route_unlock_node(rn); +} + +struct ospf_external_aggr_rt * +ospf_extrenal_aggregator_lookup(struct ospf *ospf, struct prefix_ipv4 *p) +{ + struct route_node *rn; + struct ospf_external_aggr_rt *summary_rt = NULL; + + rn = route_node_lookup(ospf->rt_aggr_tbl, (struct prefix *)p); + if (rn) { + summary_rt = rn->info; + route_unlock_node(rn); + return summary_rt; + } + return NULL; +} + +struct ospf_external_aggr_rt *ospf_external_aggr_match(struct ospf *ospf, + struct prefix_ipv4 *p) +{ + struct route_node *node; + struct ospf_external_aggr_rt *summary_rt = NULL; + + node = route_node_match(ospf->rt_aggr_tbl, (struct prefix *)p); + if (node) { + + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + if (node->info) { + struct ospf_external_aggr_rt *ag = node->info; + + zlog_debug( + "%s: Matching aggregator found.prefix:%pI4/%d Aggregator %pI4/%d\n", + __func__, &p->prefix, p->prefixlen, + &ag->p.prefix, ag->p.prefixlen); + } + + summary_rt = node->info; + route_unlock_node(node); + return summary_rt; + } + return NULL; +} + +void ospf_unlink_ei_from_aggr(struct ospf *ospf, + struct ospf_external_aggr_rt *aggr, + struct external_info *ei) +{ + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug( + "%s: Unlinking extrenal route(%pI4/%d) from aggregator(%pI4/%d), external route count:%ld", + __func__, &ei->p.prefix, ei->p.prefixlen, + &aggr->p.prefix, aggr->p.prefixlen, + OSPF_EXTERNAL_RT_COUNT(aggr)); + hash_release(aggr->match_extnl_hash, ei); + ei->aggr_route = NULL; + + /* Flush the aggreagte route if matching + * external route count becomes zero. + */ + if (!OSPF_EXTERNAL_RT_COUNT(aggr) + && CHECK_FLAG(aggr->flags, OSPF_EXTERNAL_AGGRT_ORIGINATED)) { + + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug("%s: Flushing the aggreagte route (%pI4/%d)", + __func__, &aggr->p.prefix, + aggr->p.prefixlen); + + /* Flush the aggregate LSA */ + ospf_external_lsa_flush(ospf, 0, &aggr->p, 0); + + /* Unset the Origination flag */ + UNSET_FLAG(aggr->flags, OSPF_EXTERNAL_AGGRT_ORIGINATED); + } +} + +static void ospf_link_ei_to_aggr(struct ospf_external_aggr_rt *aggr, + struct external_info *ei) +{ + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug( + "%s: Linking extrenal route(%pI4/%d) to aggregator(%pI4/%d)", + __func__, &ei->p.prefix, ei->p.prefixlen, + &aggr->p.prefix, aggr->p.prefixlen); + hash_get(aggr->match_extnl_hash, ei, hash_alloc_intern); + ei->aggr_route = aggr; +} + +struct ospf_lsa *ospf_originate_summary_lsa(struct ospf *ospf, + struct ospf_external_aggr_rt *aggr, + struct external_info *ei) +{ + struct ospf_lsa *lsa; + struct external_info ei_aggr; + struct as_external_lsa *asel; + struct ospf_external_aggr_rt *old_aggr; + route_tag_t tag = 0; + + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug("%s: Prepare to originate Summary route(%pI4/%d)", + __func__, &aggr->p.prefix, aggr->p.prefixlen); + + /* This case to handle when the overlapping aggregator address + * is availbe.Best match will be considered.So need to delink + * from old aggregator and link to the new aggr. + */ + if (ei->aggr_route) { + if (ei->aggr_route != aggr) { + old_aggr = ei->aggr_route; + ospf_unlink_ei_from_aggr(ospf, old_aggr, ei); + } + } + + /* Add the external route to hash table */ + ospf_link_ei_to_aggr(aggr, ei); + + lsa = ospf_external_info_find_lsa(ospf, &aggr->p); + /* Dont originate external LSA, + * If it is configured not to advertise. + */ + if (CHECK_FLAG(aggr->flags, OSPF_EXTERNAL_AGGRT_NO_ADVERTISE)) { + /* If it is already originated as external LSA, + * But, it is configured not to advertise then + * flush the originated external lsa. + */ + if (lsa) + ospf_external_lsa_flush(ospf, 0, &aggr->p, 0); + UNSET_FLAG(aggr->flags, OSPF_EXTERNAL_AGGRT_ORIGINATED); + + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug( + "%s: Don't originate the summary address,It is configured to not-advertise.", + __func__); + return NULL; + } + + /* Prepare the extrenal_info for aggregator */ + memset(&ei_aggr, 0, sizeof(struct external_info)); + ei_aggr.p = aggr->p; + ei_aggr.tag = aggr->tag; + ei_aggr.type = 0; + ei_aggr.instance = ospf->instance; + ei_aggr.route_map_set.metric = -1; + ei_aggr.route_map_set.metric_type = -1; + + /* Summary route already originated, + * So, Do nothing. + */ + if (CHECK_FLAG(aggr->flags, OSPF_EXTERNAL_AGGRT_ORIGINATED)) { + if (!lsa) { + flog_warn(EC_OSPF_LSA_MISSING, + "%s: Could not refresh/originate %pI4/%d", + __func__, &aggr->p.prefix, aggr->p.prefixlen); + return NULL; + } + + asel = (struct as_external_lsa *)lsa->data; + tag = (unsigned long)ntohl(asel->e[0].route_tag); + + /* If tag modified , then re-originate the route + * with modified tag details. + */ + if (tag != ei_aggr.tag) { + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug( + "%s: Route tag changed(old:%d new:%d,So refresh the summary route.(%pI4/%d)", + __func__, tag, ei_aggr.tag, + &aggr->p.prefix, aggr->p.prefixlen); + + ospf_external_lsa_refresh(ospf, lsa, &ei_aggr, + LSA_REFRESH_FORCE, 1); + } + return lsa; + } + + if (lsa && IS_LSA_MAXAGE(lsa)) { + /* This is special case. + * If a summary route need to be originated but where + * summary route already exist in lsdb with maxage, then + * it need to be refreshed. + */ + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug( + "%s: LSA is in MAX-AGE so refreshing LSA(%pI4/%d)", + __PRETTY_FUNCTION__, &aggr->p.prefix, + aggr->p.prefixlen); + + ospf_external_lsa_refresh(ospf, lsa, &ei_aggr, + LSA_REFRESH_FORCE, 1); + SET_FLAG(aggr->flags, OSPF_EXTERNAL_AGGRT_ORIGINATED); + return lsa; + } + + /* If the external route prefix same as aggregate route + * and if external route is already originated as TYPE-5 + * then it need to be refreshed and originate bit should + * be set. + */ + if (lsa && prefix_same((struct prefix *)&ei_aggr.p, + (struct prefix *)&ei->p)) { + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug( + "%s: External route prefix is same as aggr so refreshing LSA(%pI4/%d)", + __PRETTY_FUNCTION__, &aggr->p.prefix, + aggr->p.prefixlen); + ospf_external_lsa_refresh(ospf, lsa, &ei_aggr, + LSA_REFRESH_FORCE, 1); + SET_FLAG(aggr->flags, OSPF_EXTERNAL_AGGRT_ORIGINATED); + return lsa; + } + + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug("%s: Originate Summary route(%pI4/%d)", __func__, + &aggr->p.prefix, aggr->p.prefixlen); + + /* Originate summary LSA */ + lsa = ospf_external_lsa_originate(ospf, &ei_aggr); + if (lsa) { + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug("%s: Set the origination bit for aggregator", + __func__); + SET_FLAG(aggr->flags, OSPF_EXTERNAL_AGGRT_ORIGINATED); + } + + return lsa; +} +void ospf_unset_all_aggr_flag(struct ospf *ospf) +{ + struct route_node *rn = NULL; + + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug("Unset the origination bit for all aggregator"); + + for (rn = route_top(ospf->rt_aggr_tbl); rn; rn = route_next(rn)) { + if (!rn->info) + continue; + + struct ospf_external_aggr_rt *aggr = rn->info; + + UNSET_FLAG(aggr->flags, OSPF_EXTERNAL_AGGRT_ORIGINATED); + } +} + +static void ospf_delete_all_marked_aggregators(struct ospf *ospf) +{ + struct route_node *rn = NULL; + + /* Loop through all the aggregators, Delete all aggregators + * which are marked as DELETE. Set action to NONE for remaining + * aggregators + */ + for (rn = route_top(ospf->rt_aggr_tbl); rn; rn = route_next(rn)) { + if (!rn->info) + continue; + + struct ospf_external_aggr_rt *aggr = rn->info; + + if (aggr->action != OSPF_ROUTE_AGGR_DEL) { + aggr->action = OSPF_ROUTE_AGGR_NONE; + continue; + } + ospf_external_aggr_delete(ospf, rn); + ospf_external_aggregator_free(aggr); + } +} + +static void ospf_handle_aggregated_exnl_rt(struct ospf *ospf, + struct ospf_external_aggr_rt *aggr, + struct external_info *ei) +{ + struct ospf_lsa *lsa; + struct as_external_lsa *al; + struct in_addr mask; + + /* Handling the case where the external route prefix + * and aggregate prefix is same + * If same dont flush the originated external LSA. + */ + if (prefix_same((struct prefix *)&aggr->p, (struct prefix *)&ei->p)) { + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug( + "%s: External Route prefix same as Aggregator(%pI4/%d), so dont flush.", + __func__, &ei->p.prefix, ei->p.prefixlen); + return; + } + + lsa = ospf_external_info_find_lsa(ospf, &ei->p); + if (lsa) { + al = (struct as_external_lsa *)lsa->data; + masklen2ip(ei->p.prefixlen, &mask); + + if (mask.s_addr != al->mask.s_addr) + return; + + ospf_external_lsa_flush(ospf, ei->type, &ei->p, 0); + } +} + +static void ospf_handle_exnl_rt_after_aggr_del(struct ospf *ospf, + struct external_info *ei) +{ + struct ospf_lsa *lsa; + + /* Process only marked external routes. + * These routes were part of a deleted + * aggregator.So, originate now. + */ + if (!ei->to_be_processed) + return; + + ei->to_be_processed = false; + + lsa = ospf_external_info_find_lsa(ospf, &ei->p); + + if (lsa) + ospf_external_lsa_refresh(ospf, lsa, ei, LSA_REFRESH_FORCE, 0); + else { + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug("%s: Originate external route(%pI4/%d)", + __func__, &ei->p.prefix, ei->p.prefixlen); + + ospf_external_lsa_originate(ospf, ei); + } +} + +static void ospf_handle_external_aggr_add(struct ospf *ospf) +{ + struct external_info *ei; + struct route_node *rn = NULL; + struct route_table *rt = NULL; + int type = 0; + + /* Delete all the aggregators which are marked as + * OSPF_ROUTE_AGGR_DEL. + */ + ospf_delete_all_marked_aggregators(ospf); + + for (type = 0; type <= ZEBRA_ROUTE_MAX; type++) { + struct list *ext_list; + struct listnode *node; + struct ospf_external *ext; + struct ospf_external_aggr_rt *aggr; + + ext_list = ospf->external[type]; + if (!ext_list) + continue; + + for (ALL_LIST_ELEMENTS_RO(ext_list, node, ext)) { + rt = ext->external_info; + if (!rt) + continue; + + for (rn = route_top(rt); rn; rn = route_next(rn)) { + if (!rn->info) + continue; + + ei = rn->info; + if (is_prefix_default(&ei->p)) + continue; + + /* Check the AS-external-LSA + * should be originated. + */ + if (!ospf_redistribute_check(ospf, ei, NULL)) + continue; + + aggr = ospf_external_aggr_match(ospf, &ei->p); + + /* If matching aggregator found, Add + * the external route reference to the + * aggregator and originate the aggr + * route if it is advertisable. + * flush the external LSA if it is + * already originated for this external + * prefix. + */ + if (aggr) { + ospf_originate_summary_lsa(ospf, aggr, + ei); + + /* All aggregated external rts + * are handled here. + */ + ospf_handle_aggregated_exnl_rt( + ospf, aggr, ei); + continue; + } + + /* External routes which are only out + * of aggregation will be handled here. + */ + ospf_handle_exnl_rt_after_aggr_del(ospf, ei); + } + } + } +} + +static void +ospf_aggr_handle_advertise_change(struct ospf *ospf, + struct ospf_external_aggr_rt *aggr, + struct external_info *ei_aggr) +{ + struct ospf_lsa *lsa; + + /* Check if advertise option modified. */ + if (CHECK_FLAG(aggr->flags, OSPF_EXTERNAL_AGGRT_NO_ADVERTISE)) { + + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug( + "%s: Don't originate the summary address,It is configured to not-advertise.", + __func__); + + if (CHECK_FLAG(aggr->flags, OSPF_EXTERNAL_AGGRT_ORIGINATED)) { + + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug( + "%s: No-advertise,So Flush the Aggregate route(%pI4/%d)", + __func__, &aggr->p.prefix, + aggr->p.prefixlen); + + ospf_external_lsa_flush(ospf, 0, &aggr->p, 0); + + UNSET_FLAG(aggr->flags, OSPF_EXTERNAL_AGGRT_ORIGINATED); + } + return; + } + + if (!CHECK_FLAG(aggr->flags, OSPF_EXTERNAL_AGGRT_ORIGINATED)) { + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug("%s: Now it is advatisable", __func__); + + lsa = ospf_external_info_find_lsa(ospf, &ei_aggr->p); + if (lsa && IS_LSA_MAXAGE(lsa)) { + /* This is special case. + * If a summary route need to be originated but where + * summary route already exist in lsdb with maxage, then + * it need to be refreshed. + */ + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug( + "%s: It is already with Maxage, So refresh it (%pI4/%d)", + __func__, &aggr->p.prefix, + aggr->p.prefixlen); + + ospf_external_lsa_refresh(ospf, lsa, ei_aggr, + LSA_REFRESH_FORCE, 1); + + SET_FLAG(aggr->flags, OSPF_EXTERNAL_AGGRT_ORIGINATED); + + } else { + + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug( + "%s: Originate Aggregate LSA (%pI4/%d)", + __func__, &aggr->p.prefix, + aggr->p.prefixlen); + + /* Originate summary LSA */ + lsa = ospf_external_lsa_originate(ospf, ei_aggr); + if (lsa) + SET_FLAG(aggr->flags, + OSPF_EXTERNAL_AGGRT_ORIGINATED); + } + } +} + +static void ospf_handle_external_aggr_update(struct ospf *ospf) +{ + struct route_node *rn = NULL; + + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug("%s: Process modified aggregators.\n", __func__); + + for (rn = route_top(ospf->rt_aggr_tbl); rn; rn = route_next(rn)) { + struct ospf_external_aggr_rt *aggr; + struct ospf_lsa *lsa = NULL; + struct as_external_lsa *asel = NULL; + struct external_info ei_aggr; + route_tag_t tag = 0; + + if (!rn->info) + continue; + + aggr = rn->info; + + if (aggr->action == OSPF_ROUTE_AGGR_DEL) { + aggr->action = OSPF_ROUTE_AGGR_NONE; + ospf_external_aggr_delete(ospf, rn); + + if (OSPF_EXTERNAL_RT_COUNT(aggr)) + hash_clean( + aggr->match_extnl_hash, + (void *)ospf_aggr_handle_external_info); + + hash_free(aggr->match_extnl_hash); + XFREE(MTYPE_OSPF_EXTERNAL_RT_AGGR, aggr); + + } else if (aggr->action == OSPF_ROUTE_AGGR_MODIFY) { + + aggr->action = OSPF_ROUTE_AGGR_NONE; + + /* Prepare the extrenal_info for aggregator */ + memset(&ei_aggr, 0, sizeof(struct external_info)); + ei_aggr.p = aggr->p; + ei_aggr.tag = aggr->tag; + ei_aggr.type = 0; + ei_aggr.instance = ospf->instance; + ei_aggr.route_map_set.metric = -1; + ei_aggr.route_map_set.metric_type = -1; + + /* Check if tag modified */ + if (CHECK_FLAG(aggr->flags, + OSPF_EXTERNAL_AGGRT_ORIGINATED)) { + lsa = ospf_external_info_find_lsa(ospf, + &ei_aggr.p); + if (!lsa) { + flog_warn(EC_OSPF_LSA_MISSING, + "%s: Could not refresh/originate %pI4/%d", + __func__, &aggr->p.prefix, + aggr->p.prefixlen); + continue; + } + + asel = (struct as_external_lsa *)lsa->data; + tag = (unsigned long)ntohl( + asel->e[0].route_tag); + + /* If tag modified , then re-originate the + * route with modified tag details. + */ + if (tag != ei_aggr.tag) { + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug( + "%s: Route tag changed(old:%d new:%d,So refresh the summary route.(%pI4/%d)", + __func__, tag, + ei_aggr.tag, + &aggr->p.prefix, + aggr->p.prefixlen); + + ospf_external_lsa_refresh( + ospf, lsa, &ei_aggr, + LSA_REFRESH_FORCE, 1); + } + } + + /* Advertise option modified ? + * If so, handled it here. + */ + ospf_aggr_handle_advertise_change(ospf, aggr, &ei_aggr); + } + } +} + +static int ospf_asbr_external_aggr_process(struct thread *thread) +{ + struct ospf *ospf = THREAD_ARG(thread); + int operation = 0; + + ospf->t_external_aggr = NULL; + operation = ospf->aggr_action; + + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug("%s: operation:%d\n", __func__, operation); + + switch (operation) { + case OSPF_ROUTE_AGGR_ADD: + ospf_handle_external_aggr_add(ospf); + break; + case OSPF_ROUTE_AGGR_DEL: + case OSPF_ROUTE_AGGR_MODIFY: + ospf_handle_external_aggr_update(ospf); + break; + default: + break; + } + + return OSPF_SUCCESS; +} +static void ospf_external_aggr_timer(struct ospf *ospf, + struct ospf_external_aggr_rt *aggr, + enum ospf_aggr_action_t operation) +{ + aggr->action = operation; + + if (ospf->t_external_aggr) { + if (ospf->aggr_action == OSPF_ROUTE_AGGR_ADD) { + + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug( + "%s: Not required to retsart timer,set is already added.", + __func__); + return; + } + + if (operation == OSPF_ROUTE_AGGR_ADD) { + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug( + "%s, Restarting Aggregator delay timer.", + __func__); + THREAD_OFF(ospf->t_external_aggr); + } + } + + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug("%s: Start Aggregator delay timer %d(in seconds).", + __func__, ospf->aggr_delay_interval); + + ospf->aggr_action = operation; + thread_add_timer(master, ospf_asbr_external_aggr_process, ospf, + ospf->aggr_delay_interval, &ospf->t_external_aggr); +} + +int ospf_asbr_external_aggregator_set(struct ospf *ospf, struct prefix_ipv4 *p, + route_tag_t tag) +{ + struct ospf_external_aggr_rt *aggregator; + + aggregator = ospf_extrenal_aggregator_lookup(ospf, p); + + if (aggregator) { + if (CHECK_FLAG(aggregator->flags, + OSPF_EXTERNAL_AGGRT_NO_ADVERTISE)) + UNSET_FLAG(aggregator->flags, + OSPF_EXTERNAL_AGGRT_NO_ADVERTISE); + else if (aggregator->tag == tag) + return OSPF_SUCCESS; + + aggregator->tag = tag; + + ospf_external_aggr_timer(ospf, aggregator, + OSPF_ROUTE_AGGR_MODIFY); + } else { + aggregator = ospf_external_aggregator_new(p); + if (!aggregator) + return OSPF_FAILURE; + + aggregator->tag = tag; + + ospf_external_aggr_add(ospf, aggregator); + ospf_external_aggr_timer(ospf, aggregator, OSPF_ROUTE_AGGR_ADD); + } + + return OSPF_SUCCESS; +} + +int ospf_asbr_external_aggregator_unset(struct ospf *ospf, + struct prefix_ipv4 *p, route_tag_t tag) +{ + struct route_node *rn; + struct ospf_external_aggr_rt *aggr; + + rn = route_node_lookup(ospf->rt_aggr_tbl, (struct prefix *)p); + if (!rn) + return OSPF_INVALID; + + aggr = rn->info; + + if (tag && (tag != aggr->tag)) + return OSPF_INVALID; + + if (!OSPF_EXTERNAL_RT_COUNT(aggr)) { + ospf_external_aggr_delete(ospf, rn); + ospf_external_aggregator_free(aggr); + return OSPF_SUCCESS; + } + + ospf_external_aggr_timer(ospf, aggr, OSPF_ROUTE_AGGR_DEL); + + return OSPF_SUCCESS; +} + +int ospf_asbr_external_rt_no_advertise(struct ospf *ospf, struct prefix_ipv4 *p) +{ + struct ospf_external_aggr_rt *aggr; + route_tag_t tag = 0; + + aggr = ospf_extrenal_aggregator_lookup(ospf, p); + if (aggr) { + if (CHECK_FLAG(aggr->flags, OSPF_EXTERNAL_AGGRT_NO_ADVERTISE)) + return OSPF_SUCCESS; + + SET_FLAG(aggr->flags, OSPF_EXTERNAL_AGGRT_NO_ADVERTISE); + + aggr->tag = tag; + + if (!OSPF_EXTERNAL_RT_COUNT(aggr)) + return OSPF_SUCCESS; + + ospf_external_aggr_timer(ospf, aggr, OSPF_ROUTE_AGGR_MODIFY); + } else { + aggr = ospf_external_aggregator_new(p); + + if (!aggr) + return OSPF_FAILURE; + + SET_FLAG(aggr->flags, OSPF_EXTERNAL_AGGRT_NO_ADVERTISE); + ospf_external_aggr_add(ospf, aggr); + ospf_external_aggr_timer(ospf, aggr, OSPF_ROUTE_AGGR_ADD); + } + + return OSPF_SUCCESS; +} + +int ospf_asbr_external_rt_advertise(struct ospf *ospf, struct prefix_ipv4 *p) +{ + struct route_node *rn; + struct ospf_external_aggr_rt *aggr; + + rn = route_node_lookup(ospf->rt_aggr_tbl, (struct prefix *)p); + if (!rn) + return OSPF_INVALID; + + aggr = rn->info; + + if (!CHECK_FLAG(aggr->flags, OSPF_EXTERNAL_AGGRT_NO_ADVERTISE)) + return OSPF_INVALID; + + UNSET_FLAG(aggr->flags, OSPF_EXTERNAL_AGGRT_NO_ADVERTISE); + + if (!OSPF_EXTERNAL_RT_COUNT(aggr)) + return OSPF_SUCCESS; + + ospf_external_aggr_timer(ospf, aggr, OSPF_ROUTE_AGGR_MODIFY); + return OSPF_SUCCESS; +} + +int ospf_external_aggregator_timer_set(struct ospf *ospf, unsigned int interval) +{ + ospf->aggr_delay_interval = interval; + return OSPF_SUCCESS; +} diff --git a/ospfd/ospf_asbr.h b/ospfd/ospf_asbr.h index ede6c47906..7759d45455 100644 --- a/ospfd/ospf_asbr.h +++ b/ospfd/ospf_asbr.h @@ -50,8 +50,57 @@ struct external_info { route_tag_t orig_tag; struct route_map_set_values route_map_set; -#define ROUTEMAP_METRIC(E) (E)->route_map_set.metric +#define ROUTEMAP_METRIC(E) (E)->route_map_set.metric #define ROUTEMAP_METRIC_TYPE(E) (E)->route_map_set.metric_type + + /* Back pointer to summary address */ + struct ospf_external_aggr_rt *aggr_route; + + /* To identify the routes to be originated + * after a summary address deletion. + */ + bool to_be_processed; +}; + +#define OSPF_EXTL_AGGR_DEFAULT_DELAY 5 + +#define OSPF_EXTERNAL_RT_COUNT(aggr) \ + (((struct ospf_external_aggr_rt *)aggr)->match_extnl_hash->count) + +enum ospf_aggr_action_t { + OSPF_ROUTE_AGGR_NONE = 0, + OSPF_ROUTE_AGGR_ADD, + OSPF_ROUTE_AGGR_DEL, + OSPF_ROUTE_AGGR_MODIFY +}; + +#define OSPF_SUCCESS 1 +#define OSPF_FAILURE 0 +#define OSPF_INVALID -1 + +#define OSPF_EXTERNAL_AGGRT_NO_ADVERTISE 0x1 +#define OSPF_EXTERNAL_AGGRT_ORIGINATED 0x2 + +/* Data structures for external route aggregator */ +struct ospf_external_aggr_rt { + /* Prefix. */ + struct prefix_ipv4 p; + + /* Bit 1 : Dont advertise. + * Bit 2 : Originated as Type-5 + */ + uint8_t flags; + + /* Tag for summary route */ + route_tag_t tag; + + /* Action to be done at the delay + * timer expairy. + */ + enum ospf_aggr_action_t action; + + /* Hash Table of external routes */ + struct hash *match_extnl_hash; }; #define OSPF_ASBR_CHECK_DELAY 30 @@ -81,4 +130,36 @@ extern void ospf_asbr_route_install_lsa(struct ospf_lsa *); extern struct ospf_lsa *ospf_external_info_find_lsa(struct ospf *, struct prefix_ipv4 *p); +/* External Route Aggregator */ +extern void ospf_asbr_external_aggregator_init(struct ospf *instance); +extern void ospf_external_aggregator_free(struct ospf_external_aggr_rt *aggr); +extern bool is_valid_summary_addr(struct prefix_ipv4 *p); +extern struct ospf_external_aggr_rt * +ospf_external_aggr_match(struct ospf *ospf, struct prefix_ipv4 *p); +extern void ospf_unlink_ei_from_aggr(struct ospf *ospf, + struct ospf_external_aggr_rt *aggr, + struct external_info *ei); +extern struct ospf_lsa * +ospf_originate_summary_lsa(struct ospf *ospf, + struct ospf_external_aggr_rt *aggr, + struct external_info *ei); +extern int ospf_external_aggregator_timer_set(struct ospf *ospf, + unsigned int interval); +extern void ospf_external_aggrigator_free(struct ospf_external_aggr_rt *aggr); + +extern struct ospf_external_aggr_rt * +ospf_extrenal_aggregator_lookup(struct ospf *ospf, struct prefix_ipv4 *p); + +void ospf_unset_all_aggr_flag(struct ospf *ospf); + +extern int ospf_asbr_external_aggregator_set(struct ospf *ospf, + struct prefix_ipv4 *p, + route_tag_t tag); +extern int ospf_asbr_external_aggregator_unset(struct ospf *ospf, + struct prefix_ipv4 *p, + route_tag_t tag); +extern int ospf_asbr_external_rt_no_advertise(struct ospf *ospf, + struct prefix_ipv4 *p); +extern int ospf_asbr_external_rt_advertise(struct ospf *ospf, + struct prefix_ipv4 *p); #endif /* _ZEBRA_OSPF_ASBR_H */ diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index ba045e0418..e15c9c42c7 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -1001,6 +1001,8 @@ static int debug_ospf_lsa_common(struct vty *vty, int arg_base, int argc, DEBUG_ON(lsa, LSA_INSTALL); else if (strmatch(argv[arg_base]->text, "refresh")) DEBUG_ON(lsa, LSA_REFRESH); + else if (strmatch(argv[arg_base]->text, "aggregate")) + DEBUG_ON(lsa, EXTNL_LSA_AGGR); } return CMD_SUCCESS; @@ -1018,6 +1020,8 @@ static int debug_ospf_lsa_common(struct vty *vty, int arg_base, int argc, TERM_DEBUG_ON(lsa, LSA_INSTALL); else if (strmatch(argv[arg_base]->text, "refresh")) TERM_DEBUG_ON(lsa, LSA_REFRESH); + else if (strmatch(argv[arg_base]->text, "aggregate")) + TERM_DEBUG_ON(lsa, EXTNL_LSA_AGGR); } return CMD_SUCCESS; @@ -1025,21 +1029,23 @@ static int debug_ospf_lsa_common(struct vty *vty, int arg_base, int argc, DEFUN (debug_ospf_lsa, debug_ospf_lsa_cmd, - "debug ospf lsa [<generate|flooding|install|refresh>]", + "debug ospf lsa [<generate|flooding|install|refresh|aggregate>]", DEBUG_STR OSPF_STR "OSPF Link State Advertisement\n" "LSA Generation\n" "LSA Flooding\n" "LSA Install/Delete\n" - "LSA Refresh\n") + "LSA Refresh\n" + "External LSA Aggregation\n") { return debug_ospf_lsa_common(vty, 3, argc, argv); } DEFUN (debug_ospf_instance_lsa, debug_ospf_instance_lsa_cmd, - "debug ospf (1-65535) lsa [<generate|flooding|install|refresh>]", + "debug ospf (1-65535) lsa " + "[<generate|flooding|install|refresh|aggregate>]", DEBUG_STR OSPF_STR "Instance ID\n" @@ -1047,7 +1053,8 @@ DEFUN (debug_ospf_instance_lsa, "LSA Generation\n" "LSA Flooding\n" "LSA Install/Delete\n" - "LSA Refresh\n") + "LSA Refresh\n" + "External LSA Aggregation\n") { int idx_number = 2; unsigned short instance = 0; @@ -1075,6 +1082,8 @@ static int no_debug_ospf_lsa_common(struct vty *vty, int arg_base, int argc, DEBUG_OFF(lsa, LSA_INSTALL); else if (strmatch(argv[arg_base]->text, "refresh")) DEBUG_OFF(lsa, LSA_REFRESH); + else if (strmatch(argv[arg_base]->text, "aggregate")) + DEBUG_OFF(lsa, EXTNL_LSA_AGGR); } return CMD_SUCCESS; @@ -1092,6 +1101,8 @@ static int no_debug_ospf_lsa_common(struct vty *vty, int arg_base, int argc, TERM_DEBUG_OFF(lsa, LSA_INSTALL); else if (strmatch(argv[arg_base]->text, "refresh")) TERM_DEBUG_OFF(lsa, LSA_REFRESH); + else if (strmatch(argv[arg_base]->text, "aggregate")) + TERM_DEBUG_OFF(lsa, EXTNL_LSA_AGGR); } return CMD_SUCCESS; @@ -1099,7 +1110,7 @@ static int no_debug_ospf_lsa_common(struct vty *vty, int arg_base, int argc, DEFUN (no_debug_ospf_lsa, no_debug_ospf_lsa_cmd, - "no debug ospf lsa [<generate|flooding|install|refresh>]", + "no debug ospf lsa [<generate|flooding|install|refresh|aggregate>]", NO_STR DEBUG_STR OSPF_STR @@ -1107,14 +1118,16 @@ DEFUN (no_debug_ospf_lsa, "LSA Generation\n" "LSA Flooding\n" "LSA Install/Delete\n" - "LSA Refres\n") + "LSA Refres\n" + "External LSA Aggregation\n") { return no_debug_ospf_lsa_common(vty, 4, argc, argv); } DEFUN (no_debug_ospf_instance_lsa, no_debug_ospf_instance_lsa_cmd, - "no debug ospf (1-65535) lsa [<generate|flooding|install|refresh>]", + "no debug ospf (1-65535) lsa " + "[<generate|flooding|install|refresh|aggregate>]", NO_STR DEBUG_STR OSPF_STR @@ -1123,7 +1136,8 @@ DEFUN (no_debug_ospf_instance_lsa, "LSA Generation\n" "LSA Flooding\n" "LSA Install/Delete\n" - "LSA Refres\n") + "LSA Refres\n" + "External LSA Aggregation\n") { int idx_number = 3; unsigned short instance = 0; diff --git a/ospfd/ospf_dump.h b/ospfd/ospf_dump.h index a2df4ff22c..ea607fef7c 100644 --- a/ospfd/ospf_dump.h +++ b/ospfd/ospf_dump.h @@ -49,6 +49,7 @@ #define OSPF_DEBUG_LSA_INSTALL 0x04 #define OSPF_DEBUG_LSA_REFRESH 0x08 #define OSPF_DEBUG_LSA 0x0F +#define OSPF_DEBUG_EXTNL_LSA_AGGR 0x10 #define OSPF_DEBUG_ZEBRA_INTERFACE 0x01 #define OSPF_DEBUG_ZEBRA_REDISTRIBUTE 0x02 diff --git a/ospfd/ospf_flood.c b/ospfd/ospf_flood.c index 0f43553c01..cb2b7c2365 100644 --- a/ospfd/ospf_flood.c +++ b/ospfd/ospf_flood.c @@ -154,6 +154,9 @@ static void ospf_process_self_originated_lsa(struct ospf *ospf, struct ospf_interface *oi; struct external_info *ei; struct listnode *node; + struct as_external_lsa *al; + struct prefix_ipv4 p; + struct ospf_external_aggr_rt *aggr; if (IS_DEBUG_OSPF_EVENT) zlog_debug( @@ -222,12 +225,51 @@ static void ospf_process_self_originated_lsa(struct ospf *ospf, ospf_translated_nssa_refresh(ospf, NULL, new); return; } + + al = (struct as_external_lsa *)new->data; + p.family = AF_INET; + p.prefixlen = ip_masklen(al->mask); + p.prefix = new->data->id; + ei = ospf_external_info_check(ospf, new); - if (ei) + if (ei) { + if (ospf_external_aggr_match(ospf, &ei->p)) { + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug( + "%s, Matching external aggregate route found for %pI4, so don't refresh it.", + __func__, + &ei->p.prefix); + + /* Aggregated external route shouldn't + * be in LSDB. + */ + if (!IS_LSA_MAXAGE(new)) + ospf_lsa_flush_as(ospf, new); + + return; + } + ospf_external_lsa_refresh(ospf, new, ei, - LSA_REFRESH_FORCE); - else - ospf_lsa_flush_as(ospf, new); + LSA_REFRESH_FORCE, false); + } else { + aggr = (struct ospf_external_aggr_rt *) + ospf_extrenal_aggregator_lookup(ospf, &p); + if (aggr) { + struct external_info ei_aggr; + + memset(&ei_aggr, 0, + sizeof(struct external_info)); + ei_aggr.p = aggr->p; + ei_aggr.tag = aggr->tag; + ei_aggr.instance = ospf->instance; + ei_aggr.route_map_set.metric = -1; + ei_aggr.route_map_set.metric_type = -1; + + ospf_external_lsa_refresh(ospf, new, &ei_aggr, + LSA_REFRESH_FORCE, true); + } else + ospf_lsa_flush_as(ospf, new); + } break; case OSPF_OPAQUE_AREA_LSA: ospf_opaque_lsa_refresh(new); diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c index 9ad7f2c4d7..42fc3288cd 100644 --- a/ospfd/ospf_lsa.c +++ b/ospfd/ospf_lsa.c @@ -1977,10 +1977,6 @@ struct ospf_lsa *ospf_external_lsa_originate(struct ospf *ospf, return NULL; } - /* Check the AS-external-LSA should be originated. */ - if (!ospf_redistribute_check(ospf, ei, NULL)) - return NULL; - /* Create new AS-external-LSA instance. */ if ((new = ospf_external_lsa_new(ospf, ei, NULL)) == NULL) { if (IS_DEBUG_OSPF_EVENT) @@ -2056,6 +2052,7 @@ static struct external_info *ospf_default_external_info(struct ospf *ospf) void ospf_external_lsa_rid_change(struct ospf *ospf) { struct external_info *ei; + struct ospf_external_aggr_rt *aggr; int type; for (type = 0; type < ZEBRA_ROUTE_MAX; type++) { @@ -2087,9 +2084,21 @@ void ospf_external_lsa_rid_change(struct ospf *ospf) (struct prefix_ipv4 *)&ei->p)) continue; - if (!ospf_external_lsa_originate(ospf, ei)) + if (!ospf_redistribute_check(ospf, ei, NULL)) + continue; + + aggr = ospf_external_aggr_match(ospf, &ei->p); + if (aggr) { + if (IS_DEBUG_OSPF(lsa, EXTNL_LSA_AGGR)) + zlog_debug( + "Originate Summary LSA after reset/router-ID change"); + /* Here the LSA is originated as new */ + ospf_originate_summary_lsa(ospf, aggr, + ei); + } else if (!ospf_external_lsa_originate(ospf, + ei)) flog_warn(EC_OSPF_LSA_INSTALL_FAILURE, - "LSA: AS-external-LSA was not originated."); + "LSA: AS-external-LSA was not originated."); } } } @@ -2191,8 +2200,9 @@ void ospf_external_lsa_refresh_default(struct ospf *ospf) if (ei && lsa) { if (IS_DEBUG_OSPF_EVENT) zlog_debug("LSA[Type5:0.0.0.0]: Refresh AS-external-LSA %p", - (void *)lsa); - ospf_external_lsa_refresh(ospf, lsa, ei, LSA_REFRESH_FORCE); + (void *)lsa); + ospf_external_lsa_refresh(ospf, lsa, ei, LSA_REFRESH_FORCE, + false); } else if (ei && !lsa) { if (IS_DEBUG_OSPF_EVENT) zlog_debug( @@ -2225,15 +2235,51 @@ void ospf_external_lsa_refresh_type(struct ospf *ospf, uint8_t type, if (ei) { if (!is_prefix_default(&ei->p)) { struct ospf_lsa *lsa; + struct ospf_external_aggr_rt *aggr; + aggr = ospf_external_aggr_match(ospf, + &ei->p); lsa = ospf_external_info_find_lsa( - ospf, &ei->p); - if (lsa) + ospf, &ei->p); + if (aggr) { + /* Check the AS-external-LSA + * should be originated. + */ + if (!ospf_redistribute_check( + ospf, ei, NULL)) { + + ospf_unlink_ei_from_aggr( + ospf, aggr, ei); + continue; + } + + if (IS_DEBUG_OSPF( + lsa, + EXTNL_LSA_AGGR)) + zlog_debug( + "%s: Send Aggreate LSA (%pFX/%d)", + __func__, + &aggr->p.prefix, + aggr->p.prefixlen); + + ospf_originate_summary_lsa( + ospf, aggr, ei); + + } else if (lsa) { + + if (IS_LSA_MAXAGE(lsa)) + force = LSA_REFRESH_FORCE; + ospf_external_lsa_refresh( - ospf, lsa, ei, force); - else + ospf, lsa, ei, force, + false); + } else { + if (!ospf_redistribute_check( + ospf, ei, NULL)) + continue; ospf_external_lsa_originate( ospf, ei); + } } } } @@ -2243,21 +2289,25 @@ void ospf_external_lsa_refresh_type(struct ospf *ospf, uint8_t type, /* Refresh AS-external-LSA. */ struct ospf_lsa *ospf_external_lsa_refresh(struct ospf *ospf, struct ospf_lsa *lsa, - struct external_info *ei, int force) + struct external_info *ei, int force, + bool is_aggr) { struct ospf_lsa *new; - int changed; + int changed = 0; /* Check the AS-external-LSA should be originated. */ - if (!ospf_redistribute_check(ospf, ei, &changed)) { - if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) - zlog_debug( - "LSA[Type%d:%pI4]: Could not be refreshed, redist check fail", - lsa->data->type, &lsa->data->id); - ospf_external_lsa_flush(ospf, ei->type, &ei->p, - ei->ifindex /*, ei->nexthop */); - return NULL; - } + if (!is_aggr) + if (!ospf_redistribute_check(ospf, ei, &changed)) { + if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) + zlog_debug( + "LSA[Type%d:%s] Could not be refreshed, redist check fail", + lsa->data->type, + inet_ntoa(lsa->data->id)); + + ospf_external_lsa_flush(ospf, ei->type, &ei->p, + ei->ifindex /*, ei->nexthop */); + return NULL; + } if (!changed && !force) { if (IS_DEBUG_OSPF(lsa, LSA_GENERATE)) @@ -3447,7 +3497,11 @@ void ospf_schedule_lsa_flush_area(struct ospf_area *area, struct ospf_lsa *lsa) struct ospf_lsa *ospf_lsa_refresh(struct ospf *ospf, struct ospf_lsa *lsa) { struct external_info *ei; + struct ospf_external_aggr_rt *aggr; struct ospf_lsa *new = NULL; + struct as_external_lsa *al; + struct prefix_ipv4 p; + assert(CHECK_FLAG(lsa->flags, OSPF_LSA_SELF)); assert(IS_LSA_SELF(lsa)); assert(lsa->lock > 0); @@ -3470,14 +3524,37 @@ struct ospf_lsa *ospf_lsa_refresh(struct ospf *ospf, struct ospf_lsa *lsa) /* Translated from NSSA Type-5s are refreshed when * from refresh of Type-7 - do not refresh these directly. */ + + al = (struct as_external_lsa *)lsa->data; + p.family = AF_INET; + p.prefixlen = ip_masklen(al->mask); + p.prefix = lsa->data->id; + if (CHECK_FLAG(lsa->flags, OSPF_LSA_LOCAL_XLT)) break; ei = ospf_external_info_check(ospf, lsa); if (ei) - new = ospf_external_lsa_refresh(ospf, lsa, ei, - LSA_REFRESH_FORCE); - else - ospf_lsa_flush_as(ospf, lsa); + new = ospf_external_lsa_refresh( + ospf, lsa, ei, LSA_REFRESH_FORCE, false); + else { + aggr = (struct ospf_external_aggr_rt *) + ospf_extrenal_aggregator_lookup(ospf, &p); + if (aggr) { + struct external_info ei_aggr; + + memset(&ei_aggr, 0, + sizeof(struct external_info)); + ei_aggr.p = aggr->p; + ei_aggr.tag = aggr->tag; + ei_aggr.instance = ospf->instance; + ei_aggr.route_map_set.metric = -1; + ei_aggr.route_map_set.metric_type = -1; + + ospf_external_lsa_refresh(ospf, lsa, &ei_aggr, + LSA_REFRESH_FORCE, true); + } else + ospf_lsa_flush_as(ospf, lsa); + } break; case OSPF_OPAQUE_LINK_LSA: case OSPF_OPAQUE_AREA_LSA: diff --git a/ospfd/ospf_lsa.h b/ospfd/ospf_lsa.h index e63af4b347..c5de287948 100644 --- a/ospfd/ospf_lsa.h +++ b/ospfd/ospf_lsa.h @@ -313,7 +313,8 @@ extern void ospf_external_lsa_refresh_type(struct ospf *, uint8_t, unsigned short, int); extern struct ospf_lsa *ospf_external_lsa_refresh(struct ospf *, struct ospf_lsa *, - struct external_info *, int); + struct external_info *, int, + bool aggr); extern struct in_addr ospf_lsa_unique_id(struct ospf *, struct ospf_lsdb *, uint8_t, struct prefix_ipv4 *); extern void ospf_schedule_lsa_flood_area(struct ospf_area *, struct ospf_lsa *); diff --git a/ospfd/ospf_memory.c b/ospfd/ospf_memory.c index d102fddf86..ae22cec414 100644 --- a/ospfd/ospf_memory.c +++ b/ospfd/ospf_memory.c @@ -57,3 +57,4 @@ DEFINE_MTYPE(OSPFD, OSPF_PCE_PARAMS, "OSPF PCE parameters") DEFINE_MTYPE(OSPFD, OSPF_EXT_PARAMS, "OSPF Extended parameters") DEFINE_MTYPE(OSPFD, OSPF_SR_PARAMS, "OSPF Segment Routing parameters") DEFINE_MTYPE(OSPFD, OSPF_GR_HELPER, "OSPF Graceful Restart Helper") +DEFINE_MTYPE(OSPFD, OSPF_EXTERNAL_RT_AGGR, "OSPF External Route Summarisation") diff --git a/ospfd/ospf_memory.h b/ospfd/ospf_memory.h index 58f23aa9c7..624b1d3306 100644 --- a/ospfd/ospf_memory.h +++ b/ospfd/ospf_memory.h @@ -56,5 +56,6 @@ DECLARE_MTYPE(OSPF_PCE_PARAMS) DECLARE_MTYPE(OSPF_SR_PARAMS) DECLARE_MTYPE(OSPF_EXT_PARAMS) DECLARE_MTYPE(OSPF_GR_HELPER) +DECLARE_MTYPE(OSPF_EXTERNAL_RT_AGGR) #endif /* _QUAGGA_OSPF_MEMORY_H */ diff --git a/ospfd/ospf_opaque.c b/ospfd/ospf_opaque.c index 5ba61b3184..eb0c4a949a 100644 --- a/ospfd/ospf_opaque.c +++ b/ospfd/ospf_opaque.c @@ -1159,7 +1159,8 @@ void ospf_opaque_config_write_debug(struct vty *vty) return; } -void show_opaque_info_detail(struct vty *vty, struct ospf_lsa *lsa) +void show_opaque_info_detail(struct vty *vty, struct ospf_lsa *lsa, + json_object *json) { struct lsa_header *lsah = lsa->data; uint32_t lsid = ntohl(lsah->id.s_addr); @@ -1169,13 +1170,17 @@ void show_opaque_info_detail(struct vty *vty, struct ospf_lsa *lsa) /* Switch output functionality by vty address. */ if (vty != NULL) { - vty_out(vty, " Opaque-Type %u (%s)\n", opaque_type, - ospf_opaque_type_name(opaque_type)); - vty_out(vty, " Opaque-ID 0x%x\n", opaque_id); - - vty_out(vty, " Opaque-Info: %u octets of data%s\n", - ntohs(lsah->length) - OSPF_LSA_HEADER_SIZE, - VALID_OPAQUE_INFO_LEN(lsah) ? "" : "(Invalid length?)"); + if (!json) { + vty_out(vty, " Opaque-Type %u (%s)\n", opaque_type, + ospf_opaque_type_name(opaque_type)); + vty_out(vty, " Opaque-ID 0x%x\n", opaque_id); + + vty_out(vty, " Opaque-Info: %u octets of data%s\n", + ntohs(lsah->length) - OSPF_LSA_HEADER_SIZE, + VALID_OPAQUE_INFO_LEN(lsah) + ? "" + : "(Invalid length?)"); + } } else { zlog_debug(" Opaque-Type %u (%s)", opaque_type, ospf_opaque_type_name(opaque_type)); @@ -1200,7 +1205,7 @@ void ospf_opaque_lsa_dump(struct stream *s, uint16_t length) struct ospf_lsa lsa; lsa.data = (struct lsa_header *)stream_pnt(s); - show_opaque_info_detail(NULL, &lsa); + show_opaque_info_detail(NULL, &lsa, NULL); return; } diff --git a/ospfd/ospf_opaque.h b/ospfd/ospf_opaque.h index 96155608b2..f02f34c9af 100644 --- a/ospfd/ospf_opaque.h +++ b/ospfd/ospf_opaque.h @@ -24,6 +24,7 @@ #define _ZEBRA_OSPF_OPAQUE_H #include "vty.h" +#include <lib/json.h> #define IS_OPAQUE_LSA(type) \ ((type) == OSPF_OPAQUE_LINK_LSA || (type) == OSPF_OPAQUE_AREA_LSA \ @@ -148,7 +149,8 @@ extern void ospf_opaque_nsm_change(struct ospf_neighbor *nbr, int old_status); extern void ospf_opaque_config_write_router(struct vty *vty, struct ospf *ospf); extern void ospf_opaque_config_write_if(struct vty *vty, struct interface *ifp); extern void ospf_opaque_config_write_debug(struct vty *vty); -extern void show_opaque_info_detail(struct vty *vty, struct ospf_lsa *lsa); +extern void show_opaque_info_detail(struct vty *vty, struct ospf_lsa *lsa, + json_object *json); extern void ospf_opaque_lsa_dump(struct stream *s, uint16_t length); extern void ospf_opaque_lsa_originate_schedule(struct ospf_interface *oi, diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 7e41880bca..28ee4db3a1 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -22,6 +22,7 @@ #include <zebra.h> #include <string.h> +#include "printfrr.h" #include "monotime.h" #include "memory.h" #include "thread.h" @@ -55,6 +56,7 @@ #include "ospfd/ospf_bfd.h" #include "ospfd/ospf_ldp_sync.h" + FRR_CFG_DEFAULT_BOOL(OSPF_LOG_ADJACENCY_CHANGES, { .val_bool = true, .match_profile = "datacenter", }, { .val_bool = false }, @@ -5774,27 +5776,62 @@ DEFUN (show_ip_ospf_instance_neighbor_int_detail, } /* Show functions */ -static int show_lsa_summary(struct vty *vty, struct ospf_lsa *lsa, int self) +static int show_lsa_summary(struct vty *vty, struct ospf_lsa *lsa, int self, + json_object *json_lsa) { struct router_lsa *rl; struct summary_lsa *sl; struct as_external_lsa *asel; struct prefix_ipv4 p; + char buf[PREFIX2STR_BUFFER]; if (lsa != NULL) /* If self option is set, check LSA self flag. */ if (self == 0 || IS_LSA_SELF(lsa)) { - /* LSA common part show. */ - vty_out(vty, "%-15pI4 ", &lsa->data->id); - vty_out(vty, "%-15pI4 %4d 0x%08lx 0x%04x", - &lsa->data->adv_router, LS_AGE(lsa), - (unsigned long)ntohl(lsa->data->ls_seqnum), - ntohs(lsa->data->checksum)); + + if (!json_lsa) { + /* LSA common part show. */ + vty_out(vty, "%-15pI4", + &lsa->data->id); + vty_out(vty, "%-15s %4d 0x%08lx 0x%04x", + inet_ntoa(lsa->data->adv_router), + LS_AGE(lsa), + (unsigned long)ntohl( + lsa->data->ls_seqnum), + ntohs(lsa->data->checksum)); + } else { + char seqnum[10]; + char checksum[10]; + + snprintf(seqnum, sizeof(seqnum), "%x", + ntohl(lsa->data->ls_seqnum)); + snprintf(checksum, sizeof(checksum), "%x", + ntohs(lsa->data->checksum)); + json_object_string_add( + json_lsa, "lsId", + inet_ntoa(lsa->data->id)); + json_object_string_add( + json_lsa, "advertisedRouter", + inet_ntoa(lsa->data->adv_router)); + json_object_int_add(json_lsa, "lsaAge", + LS_AGE(lsa)); + json_object_string_add( + json_lsa, "sequenceNumber", seqnum); + json_object_string_add(json_lsa, "checksum", + checksum); + } + /* LSA specific part show. */ switch (lsa->data->type) { case OSPF_ROUTER_LSA: rl = (struct router_lsa *)lsa->data; - vty_out(vty, " %-d", ntohs(rl->links)); + + if (!json_lsa) + vty_out(vty, " %-d", ntohs(rl->links)); + else + json_object_int_add(json_lsa, + "numOfRouterLinks", + ntohs(rl->links)); break; case OSPF_SUMMARY_LSA: sl = (struct summary_lsa *)lsa->data; @@ -5804,7 +5841,14 @@ static int show_lsa_summary(struct vty *vty, struct ospf_lsa *lsa, int self) p.prefixlen = ip_masklen(sl->mask); apply_mask_ipv4(&p); - vty_out(vty, " %pFX", &p); + if (!json_lsa) + vty_out(vty, " %pFX", &p); + else { + prefix2str(&p, buf, sizeof(buf)); + json_object_string_add(json_lsa, + "summaryAddress", + buf); + } break; case OSPF_AS_EXTERNAL_LSA: case OSPF_AS_NSSA_LSA: @@ -5815,13 +5859,30 @@ static int show_lsa_summary(struct vty *vty, struct ospf_lsa *lsa, int self) p.prefixlen = ip_masklen(asel->mask); apply_mask_ipv4(&p); - vty_out(vty, " %s %pFX [0x%lx]", - IS_EXTERNAL_METRIC(asel->e[0].tos) - ? "E2" - : "E1", - &p, - (unsigned long)ntohl( - asel->e[0].route_tag)); + if (!json_lsa) + vty_out(vty, " %s %pFX [0x%lx]", + IS_EXTERNAL_METRIC( + asel->e[0].tos) + ? "E2" + : "E1", + &p, + (unsigned long)ntohl( + asel->e[0].route_tag)); + else { + prefix2str(&p, buf, sizeof(buf)); + json_object_string_add( + json_lsa, "metricType", + IS_EXTERNAL_METRIC( + asel->e[0].tos) + ? "E2" + : "E1"); + json_object_string_add(json_lsa, + "route", buf); + json_object_int_add( + json_lsa, "tag", + (unsigned long)ntohl( + asel->e[0].route_tag)); + } break; case OSPF_NETWORK_LSA: case OSPF_ASBR_SUMMARY_LSA: @@ -5831,7 +5892,9 @@ static int show_lsa_summary(struct vty *vty, struct ospf_lsa *lsa, int self) default: break; } - vty_out(vty, "\n"); + + if (!json_lsa) + vty_out(vty, "\n"); } return 0; @@ -5852,6 +5915,21 @@ static const char *const show_database_desc[] = { "AS-external Opaque-LSA", }; +static const char * const show_database_desc_json[] = { + "unknown", + "routerLinkStates", + "networkLinkStates", + "summaryLinkStates", + "asbrSummaryLinkStates", + "asExternalLinkStates", + "groupMembershipLsa", + "nssaExternalLinkStates", + "type8Lsa", + "linkLocalOpaqueLsa", + "areaLocalOpaqueLsa", + "asExternalOpaqueLsa", +}; + static const char *const show_database_header[] = { "", "Link ID ADV Router Age Seq# CkSum Link count", @@ -5867,41 +5945,97 @@ static const char *const show_database_header[] = { "Opaque-Type/Id ADV Router Age Seq# CkSum", }; -static void show_ip_ospf_database_header(struct vty *vty, struct ospf_lsa *lsa) +static void show_ip_ospf_database_header(struct vty *vty, struct ospf_lsa *lsa, + json_object *json) { struct router_lsa *rlsa = (struct router_lsa *)lsa->data; - vty_out(vty, " LS age: %d\n", LS_AGE(lsa)); - vty_out(vty, " Options: 0x%-2x : %s\n", lsa->data->options, - ospf_options_dump(lsa->data->options)); - vty_out(vty, " LS Flags: 0x%-2x %s\n", lsa->flags, - ((lsa->flags & OSPF_LSA_LOCAL_XLT) ? "(Translated from Type-7)" - : "")); - - if (lsa->data->type == OSPF_ROUTER_LSA) { - vty_out(vty, " Flags: 0x%x", rlsa->flags); - - if (rlsa->flags) - vty_out(vty, " :%s%s%s%s", - IS_ROUTER_LSA_BORDER(rlsa) ? " ABR" : "", - IS_ROUTER_LSA_EXTERNAL(rlsa) ? " ASBR" : "", - IS_ROUTER_LSA_VIRTUAL(rlsa) ? " VL-endpoint" - : "", - IS_ROUTER_LSA_SHORTCUT(rlsa) ? " Shortcut" - : ""); + if (!json) { + vty_out(vty, " LS age: %d\n", LS_AGE(lsa)); + vty_out(vty, " Options: 0x%-2x : %s\n", lsa->data->options, + ospf_options_dump(lsa->data->options)); + vty_out(vty, " LS Flags: 0x%-2x %s\n", lsa->flags, + ((lsa->flags & OSPF_LSA_LOCAL_XLT) + ? "(Translated from Type-7)" + : "")); + + if (lsa->data->type == OSPF_ROUTER_LSA) { + vty_out(vty, " Flags: 0x%x", rlsa->flags); + + if (rlsa->flags) + vty_out(vty, " :%s%s%s%s", + IS_ROUTER_LSA_BORDER(rlsa) ? " ABR" + : "", + IS_ROUTER_LSA_EXTERNAL(rlsa) ? " ASBR" + : "", + IS_ROUTER_LSA_VIRTUAL(rlsa) + ? " VL-endpoint" + : "", + IS_ROUTER_LSA_SHORTCUT(rlsa) + ? " Shortcut" + : ""); - vty_out(vty, "\n"); + vty_out(vty, "\n"); + } + vty_out(vty, " LS Type: %s\n", + lookup_msg(ospf_lsa_type_msg, lsa->data->type, NULL)); + vty_out(vty, " Link State ID: %pI4 %s\n", + &lsa->data->id, + lookup_msg(ospf_link_state_id_type_msg, lsa->data->type, + NULL)); + vty_out(vty, " Advertising Router: %pI4\n", + &lsa->data->adv_router); + vty_out(vty, " LS Seq Number: %08lx\n", + (unsigned long)ntohl(lsa->data->ls_seqnum)); + vty_out(vty, " Checksum: 0x%04x\n", + ntohs(lsa->data->checksum)); + vty_out(vty, " Length: %d\n\n", ntohs(lsa->data->length)); + } else { + char seqnum[10]; + char checksum[10]; + + snprintf(seqnum, 10, "%x", ntohl(lsa->data->ls_seqnum)); + snprintf(checksum, 10, "%x", ntohs(lsa->data->checksum)); + + json_object_int_add(json, "lsaAge", LS_AGE(lsa)); + json_object_string_add(json, "options", + ospf_options_dump(lsa->data->options)); + json_object_int_add(json, "lsaFlags", lsa->flags); + + if (lsa->flags & OSPF_LSA_LOCAL_XLT) + json_object_boolean_true_add(json, + "translatedFromType7"); + + if (lsa->data->type == OSPF_ROUTER_LSA) { + json_object_int_add(json, "flags", rlsa->flags); + + if (rlsa->flags) { + if (IS_ROUTER_LSA_BORDER(rlsa)) + json_object_boolean_true_add(json, + "abr"); + if (IS_ROUTER_LSA_EXTERNAL(rlsa)) + json_object_boolean_true_add(json, + "asbr"); + if (IS_ROUTER_LSA_VIRTUAL(rlsa)) + json_object_boolean_true_add( + json, "vlEndpoint"); + if (IS_ROUTER_LSA_SHORTCUT(rlsa)) + json_object_boolean_true_add( + json, "shortcut"); + } + } + + json_object_string_add( + json, "lsaType", + lookup_msg(ospf_lsa_type_msg, lsa->data->type, NULL)); + json_object_string_add(json, "linkStateId", + inet_ntoa(lsa->data->id)); + json_object_string_add(json, "advertisingRouter", + inet_ntoa(lsa->data->adv_router)); + json_object_string_add(json, "lsaSeqNumber", seqnum); + json_object_string_add(json, "checksum", checksum); + json_object_int_add(json, "length", ntohs(lsa->data->length)); } - vty_out(vty, " LS Type: %s\n", - lookup_msg(ospf_lsa_type_msg, lsa->data->type, NULL)); - vty_out(vty, " Link State ID: %pI4 %s\n", &lsa->data->id, - lookup_msg(ospf_link_state_id_type_msg, lsa->data->type, NULL)); - vty_out(vty, " Advertising Router: %pI4\n", - &lsa->data->adv_router); - vty_out(vty, " LS Seq Number: %08lx\n", - (unsigned long)ntohl(lsa->data->ls_seqnum)); - vty_out(vty, " Checksum: 0x%04x\n", ntohs(lsa->data->checksum)); - vty_out(vty, " Length: %d\n\n", ntohs(lsa->data->length)); } static const char *const link_type_desc[] = { @@ -5922,128 +6056,240 @@ static const char *const link_data_desc[] = { "Network Mask", "Router Interface address", }; +static const char *const link_id_desc_json[] = { + "null", "neighborRouterId", "designatedRouterAddress", + "networkAddress", "neighborRouterId", +}; + +static const char *const link_data_desc_json[] = { + "null", "routerInterfaceAddress", "routerInterfaceAddress", + "networkMask", "routerInterfaceAddress", +}; + /* Show router-LSA each Link information. */ static void show_ip_ospf_database_router_links(struct vty *vty, - struct router_lsa *rl) + struct router_lsa *rl, + json_object *json) { int len, type; - unsigned int i; + unsigned short i; + json_object *json_links = NULL; + json_object *json_link = NULL; + int metric = 0; + + if (json) + json_links = json_object_new_object(); len = ntohs(rl->header.length) - 4; for (i = 0; i < ntohs(rl->links) && len > 0; len -= 12, i++) { type = rl->link[i].type; - vty_out(vty, " Link connected to: %s\n", - link_type_desc[type]); - vty_out(vty, " (Link ID) %s: %pI4\n", link_id_desc[type], - &rl->link[i].link_id); - vty_out(vty, " (Link Data) %s: %pI4\n", - link_data_desc[type], &rl->link[i].link_data); - vty_out(vty, " Number of TOS metrics: 0\n"); - vty_out(vty, " TOS 0 Metric: %d\n", - ntohs(rl->link[i].metric)); - vty_out(vty, "\n"); + if (json) { + char link[16]; + + snprintf(link, sizeof(link), "link%u", i); + json_link = json_object_new_object(); + json_object_string_add(json_link, "linkType", + link_type_desc[type]); + json_object_string_add(json_link, + link_id_desc_json[type], + inet_ntoa(rl->link[i].link_id)); + json_object_string_add( + json_link, link_data_desc_json[type], + inet_ntoa(rl->link[i].link_data)); + json_object_int_add(json_link, "numOfTosMetrics", + metric); + json_object_int_add(json_link, "tos0Metric", + ntohs(rl->link[i].metric)); + json_object_object_add(json_links, link, json_link); + } else { + vty_out(vty, " Link connected to: %s\n", + link_type_desc[type]); + vty_out(vty, " (Link ID) %s: %pI4\n", + link_id_desc[type], + &rl->link[i].link_id); + vty_out(vty, " (Link Data) %s: %pI4\n", + link_data_desc[type], + &rl->link[i].link_data); + vty_out(vty, " Number of TOS metrics: 0\n"); + vty_out(vty, " TOS 0 Metric: %d\n", + ntohs(rl->link[i].metric)); + vty_out(vty, "\n"); + } } + if (json) + json_object_object_add(json, "routerLinks", json_links); } /* Show router-LSA detail information. */ -static int show_router_lsa_detail(struct vty *vty, struct ospf_lsa *lsa) +static int show_router_lsa_detail(struct vty *vty, struct ospf_lsa *lsa, + json_object *json) { if (lsa != NULL) { struct router_lsa *rl = (struct router_lsa *)lsa->data; - show_ip_ospf_database_header(vty, lsa); + show_ip_ospf_database_header(vty, lsa, json); - vty_out(vty, " Number of Links: %d\n\n", ntohs(rl->links)); + if (!json) + vty_out(vty, " Number of Links: %d\n\n", + ntohs(rl->links)); + else + json_object_int_add(json, "numOfLinks", + ntohs(rl->links)); - show_ip_ospf_database_router_links(vty, rl); - vty_out(vty, "\n"); + show_ip_ospf_database_router_links(vty, rl, json); + + if (!json) + vty_out(vty, "\n"); } return 0; } /* Show network-LSA detail information. */ -static int show_network_lsa_detail(struct vty *vty, struct ospf_lsa *lsa) +static int show_network_lsa_detail(struct vty *vty, struct ospf_lsa *lsa, + json_object *json) { int length, i; + json_object *json_attached_rt = NULL; + json_object *json_router = NULL; + + if (json) + json_attached_rt = json_object_new_object(); if (lsa != NULL) { struct network_lsa *nl = (struct network_lsa *)lsa->data; - show_ip_ospf_database_header(vty, lsa); + show_ip_ospf_database_header(vty, lsa, json); - vty_out(vty, " Network Mask: /%d\n", ip_masklen(nl->mask)); + if (!json) + vty_out(vty, " Network Mask: /%d\n", + ip_masklen(nl->mask)); + else + json_object_int_add(json, "networkMask", + ip_masklen(nl->mask)); length = ntohs(lsa->data->length) - OSPF_LSA_HEADER_SIZE - 4; for (i = 0; length > 0; i++, length -= 4) - vty_out(vty, " Attached Router: %pI4\n", - &nl->routers[i]); - - vty_out(vty, "\n"); + if (!json) { + vty_out(vty, " Attached Router: %pI4\n", + &nl->routers[i]); + vty_out(vty, "\n"); + } else { + json_router = json_object_new_object(); + json_object_string_add( + json_router, "attachedRouterId", + inet_ntoa(nl->routers[i])); + json_object_object_add( + json_attached_rt, + inet_ntoa(nl->routers[i]), json_router); + } } + if (json) + json_object_object_add(json, "attchedRouters", + json_attached_rt); + return 0; } /* Show summary-LSA detail information. */ -static int show_summary_lsa_detail(struct vty *vty, struct ospf_lsa *lsa) +static int show_summary_lsa_detail(struct vty *vty, struct ospf_lsa *lsa, + json_object *json) { if (lsa != NULL) { struct summary_lsa *sl = (struct summary_lsa *)lsa->data; - show_ip_ospf_database_header(vty, lsa); + show_ip_ospf_database_header(vty, lsa, json); - vty_out(vty, " Network Mask: /%d\n", ip_masklen(sl->mask)); - vty_out(vty, " TOS: 0 Metric: %d\n", - GET_METRIC(sl->metric)); - vty_out(vty, "\n"); + if (!json) { + vty_out(vty, " Network Mask: /%d\n", + ip_masklen(sl->mask)); + vty_out(vty, " TOS: 0 Metric: %d\n", + GET_METRIC(sl->metric)); + vty_out(vty, "\n"); + } else { + json_object_int_add(json, "networkMask", + ip_masklen(sl->mask)); + json_object_int_add(json, "tos0Metric", + GET_METRIC(sl->metric)); + } } return 0; } /* Show summary-ASBR-LSA detail information. */ -static int show_summary_asbr_lsa_detail(struct vty *vty, struct ospf_lsa *lsa) +static int show_summary_asbr_lsa_detail(struct vty *vty, struct ospf_lsa *lsa, + json_object *json) { if (lsa != NULL) { struct summary_lsa *sl = (struct summary_lsa *)lsa->data; - show_ip_ospf_database_header(vty, lsa); + show_ip_ospf_database_header(vty, lsa, json); - vty_out(vty, " Network Mask: /%d\n", ip_masklen(sl->mask)); - vty_out(vty, " TOS: 0 Metric: %d\n", - GET_METRIC(sl->metric)); - vty_out(vty, "\n"); + if (!json) { + vty_out(vty, " Network Mask: /%d\n", + ip_masklen(sl->mask)); + vty_out(vty, " TOS: 0 Metric: %d\n", + GET_METRIC(sl->metric)); + vty_out(vty, "\n"); + } else { + json_object_int_add(json, "networkMask", + ip_masklen(sl->mask)); + json_object_int_add(json, "tos0Metric", + GET_METRIC(sl->metric)); + } } return 0; } /* Show AS-external-LSA detail information. */ -static int show_as_external_lsa_detail(struct vty *vty, struct ospf_lsa *lsa) +static int show_as_external_lsa_detail(struct vty *vty, struct ospf_lsa *lsa, + json_object *json) { + int tos = 0; + if (lsa != NULL) { struct as_external_lsa *al = (struct as_external_lsa *)lsa->data; - show_ip_ospf_database_header(vty, lsa); - - vty_out(vty, " Network Mask: /%d\n", ip_masklen(al->mask)); - vty_out(vty, " Metric Type: %s\n", - IS_EXTERNAL_METRIC(al->e[0].tos) - ? "2 (Larger than any link state path)" - : "1"); - vty_out(vty, " TOS: 0\n"); - vty_out(vty, " Metric: %d\n", - GET_METRIC(al->e[0].metric)); - vty_out(vty, " Forward Address: %pI4\n", - &al->e[0].fwd_addr); - - vty_out(vty, - " External Route Tag: %" ROUTE_TAG_PRI "\n\n", - (route_tag_t)ntohl(al->e[0].route_tag)); + show_ip_ospf_database_header(vty, lsa, json); + + if (!json) { + vty_out(vty, " Network Mask: /%d\n", + ip_masklen(al->mask)); + vty_out(vty, " Metric Type: %s\n", + IS_EXTERNAL_METRIC(al->e[0].tos) + ? "2 (Larger than any link state path)" + : "1"); + vty_out(vty, " TOS: 0\n"); + vty_out(vty, " Metric: %d\n", + GET_METRIC(al->e[0].metric)); + vty_out(vty, " Forward Address: %pI4\n", + &al->e[0].fwd_addr); + vty_out(vty, + " External Route Tag: %" ROUTE_TAG_PRI "\n\n", + (route_tag_t)ntohl(al->e[0].route_tag)); + } else { + json_object_int_add(json, "networkMask", + ip_masklen(al->mask)); + json_object_string_add( + json, "metricType", + IS_EXTERNAL_METRIC(al->e[0].tos) + ? "E2 (Larger than any link state path)" + : "E1"); + json_object_int_add(json, "tos", tos); + json_object_int_add(json, "metric", + GET_METRIC(al->e[0].metric)); + json_object_string_add(json, "forwardAddress", + inet_ntoa(al->e[0].fwd_addr)); + json_object_int_add( + json, "externalRouteTag", + (route_tag_t)ntohl(al->e[0].route_tag)); + } } return 0; @@ -6074,50 +6320,74 @@ show_as_external_lsa_stdvty (struct ospf_lsa *lsa) } #endif /* Show AS-NSSA-LSA detail information. */ -static int show_as_nssa_lsa_detail(struct vty *vty, struct ospf_lsa *lsa) +static int show_as_nssa_lsa_detail(struct vty *vty, struct ospf_lsa *lsa, + json_object *json) { + int tos = 0; + if (lsa != NULL) { struct as_external_lsa *al = (struct as_external_lsa *)lsa->data; - show_ip_ospf_database_header(vty, lsa); - - vty_out(vty, " Network Mask: /%d\n", ip_masklen(al->mask)); - vty_out(vty, " Metric Type: %s\n", - IS_EXTERNAL_METRIC(al->e[0].tos) - ? "2 (Larger than any link state path)" - : "1"); - vty_out(vty, " TOS: 0\n"); - vty_out(vty, " Metric: %d\n", - GET_METRIC(al->e[0].metric)); - vty_out(vty, " NSSA: Forward Address: %pI4\n", - &al->e[0].fwd_addr); - - vty_out(vty, - " External Route Tag: %" ROUTE_TAG_PRI "\n\n", - (route_tag_t)ntohl(al->e[0].route_tag)); + show_ip_ospf_database_header(vty, lsa, json); + + if (!json) { + vty_out(vty, " Network Mask: /%d\n", + ip_masklen(al->mask)); + vty_out(vty, " Metric Type: %s\n", + IS_EXTERNAL_METRIC(al->e[0].tos) + ? "2 (Larger than any link state path)" + : "1"); + vty_out(vty, " TOS: 0\n"); + vty_out(vty, " Metric: %d\n", + GET_METRIC(al->e[0].metric)); + vty_out(vty, " NSSA: Forward Address: %pI4\n", + &al->e[0].fwd_addr); + vty_out(vty, + " External Route Tag: %" ROUTE_TAG_PRI + "\n\n", + (route_tag_t)ntohl(al->e[0].route_tag)); + } else { + json_object_int_add(json, "networkMask", + ip_masklen(al->mask)); + json_object_string_add( + json, "metricType", + IS_EXTERNAL_METRIC(al->e[0].tos) + ? "E2 (Larger than any link state path)" + : "E1"); + json_object_int_add(json, "tos", tos); + json_object_int_add(json, "metric", + GET_METRIC(al->e[0].metric)); + json_object_string_add(json, "nssaForwardAddress", + inet_ntoa(al->e[0].fwd_addr)); + json_object_int_add( + json, "externalRouteTag", + (route_tag_t)ntohl(al->e[0].route_tag)); + } } return 0; } -static int show_func_dummy(struct vty *vty, struct ospf_lsa *lsa) +static int show_func_dummy(struct vty *vty, struct ospf_lsa *lsa, + json_object *json) { return 0; } -static int show_opaque_lsa_detail(struct vty *vty, struct ospf_lsa *lsa) +static int show_opaque_lsa_detail(struct vty *vty, struct ospf_lsa *lsa, + json_object *json) { if (lsa != NULL) { - show_ip_ospf_database_header(vty, lsa); - show_opaque_info_detail(vty, lsa); - - vty_out(vty, "\n"); + show_ip_ospf_database_header(vty, lsa, json); + show_opaque_info_detail(vty, lsa, json); + if (!json) + vty_out(vty, "\n"); } return 0; } -int (*const show_function[])(struct vty *, struct ospf_lsa *) = { +int (*show_function[])(struct vty *, struct ospf_lsa *, json_object *) = { NULL, show_router_lsa_detail, show_network_lsa_detail, @@ -6150,11 +6420,13 @@ static void show_lsa_prefix_set(struct vty *vty, struct prefix_ls *lp, } static void show_lsa_detail_proc(struct vty *vty, struct route_table *rt, - struct in_addr *id, struct in_addr *adv_router) + struct in_addr *id, struct in_addr *adv_router, + json_object *json) { struct prefix_ls lp; struct route_node *rn, *start; struct ospf_lsa *lsa; + json_object *json_lsa = NULL; show_lsa_prefix_set(vty, &lp, id, adv_router); start = route_node_get(rt, (struct prefix *)&lp); @@ -6162,9 +6434,14 @@ static void show_lsa_detail_proc(struct vty *vty, struct route_table *rt, route_lock_node(start); for (rn = start; rn; rn = route_next_until(rn, start)) if ((lsa = rn->info)) { + if (json) { + json_lsa = json_object_new_object(); + json_object_array_add(json, json_lsa); + } + if (show_function[lsa->data->type] != NULL) - show_function[lsa->data->type](vty, - lsa); + show_function[lsa->data->type]( + vty, lsa, json_lsa); } route_unlock_node(start); } @@ -6173,25 +6450,62 @@ static void show_lsa_detail_proc(struct vty *vty, struct route_table *rt, /* Show detail LSA information -- if id is NULL then show all LSAs. */ static void show_lsa_detail(struct vty *vty, struct ospf *ospf, int type, - struct in_addr *id, struct in_addr *adv_router) + struct in_addr *id, struct in_addr *adv_router, + json_object *json) { struct listnode *node; struct ospf_area *area; + json_object *json_lsa_type = NULL; + json_object *json_areas = NULL; + json_object *json_lsa_array = NULL; + + if (json) + json_lsa_type = json_object_new_object(); switch (type) { case OSPF_AS_EXTERNAL_LSA: case OSPF_OPAQUE_AS_LSA: - vty_out(vty, " %s \n\n", - show_database_desc[type]); - show_lsa_detail_proc(vty, AS_LSDB(ospf, type), id, adv_router); + if (!json) + vty_out(vty, " %s \n\n", + show_database_desc[type]); + else + json_lsa_array = json_object_new_array(); + + show_lsa_detail_proc(vty, AS_LSDB(ospf, type), id, adv_router, + json_lsa_array); + if (json) + json_object_object_add(json, + show_database_desc_json[type], + json_lsa_array); + break; default: + if (json) + json_areas = json_object_new_object(); + for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, area)) { - vty_out(vty, "\n %s (Area %s)\n\n", - show_database_desc[type], - ospf_area_desc_string(area)); + if (!json) { + vty_out(vty, + "\n %s (Area %s)\n\n", + show_database_desc[type], + ospf_area_desc_string(area)); + } else { + json_lsa_array = json_object_new_array(); + json_object_object_add(json_areas, + inet_ntoa(area->area_id), + json_lsa_array); + } + show_lsa_detail_proc(vty, AREA_LSDB(area, type), id, - adv_router); + adv_router, json_lsa_array); + } + + if (json) { + json_object_object_add(json_lsa_type, "areas", + json_areas); + json_object_object_add(json, + show_database_desc_json[type], + json_lsa_type); } break; } @@ -6199,60 +6513,104 @@ static void show_lsa_detail(struct vty *vty, struct ospf *ospf, int type, static void show_lsa_detail_adv_router_proc(struct vty *vty, struct route_table *rt, - struct in_addr *adv_router) + struct in_addr *adv_router, + json_object *json) { struct route_node *rn; struct ospf_lsa *lsa; for (rn = route_top(rt); rn; rn = route_next(rn)) - if ((lsa = rn->info)) + if ((lsa = rn->info)) { + json_object *json_lsa = NULL; + if (IPV4_ADDR_SAME(adv_router, &lsa->data->adv_router)) { if (CHECK_FLAG(lsa->flags, OSPF_LSA_LOCAL_XLT)) continue; + if (json) + json_lsa = json_object_new_object(); + if (show_function[lsa->data->type] != NULL) - show_function[lsa->data->type](vty, - lsa); + show_function[lsa->data->type]( + vty, lsa, json_lsa); + if (json) + json_object_object_add( + json, inet_ntoa(lsa->data->id), + json_lsa); } + } } /* Show detail LSA information. */ static void show_lsa_detail_adv_router(struct vty *vty, struct ospf *ospf, - int type, struct in_addr *adv_router) + int type, struct in_addr *adv_router, + json_object *json) { struct listnode *node; struct ospf_area *area; + json_object *json_lstype = NULL; + json_object *json_area = NULL; + + if (json) + json_lstype = json_object_new_object(); switch (type) { case OSPF_AS_EXTERNAL_LSA: case OSPF_OPAQUE_AS_LSA: - vty_out(vty, " %s \n\n", - show_database_desc[type]); + if (!json) + vty_out(vty, " %s \n\n", + show_database_desc[type]); + show_lsa_detail_adv_router_proc(vty, AS_LSDB(ospf, type), - adv_router); + adv_router, json_lstype); break; default: + for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, area)) { - vty_out(vty, "\n %s (Area %s)\n\n", - show_database_desc[type], - ospf_area_desc_string(area)); - show_lsa_detail_adv_router_proc( - vty, AREA_LSDB(area, type), adv_router); + if (json) + json_area = json_object_new_object(); + else + vty_out(vty, + "\n %s (Area %s)\n\n", + show_database_desc[type], + ospf_area_desc_string(area)); + show_lsa_detail_adv_router_proc(vty, + AREA_LSDB(area, type), + adv_router, json_area); + + if (json) + json_object_object_add(json_lstype, + inet_ntoa(area->area_id), + json_area); } break; } + + if (json) + json_object_object_add(json, show_database_desc[type], + json_lstype); } static void show_ip_ospf_database_summary(struct vty *vty, struct ospf *ospf, - int self) + int self, json_object *json) { struct ospf_lsa *lsa; struct route_node *rn; struct ospf_area *area; struct listnode *node; + json_object *json_areas = NULL; + json_object *json_area = NULL; + json_object *json_lsa = NULL; int type; + json_object *json_lsa_array = NULL; + + if (json) + json_areas = json_object_new_object(); for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, area)) { + if (json) + json_area = json_object_new_object(); + for (type = OSPF_MIN_LSA; type < OSPF_MAX_LSA; type++) { switch (type) { case OSPF_AS_EXTERNAL_LSA: @@ -6264,20 +6622,49 @@ static void show_ip_ospf_database_summary(struct vty *vty, struct ospf *ospf, if (ospf_lsdb_count_self(area->lsdb, type) > 0 || (!self && ospf_lsdb_count(area->lsdb, type) > 0)) { - vty_out(vty, " %s (Area %s)\n\n", - show_database_desc[type], - ospf_area_desc_string(area)); - vty_out(vty, "%s\n", - show_database_header[type]); - LSDB_LOOP (AREA_LSDB(area, type), rn, lsa) - show_lsa_summary(vty, lsa, self); + if (!json) { + vty_out(vty, + " %s (Area %s)\n\n", + show_database_desc[type], + ospf_area_desc_string(area)); + vty_out(vty, "%s\n", + show_database_header[type]); + } else { + json_lsa_array = + json_object_new_array(); + json_object_object_add( + json_area, + show_database_desc_json[type], + json_lsa_array); + } + + LSDB_LOOP (AREA_LSDB(area, type), rn, lsa) { + if (json) { + json_lsa = + json_object_new_object(); + json_object_array_add( + json_lsa_array, + json_lsa); + } + + show_lsa_summary(vty, lsa, self, + json_lsa); + } - vty_out(vty, "\n"); + if (!json) + vty_out(vty, "\n"); } } + if (json) + json_object_object_add(json_areas, + inet_ntoa(area->area_id), + json_area); } + if (json) + json_object_object_add(json, "areas", json_areas); + for (type = OSPF_MIN_LSA; type < OSPF_MAX_LSA; type++) { switch (type) { case OSPF_AS_EXTERNAL_LSA: @@ -6288,39 +6675,82 @@ static void show_ip_ospf_database_summary(struct vty *vty, struct ospf *ospf, } if (ospf_lsdb_count_self(ospf->lsdb, type) || (!self && ospf_lsdb_count(ospf->lsdb, type))) { - vty_out(vty, " %s\n\n", - show_database_desc[type]); - vty_out(vty, "%s\n", show_database_header[type]); + if (!json) { + vty_out(vty, " %s\n\n", + show_database_desc[type]); + vty_out(vty, "%s\n", + show_database_header[type]); + } else { + json_lsa_array = json_object_new_array(); + json_object_object_add( + json, show_database_desc_json[type], + json_lsa_array); + } - LSDB_LOOP (AS_LSDB(ospf, type), rn, lsa) - show_lsa_summary(vty, lsa, self); + LSDB_LOOP (AS_LSDB(ospf, type), rn, lsa) { + if (json) { + json_lsa = json_object_new_object(); + json_object_array_add(json_lsa_array, + json_lsa); + } - vty_out(vty, "\n"); + show_lsa_summary(vty, lsa, self, json_lsa); + } + + if (!json) + vty_out(vty, "\n"); } } - vty_out(vty, "\n"); + if (!json) + vty_out(vty, "\n"); } -static void show_ip_ospf_database_maxage(struct vty *vty, struct ospf *ospf) +static void show_ip_ospf_database_maxage(struct vty *vty, struct ospf *ospf, + json_object *json) { struct route_node *rn; + json_object *json_maxage = NULL; - vty_out(vty, "\n MaxAge Link States:\n\n"); + if (!json) + vty_out(vty, "\n MaxAge Link States:\n\n"); + else + json_maxage = json_object_new_object(); for (rn = route_top(ospf->maxage_lsa); rn; rn = route_next(rn)) { struct ospf_lsa *lsa; + json_object *json_lsa = NULL; if ((lsa = rn->info) != NULL) { - vty_out(vty, "Link type: %d\n", lsa->data->type); - vty_out(vty, "Link State ID: %pI4\n", - &lsa->data->id); - vty_out(vty, "Advertising Router: %pI4\n", - &lsa->data->adv_router); - vty_out(vty, "LSA lock count: %d\n", lsa->lock); - vty_out(vty, "\n"); + if (!json) { + vty_out(vty, "Link type: %d\n", + lsa->data->type); + vty_out(vty, "Link State ID: %s\n", + inet_ntoa(lsa->data->id)); + vty_out(vty, "Advertising Router: %pI4\n", + &lsa->data->adv_router); + vty_out(vty, "LSA lock count: %d\n", lsa->lock); + vty_out(vty, "\n"); + } else { + json_lsa = json_object_new_object(); + json_object_int_add(json_lsa, "linkType", + lsa->data->type); + json_object_string_add( + json_lsa, "linkStateId", + inet_ntoa(lsa->data->id)); + json_object_string_add( + json_lsa, "advertisingRouter", + inet_ntoa(lsa->data->adv_router)); + json_object_int_add(json_lsa, "lsaLockCount", + lsa->lock); + json_object_object_add(json_maxage, + inet_ntoa(lsa->data->id), + json_lsa); + } } } + if (json) + json_object_object_add(json, "maxAgeLinkStates", json_maxage); } #define OSPF_LSA_TYPE_NSSA_DESC "NSSA external link state\n" @@ -6343,23 +6773,53 @@ static void show_ip_ospf_database_maxage(struct vty *vty, struct ospf *ospf) static int show_ip_ospf_database_common(struct vty *vty, struct ospf *ospf, int arg_base, int argc, struct cmd_token **argv, - uint8_t use_vrf) + uint8_t use_vrf, json_object *json, + bool uj) { int idx_type = 4; int type, ret; struct in_addr id, adv_router; + json_object *json_vrf = NULL; - if (ospf->instance) - vty_out(vty, "\nOSPF Instance: %d\n", ospf->instance); + if (uj) { + if (use_vrf) + json_vrf = json_object_new_object(); + else + json_vrf = json; + } - ospf_show_vrf_name(ospf, vty, NULL, use_vrf); + if (ospf->instance) { + if (uj) + json_object_int_add(json_vrf, "ospfInstance", + ospf->instance); + else + vty_out(vty, "\nOSPF Instance: %d\n\n", ospf->instance); + } + + ospf_show_vrf_name(ospf, vty, json_vrf, use_vrf); - vty_out(vty, "\n OSPF Router with ID (%pI4)\n\n", - &ospf->router_id); + /* Show Router ID. */ + if (uj) { + json_object_string_add(json_vrf, "routerId", + inet_ntoa(ospf->router_id)); + } else { + vty_out(vty, "\n OSPF Router with ID (%pI4)\n\n", + &ospf->router_id); + } /* Show all LSA. */ - if (argc == arg_base + 4) { - show_ip_ospf_database_summary(vty, ospf, 0); + if ((argc == arg_base + 4) || (uj && (argc == arg_base + 5))) { + show_ip_ospf_database_summary(vty, ospf, 0, json_vrf); + if (json) { + if (use_vrf) { + if (ospf->vrf_id == VRF_DEFAULT) + json_object_object_add(json, "default", + json_vrf); + else + json_object_object_add(json, ospf->name, + json_vrf); + } + } return CMD_SUCCESS; } @@ -6377,10 +6837,30 @@ static int show_ip_ospf_database_common(struct vty *vty, struct ospf *ospf, else if (strncmp(argv[arg_base + idx_type]->text, "e", 1) == 0) type = OSPF_AS_EXTERNAL_LSA; else if (strncmp(argv[arg_base + idx_type]->text, "se", 2) == 0) { - show_ip_ospf_database_summary(vty, ospf, 1); + show_ip_ospf_database_summary(vty, ospf, 1, json_vrf); + if (json) { + if (use_vrf) { + if (ospf->vrf_id == VRF_DEFAULT) + json_object_object_add(json, "default", + json_vrf); + else + json_object_object_add(json, ospf->name, + json_vrf); + } + } return CMD_SUCCESS; } else if (strncmp(argv[arg_base + idx_type]->text, "m", 1) == 0) { - show_ip_ospf_database_maxage(vty, ospf); + show_ip_ospf_database_maxage(vty, ospf, json_vrf); + if (json) { + if (use_vrf) { + if (ospf->vrf_id == VRF_DEFAULT) + json_object_object_add(json, "default", + json_vrf); + else + json_object_object_add(json, ospf->name, + json_vrf); + } + } return CMD_SUCCESS; } else if (strncmp(argv[arg_base + idx_type]->text, "opaque-l", 8) == 0) type = OSPF_OPAQUE_LINK_LSA; @@ -6392,18 +6872,19 @@ static int show_ip_ospf_database_common(struct vty *vty, struct ospf *ospf, return CMD_WARNING; /* `show ip ospf database LSA'. */ - if (argc == arg_base + 5) - show_lsa_detail(vty, ospf, type, NULL, NULL); + if ((argc == arg_base + 5) || (uj && (argc == arg_base + 6))) + show_lsa_detail(vty, ospf, type, NULL, NULL, json_vrf); else if (argc >= arg_base + 6) { ret = inet_aton(argv[arg_base + 5]->arg, &id); if (!ret) return CMD_WARNING; /* `show ip ospf database LSA ID'. */ - if (argc == arg_base + 6) - show_lsa_detail(vty, ospf, type, &id, NULL); + if ((argc == arg_base + 6) || (uj && (argc == arg_base + 7))) + show_lsa_detail(vty, ospf, type, &id, NULL, json_vrf); /* `show ip ospf database LSA ID adv-router ADV_ROUTER'. */ - else if (argc == arg_base + 7) { + else if ((argc == arg_base + 7) + || (uj && (argc == arg_base + 8))) { if (strncmp(argv[arg_base + 6]->text, "s", 1) == 0) adv_router = ospf->router_id; else { @@ -6412,7 +6893,19 @@ static int show_ip_ospf_database_common(struct vty *vty, struct ospf *ospf, if (!ret) return CMD_WARNING; } - show_lsa_detail(vty, ospf, type, &id, &adv_router); + show_lsa_detail(vty, ospf, type, &id, &adv_router, + json_vrf); + } + } + + if (json) { + if (use_vrf) { + if (ospf->vrf_id == VRF_DEFAULT) + json_object_object_add(json, "default", + json_vrf); + else + json_object_object_add(json, ospf->name, + json_vrf); } } @@ -6421,7 +6914,7 @@ static int show_ip_ospf_database_common(struct vty *vty, struct ospf *ospf, DEFUN (show_ip_ospf_database_max, show_ip_ospf_database_max_cmd, - "show ip ospf [vrf <NAME|all>] database <max-age|self-originate>", + "show ip ospf [vrf <NAME|all>] database <max-age|self-originate> [json]", SHOW_STR IP_STR "OSPF information\n" @@ -6429,7 +6922,8 @@ DEFUN (show_ip_ospf_database_max, "All VRFs\n" "Database summary\n" "LSAs in MaxAge list\n" - "Self-originated link states\n") + "Self-originated link states\n" + JSON_STR) { struct ospf *ospf = NULL; struct listnode *node = NULL; @@ -6439,6 +6933,11 @@ DEFUN (show_ip_ospf_database_max, int inst = 0; int idx_vrf = 0; uint8_t use_vrf = 0; + bool uj = use_json(argc, argv); + json_object *json = NULL; + + if (uj) + json = json_object_new_object(); OSPF_FIND_VRF_ARGS(argv, argc, idx_vrf, vrf_name, all_vrf); @@ -6454,7 +6953,7 @@ DEFUN (show_ip_ospf_database_max, ospf_output = true; ret = show_ip_ospf_database_common( vty, ospf, idx_vrf ? 2 : 0, argc, argv, - use_vrf); + use_vrf, json, uj); } if (!ospf_output) @@ -6466,8 +6965,8 @@ DEFUN (show_ip_ospf_database_max, return CMD_SUCCESS; } ret = (show_ip_ospf_database_common( - vty, ospf, idx_vrf ? 2 : 0, argc, argv, - use_vrf)); + vty, ospf, idx_vrf ? 2 : 0, argc, argv, use_vrf, + json, uj)); } } else { /* Display default ospf (instance 0) info */ @@ -6478,7 +6977,12 @@ DEFUN (show_ip_ospf_database_max, } ret = show_ip_ospf_database_common(vty, ospf, 0, argc, argv, - use_vrf); + use_vrf, json, uj); + } + + if (uj) { + vty_out(vty, "%s\n", json_object_to_json_string(json)); + json_object_free(json); } return ret; @@ -6486,7 +6990,7 @@ DEFUN (show_ip_ospf_database_max, DEFUN (show_ip_ospf_instance_database, show_ip_ospf_instance_database_cmd, - "show ip ospf [{(1-65535)|vrf NAME}] database [<asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as> [A.B.C.D [<self-originate|adv-router A.B.C.D>]]]", + "show ip ospf [{(1-65535)|vrf NAME}] database [<asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as> [A.B.C.D [<self-originate|adv-router A.B.C.D>]]] [json]", SHOW_STR IP_STR "OSPF information\n" @@ -6497,7 +7001,8 @@ DEFUN (show_ip_ospf_instance_database, "Link State ID (as an IP address)\n" "Self-originated link states\n" "Advertising Router link states\n" - "Advertising Router (as an IP address)\n") + "Advertising Router (as an IP address)\n" + JSON_STR) { struct ospf *ospf; unsigned short instance = 0; @@ -6508,6 +7013,11 @@ DEFUN (show_ip_ospf_instance_database, int inst = 0; int idx = 0; uint8_t use_vrf = 0; + bool uj = use_json(argc, argv); + json_object *json = NULL; + + if (uj) + json = json_object_new_object(); if (argv_find(argv, argc, "(1-65535)", &idx)) { instance = strtoul(argv[idx]->arg, NULL, 10); @@ -6517,8 +7027,8 @@ DEFUN (show_ip_ospf_instance_database, if (!ospf->oi_running) return CMD_SUCCESS; - return (show_ip_ospf_database_common(vty, ospf, idx ? 1 : 0, - argc, argv, use_vrf)); + return (show_ip_ospf_database_common( + vty, ospf, idx ? 1 : 0, argc, argv, use_vrf, json, uj)); } else if (argv_find(argv, argc, "vrf", &idx)) { vrf_name = argv[++idx]->arg; all_vrf = strmatch(vrf_name, "all"); @@ -6532,7 +7042,7 @@ DEFUN (show_ip_ospf_instance_database, continue; ret = (show_ip_ospf_database_common( vty, ospf, idx ? 2 : 0, argc, argv, - use_vrf)); + use_vrf, json, uj)); } } else { ospf = ospf_lookup_by_inst_name(inst, vrf_name); @@ -6542,7 +7052,8 @@ DEFUN (show_ip_ospf_instance_database, } ret = (show_ip_ospf_database_common( - vty, ospf, idx ? 2 : 0, argc, argv, use_vrf)); + vty, ospf, idx ? 2 : 0, argc, argv, use_vrf, + json, uj)); } } else { /* Display default ospf (instance 0) info */ @@ -6553,7 +7064,12 @@ DEFUN (show_ip_ospf_instance_database, } ret = (show_ip_ospf_database_common(vty, ospf, 0, argc, argv, - use_vrf)); + use_vrf, json, uj)); + } + + if (uj) { + vty_out(vty, "%s\n", json_object_to_json_string(json)); + json_object_free(json); } return ret; @@ -6561,18 +7077,24 @@ DEFUN (show_ip_ospf_instance_database, DEFUN (show_ip_ospf_instance_database_max, show_ip_ospf_instance_database_max_cmd, - "show ip ospf (1-65535) database <max-age|self-originate>", + "show ip ospf (1-65535) database <max-age|self-originate> [json]", SHOW_STR IP_STR "OSPF information\n" "Instance ID\n" "Database summary\n" "LSAs in MaxAge list\n" - "Self-originated link states\n") + "Self-originated link states\n" + JSON_STR) { int idx_number = 3; struct ospf *ospf; unsigned short instance = 0; + bool uj = use_json(argc, argv); + json_object *json = NULL; + + if (uj) + json = json_object_new_object(); instance = strtoul(argv[idx_number]->arg, NULL, 10); @@ -6585,7 +7107,16 @@ DEFUN (show_ip_ospf_instance_database_max, return CMD_SUCCESS; } - return show_ip_ospf_database_common(vty, ospf, 1, argc, argv, 0); + show_ip_ospf_database_common(vty, ospf, 1, argc, argv, 0, json, uj); + + if (uj) { + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); + json_object_free(json); + } + + return CMD_SUCCESS; } @@ -6593,19 +7124,40 @@ static int show_ip_ospf_database_type_adv_router_common(struct vty *vty, struct ospf *ospf, int arg_base, int argc, struct cmd_token **argv, - uint8_t use_vrf) + uint8_t use_vrf, + json_object *json, + bool uj) { int idx_type = 4; int type, ret; struct in_addr adv_router; + json_object *json_vrf = NULL; - if (ospf->instance) - vty_out(vty, "\nOSPF Instance: %d\n", ospf->instance); + if (uj) { + if (use_vrf) + json_vrf = json_object_new_object(); + else + json_vrf = json; + } - ospf_show_vrf_name(ospf, vty, NULL, use_vrf); + if (ospf->instance) { + if (uj) + json_object_int_add(json, "ospfInstance", + ospf->instance); + else + vty_out(vty, "\nOSPF Instance: %d\n\n", ospf->instance); + } - vty_out(vty, "\n OSPF Router with ID (%pI4)\n\n", - &ospf->router_id); + ospf_show_vrf_name(ospf, vty, json_vrf, use_vrf); + + /* Show Router ID. */ + if (uj) { + json_object_string_add(json_vrf, "routerId", + inet_ntoa(ospf->router_id)); + } else { + vty_out(vty, "\n OSPF Router with ID (%pI4)\n\n", + &ospf->router_id); + } /* Set database type to show. */ if (strncmp(argv[arg_base + idx_type]->text, "r", 1) == 0) @@ -6638,14 +7190,25 @@ static int show_ip_ospf_database_type_adv_router_common(struct vty *vty, return CMD_WARNING; } - show_lsa_detail_adv_router(vty, ospf, type, &adv_router); + show_lsa_detail_adv_router(vty, ospf, type, &adv_router, json_vrf); + + if (json) { + if (use_vrf) { + if (ospf->vrf_id == VRF_DEFAULT) + json_object_object_add(json, "default", + json_vrf); + else + json_object_object_add(json, ospf->name, + json_vrf); + } + } return CMD_SUCCESS; } DEFUN (show_ip_ospf_instance_database_type_adv_router, show_ip_ospf_instance_database_type_adv_router_cmd, - "show ip ospf [{(1-65535)|vrf NAME}] database <asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as> <adv-router A.B.C.D|self-originate>", + "show ip ospf [{(1-65535)|vrf NAME}] database <asbr-summary|external|network|router|summary|nssa-external|opaque-link|opaque-area|opaque-as> <adv-router A.B.C.D|self-originate> [json]", SHOW_STR IP_STR "OSPF information\n" @@ -6655,7 +7218,8 @@ DEFUN (show_ip_ospf_instance_database_type_adv_router, OSPF_LSA_TYPES_DESC "Advertising Router link states\n" "Advertising Router (as an IP address)\n" - "Self-originated link states\n") + "Self-originated link states\n" + JSON_STR) { struct ospf *ospf = NULL; unsigned short instance = 0; @@ -6666,6 +7230,11 @@ DEFUN (show_ip_ospf_instance_database_type_adv_router, int inst = 0; int idx = 0, idx_vrf = 0; uint8_t use_vrf = 0; + bool uj = use_json(argc, argv); + json_object *json = NULL; + + if (uj) + json = json_object_new_object(); if (argv_find(argv, argc, "(1-65535)", &idx)) { instance = strtoul(argv[idx]->arg, NULL, 10); @@ -6678,7 +7247,7 @@ DEFUN (show_ip_ospf_instance_database_type_adv_router, } return (show_ip_ospf_database_type_adv_router_common( - vty, ospf, idx ? 1 : 0, argc, argv, use_vrf)); + vty, ospf, idx ? 1 : 0, argc, argv, use_vrf, json, uj)); } OSPF_FIND_VRF_ARGS(argv, argc, idx_vrf, vrf_name, all_vrf); @@ -6695,7 +7264,7 @@ DEFUN (show_ip_ospf_instance_database_type_adv_router, ospf_output = true; ret = show_ip_ospf_database_type_adv_router_common( vty, ospf, idx ? 1 : 0, argc, argv, - use_vrf); + use_vrf, json, uj); } if (!ospf_output) vty_out(vty, "%% OSPF instance not found\n"); @@ -6707,7 +7276,8 @@ DEFUN (show_ip_ospf_instance_database_type_adv_router, } ret = show_ip_ospf_database_type_adv_router_common( - vty, ospf, idx ? 1 : 0, argc, argv, use_vrf); + vty, ospf, idx ? 1 : 0, argc, argv, use_vrf, + json, uj); } } else { /* Display default ospf (instance 0) info */ @@ -6718,8 +7288,14 @@ DEFUN (show_ip_ospf_instance_database_type_adv_router, } ret = show_ip_ospf_database_type_adv_router_common( - vty, ospf, idx ? 1 : 0, argc, argv, use_vrf); + vty, ospf, idx ? 1 : 0, argc, argv, use_vrf, json, uj); + } + + if (uj) { + vty_out(vty, "%s\n", json_object_to_json_string(json)); + json_object_free(json); } + return ret; /*return (show_ip_ospf_database_type_adv_router_common( vty, ospf, idx ? 1 : 0, argc, argv));*/ @@ -9202,6 +9778,88 @@ DEFPY(ospf_gr_helper_planned_only, return CMD_SUCCESS; } +/* External Route Aggregation */ +DEFUN (ospf_external_route_aggregation, + ospf_external_route_aggregation_cmd, + "summary-address A.B.C.D/M [tag (1-4294967295)]", + "External summary address\n" + "Summary address prefix (a.b.c.d/m) \n" + "Router tag \n" + "Router tag value\n") +{ + VTY_DECLVAR_INSTANCE_CONTEXT(ospf, ospf); + struct prefix_ipv4 p; + int idx = 1; + route_tag_t tag = 0; + int ret = OSPF_SUCCESS; + + str2prefix_ipv4(argv[idx]->arg, &p); + + if (is_prefix_default(&p)) { + vty_out(vty, + "Default address shouldn't be configured as summary address.\n"); + return CMD_SUCCESS; + } + + /* Apply mask for given prefix. */ + apply_mask((struct prefix *)&p); + + if (!is_valid_summary_addr(&p)) { + vty_out(vty, "Not a valid summary address.\n"); + return CMD_WARNING_CONFIG_FAILED; + } + + if (argc > 2) + tag = strtoul(argv[idx + 2]->arg, NULL, 10); + + ret = ospf_asbr_external_aggregator_set(ospf, &p, tag); + if (ret == OSPF_INVALID) + vty_out(vty, "Inavlid configuration!!\n"); + + return CMD_SUCCESS; +} + +DEFUN (no_ospf_external_route_aggregation, + no_ospf_external_route_aggregation_cmd, + "no summary-address A.B.C.D/M [tag (1-4294967295)]", + NO_STR + "External summary address\n" + "Summary address prefix (a.b.c.d/m)\n" + "Router tag\n" + "Router tag value\n") +{ + VTY_DECLVAR_INSTANCE_CONTEXT(ospf, ospf); + struct prefix_ipv4 p; + int idx = 2; + route_tag_t tag = 0; + int ret = OSPF_SUCCESS; + + str2prefix_ipv4(argv[idx]->arg, &p); + + if (is_prefix_default(&p)) { + vty_out(vty, + "Default address shouldn't be configured as summary address.\n"); + return CMD_SUCCESS; + } + + /* Apply mask for given prefix. */ + apply_mask((struct prefix *)&p); + + if (!is_valid_summary_addr(&p)) { + vty_out(vty, "Not a valid summary address.\n"); + return CMD_WARNING_CONFIG_FAILED; + } + + if (argc > 3) + tag = strtoul(argv[idx + 2]->arg, NULL, 10); + + ret = ospf_asbr_external_aggregator_unset(ospf, &p, tag); + if (ret == OSPF_INVALID) + vty_out(vty, "Inavlid configuration!!\n"); + + return CMD_SUCCESS; +} + DEFPY(no_ospf_gr_helper_planned_only, no_ospf_gr_helper_planned_only_cmd, "no graceful-restart helper planned-only", @@ -9454,6 +10112,93 @@ static int ospf_show_gr_helper_details(struct vty *vty, struct ospf *ospf, } } } + return CMD_SUCCESS; +} + +DEFUN (ospf_external_route_aggregation_no_adrvertise, + ospf_external_route_aggregation_no_adrvertise_cmd, + "summary-address A.B.C.D/M no-advertise", + "External summary address\n" + "Summary address prefix (a.b.c.d/m) \n" + "Don't advertise summary route \n") +{ + VTY_DECLVAR_INSTANCE_CONTEXT(ospf, ospf); + struct prefix_ipv4 p; + int idx = 1; + int ret = OSPF_SUCCESS; + + str2prefix_ipv4(argv[idx]->arg, &p); + + if (is_prefix_default(&p)) { + vty_out(vty, + "Default address shouldn't be configured as summary address.\n"); + return CMD_SUCCESS; + } + + /* Apply mask for given prefix. */ + apply_mask((struct prefix *)&p); + + if (!is_valid_summary_addr(&p)) { + vty_out(vty, "Not a valid summary address.\n"); + return CMD_WARNING_CONFIG_FAILED; + } + + ret = ospf_asbr_external_rt_no_advertise(ospf, &p); + if (ret == OSPF_INVALID) + vty_out(vty, "Inavlid configuration!!\n"); + + return CMD_SUCCESS; +} + +DEFUN (no_ospf_external_route_aggregation_no_adrvertise, + no_ospf_external_route_aggregation_no_adrvertise_cmd, + "no summary-address A.B.C.D/M no-advertise", + NO_STR + "External summary address\n" + "Summary address prefix (a.b.c.d/m) \n" + "Adverise summary route to the AS \n.") +{ + VTY_DECLVAR_INSTANCE_CONTEXT(ospf, ospf); + struct prefix_ipv4 p; + int idx = 2; + int ret = OSPF_SUCCESS; + + str2prefix_ipv4(argv[idx]->arg, &p); + + if (is_prefix_default(&p)) { + vty_out(vty, + "Default address shouldn't be configured as summary address.\n"); + return CMD_SUCCESS; + } + + /* Apply mask for given prefix. */ + apply_mask((struct prefix *)&p); + + if (!is_valid_summary_addr(&p)) { + vty_out(vty, "Not a valid summary address.\n"); + return CMD_WARNING_CONFIG_FAILED; + } + + ret = ospf_asbr_external_rt_advertise(ospf, &p); + if (ret == OSPF_INVALID) + vty_out(vty, "Inavlid configuration!!\n"); + + return CMD_SUCCESS; +} + +DEFUN (ospf_route_aggregation_timer, + ospf_route_aggregation_timer_cmd, + "aggregation timer (5-1800)", + "External route aggregation\n" + "Delay timer (in seconds)\n" + "Timer interval(in seconds)\n") +{ + VTY_DECLVAR_INSTANCE_CONTEXT(ospf, ospf); + unsigned int interval = 0; + + interval = strtoul(argv[2]->arg, NULL, 10); + + ospf_external_aggregator_timer_set(ospf, interval); return CMD_SUCCESS; } @@ -9560,6 +10305,21 @@ DEFPY (show_ip_ospf_gr_helper, return CMD_SUCCESS; } /* Graceful Restart HELPER commands end */ +DEFUN (no_ospf_route_aggregation_timer, + no_ospf_route_aggregation_timer_cmd, + "no aggregation timer", + NO_STR + "External route aggregation\n" + "Delay timer\n") +{ + VTY_DECLVAR_INSTANCE_CONTEXT(ospf, ospf); + + ospf_external_aggregator_timer_set(ospf, OSPF_EXTL_AGGR_DEFAULT_DELAY); + + return CMD_SUCCESS; +} + +/* External Route Aggregation End */ static void config_write_stub_router(struct vty *vty, struct ospf *ospf) { @@ -10370,6 +11130,264 @@ static const char *const ospf_abr_type_str[] = { static const char *const ospf_shortcut_mode_str[] = { "default", "enable", "disable" }; +static int ospf_vty_external_rt_walkcb(struct hash_bucket *backet, + void *arg) +{ + struct external_info *ei = backet->data; + struct vty *vty = (struct vty *)arg; + static unsigned int count; + + vty_out(vty, "%-4pI4/%d, ", &ei->p.prefix, ei->p.prefixlen); + count++; + + if (count % 5 == 0) + vty_out(vty, "\n"); + + if (OSPF_EXTERNAL_RT_COUNT(ei->aggr_route) == count) + count = 0; + + return HASHWALK_CONTINUE; +} + +static int ospf_json_external_rt_walkcb(struct hash_bucket *backet, + void *arg) +{ + struct external_info *ei = backet->data; + struct json_object *json = (struct json_object *)arg; + char buf[PREFIX2STR_BUFFER]; + char exnalbuf[20]; + static unsigned int count; + + prefix2str(&ei->p, buf, sizeof(buf)); + + snprintf(exnalbuf, 20, "Exnl Addr-%d", count); + + json_object_string_add(json, exnalbuf, buf); + + count++; + + if (OSPF_EXTERNAL_RT_COUNT(ei->aggr_route) == count) + count = 0; + + return HASHWALK_CONTINUE; +} + +static int ospf_show_summary_address(struct vty *vty, struct ospf *ospf, + uint8_t use_vrf, json_object *json, + bool uj, bool detail) +{ + struct route_node *rn; + json_object *json_vrf = NULL; + int mtype = 0; + int mval = 0; + static char header[] = + "Summary-address Metric-type Metric Tag External_Rt_count\n"; + + mtype = metric_type(ospf, 0, ospf->instance); + mval = metric_value(ospf, 0, ospf->instance); + + if (!uj) + vty_out(vty, "%s\n", header); + + if (uj) { + if (use_vrf) + json_vrf = json_object_new_object(); + else + json_vrf = json; + } + + if (ospf->instance) { + if (uj) + json_object_int_add(json, "ospfInstance", + ospf->instance); + else + vty_out(vty, "\nOSPF Instance: %d\n\n", ospf->instance); + } + + ospf_show_vrf_name(ospf, vty, json_vrf, use_vrf); + + if (!uj) + vty_out(vty, "aggregation delay interval :%d(in seconds)\n\n", + ospf->aggr_delay_interval); + else + json_object_int_add(json_vrf, "aggregation delay interval", + ospf->aggr_delay_interval); + + for (rn = route_top(ospf->rt_aggr_tbl); rn; rn = route_next(rn)) + if (rn->info) { + struct ospf_external_aggr_rt *aggr = rn->info; + json_object *json_aggr = NULL; + char buf[PREFIX2STR_BUFFER]; + + prefix2str(&aggr->p, buf, sizeof(buf)); + + if (uj) { + + json_aggr = json_object_new_object(); + + json_object_object_add(json_vrf, buf, + json_aggr); + + json_object_string_add(json_aggr, + "Summary address", buf); + + json_object_string_add( + json_aggr, "Metric-type", + (mtype == EXTERNAL_METRIC_TYPE_1) + ? "E1" + : "E2"); + + json_object_int_add(json_aggr, "Metric", mval); + + json_object_int_add(json_aggr, "Tag", + aggr->tag); + + json_object_int_add( + json_aggr, "External route count", + OSPF_EXTERNAL_RT_COUNT(aggr)); + + if (OSPF_EXTERNAL_RT_COUNT(aggr) && detail) { + hash_walk( + aggr->match_extnl_hash, + ospf_json_external_rt_walkcb, + json_aggr); + } + + } else { + vty_out(vty, "%-20s", buf); + + (mtype == EXTERNAL_METRIC_TYPE_1) + ? vty_out(vty, "%-16s", "E1") + : vty_out(vty, "%-16s", "E2"); + vty_out(vty, "%-11d", mval); + + vty_out(vty, "%-12u", aggr->tag); + + vty_out(vty, "%-5ld\n", + OSPF_EXTERNAL_RT_COUNT(aggr)); + + if (OSPF_EXTERNAL_RT_COUNT(aggr) && detail) { + vty_out(vty, + "Matched External routes:\n"); + hash_walk( + aggr->match_extnl_hash, + ospf_vty_external_rt_walkcb, + vty); + vty_out(vty, "\n"); + } + + vty_out(vty, "\n"); + } + } + + if (uj) { + if (use_vrf) { + if (ospf->vrf_id == VRF_DEFAULT) + json_object_object_add(json, "default", + json_vrf); + else + json_object_object_add(json, ospf->name, + json_vrf); + } + } else + vty_out(vty, "\n"); + + return CMD_SUCCESS; +} + +DEFUN (show_ip_ospf_external_aggregator, + show_ip_ospf_external_aggregator_cmd, + "show ip ospf [vrf <NAME|all>] summary-address [detail] [json]", + SHOW_STR IP_STR + "OSPF information\n" + VRF_CMD_HELP_STR + "All VRFs\n" + "Show external summary addresses\n" + "Detailed informtion\n" + JSON_STR) +{ + char *vrf_name = NULL; + bool all_vrf = false; + int ret = CMD_SUCCESS; + int idx_vrf = 0; + int idx = 0; + uint8_t use_vrf = 0; + bool uj = use_json(argc, argv); + struct ospf *ospf = NULL; + json_object *json = NULL; + struct listnode *node = NULL; + int inst = 0; + bool detail = false; + + OSPF_FIND_VRF_ARGS(argv, argc, idx_vrf, vrf_name, all_vrf); + + if (argv_find(argv, argc, "detail", &idx)) + detail = true; + + if (uj) + json = json_object_new_object(); + + /* vrf input is provided */ + if (vrf_name) { + use_vrf = 1; + if (all_vrf) { + for (ALL_LIST_ELEMENTS_RO(om->ospf, node, ospf)) { + if (!ospf->oi_running) + continue; + ret = ospf_show_summary_address( + vty, ospf, use_vrf, json, uj, detail); + } + + if (uj) { + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); + json_object_free(json); + } + + return ret; + } + + ospf = ospf_lookup_by_inst_name(inst, vrf_name); + + if (ospf == NULL || !ospf->oi_running) { + if (uj) { + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); + json_object_free(json); + } else + vty_out(vty, "%% OSPF instance not found\n"); + + return CMD_SUCCESS; + } + ospf_show_summary_address(vty, ospf, use_vrf, json, uj, detail); + + } else { + /* Default Vrf */ + ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT); + if (ospf == NULL || !ospf->oi_running) { + if (uj) { + vty_out(vty, "%s\n", + json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); + json_object_free(json); + } else + vty_out(vty, "%% OSPF instance not found\n"); + + return CMD_SUCCESS; + } + + ospf_show_summary_address(vty, ospf, use_vrf, json, uj, detail); + } + + if (uj) { + vty_out(vty, "%s\n", json_object_to_json_string_ext( + json, JSON_C_TO_STRING_PRETTY)); + json_object_free(json); + } + return CMD_SUCCESS; +} static const char *const ospf_int_type_str[] = { "unknown", /* should never be used. */ @@ -10926,6 +11944,30 @@ static int config_write_ospf_gr_helper(struct vty *vty, struct ospf *ospf) hash_walk(ospf->enable_rtr_list, ospf_cfg_write_helper_dis_rtr_walkcb, vty); } + return 0; +} + +static int config_write_ospf_external_aggregator(struct vty *vty, + struct ospf *ospf) +{ + struct route_node *rn; + + /* print 'summary-address A.B.C.D/M' */ + for (rn = route_top(ospf->rt_aggr_tbl); rn; rn = route_next(rn)) + if (rn->info) { + struct ospf_external_aggr_rt *aggr = rn->info; + + vty_out(vty, " summary-address %pI4/%d ", + &aggr->p.prefix, aggr->p.prefixlen); + if (aggr->tag) + vty_out(vty, " tag %u ", aggr->tag); + + if (CHECK_FLAG(aggr->flags, + OSPF_EXTERNAL_AGGRT_NO_ADVERTISE)) + vty_out(vty, " no-advertise"); + + vty_out(vty, "\n"); + } return 0; } @@ -11099,6 +12141,9 @@ static int ospf_config_write_one(struct vty *vty, struct ospf *ospf) /* Print gr helper configs */ config_write_ospf_gr_helper(vty, ospf); + /* Print external route aggregation. */ + config_write_ospf_external_aggregator(vty, ospf); + /* passive-interface print. */ if (ospf->passive_interface_default == OSPF_IF_PASSIVE) vty_out(vty, " passive-interface default\n"); @@ -11245,8 +12290,10 @@ void ospf_vty_show_init(void) /* "show ip ospf gr-helper details" command */ install_element(VIEW_NODE, &show_ip_ospf_gr_helper_cmd); -} + /* "show ip ospf summary-address" command */ + install_element(VIEW_NODE, &show_ip_ospf_external_aggregator_cmd); +} static int config_write_interface(struct vty *vty); /* ospfd's interface node. */ @@ -11370,6 +12417,17 @@ static void ospf_vty_zebra_init(void) install_element(OSPF_NODE, &no_ospf_gr_helper_supported_grace_time_cmd); install_element(OSPF_NODE, &ospf_gr_helper_planned_only_cmd); install_element(OSPF_NODE, &no_ospf_gr_helper_planned_only_cmd); + + /* External LSA summarisation config commands.*/ + install_element(OSPF_NODE, &ospf_external_route_aggregation_cmd); + install_element(OSPF_NODE, &no_ospf_external_route_aggregation_cmd); + install_element(OSPF_NODE, + &ospf_external_route_aggregation_no_adrvertise_cmd); + install_element(OSPF_NODE, + &no_ospf_external_route_aggregation_no_adrvertise_cmd); + install_element(OSPF_NODE, &ospf_route_aggregation_timer_cmd); + install_element(OSPF_NODE, &no_ospf_route_aggregation_timer_cmd); + #if 0 install_element (OSPF_NODE, &ospf_distance_source_cmd); install_element (OSPF_NODE, &no_ospf_distance_source_cmd); diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index 477405e2a8..fd965e8f21 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -463,7 +463,7 @@ static int ospf_external_lsa_default_routemap_timer(struct thread *thread) if (ret && !lsa) ospf_external_lsa_originate(ospf, default_ei); else if (ret && lsa && IS_LSA_MAXAGE(lsa)) - ospf_external_lsa_refresh(ospf, lsa, default_ei, true); + ospf_external_lsa_refresh(ospf, lsa, default_ei, true, false); else if (!ret && lsa) ospf_external_lsa_flush(ospf, DEFAULT_ROUTE, &default_ei->p, 0); @@ -973,7 +973,8 @@ static bool ospf_external_lsa_default_routemap_apply(struct ospf *ospf, if (lsa && IS_LSA_MAXAGE(lsa)) /* Refresh lsa.*/ - ospf_external_lsa_refresh(ospf, lsa, default_ei, true); + ospf_external_lsa_refresh(ospf, lsa, default_ei, true, + false); else /* If permit and default not advertised then advertise. */ @@ -1180,23 +1181,100 @@ static int ospf_zebra_read_route(ZAPI_CALLBACK_ARGS) if (is_prefix_default(&p)) ospf_external_lsa_refresh_default(ospf); else { - struct ospf_lsa *current; + struct ospf_external_aggr_rt *aggr; + struct as_external_lsa *al; + struct ospf_lsa *lsa = NULL; + struct in_addr mask; + + aggr = ospf_external_aggr_match(ospf, + &ei->p); + + if (aggr) { + /* Check the AS-external-LSA + * should be originated. + */ + if (!ospf_redistribute_check( + ospf, ei, NULL)) + return 0; - current = ospf_external_info_find_lsa( - ospf, &ei->p); - if (!current) - ospf_external_lsa_originate( - ospf, ei); - else { if (IS_DEBUG_OSPF( - zebra, - ZEBRA_REDISTRIBUTE)) + lsa, + EXTNL_LSA_AGGR)) zlog_debug( - "ospf_zebra_read_route() : %pI4 refreshing LSA", - &p.prefix); - ospf_external_lsa_refresh( - ospf, current, ei, - LSA_REFRESH_FORCE); + "%s: Send Aggreate LSA (%pI4/%d)", + __func__, + &aggr->p.prefix, + aggr->p.prefixlen); + + ospf_originate_summary_lsa( + ospf, aggr, ei); + + /* Handling the case where the + * external route prefix + * and aggegate prefix is same + * If same dont flush the + * originated + * external LSA. + */ + if (prefix_same( + (struct prefix + *)&aggr->p, + (struct prefix *)&ei + ->p)) + return 0; + + lsa = ospf_external_info_find_lsa( + ospf, &ei->p); + + if (lsa) { + al = (struct + as_external_lsa *) + lsa->data; + masklen2ip( + ei->p.prefixlen, + &mask); + + if (mask.s_addr + != al->mask.s_addr) + return 0; + + ospf_external_lsa_flush( + ospf, ei->type, + &ei->p, 0); + } + } else { + struct ospf_lsa *current; + + current = + ospf_external_info_find_lsa( + ospf, &ei->p); + if (!current) { + /* Check the + * AS-external-LSA + * should be + * originated. + */ + if (!ospf_redistribute_check( + ospf, ei, + NULL)) + return 0; + + ospf_external_lsa_originate( + ospf, ei); + } else { + if (IS_DEBUG_OSPF( + zebra, + ZEBRA_REDISTRIBUTE)) + zlog_debug( + "%s: %pI4 refreshing LSA", + __func__, + &p.prefix); + ospf_external_lsa_refresh( + ospf, current, + ei, + LSA_REFRESH_FORCE, + false); + } } } } @@ -1210,21 +1288,36 @@ static int ospf_zebra_read_route(ZAPI_CALLBACK_ARGS) } else /* if (cmd == ZEBRA_REDISTRIBUTE_ROUTE_DEL) */ { - /* - * Check if default-information originate is - * with some routemap prefix/access list match. - * Apply before ei is deleted. - */ + struct ospf_external_aggr_rt *aggr; + ei = ospf_external_info_lookup(ospf, rt_type, api.instance, &p); - if (ei) + if (ei == NULL) + return 0; + else + /* + * Check if default-information originate i + * with some routemap prefix/access list match. + * Apply before ei is deleted. + */ ospf_external_lsa_default_routemap_apply(ospf, ei, cmd); - ospf_external_info_delete(ospf, rt_type, api.instance, p); - if (is_prefix_default(&p)) - ospf_external_lsa_refresh_default(ospf); - else - ospf_external_lsa_flush(ospf, rt_type, &p, - ifindex /*, nexthop */); + aggr = ospf_external_aggr_match(ospf, &ei->p); + + if (aggr && (ei->aggr_route == aggr)) { + ospf_unlink_ei_from_aggr(ospf, aggr, ei); + + ospf_external_info_delete(ospf, rt_type, api.instance, + p); + } else { + ospf_external_info_delete(ospf, rt_type, api.instance, + p); + + if (is_prefix_default(&p)) + ospf_external_lsa_refresh_default(ospf); + else + ospf_external_lsa_flush(ospf, rt_type, &p, + ifindex /*, nexthop */); + } } @@ -1316,32 +1409,80 @@ static int ospf_distribute_list_update_timer(struct thread *thread) if ((ei = rn->info) != NULL) { if (is_prefix_default(&ei->p)) default_refresh = 1; - else if ( - (lsa = ospf_external_info_find_lsa( - ospf, &ei->p))) { - int force = - LSA_REFRESH_IF_CHANGED; - /* If this is a MaxAge LSA, we - * need to force refresh it - * because distribute settings - * might have changed and now, - * this LSA needs to be - * originated, not be removed. - * If we don't force refresh it, - * it will remain a MaxAge LSA - * because it will look like it - * hasn't changed. Neighbors - * will not receive updates for - * this LSA. - */ - if (IS_LSA_MAXAGE(lsa)) - force = LSA_REFRESH_FORCE; - - ospf_external_lsa_refresh( - ospf, lsa, ei, force); - } else - ospf_external_lsa_originate( - ospf, ei); + else { + struct ospf_external_aggr_rt + *aggr; + aggr = ospf_external_aggr_match( + ospf, &ei->p); + if (aggr) { + /* Check the + * AS-external-LSA + * should be originated. + */ + if (!ospf_redistribute_check( + ospf, ei, + NULL)) { + + ospf_unlink_ei_from_aggr( + ospf, + aggr, + ei); + continue; + } + + if (IS_DEBUG_OSPF( + lsa, + EXTNL_LSA_AGGR)) + zlog_debug( + "%s: Send Aggregate LSA (%pI4/%d)", + __func__, + &aggr->p.prefix, + aggr->p.prefixlen); + + /* Originate Aggregate + * LSA + */ + ospf_originate_summary_lsa( + ospf, aggr, ei); + } else if ( + (lsa = ospf_external_info_find_lsa( + ospf, + &ei->p))) { + int force = + LSA_REFRESH_IF_CHANGED; + /* If this is a MaxAge + * LSA, we need to + * force refresh it + * because distribute + * settings might have + * changed and now, + * this LSA needs to be + * originated, not be + * removed. + * If we don't force + * refresh it, it will + * remain a MaxAge LSA + * because it will look + * like it hasn't + * changed. Neighbors + * will not receive + * updates for this LSA. + */ + if (IS_LSA_MAXAGE(lsa)) + force = LSA_REFRESH_FORCE; + + ospf_external_lsa_refresh( + ospf, lsa, ei, + force, false); + } else { + if (!ospf_redistribute_check( + ospf, ei, + NULL)) + continue; + ospf_external_lsa_originate( + ospf, ei); + } + } } } } diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index c6e24eb776..a839806720 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -312,6 +312,8 @@ static struct ospf *ospf_new(unsigned short instance, const char *name) ospf_gr_helper_init(new); + ospf_asbr_external_aggregator_init(new); + QOBJ_REG(new, ospf); new->fd = -1; @@ -716,6 +718,7 @@ static void ospf_finish_final(struct ospf *ospf) OSPF_TIMER_OFF(ospf->t_opaque_lsa_self); OSPF_TIMER_OFF(ospf->t_sr_update); OSPF_TIMER_OFF(ospf->t_default_routemap_timer); + OSPF_TIMER_OFF(ospf->t_external_aggr); LSDB_LOOP (OPAQUE_AS_LSDB(ospf), rn, lsa) ospf_discard_from_db(ospf, ospf->lsdb, lsa); @@ -784,6 +787,22 @@ static void ospf_finish_final(struct ospf *ospf) ospf_distance_reset(ospf); route_table_finish(ospf->distance_table); + /* Release extrenal Aggregator table */ + for (rn = route_top(ospf->rt_aggr_tbl); rn; rn = route_next(rn)) { + struct ospf_external_aggr_rt *aggr; + + aggr = rn->info; + + if (aggr) { + ospf_external_aggregator_free(aggr); + rn->info = NULL; + route_unlock_node(rn); + } + } + + route_table_finish(ospf->rt_aggr_tbl); + + list_delete(&ospf->areas); list_delete(&ospf->oi_write_q); diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h index 5be897400b..bdd09e1e76 100644 --- a/ospfd/ospfd.h +++ b/ospfd/ospfd.h @@ -355,6 +355,22 @@ struct ospf { /* last HELPER exit reason */ uint32_t last_exit_reason; + /* delay timer to process external routes + * with summary address. + */ + struct thread *t_external_aggr; + + /* delay interval in seconds */ + unsigned int aggr_delay_interval; + + /* Table of configured Aggregate addresses */ + struct route_table *rt_aggr_tbl; + + /* used as argument for aggr delay + * timer thread. + */ + int aggr_action; + /* MPLS LDP-IGP Sync */ struct ldp_sync_info_cmd ldp_sync_cmd; diff --git a/pbrd/pbr_vty.c b/pbrd/pbr_vty.c index eb51516c24..26163dcc56 100644 --- a/pbrd/pbr_vty.c +++ b/pbrd/pbr_vty.c @@ -907,16 +907,22 @@ DEFPY (show_pbr_interface, if (j) this_iface = json_object_new_object(); - if (!ifp->info) + if (!ifp->info) { + json_object_free(this_iface); continue; + } - if (name && strcmp(ifp->name, name) != 0) + if (name && strcmp(ifp->name, name) != 0) { + json_object_free(this_iface); continue; + } pbr_ifp = ifp->info; - if (strcmp(pbr_ifp->mapname, "") == 0) + if (strcmp(pbr_ifp->mapname, "") == 0) { + json_object_free(this_iface); continue; + } pbrm = pbrm_find(pbr_ifp->mapname); diff --git a/tools/gcc-plugins/frr-format.c b/tools/gcc-plugins/frr-format.c index be56517171..6d91d2cdcd 100644 --- a/tools/gcc-plugins/frr-format.c +++ b/tools/gcc-plugins/frr-format.c @@ -2729,6 +2729,16 @@ tree type_normalize (tree type, tree *cousin, tree target = NULL) return type; } +/* gcc-10 asserts when you give a TYPE_DECL instead of the actual TYPE */ +static tree +decl_deref(tree typ) +{ + while (TREE_CODE (typ) == TYPE_DECL) + typ = DECL_ORIGINAL_TYPE (typ); + + return typ; +} + static void check_format_types (const substring_loc &fmt_loc, format_wanted_type *types, const format_kind_info *fki, @@ -2750,6 +2760,8 @@ check_format_types (const substring_loc &fmt_loc, wanted_type = types->wanted_type; arg_num = types->arg_num; + wanted_type = decl_deref(wanted_type); + /* The following should not occur here. */ gcc_assert (wanted_type); gcc_assert (wanted_type != void_type_node || types->pointer_count); @@ -2873,7 +2885,7 @@ check_format_types (const substring_loc &fmt_loc, || cur_type == signed_char_type_node || cur_type == unsigned_char_type_node); - int compat = lang_hooks.types_compatible_p (wanted_type, cur_type); + int compat = lang_hooks.types_compatible_p (decl_deref (wanted_type), decl_deref (cur_type)); /* Check the type of the "real" argument, if there's a type we want. */ if ((TREE_CODE (wanted_type) != INTEGER_TYPE || types->pointer_count) && compat) @@ -3180,6 +3192,9 @@ matching_type_p (tree spec_type, tree arg_type) gcc_assert (spec_type); gcc_assert (arg_type); + spec_type = decl_deref (spec_type); + arg_type = decl_deref (arg_type); + /* If any of the types requires structural equality, we can't compare their canonical types. */ if (TYPE_STRUCTURAL_EQUALITY_P (spec_type) diff --git a/yang/frr-bgp-common-structure.yang b/yang/frr-bgp-common-structure.yang index 6543b1d1c3..507928f28e 100644 --- a/yang/frr-bgp-common-structure.yang +++ b/yang/frr-bgp-common-structure.yang @@ -110,7 +110,6 @@ submodule frr-bgp-common-structure { container local-as { leaf local-as { type inet:as-number; - mandatory true; description "The local autonomous system number that is to be used when establishing sessions with the remote peer or peer group, if @@ -200,7 +199,6 @@ submodule frr-bgp-common-structure { container neighbor-remote-as { leaf remote-as-type { type frr-bt:as-type; - mandatory true; description "Remote AS type."; } @@ -363,18 +361,18 @@ submodule frr-bgp-common-structure { description "Structural grouping used to include default-originate configuration for both BGP neighbors and peer groups."; - container default-originate-options { + container default-originate { description "default originate parameters for the BGP neighbor or group."; - leaf send-default-route { + leaf originate { type boolean; default "false"; description "If set to 'true', send the default-route to the neighbour(s)."; } - leaf rmap-policy-export { + leaf route-map { type frr-route-map:route-map-ref; description "Route-map to specify criteria to originate default."; @@ -402,7 +400,14 @@ submodule frr-bgp-common-structure { neighbour."; } - container prefix-limit-options { + leaf force-check { + type boolean; + default false; + description + "Force check all received routes."; + } + + container options { when "../direction = 'in'"; choice options { case warning { @@ -446,7 +451,7 @@ submodule frr-bgp-common-structure { } leaf tr-restart-timer { - type uint32; + type uint16; units "minutes"; description "Time interval in seconds after which the BGP session is @@ -598,7 +603,7 @@ submodule frr-bgp-common-structure { leaf send-large-community { type boolean; - default "false"; + default "true"; description "Send large community attribute to this neighbor."; } @@ -614,7 +619,6 @@ submodule frr-bgp-common-structure { "BGP Administrative Shutdown Communication."; leaf enable { type boolean; - mandatory true; description "When set to 'true', BGP shutdown communication is enabled."; } diff --git a/yang/frr-bgp-neighbor.yang b/yang/frr-bgp-neighbor.yang index 3b8d63c447..a4b50b156b 100644 --- a/yang/frr-bgp-neighbor.yang +++ b/yang/frr-bgp-neighbor.yang @@ -97,8 +97,6 @@ submodule frr-bgp-neighbor { uses neighbor-update-source; - uses neighbor-remote-as; - uses structure-neighbor-group-ebgp-multihop; uses neighbor-local-as-options; @@ -124,7 +122,6 @@ submodule frr-bgp-neighbor { leaf enabled { type boolean; - default "false"; description "This leaf indicates whether the IPv4 Unicast AFI, SAFI is enabled for the neighbour or group."; diff --git a/yang/frr-bgp-peer-group.yang b/yang/frr-bgp-peer-group.yang index 3ce628d2b7..452ff1a12f 100644 --- a/yang/frr-bgp-peer-group.yang +++ b/yang/frr-bgp-peer-group.yang @@ -9,6 +9,10 @@ submodule frr-bgp-peer-group { prefix inet; } + import frr-bgp-types { + prefix frr-bt; + } + include frr-bgp-common-structure; include frr-bgp-neighbor; @@ -72,6 +76,8 @@ submodule frr-bgp-peer-group { "Configure BGP dynamic neighbors listen range."; } + uses neighbor-remote-as; + uses neighbor-parameters; } diff --git a/yang/frr-bgp.yang b/yang/frr-bgp.yang index 820c4b2861..2fb5d13fa7 100644 --- a/yang/frr-bgp.yang +++ b/yang/frr-bgp.yang @@ -19,6 +19,10 @@ module frr-bgp { prefix frr-interface; } + import frr-bgp-types { + prefix frr-bt; + } + include "frr-bgp-common-structure"; include "frr-bgp-common"; @@ -206,6 +210,25 @@ module frr-bgp { "The peer-group with which this neighbor is associated."; } + container neighbor-remote-as { + leaf remote-as-type { + type frr-bt:as-type; + mandatory true; + description + "Remote AS type."; + } + + leaf remote-as { + when "../remote-as-type = 'as-specified'"; + type inet:as-number; + description + "The remote autonomous system number received in + the BGP OPEN message."; + reference + "RFC 4271"; + } + } + uses neighbor-parameters; } @@ -238,6 +261,8 @@ module frr-bgp { "The peer-group with which this neighbor is associated."; } + uses neighbor-remote-as; + uses neighbor-parameters; } } @@ -552,6 +577,8 @@ module frr-bgp { uses structure-neighbor-group-as-path-options; + uses structure-neighbor-default-originate-options; + uses structure-neighbor-group-attr-unchanged; uses structure-neighbor-group-orf-capability; @@ -578,6 +605,8 @@ module frr-bgp { uses structure-neighbor-group-as-path-options; + uses structure-neighbor-default-originate-options; + uses structure-neighbor-group-attr-unchanged; uses structure-neighbor-group-orf-capability; @@ -604,6 +633,8 @@ module frr-bgp { uses structure-neighbor-group-as-path-options; + uses structure-neighbor-default-originate-options; + uses structure-neighbor-group-attr-unchanged; uses structure-neighbor-group-orf-capability; @@ -630,6 +661,8 @@ module frr-bgp { uses structure-neighbor-group-as-path-options; + uses structure-neighbor-default-originate-options; + uses structure-neighbor-group-attr-unchanged; uses structure-neighbor-group-orf-capability; @@ -656,6 +689,8 @@ module frr-bgp { uses structure-neighbor-group-as-path-options; + uses structure-neighbor-default-originate-options; + uses structure-neighbor-group-attr-unchanged; uses structure-neighbor-group-orf-capability; @@ -799,6 +834,8 @@ module frr-bgp { uses structure-neighbor-group-as-path-options; + uses structure-neighbor-default-originate-options; + uses structure-neighbor-group-attr-unchanged; uses structure-neighbor-group-orf-capability; @@ -825,6 +862,8 @@ module frr-bgp { uses structure-neighbor-group-as-path-options; + uses structure-neighbor-default-originate-options; + uses structure-neighbor-group-attr-unchanged; uses structure-neighbor-group-orf-capability; @@ -851,6 +890,8 @@ module frr-bgp { uses structure-neighbor-group-as-path-options; + uses structure-neighbor-default-originate-options; + uses structure-neighbor-group-attr-unchanged; uses structure-neighbor-group-orf-capability; @@ -877,6 +918,8 @@ module frr-bgp { uses structure-neighbor-group-as-path-options; + uses structure-neighbor-default-originate-options; + uses structure-neighbor-group-attr-unchanged; uses structure-neighbor-group-orf-capability; @@ -903,6 +946,8 @@ module frr-bgp { uses structure-neighbor-group-as-path-options; + uses structure-neighbor-default-originate-options; + uses structure-neighbor-group-attr-unchanged; uses structure-neighbor-group-orf-capability; @@ -1046,6 +1091,8 @@ module frr-bgp { uses structure-neighbor-group-as-path-options; + uses structure-neighbor-default-originate-options; + uses structure-neighbor-group-attr-unchanged; uses structure-neighbor-group-orf-capability; @@ -1072,6 +1119,8 @@ module frr-bgp { uses structure-neighbor-group-as-path-options; + uses structure-neighbor-default-originate-options; + uses structure-neighbor-group-attr-unchanged; uses structure-neighbor-group-orf-capability; @@ -1098,6 +1147,8 @@ module frr-bgp { uses structure-neighbor-group-as-path-options; + uses structure-neighbor-default-originate-options; + uses structure-neighbor-group-attr-unchanged; uses structure-neighbor-group-orf-capability; @@ -1124,6 +1175,8 @@ module frr-bgp { uses structure-neighbor-group-as-path-options; + uses structure-neighbor-default-originate-options; + uses structure-neighbor-group-attr-unchanged; uses structure-neighbor-group-orf-capability; @@ -1150,6 +1203,8 @@ module frr-bgp { uses structure-neighbor-group-as-path-options; + uses structure-neighbor-default-originate-options; + uses structure-neighbor-group-attr-unchanged; uses structure-neighbor-group-orf-capability; diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c index df0e22b40c..ab7d2845e7 100644 --- a/zebra/zebra_vty.c +++ b/zebra/zebra_vty.c @@ -1766,9 +1766,11 @@ DEFPY (show_route, if (vrf_name) VRF_GET_ID(vrf_id, vrf_name, !!json); vrf = vrf_lookup_by_id(vrf_id); - if (vrf) - zvrf = vrf->info; - if (!vrf || !zvrf) + if (!vrf) + return CMD_SUCCESS; + + zvrf = vrf->info; + if (!zvrf) return CMD_SUCCESS; if (table_all) |
