mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00
nhrpd: Add missing enum's to switch statement
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
a348c9456f
commit
d0038397b7
|
@ -330,7 +330,14 @@ static void nhrp_cache_update_timers(struct nhrp_cache *c)
|
|||
thread_add_timer_msec(master, nhrp_cache_do_free, c, 10,
|
||||
&c->t_timeout);
|
||||
break;
|
||||
default:
|
||||
case NHRP_CACHE_INCOMPLETE:
|
||||
case NHRP_CACHE_NEGATIVE:
|
||||
case NHRP_CACHE_CACHED:
|
||||
case NHRP_CACHE_DYNAMIC:
|
||||
case NHRP_CACHE_NHS:
|
||||
case NHRP_CACHE_STATIC:
|
||||
case NHRP_CACHE_LOCAL:
|
||||
case NHRP_CACHE_NUM_TYPES:
|
||||
if (c->cur.expires)
|
||||
thread_add_timer(master, nhrp_cache_do_timeout, c,
|
||||
c->cur.expires - monotime(NULL),
|
||||
|
|
|
@ -184,16 +184,17 @@ void nhrp_interface_update_nbma(struct interface *ifp,
|
|||
struct nhrp_interface *nifp = ifp->info, *nbmanifp = NULL;
|
||||
struct interface *nbmaifp = NULL;
|
||||
union sockunion nbma;
|
||||
struct in_addr saddr = {0};
|
||||
|
||||
sockunion_family(&nbma) = AF_UNSPEC;
|
||||
|
||||
if (nifp->source)
|
||||
nbmaifp = if_lookup_by_name(nifp->source, nifp->link_vrf_id);
|
||||
|
||||
switch (ifp->ll_type) {
|
||||
case ZEBRA_LLT_IPGRE: {
|
||||
struct in_addr saddr = {0};
|
||||
|
||||
if (ifp->ll_type != ZEBRA_LLT_IPGRE)
|
||||
debugf(NHRP_DEBUG_IF, "%s: Ignoring non GRE interface type %u",
|
||||
__func__, ifp->ll_type);
|
||||
else {
|
||||
if (!gre_info) {
|
||||
nhrp_send_zebra_gre_request(ifp);
|
||||
return;
|
||||
|
@ -214,9 +215,6 @@ void nhrp_interface_update_nbma(struct interface *ifp,
|
|||
nbmaifp =
|
||||
if_lookup_by_index(nifp->link_idx,
|
||||
nifp->link_vrf_id);
|
||||
} break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (nbmaifp)
|
||||
|
|
|
@ -139,7 +139,17 @@ void nhrp_route_announce(int add, enum nhrp_cache_type type,
|
|||
/* Regular route, so these are announced
|
||||
* to other routing daemons */
|
||||
break;
|
||||
default:
|
||||
case NHRP_CACHE_INVALID:
|
||||
case NHRP_CACHE_INCOMPLETE:
|
||||
/*
|
||||
* I cannot believe that we want to set a FIB_OVERRIDE
|
||||
* for invalid state or incomplete. But this matches
|
||||
* the original code. Someone will probably notice
|
||||
* the problem eventually
|
||||
*/
|
||||
case NHRP_CACHE_CACHED:
|
||||
case NHRP_CACHE_LOCAL:
|
||||
case NHRP_CACHE_NUM_TYPES:
|
||||
SET_FLAG(api.flags, ZEBRA_FLAG_FIB_OVERRIDE);
|
||||
break;
|
||||
}
|
||||
|
|
20
nhrpd/vici.c
20
nhrpd/vici.c
|
@ -135,11 +135,6 @@ static void vici_parse_message(struct vici_conn *vici, struct zbuf *msg,
|
|||
case VICI_LIST_END:
|
||||
debugf(NHRP_DEBUG_VICI, "VICI: List end");
|
||||
break;
|
||||
default:
|
||||
debugf(NHRP_DEBUG_VICI,
|
||||
"VICI: Unsupported message component type %d",
|
||||
*type);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -207,7 +202,12 @@ static void parse_sa_message(struct vici_message_ctx *ctx,
|
|||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
case VICI_START:
|
||||
case VICI_KEY_VALUE:
|
||||
case VICI_LIST_START:
|
||||
case VICI_LIST_ITEM:
|
||||
case VICI_LIST_END:
|
||||
case VICI_END:
|
||||
if (!key || !key->ptr)
|
||||
break;
|
||||
|
||||
|
@ -286,7 +286,13 @@ static void parse_cmd_response(struct vici_message_ctx *ctx,
|
|||
&& blob2buf(val, buf, sizeof(buf)))
|
||||
flog_err(EC_NHRP_SWAN, "VICI: strongSwan: %s", buf);
|
||||
break;
|
||||
default:
|
||||
case VICI_START:
|
||||
case VICI_SECTION_START:
|
||||
case VICI_SECTION_END:
|
||||
case VICI_LIST_START:
|
||||
case VICI_LIST_ITEM:
|
||||
case VICI_LIST_END:
|
||||
case VICI_END:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue