diff options
| author | Russ White <russ@riw.us> | 2025-03-18 11:02:28 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-18 11:02:28 -0400 |
| commit | 4b6e0ba1a14a22a9b2b8fb4037a4466433494908 (patch) | |
| tree | 3005220e5bc1b6885c7f61ade4c263e9ab98a3f5 /zebra | |
| parent | fe809f47d6d8a07f3ee328d3b93a457f19dd8aa0 (diff) | |
| parent | 50708524c0ee767266069d3006a2331d80d73ebb (diff) | |
Merge pull request #18349 from donaldsharp/more_yang_state
More yang state
Diffstat (limited to 'zebra')
| -rw-r--r-- | zebra/zebra_nb.c | 6 | ||||
| -rw-r--r-- | zebra/zebra_nb.h | 1 | ||||
| -rw-r--r-- | zebra/zebra_nb_state.c | 9 |
3 files changed, 16 insertions, 0 deletions
diff --git a/zebra/zebra_nb.c b/zebra/zebra_nb.c index f45ce03956..50fdb8b7aa 100644 --- a/zebra/zebra_nb.c +++ b/zebra/zebra_nb.c @@ -58,6 +58,12 @@ const struct frr_yang_module_info frr_zebra_info = { } }, { + .xpath = "/frr-zebra:zebra/state/mpls-forwarding", + .cbs = { + .get_elem = zebra_state_mpls_forwarding_get_elem, + } + }, + { .xpath = "/frr-zebra:zebra/workqueue-hold-timer", .cbs = { .modify = zebra_workqueue_hold_timer_modify, diff --git a/zebra/zebra_nb.h b/zebra/zebra_nb.h index 7b0205058e..628eeab1de 100644 --- a/zebra/zebra_nb.h +++ b/zebra/zebra_nb.h @@ -37,6 +37,7 @@ int zebra_ipv6_forwarding_modify(struct nb_cb_modify_args *args); int zebra_ipv6_forwarding_destroy(struct nb_cb_destroy_args *args); int zebra_workqueue_hold_timer_modify(struct nb_cb_modify_args *args); struct yang_data *zebra_ipv6_forwarding_get_elem(struct nb_cb_get_elem_args *args); +struct yang_data *zebra_state_mpls_forwarding_get_elem(struct nb_cb_get_elem_args *args); int zebra_zapi_packets_modify(struct nb_cb_modify_args *args); int zebra_import_kernel_table_table_id_modify(struct nb_cb_modify_args *args); int zebra_import_kernel_table_table_id_destroy(struct nb_cb_destroy_args *args); diff --git a/zebra/zebra_nb_state.c b/zebra/zebra_nb_state.c index 8f072d302d..54af91dafa 100644 --- a/zebra/zebra_nb_state.c +++ b/zebra/zebra_nb_state.c @@ -15,6 +15,7 @@ #include "zebra/zebra_vxlan.h" #include "zebra/zebra_vxlan_if.h" #include "zebra/ipforward.h" +#include "zebra/zebra_mpls.h" /* * XPath: /frr-interface:lib/interface/frr-zebra:zebra/state/up-count @@ -1189,3 +1190,11 @@ struct yang_data *zebra_ipv6_forwarding_get_elem(struct nb_cb_get_elem_args *arg { return yang_data_new_bool(args->xpath, ipforward_ipv6()); } + +/* + * XPath: /frr-zebra:zebra/state/mpls-forwarding + */ +struct yang_data *zebra_state_mpls_forwarding_get_elem(struct nb_cb_get_elem_args *args) +{ + return yang_data_new_bool(args->xpath, mpls_enabled); +} |
