forked from Mirror/frr
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,
|
thread_add_timer_msec(master, nhrp_cache_do_free, c, 10,
|
||||||
&c->t_timeout);
|
&c->t_timeout);
|
||||||
break;
|
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)
|
if (c->cur.expires)
|
||||||
thread_add_timer(master, nhrp_cache_do_timeout, c,
|
thread_add_timer(master, nhrp_cache_do_timeout, c,
|
||||||
c->cur.expires - monotime(NULL),
|
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 nhrp_interface *nifp = ifp->info, *nbmanifp = NULL;
|
||||||
struct interface *nbmaifp = NULL;
|
struct interface *nbmaifp = NULL;
|
||||||
union sockunion nbma;
|
union sockunion nbma;
|
||||||
|
struct in_addr saddr = {0};
|
||||||
|
|
||||||
sockunion_family(&nbma) = AF_UNSPEC;
|
sockunion_family(&nbma) = AF_UNSPEC;
|
||||||
|
|
||||||
if (nifp->source)
|
if (nifp->source)
|
||||||
nbmaifp = if_lookup_by_name(nifp->source, nifp->link_vrf_id);
|
nbmaifp = if_lookup_by_name(nifp->source, nifp->link_vrf_id);
|
||||||
|
|
||||||
switch (ifp->ll_type) {
|
if (ifp->ll_type != ZEBRA_LLT_IPGRE)
|
||||||
case ZEBRA_LLT_IPGRE: {
|
debugf(NHRP_DEBUG_IF, "%s: Ignoring non GRE interface type %u",
|
||||||
struct in_addr saddr = {0};
|
__func__, ifp->ll_type);
|
||||||
|
else {
|
||||||
if (!gre_info) {
|
if (!gre_info) {
|
||||||
nhrp_send_zebra_gre_request(ifp);
|
nhrp_send_zebra_gre_request(ifp);
|
||||||
return;
|
return;
|
||||||
|
@ -214,9 +215,6 @@ void nhrp_interface_update_nbma(struct interface *ifp,
|
||||||
nbmaifp =
|
nbmaifp =
|
||||||
if_lookup_by_index(nifp->link_idx,
|
if_lookup_by_index(nifp->link_idx,
|
||||||
nifp->link_vrf_id);
|
nifp->link_vrf_id);
|
||||||
} break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nbmaifp)
|
if (nbmaifp)
|
||||||
|
|
|
@ -139,7 +139,17 @@ void nhrp_route_announce(int add, enum nhrp_cache_type type,
|
||||||
/* Regular route, so these are announced
|
/* Regular route, so these are announced
|
||||||
* to other routing daemons */
|
* to other routing daemons */
|
||||||
break;
|
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);
|
SET_FLAG(api.flags, ZEBRA_FLAG_FIB_OVERRIDE);
|
||||||
break;
|
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:
|
case VICI_LIST_END:
|
||||||
debugf(NHRP_DEBUG_VICI, "VICI: List end");
|
debugf(NHRP_DEBUG_VICI, "VICI: List end");
|
||||||
break;
|
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;
|
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)
|
if (!key || !key->ptr)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -286,7 +286,13 @@ static void parse_cmd_response(struct vici_message_ctx *ctx,
|
||||||
&& blob2buf(val, buf, sizeof(buf)))
|
&& blob2buf(val, buf, sizeof(buf)))
|
||||||
flog_err(EC_NHRP_SWAN, "VICI: strongSwan: %s", buf);
|
flog_err(EC_NHRP_SWAN, "VICI: strongSwan: %s", buf);
|
||||||
break;
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue