From 74fb4056cb496e3273ea6512ab160b7de0885608 Mon Sep 17 00:00:00 2001 From: Christian Hopps Date: Sat, 20 Apr 2024 07:59:02 -0400 Subject: [PATCH] yang: add missing `zif-gre` zebra interface type This was caught by the grpc_basic test which was receiving an invalid error result, which was returned b/c inside zebra the libyang code was flagging the value as invalid for a derived zebra interface type. Signed-off-by: Christian Hopps --- yang/frr-zebra.yang | 6 ++++++ zebra/zebra_nb_state.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/yang/frr-zebra.yang b/yang/frr-zebra.yang index f1a69068c3bc..79c524a40a94 100644 --- a/yang/frr-zebra.yang +++ b/yang/frr-zebra.yang @@ -151,6 +151,12 @@ module frr-zebra { "Zebra interface type macvlan."; } + identity zif-gre { + base zebra-interface-type; + description + "Zebra interface type gre."; + } + /* * Multicast RPF mode configurable type */ diff --git a/zebra/zebra_nb_state.c b/zebra/zebra_nb_state.c index 46492f023aee..63ac7877d0f9 100644 --- a/zebra/zebra_nb_state.c +++ b/zebra/zebra_nb_state.c @@ -55,6 +55,10 @@ lib_interface_zebra_state_zif_type_get_elem(struct nb_cb_get_elem_args *args) zebra_if = ifp->info; + /* + * NOTE: when adding a new type to the switch, make sure it is defined + * in it's YANG model. + */ switch (zebra_if->zif_type) { case ZEBRA_IF_OTHER: type = "frr-zebra:zif-other";