summaryrefslogtreecommitdiff
path: root/zebra/zebra_nb_config.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_nb_config.c')
-rw-r--r--zebra/zebra_nb_config.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/zebra/zebra_nb_config.c b/zebra/zebra_nb_config.c
index ec151360bd..d99010547f 100644
--- a/zebra/zebra_nb_config.c
+++ b/zebra/zebra_nb_config.c
@@ -3358,10 +3358,7 @@ int lib_vrf_zebra_filter_protocol_create(struct nb_cb_create_args *args)
const char *proto = yang_dnode_get_string(args->dnode, "protocol");
int rtype;
- if (strcasecmp(proto, "any") == 0)
- rtype = ZEBRA_ROUTE_MAX;
- else
- rtype = proto_name2num(proto);
+ rtype = proto_name2num(proto);
if (args->event == NB_EV_VALIDATE)
if (rtype < 0) {
@@ -3387,10 +3384,7 @@ int lib_vrf_zebra_filter_protocol_destroy(struct nb_cb_destroy_args *args)
yang_afi_safi_identity2value(afi_safi, &afi, &safi);
- if (strcasecmp(proto, "any") == 0)
- rtype = ZEBRA_ROUTE_MAX;
- else
- rtype = proto_name2num(proto);
+ rtype = proto_name2num(proto);
/* deleting an existing entry, it can't be invalid */
assert(rtype >= 0);
@@ -3418,10 +3412,7 @@ void lib_vrf_zebra_filter_protocol_apply_finish(
yang_afi_safi_identity2value(afi_safi, &afi, &safi);
- if (strcasecmp(proto, "any") == 0)
- rtype = ZEBRA_ROUTE_MAX;
- else
- rtype = proto_name2num(proto);
+ rtype = proto_name2num(proto);
/* finishing apply for a validated entry, it can't be invalid */
assert(rtype >= 0);