mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 21:47:15 +02:00
build: add -Wimplicit-fallthrough
Also: - replace all /* fallthrough */ comments with portable fallthrough; pseudo keyword to accomodate both gcc and clang - add missing break; statements as required by older versions of gcc - cleanup some code to remove unnecessary fallthrough Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
parent
9bc4d9eaec
commit
7d67b9ff28
|
@ -1892,7 +1892,7 @@ struct aspath *aspath_reconcile_as4(struct aspath *aspath,
|
||||||
"[AS4] AS4PATHmangle: AS_CONFED_SEQUENCE falls across 2/4 ASN boundary somewhere, broken..");
|
"[AS4] AS4PATHmangle: AS_CONFED_SEQUENCE falls across 2/4 ASN boundary somewhere, broken..");
|
||||||
hops = seg->length;
|
hops = seg->length;
|
||||||
}
|
}
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case AS_SEQUENCE:
|
case AS_SEQUENCE:
|
||||||
cpasns = MIN(seg->length, hops);
|
cpasns = MIN(seg->length, hops);
|
||||||
hops -= seg->length;
|
hops -= seg->length;
|
||||||
|
|
|
@ -2323,11 +2323,8 @@ int bgp_mp_reach_parse(struct bgp_attr_parser_args *args,
|
||||||
/*
|
/*
|
||||||
* NOTE: intentional fall through
|
* NOTE: intentional fall through
|
||||||
* - for consistency in rx processing
|
* - for consistency in rx processing
|
||||||
*
|
|
||||||
* The following comment is to signal GCC this intention
|
|
||||||
* and suppress the warning
|
|
||||||
*/
|
*/
|
||||||
/* FALLTHRU */
|
fallthrough;
|
||||||
case BGP_ATTR_NHLEN_IPV4:
|
case BGP_ATTR_NHLEN_IPV4:
|
||||||
stream_get(&attr->mp_nexthop_global_in, s, IPV4_MAX_BYTELEN);
|
stream_get(&attr->mp_nexthop_global_in, s, IPV4_MAX_BYTELEN);
|
||||||
/* Probably needed for RFC 2283 */
|
/* Probably needed for RFC 2283 */
|
||||||
|
|
|
@ -128,6 +128,7 @@ static void community_entry_free(struct community_entry *entry)
|
||||||
XFREE(MTYPE_COMMUNITY_LIST_CONFIG, entry->config);
|
XFREE(MTYPE_COMMUNITY_LIST_CONFIG, entry->config);
|
||||||
if (entry->reg)
|
if (entry->reg)
|
||||||
bgp_regex_free(entry->reg);
|
bgp_regex_free(entry->reg);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -445,7 +445,7 @@ void bgp_timer_set(struct peer_connection *connection)
|
||||||
|
|
||||||
EVENT_OFF(peer->connection->t_pmax_restart);
|
EVENT_OFF(peer->connection->t_pmax_restart);
|
||||||
EVENT_OFF(peer->t_refresh_stalepath);
|
EVENT_OFF(peer->t_refresh_stalepath);
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case Clearing:
|
case Clearing:
|
||||||
EVENT_OFF(connection->t_start);
|
EVENT_OFF(connection->t_start);
|
||||||
EVENT_OFF(connection->t_connect);
|
EVENT_OFF(connection->t_connect);
|
||||||
|
@ -2384,6 +2384,7 @@ void bgp_fsm_nht_update(struct peer_connection *connection, struct peer *peer,
|
||||||
&& (peer->gtsm_hops == BGP_GTSM_HOPS_CONNECTED
|
&& (peer->gtsm_hops == BGP_GTSM_HOPS_CONNECTED
|
||||||
|| peer->bgp->fast_convergence))
|
|| peer->bgp->fast_convergence))
|
||||||
BGP_EVENT_ADD(connection, TCP_fatal_error);
|
BGP_EVENT_ADD(connection, TCP_fatal_error);
|
||||||
|
break;
|
||||||
case Clearing:
|
case Clearing:
|
||||||
case Deleted:
|
case Deleted:
|
||||||
case BGP_STATUS_MAX:
|
case BGP_STATUS_MAX:
|
||||||
|
|
|
@ -1028,6 +1028,7 @@ static int bgp_capability_parse(struct peer *peer, size_t length,
|
||||||
BGP_NOTIFY_OPEN_MALFORMED_ATTR);
|
BGP_NOTIFY_OPEN_MALFORMED_ATTR);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
/* we deliberately ignore unknown codes, see below */
|
/* we deliberately ignore unknown codes, see below */
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1747,7 +1747,7 @@ int lib_route_map_entry_set_action_rmap_set_action_ipv6_address_modify(
|
||||||
|| IN6_IS_ADDR_LINKLOCAL(&i6a))
|
|| IN6_IS_ADDR_LINKLOCAL(&i6a))
|
||||||
return NB_ERR_VALIDATION;
|
return NB_ERR_VALIDATION;
|
||||||
}
|
}
|
||||||
/* FALLTHROUGH */
|
return NB_OK;
|
||||||
case NB_EV_PREPARE:
|
case NB_EV_PREPARE:
|
||||||
case NB_EV_ABORT:
|
case NB_EV_ABORT:
|
||||||
return NB_OK;
|
return NB_OK;
|
||||||
|
|
|
@ -186,7 +186,6 @@ int bgp_option_set(int flag)
|
||||||
int bgp_option_unset(int flag)
|
int bgp_option_unset(int flag)
|
||||||
{
|
{
|
||||||
switch (flag) {
|
switch (flag) {
|
||||||
/* Fall through. */
|
|
||||||
case BGP_OPT_NO_ZEBRA:
|
case BGP_OPT_NO_ZEBRA:
|
||||||
case BGP_OPT_NO_FIB:
|
case BGP_OPT_NO_FIB:
|
||||||
UNSET_FLAG(bm->options, flag);
|
UNSET_FLAG(bm->options, flag);
|
||||||
|
|
|
@ -1720,7 +1720,8 @@ DEFUN (vnc_nve_group_export_no_routemap,
|
||||||
switch (argv[idx]->text[0]) {
|
switch (argv[idx]->text[0]) {
|
||||||
case 'z':
|
case 'z':
|
||||||
is_bgp = 0;
|
is_bgp = 0;
|
||||||
/* fall thru */
|
idx += 2;
|
||||||
|
break;
|
||||||
case 'b':
|
case 'b':
|
||||||
idx += 2;
|
idx += 2;
|
||||||
break;
|
break;
|
||||||
|
@ -3590,7 +3591,9 @@ DEFUN (vnc_l2_group_rt,
|
||||||
|
|
||||||
switch (argv[1]->arg[0]) {
|
switch (argv[1]->arg[0]) {
|
||||||
case 'b':
|
case 'b':
|
||||||
do_export = 1; /* fall through */
|
do_export = 1;
|
||||||
|
do_import = 1;
|
||||||
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
do_import = 1;
|
do_import = 1;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -4151,6 +4151,7 @@ static int rfapi_vty_show_nve_summary(struct vty *vty,
|
||||||
|
|
||||||
case SHOW_NVE_SUMMARY_RESPONSES:
|
case SHOW_NVE_SUMMARY_RESPONSES:
|
||||||
rfapiRibShowResponsesSummary(vty);
|
rfapiRibShowResponsesSummary(vty);
|
||||||
|
break;
|
||||||
|
|
||||||
case SHOW_NVE_SUMMARY_UNKNOWN_NVES:
|
case SHOW_NVE_SUMMARY_UNKNOWN_NVES:
|
||||||
case SHOW_NVE_SUMMARY_MAX:
|
case SHOW_NVE_SUMMARY_MAX:
|
||||||
|
|
|
@ -365,6 +365,7 @@ AC_C_FLAG([-Wpointer-arith])
|
||||||
AC_C_FLAG([-Wbad-function-cast])
|
AC_C_FLAG([-Wbad-function-cast])
|
||||||
AC_C_FLAG([-Wwrite-strings])
|
AC_C_FLAG([-Wwrite-strings])
|
||||||
AC_C_FLAG([-Wundef])
|
AC_C_FLAG([-Wundef])
|
||||||
|
AC_C_FLAG([-Wimplicit-fallthrough])
|
||||||
if test "$enable_gcc_ultra_verbose" = "yes" ; then
|
if test "$enable_gcc_ultra_verbose" = "yes" ; then
|
||||||
AC_C_FLAG([-Wcast-qual])
|
AC_C_FLAG([-Wcast-qual])
|
||||||
AC_C_FLAG([-Wmissing-noreturn])
|
AC_C_FLAG([-Wmissing-noreturn])
|
||||||
|
|
|
@ -229,7 +229,7 @@ send_capability(struct nbr *nbr, uint16_t capability, int enable)
|
||||||
* Announcement Parameter in Capability messages sent to
|
* Announcement Parameter in Capability messages sent to
|
||||||
* its peers".
|
* its peers".
|
||||||
*/
|
*/
|
||||||
/* FALLTHROUGH */
|
fallthrough;
|
||||||
default:
|
default:
|
||||||
fatalx("send_capability: unsupported capability");
|
fatalx("send_capability: unsupported capability");
|
||||||
}
|
}
|
||||||
|
@ -333,7 +333,7 @@ recv_capability(struct nbr *nbr, char *buf, uint16_t len)
|
||||||
* parameter and process any other Capability Parameters
|
* parameter and process any other Capability Parameters
|
||||||
* in the message".
|
* in the message".
|
||||||
*/
|
*/
|
||||||
/* FALLTHROUGH */
|
fallthrough;
|
||||||
default:
|
default:
|
||||||
if (!CHECK_FLAG(ntohs(tlv.type), UNKNOWN_FLAG))
|
if (!CHECK_FLAG(ntohs(tlv.type), UNKNOWN_FLAG))
|
||||||
send_notification_rtlvs(nbr, S_UNSSUPORTDCAP,
|
send_notification_rtlvs(nbr, S_UNSSUPORTDCAP,
|
||||||
|
|
|
@ -1106,7 +1106,7 @@ show_lib_msg(struct vty *vty, struct imsg *imsg, struct show_params *params)
|
||||||
if (params->lib.remote_label != NO_LABEL &&
|
if (params->lib.remote_label != NO_LABEL &&
|
||||||
params->lib.remote_label != rt->remote_label)
|
params->lib.remote_label != rt->remote_label)
|
||||||
return (0);
|
return (0);
|
||||||
/* FALLTHROUGH */
|
fallthrough;
|
||||||
case IMSG_CTL_SHOW_LIB_RCVD:
|
case IMSG_CTL_SHOW_LIB_RCVD:
|
||||||
rt = imsg->data;
|
rt = imsg->data;
|
||||||
|
|
||||||
|
|
|
@ -505,21 +505,12 @@ nbr_start_idtimer(struct nbr *nbr)
|
||||||
{
|
{
|
||||||
int secs;
|
int secs;
|
||||||
|
|
||||||
secs = INIT_DELAY_TMR;
|
if (nbr->idtimer_cnt > 2) {
|
||||||
switch(nbr->idtimer_cnt) {
|
|
||||||
default:
|
|
||||||
/* do not further increase the counter */
|
/* do not further increase the counter */
|
||||||
secs = MAX_DELAY_TMR;
|
secs = MAX_DELAY_TMR;
|
||||||
break;
|
} else {
|
||||||
case 2:
|
secs = INIT_DELAY_TMR * (1 << nbr->idtimer_cnt);
|
||||||
secs *= 2;
|
|
||||||
/* FALLTHROUGH */
|
|
||||||
case 1:
|
|
||||||
secs *= 2;
|
|
||||||
/* FALLTHROUGH */
|
|
||||||
case 0:
|
|
||||||
nbr->idtimer_cnt++;
|
nbr->idtimer_cnt++;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EVENT_OFF(nbr->initdelay_timer);
|
EVENT_OFF(nbr->initdelay_timer);
|
||||||
|
|
13
lib/base64.c
13
lib/base64.c
|
@ -9,6 +9,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "base64.h"
|
#include "base64.h"
|
||||||
|
#include "compiler.h"
|
||||||
|
|
||||||
static const int CHARS_PER_LINE = 72;
|
static const int CHARS_PER_LINE = 72;
|
||||||
static const char *ENCODING =
|
static const char *ENCODING =
|
||||||
|
@ -41,6 +42,7 @@ int base64_encode_block(const char *plaintext_in, int length_in, char *code_out,
|
||||||
|
|
||||||
switch (state_in->step) {
|
switch (state_in->step) {
|
||||||
while (1) {
|
while (1) {
|
||||||
|
fallthrough;
|
||||||
case step_A:
|
case step_A:
|
||||||
if (plainchar == plaintextend) {
|
if (plainchar == plaintextend) {
|
||||||
state_in->result = result;
|
state_in->result = result;
|
||||||
|
@ -51,7 +53,7 @@ int base64_encode_block(const char *plaintext_in, int length_in, char *code_out,
|
||||||
result = (fragment & 0x0fc) >> 2;
|
result = (fragment & 0x0fc) >> 2;
|
||||||
*codechar++ = base64_encode_value(result);
|
*codechar++ = base64_encode_value(result);
|
||||||
result = (fragment & 0x003) << 4;
|
result = (fragment & 0x003) << 4;
|
||||||
/* fall through */
|
fallthrough;
|
||||||
case step_B:
|
case step_B:
|
||||||
if (plainchar == plaintextend) {
|
if (plainchar == plaintextend) {
|
||||||
state_in->result = result;
|
state_in->result = result;
|
||||||
|
@ -62,7 +64,7 @@ int base64_encode_block(const char *plaintext_in, int length_in, char *code_out,
|
||||||
result |= (fragment & 0x0f0) >> 4;
|
result |= (fragment & 0x0f0) >> 4;
|
||||||
*codechar++ = base64_encode_value(result);
|
*codechar++ = base64_encode_value(result);
|
||||||
result = (fragment & 0x00f) << 2;
|
result = (fragment & 0x00f) << 2;
|
||||||
/* fall through */
|
fallthrough;
|
||||||
case step_C:
|
case step_C:
|
||||||
if (plainchar == plaintextend) {
|
if (plainchar == plaintextend) {
|
||||||
state_in->result = result;
|
state_in->result = result;
|
||||||
|
@ -146,6 +148,7 @@ int base64_decode_block(const char *code_in, int length_in, char *plaintext_out,
|
||||||
|
|
||||||
switch (state_in->step) {
|
switch (state_in->step) {
|
||||||
while (1) {
|
while (1) {
|
||||||
|
fallthrough;
|
||||||
case step_a:
|
case step_a:
|
||||||
do {
|
do {
|
||||||
if (codec == code_in+length_in) {
|
if (codec == code_in+length_in) {
|
||||||
|
@ -156,7 +159,7 @@ int base64_decode_block(const char *code_in, int length_in, char *plaintext_out,
|
||||||
fragmt = base64_decode_value(*codec++);
|
fragmt = base64_decode_value(*codec++);
|
||||||
} while (fragmt < 0);
|
} while (fragmt < 0);
|
||||||
*plainc = (fragmt & 0x03f) << 2;
|
*plainc = (fragmt & 0x03f) << 2;
|
||||||
/* fall through */
|
fallthrough;
|
||||||
case step_b:
|
case step_b:
|
||||||
do {
|
do {
|
||||||
if (codec == code_in+length_in) {
|
if (codec == code_in+length_in) {
|
||||||
|
@ -168,7 +171,7 @@ int base64_decode_block(const char *code_in, int length_in, char *plaintext_out,
|
||||||
} while (fragmt < 0);
|
} while (fragmt < 0);
|
||||||
*plainc++ |= (fragmt & 0x030) >> 4;
|
*plainc++ |= (fragmt & 0x030) >> 4;
|
||||||
*plainc = (fragmt & 0x00f) << 4;
|
*plainc = (fragmt & 0x00f) << 4;
|
||||||
/* fall through */
|
fallthrough;
|
||||||
case step_c:
|
case step_c:
|
||||||
do {
|
do {
|
||||||
if (codec == code_in+length_in) {
|
if (codec == code_in+length_in) {
|
||||||
|
@ -180,7 +183,7 @@ int base64_decode_block(const char *code_in, int length_in, char *plaintext_out,
|
||||||
} while (fragmt < 0);
|
} while (fragmt < 0);
|
||||||
*plainc++ |= (fragmt & 0x03c) >> 2;
|
*plainc++ |= (fragmt & 0x03c) >> 2;
|
||||||
*plainc = (fragmt & 0x003) << 6;
|
*plainc = (fragmt & 0x003) << 6;
|
||||||
/* fall through */
|
fallthrough;
|
||||||
case step_d:
|
case step_d:
|
||||||
do {
|
do {
|
||||||
if (codec == code_in+length_in) {
|
if (codec == code_in+length_in) {
|
||||||
|
|
|
@ -405,10 +405,10 @@ enum matcher_rv command_complete(struct graph *graph, vector vline,
|
||||||
listnode_add(next, newstack);
|
listnode_add(next, newstack);
|
||||||
break;
|
break;
|
||||||
case partly_match:
|
case partly_match:
|
||||||
trace_matcher("trivial_match\n");
|
trace_matcher("partly_match\n");
|
||||||
if (exact_match_exists && !last_token)
|
if (exact_match_exists && !last_token)
|
||||||
break;
|
break;
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case exact_match:
|
case exact_match:
|
||||||
trace_matcher("exact_match\n");
|
trace_matcher("exact_match\n");
|
||||||
if (last_token) {
|
if (last_token) {
|
||||||
|
|
|
@ -33,7 +33,7 @@ extern "C" {
|
||||||
# define _RET_NONNULL , returns_nonnull
|
# define _RET_NONNULL , returns_nonnull
|
||||||
#endif
|
#endif
|
||||||
#if __has_attribute(fallthrough)
|
#if __has_attribute(fallthrough)
|
||||||
# define _FALLTHROUGH __attribute__((fallthrough));
|
# define fallthrough __attribute__((fallthrough));
|
||||||
#endif
|
#endif
|
||||||
# define _CONSTRUCTOR(x) constructor(x)
|
# define _CONSTRUCTOR(x) constructor(x)
|
||||||
# define _DEPRECATED(x) deprecated(x)
|
# define _DEPRECATED(x) deprecated(x)
|
||||||
|
@ -57,7 +57,7 @@ extern "C" {
|
||||||
# define __has_attribute(x) 0
|
# define __has_attribute(x) 0
|
||||||
#endif
|
#endif
|
||||||
#if __GNUC__ >= 7
|
#if __GNUC__ >= 7
|
||||||
# define _FALLTHROUGH __attribute__((fallthrough));
|
# define fallthrough __attribute__((fallthrough));
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -112,8 +112,8 @@ extern "C" {
|
||||||
#ifndef _ALLOC_SIZE
|
#ifndef _ALLOC_SIZE
|
||||||
# define _ALLOC_SIZE(x)
|
# define _ALLOC_SIZE(x)
|
||||||
#endif
|
#endif
|
||||||
#ifndef _FALLTHROUGH
|
#ifndef fallthrough
|
||||||
#define _FALLTHROUGH
|
#define fallthrough
|
||||||
#endif
|
#endif
|
||||||
#ifndef _DEPRECATED
|
#ifndef _DEPRECATED
|
||||||
#define _DEPRECATED(x) deprecated
|
#define _DEPRECATED(x) deprecated
|
||||||
|
|
22
lib/jhash.c
22
lib/jhash.c
|
@ -86,34 +86,34 @@ uint32_t jhash(const void *key, uint32_t length, uint32_t initval)
|
||||||
switch (len) {
|
switch (len) {
|
||||||
case 11:
|
case 11:
|
||||||
c += ((uint32_t)k[10] << 24);
|
c += ((uint32_t)k[10] << 24);
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case 10:
|
case 10:
|
||||||
c += ((uint32_t)k[9] << 16);
|
c += ((uint32_t)k[9] << 16);
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case 9:
|
case 9:
|
||||||
c += ((uint32_t)k[8] << 8);
|
c += ((uint32_t)k[8] << 8);
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case 8:
|
case 8:
|
||||||
b += ((uint32_t)k[7] << 24);
|
b += ((uint32_t)k[7] << 24);
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case 7:
|
case 7:
|
||||||
b += ((uint32_t)k[6] << 16);
|
b += ((uint32_t)k[6] << 16);
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case 6:
|
case 6:
|
||||||
b += ((uint32_t)k[5] << 8);
|
b += ((uint32_t)k[5] << 8);
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case 5:
|
case 5:
|
||||||
b += k[4];
|
b += k[4];
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case 4:
|
case 4:
|
||||||
a += ((uint32_t)k[3] << 24);
|
a += ((uint32_t)k[3] << 24);
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case 3:
|
case 3:
|
||||||
a += ((uint32_t)k[2] << 16);
|
a += ((uint32_t)k[2] << 16);
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case 2:
|
case 2:
|
||||||
a += ((uint32_t)k[1] << 8);
|
a += ((uint32_t)k[1] << 8);
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case 1:
|
case 1:
|
||||||
a += k[0];
|
a += k[0];
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,7 @@ uint32_t jhash2(const uint32_t *k, uint32_t length, uint32_t initval)
|
||||||
switch (len) {
|
switch (len) {
|
||||||
case 2:
|
case 2:
|
||||||
b += k[1];
|
b += k[1];
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case 1:
|
case 1:
|
||||||
a += k[0];
|
a += k[0];
|
||||||
}
|
}
|
||||||
|
|
|
@ -218,7 +218,8 @@ bool frr_zclient_addr(struct sockaddr_storage *sa, socklen_t *sa_len,
|
||||||
break;
|
break;
|
||||||
case '6':
|
case '6':
|
||||||
path++;
|
path++;
|
||||||
/* fallthrough */
|
af = AF_INET6;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
af = AF_INET6;
|
af = AF_INET6;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -173,7 +173,7 @@ static int _nexthop_cmp_no_labels(const struct nexthop *next1,
|
||||||
ret = _nexthop_gateway_cmp(next1, next2);
|
ret = _nexthop_gateway_cmp(next1, next2);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
return ret;
|
return ret;
|
||||||
/* Intentional Fall-Through */
|
fallthrough;
|
||||||
case NEXTHOP_TYPE_IFINDEX:
|
case NEXTHOP_TYPE_IFINDEX:
|
||||||
if (next1->ifindex < next2->ifindex)
|
if (next1->ifindex < next2->ifindex)
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -295,7 +295,7 @@ int nexthop_cmp_basic(const struct nexthop *nh1,
|
||||||
ret = nexthop_g_addr_cmp(nh1->type, &nh1->gate, &nh2->gate);
|
ret = nexthop_g_addr_cmp(nh1->type, &nh1->gate, &nh2->gate);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
return ret;
|
return ret;
|
||||||
/* Intentional Fall-Through */
|
fallthrough;
|
||||||
case NEXTHOP_TYPE_IFINDEX:
|
case NEXTHOP_TYPE_IFINDEX:
|
||||||
if (nh1->ifindex < nh2->ifindex)
|
if (nh1->ifindex < nh2->ifindex)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -180,7 +180,7 @@ static struct nexthop *nhg_nh_find(const struct nexthop_group *nhg,
|
||||||
&nexthop->gate, &nh->gate);
|
&nexthop->gate, &nh->gate);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
continue;
|
continue;
|
||||||
/* Intentional Fall-Through */
|
fallthrough;
|
||||||
case NEXTHOP_TYPE_IFINDEX:
|
case NEXTHOP_TYPE_IFINDEX:
|
||||||
if (nexthop->ifindex != nh->ifindex)
|
if (nexthop->ifindex != nh->ifindex)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -355,7 +355,7 @@ reswitch: switch (ch) {
|
||||||
goto rflag;
|
goto rflag;
|
||||||
case 'C':
|
case 'C':
|
||||||
flags |= LONGINT;
|
flags |= LONGINT;
|
||||||
/*FALLTHROUGH*/
|
fallthrough;
|
||||||
case 'c':
|
case 'c':
|
||||||
error = addtype(&types,
|
error = addtype(&types,
|
||||||
(flags & LONGINT) ? T_WINT : T_INT);
|
(flags & LONGINT) ? T_WINT : T_INT);
|
||||||
|
@ -364,7 +364,7 @@ reswitch: switch (ch) {
|
||||||
break;
|
break;
|
||||||
case 'D':
|
case 'D':
|
||||||
flags |= LONGINT;
|
flags |= LONGINT;
|
||||||
/*FALLTHROUGH*/
|
fallthrough;
|
||||||
case 'd':
|
case 'd':
|
||||||
case 'i':
|
case 'i':
|
||||||
if ((error = addsarg(&types, flags)))
|
if ((error = addsarg(&types, flags)))
|
||||||
|
@ -408,7 +408,7 @@ reswitch: switch (ch) {
|
||||||
#endif
|
#endif
|
||||||
case 'O':
|
case 'O':
|
||||||
flags |= LONGINT;
|
flags |= LONGINT;
|
||||||
/*FALLTHROUGH*/
|
fallthrough;
|
||||||
case 'o':
|
case 'o':
|
||||||
if ((error = adduarg(&types, flags)))
|
if ((error = adduarg(&types, flags)))
|
||||||
goto error;
|
goto error;
|
||||||
|
@ -419,7 +419,7 @@ reswitch: switch (ch) {
|
||||||
break;
|
break;
|
||||||
case 'S':
|
case 'S':
|
||||||
flags |= LONGINT;
|
flags |= LONGINT;
|
||||||
/*FALLTHROUGH*/
|
fallthrough;
|
||||||
case 's':
|
case 's':
|
||||||
error = addtype(&types,
|
error = addtype(&types,
|
||||||
(flags & LONGINT) ? TP_WCHAR : TP_CHAR);
|
(flags & LONGINT) ? TP_WCHAR : TP_CHAR);
|
||||||
|
@ -428,7 +428,7 @@ reswitch: switch (ch) {
|
||||||
break;
|
break;
|
||||||
case 'U':
|
case 'U':
|
||||||
flags |= LONGINT;
|
flags |= LONGINT;
|
||||||
/*FALLTHROUGH*/
|
fallthrough;
|
||||||
case 'u':
|
case 'u':
|
||||||
case 'X':
|
case 'X':
|
||||||
case 'x':
|
case 'x':
|
||||||
|
@ -549,7 +549,7 @@ reswitch: switch (ch) {
|
||||||
goto rflag;
|
goto rflag;
|
||||||
case 'C':
|
case 'C':
|
||||||
flags |= LONGINT;
|
flags |= LONGINT;
|
||||||
/*FALLTHROUGH*/
|
fallthrough;
|
||||||
case 'c':
|
case 'c':
|
||||||
error = addtype(&types,
|
error = addtype(&types,
|
||||||
(flags & LONGINT) ? T_WINT : T_INT);
|
(flags & LONGINT) ? T_WINT : T_INT);
|
||||||
|
@ -558,7 +558,7 @@ reswitch: switch (ch) {
|
||||||
break;
|
break;
|
||||||
case 'D':
|
case 'D':
|
||||||
flags |= LONGINT;
|
flags |= LONGINT;
|
||||||
/*FALLTHROUGH*/
|
fallthrough;
|
||||||
case 'd':
|
case 'd':
|
||||||
case 'i':
|
case 'i':
|
||||||
if ((error = addsarg(&types, flags)))
|
if ((error = addsarg(&types, flags)))
|
||||||
|
@ -602,7 +602,7 @@ reswitch: switch (ch) {
|
||||||
#endif
|
#endif
|
||||||
case 'O':
|
case 'O':
|
||||||
flags |= LONGINT;
|
flags |= LONGINT;
|
||||||
/*FALLTHROUGH*/
|
fallthrough;
|
||||||
case 'o':
|
case 'o':
|
||||||
if ((error = adduarg(&types, flags)))
|
if ((error = adduarg(&types, flags)))
|
||||||
goto error;
|
goto error;
|
||||||
|
@ -613,7 +613,7 @@ reswitch: switch (ch) {
|
||||||
break;
|
break;
|
||||||
case 'S':
|
case 'S':
|
||||||
flags |= LONGINT;
|
flags |= LONGINT;
|
||||||
/*FALLTHROUGH*/
|
fallthrough;
|
||||||
case 's':
|
case 's':
|
||||||
error = addtype(&types,
|
error = addtype(&types,
|
||||||
(flags & LONGINT) ? TP_WCHAR : TP_CHAR);
|
(flags & LONGINT) ? TP_WCHAR : TP_CHAR);
|
||||||
|
@ -622,7 +622,7 @@ reswitch: switch (ch) {
|
||||||
break;
|
break;
|
||||||
case 'U':
|
case 'U':
|
||||||
flags |= LONGINT;
|
flags |= LONGINT;
|
||||||
/*FALLTHROUGH*/
|
fallthrough;
|
||||||
case 'u':
|
case 'u':
|
||||||
case 'X':
|
case 'X':
|
||||||
case 'x':
|
case 'x':
|
||||||
|
|
|
@ -340,7 +340,7 @@ reswitch: switch (ch) {
|
||||||
if (width >= 0)
|
if (width >= 0)
|
||||||
goto rflag;
|
goto rflag;
|
||||||
width = -width;
|
width = -width;
|
||||||
/* FALLTHROUGH */
|
fallthrough;
|
||||||
case '-':
|
case '-':
|
||||||
flags |= LADJUST;
|
flags |= LADJUST;
|
||||||
goto rflag;
|
goto rflag;
|
||||||
|
@ -434,7 +434,7 @@ reswitch: switch (ch) {
|
||||||
break;
|
break;
|
||||||
case 'C':
|
case 'C':
|
||||||
flags |= LONGINT;
|
flags |= LONGINT;
|
||||||
/*FALLTHROUGH*/
|
fallthrough;
|
||||||
case 'c':
|
case 'c':
|
||||||
#ifdef WCHAR_SUPPORT
|
#ifdef WCHAR_SUPPORT
|
||||||
if (flags & LONGINT) {
|
if (flags & LONGINT) {
|
||||||
|
@ -460,7 +460,7 @@ reswitch: switch (ch) {
|
||||||
break;
|
break;
|
||||||
case 'D':
|
case 'D':
|
||||||
flags |= LONGINT;
|
flags |= LONGINT;
|
||||||
/*FALLTHROUGH*/
|
fallthrough;
|
||||||
case 'd':
|
case 'd':
|
||||||
case 'i':
|
case 'i':
|
||||||
if (flags & INTMAX_SIZE)
|
if (flags & INTMAX_SIZE)
|
||||||
|
@ -551,7 +551,7 @@ reswitch: switch (ch) {
|
||||||
break;
|
break;
|
||||||
case 'O':
|
case 'O':
|
||||||
flags |= LONGINT;
|
flags |= LONGINT;
|
||||||
/*FALLTHROUGH*/
|
fallthrough;
|
||||||
case 'o':
|
case 'o':
|
||||||
if (flags & INTMAX_SIZE)
|
if (flags & INTMAX_SIZE)
|
||||||
ujval = UJARG();
|
ujval = UJARG();
|
||||||
|
@ -595,7 +595,7 @@ reswitch: switch (ch) {
|
||||||
goto nosign;
|
goto nosign;
|
||||||
case 'S':
|
case 'S':
|
||||||
flags |= LONGINT;
|
flags |= LONGINT;
|
||||||
/*FALLTHROUGH*/
|
fallthrough;
|
||||||
case 's':
|
case 's':
|
||||||
#ifdef WCHAR_SUPPORT
|
#ifdef WCHAR_SUPPORT
|
||||||
if (flags & LONGINT) {
|
if (flags & LONGINT) {
|
||||||
|
@ -621,7 +621,7 @@ reswitch: switch (ch) {
|
||||||
break;
|
break;
|
||||||
case 'U':
|
case 'U':
|
||||||
flags |= LONGINT;
|
flags |= LONGINT;
|
||||||
/*FALLTHROUGH*/
|
fallthrough;
|
||||||
case 'u':
|
case 'u':
|
||||||
if (flags & INTMAX_SIZE)
|
if (flags & INTMAX_SIZE)
|
||||||
ujval = UJARG();
|
ujval = UJARG();
|
||||||
|
|
|
@ -364,7 +364,6 @@ lib_route_map_entry_exit_policy_modify(struct nb_cb_modify_args *args)
|
||||||
case 0: /* permit-or-deny */
|
case 0: /* permit-or-deny */
|
||||||
break;
|
break;
|
||||||
case 1: /* next */
|
case 1: /* next */
|
||||||
/* FALLTHROUGH */
|
|
||||||
case 2: /* goto */
|
case 2: /* goto */
|
||||||
rm_action =
|
rm_action =
|
||||||
yang_dnode_get_enum(args->dnode, "../action");
|
yang_dnode_get_enum(args->dnode, "../action");
|
||||||
|
@ -885,7 +884,7 @@ static int lib_route_map_entry_set_action_ipv4_address_modify(
|
||||||
yang_dnode_get_ipv4(&ia, args->dnode, NULL);
|
yang_dnode_get_ipv4(&ia, args->dnode, NULL);
|
||||||
if (ia.s_addr == INADDR_ANY || !ipv4_unicast_valid(&ia))
|
if (ia.s_addr == INADDR_ANY || !ipv4_unicast_valid(&ia))
|
||||||
return NB_ERR_VALIDATION;
|
return NB_ERR_VALIDATION;
|
||||||
/* FALLTHROUGH */
|
return NB_OK;
|
||||||
case NB_EV_PREPARE:
|
case NB_EV_PREPARE:
|
||||||
case NB_EV_ABORT:
|
case NB_EV_ABORT:
|
||||||
return NB_OK;
|
return NB_OK;
|
||||||
|
@ -944,7 +943,7 @@ static int lib_route_map_entry_set_action_ipv6_address_modify(
|
||||||
yang_dnode_get_ipv6(&i6a, args->dnode, NULL);
|
yang_dnode_get_ipv6(&i6a, args->dnode, NULL);
|
||||||
if (!IN6_IS_ADDR_LINKLOCAL(&i6a))
|
if (!IN6_IS_ADDR_LINKLOCAL(&i6a))
|
||||||
return NB_ERR_VALIDATION;
|
return NB_ERR_VALIDATION;
|
||||||
/* FALLTHROUGH */
|
return NB_OK;
|
||||||
case NB_EV_PREPARE:
|
case NB_EV_PREPARE:
|
||||||
case NB_EV_ABORT:
|
case NB_EV_ABORT:
|
||||||
return NB_OK;
|
return NB_OK;
|
||||||
|
|
|
@ -1565,7 +1565,7 @@ static void vty_read(struct event *thread)
|
||||||
break;
|
break;
|
||||||
case '\r':
|
case '\r':
|
||||||
vty->escape = VTY_CR;
|
vty->escape = VTY_CR;
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case '\n':
|
case '\n':
|
||||||
vty_out(vty, "\n");
|
vty_out(vty, "\n");
|
||||||
buffer_flush_available(vty->obuf, vty->wfd);
|
buffer_flush_available(vty->obuf, vty->wfd);
|
||||||
|
|
|
@ -271,9 +271,10 @@ void work_queue_run(struct event *thread)
|
||||||
switch (ret) {
|
switch (ret) {
|
||||||
case WQ_QUEUE_BLOCKED: {
|
case WQ_QUEUE_BLOCKED: {
|
||||||
/* decrement item->ran again, cause this isn't an item
|
/* decrement item->ran again, cause this isn't an item
|
||||||
* specific error, and fall through to WQ_RETRY_LATER
|
* specific error, and retry later
|
||||||
*/
|
*/
|
||||||
item->ran--;
|
item->ran--;
|
||||||
|
goto stats;
|
||||||
}
|
}
|
||||||
case WQ_RETRY_LATER: {
|
case WQ_RETRY_LATER: {
|
||||||
goto stats;
|
goto stats;
|
||||||
|
@ -296,9 +297,10 @@ void work_queue_run(struct event *thread)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case WQ_RETRY_NOW:
|
case WQ_RETRY_NOW:
|
||||||
/* a RETRY_NOW that gets here has exceeded max_tries, same as
|
/* a RETRY_NOW that gets here has exceeded max_tries, same
|
||||||
* ERROR */
|
* as ERROR
|
||||||
/* fallthru */
|
*/
|
||||||
|
fallthrough;
|
||||||
case WQ_SUCCESS:
|
case WQ_SUCCESS:
|
||||||
default: {
|
default: {
|
||||||
work_queue_item_remove(wq, item);
|
work_queue_item_remove(wq, item);
|
||||||
|
|
|
@ -891,7 +891,7 @@ static int zapi_nexthop_cmp_no_labels(const struct zapi_nexthop *next1,
|
||||||
&next2->gate);
|
&next2->gate);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
return ret;
|
return ret;
|
||||||
/* Intentional Fall-Through */
|
fallthrough;
|
||||||
case NEXTHOP_TYPE_IFINDEX:
|
case NEXTHOP_TYPE_IFINDEX:
|
||||||
if (next1->ifindex < next2->ifindex)
|
if (next1->ifindex < next2->ifindex)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -913,7 +913,7 @@ static int zlog_5424_open(struct zlog_cfg_5424 *zcf, int sock_type)
|
||||||
}
|
}
|
||||||
|
|
||||||
flags = O_NONBLOCK;
|
flags = O_NONBLOCK;
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
|
|
||||||
case ZLOG_5424_DST_FILE:
|
case ZLOG_5424_DST_FILE:
|
||||||
if (!zcf->filename)
|
if (!zcf->filename)
|
||||||
|
|
|
@ -270,7 +270,7 @@ int nhrp_ext_reply(struct zbuf *zb, struct nhrp_packet_header *hdr,
|
||||||
default:
|
default:
|
||||||
if (type & NHRP_EXTENSION_FLAG_COMPULSORY)
|
if (type & NHRP_EXTENSION_FLAG_COMPULSORY)
|
||||||
goto err;
|
goto err;
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case NHRP_EXTENSION_FORWARD_TRANSIT_NHS:
|
case NHRP_EXTENSION_FORWARD_TRANSIT_NHS:
|
||||||
case NHRP_EXTENSION_REVERSE_TRANSIT_NHS:
|
case NHRP_EXTENSION_REVERSE_TRANSIT_NHS:
|
||||||
/* Supported compulsory extensions, and any
|
/* Supported compulsory extensions, and any
|
||||||
|
|
|
@ -139,7 +139,7 @@ static void nhrp_peer_ifp_notify(struct notifier_block *n, unsigned long cmd)
|
||||||
nhrp_peer_vc_notify);
|
nhrp_peer_vc_notify);
|
||||||
__nhrp_peer_check(p);
|
__nhrp_peer_check(p);
|
||||||
}
|
}
|
||||||
/* fallthru */ /* to post config update */
|
fallthrough; /* to post config update */
|
||||||
case NOTIFY_INTERFACE_ADDRESS_CHANGED:
|
case NOTIFY_INTERFACE_ADDRESS_CHANGED:
|
||||||
notifier_call(&p->notifier_list, NOTIFY_PEER_IFCONFIG_CHANGED);
|
notifier_call(&p->notifier_list, NOTIFY_PEER_IFCONFIG_CHANGED);
|
||||||
break;
|
break;
|
||||||
|
@ -1050,7 +1050,7 @@ static void nhrp_peer_forward(struct nhrp_peer *p,
|
||||||
* append our selves to the transit NHS list
|
* append our selves to the transit NHS list
|
||||||
*/
|
*/
|
||||||
goto err;
|
goto err;
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case NHRP_EXTENSION_RESPONDER_ADDRESS:
|
case NHRP_EXTENSION_RESPONDER_ADDRESS:
|
||||||
/* Supported compulsory extensions, and any
|
/* Supported compulsory extensions, and any
|
||||||
* non-compulsory that is not explicitly handled,
|
* non-compulsory that is not explicitly handled,
|
||||||
|
@ -1220,7 +1220,7 @@ void nhrp_peer_recv(struct nhrp_peer *p, struct zbuf *zb)
|
||||||
/* FIXME: send error-indication */
|
/* FIXME: send error-indication */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* fallthru */ /* FIXME: double check, is this correct? */
|
fallthrough; /* FIXME: double check, is this correct? */
|
||||||
case NHRP_ROUTE_OFF_NBMA:
|
case NHRP_ROUTE_OFF_NBMA:
|
||||||
if (packet_types[hdr->type].handler) {
|
if (packet_types[hdr->type].handler) {
|
||||||
packet_types[hdr->type].handler(&pp);
|
packet_types[hdr->type].handler(&pp);
|
||||||
|
|
|
@ -632,7 +632,7 @@ static void ospf6_dbdesc_recv_master(struct ospf6_header *oh,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* else fall through to ExStart */
|
/* else fall through to ExStart */
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case OSPF6_NEIGHBOR_EXSTART:
|
case OSPF6_NEIGHBOR_EXSTART:
|
||||||
/* if neighbor obeys us as our slave, schedule negotiation_done
|
/* if neighbor obeys us as our slave, schedule negotiation_done
|
||||||
and process LSA Headers. Otherwise, ignore this message */
|
and process LSA Headers. Otherwise, ignore this message */
|
||||||
|
@ -651,7 +651,7 @@ static void ospf6_dbdesc_recv_master(struct ospf6_header *oh,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* fall through to exchange */
|
/* fall through to exchange */
|
||||||
|
fallthrough;
|
||||||
case OSPF6_NEIGHBOR_EXCHANGE:
|
case OSPF6_NEIGHBOR_EXCHANGE:
|
||||||
if (!memcmp(dbdesc, &on->dbdesc_last,
|
if (!memcmp(dbdesc, &on->dbdesc_last,
|
||||||
sizeof(struct ospf6_dbdesc))) {
|
sizeof(struct ospf6_dbdesc))) {
|
||||||
|
@ -836,7 +836,7 @@ static void ospf6_dbdesc_recv_slave(struct ospf6_header *oh,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* else fall through to ExStart */
|
/* else fall through to ExStart */
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case OSPF6_NEIGHBOR_EXSTART:
|
case OSPF6_NEIGHBOR_EXSTART:
|
||||||
/* If the neighbor is Master, act as Slave. Schedule
|
/* If the neighbor is Master, act as Slave. Schedule
|
||||||
negotiation_done
|
negotiation_done
|
||||||
|
|
|
@ -363,7 +363,7 @@ void ospf6_route_zebra_copy_nexthops(struct ospf6_route *route,
|
||||||
|
|
||||||
case NEXTHOP_TYPE_IPV6_IFINDEX:
|
case NEXTHOP_TYPE_IPV6_IFINDEX:
|
||||||
nexthops[i].ifindex = nh->ifindex;
|
nexthops[i].ifindex = nh->ifindex;
|
||||||
/* FALLTHROUGH */
|
fallthrough;
|
||||||
case NEXTHOP_TYPE_IPV6:
|
case NEXTHOP_TYPE_IPV6:
|
||||||
nexthops[i].gate.ipv6 = nh->address;
|
nexthops[i].gate.ipv6 = nh->address;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -67,7 +67,7 @@ static inline bool ospf6_nexthop_is_same(const struct ospf6_nexthop *nha,
|
||||||
case NEXTHOP_TYPE_IPV6_IFINDEX:
|
case NEXTHOP_TYPE_IPV6_IFINDEX:
|
||||||
if (nha->ifindex != nhb->ifindex)
|
if (nha->ifindex != nhb->ifindex)
|
||||||
return false;
|
return false;
|
||||||
/* FALLTHROUGH */
|
fallthrough;
|
||||||
case NEXTHOP_TYPE_IPV6:
|
case NEXTHOP_TYPE_IPV6:
|
||||||
if (!IN6_ARE_ADDR_EQUAL(&nha->address, &nhb->address))
|
if (!IN6_ARE_ADDR_EQUAL(&nha->address, &nhb->address))
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -698,7 +698,7 @@ static uint8_t *ospfv3GeneralGroup(struct variable *v, oid *name,
|
||||||
if (ospf6)
|
if (ospf6)
|
||||||
return SNMP_INTEGER(ospf6->ref_bandwidth);
|
return SNMP_INTEGER(ospf6->ref_bandwidth);
|
||||||
/* Otherwise, like for "not implemented". */
|
/* Otherwise, like for "not implemented". */
|
||||||
/* fallthru */
|
return NULL;
|
||||||
case OSPFv3RESTARTSUPPORT:
|
case OSPFv3RESTARTSUPPORT:
|
||||||
case OSPFv3RESTARTINTERVAL:
|
case OSPFv3RESTARTINTERVAL:
|
||||||
case OSPFv3RESTARTSTRICTLSACHECKING:
|
case OSPFv3RESTARTSTRICTLSACHECKING:
|
||||||
|
|
|
@ -954,7 +954,7 @@ int ospf_flood_through(struct ospf *ospf, struct ospf_neighbor *inbr,
|
||||||
|
|
||||||
if (IS_DEBUG_OSPF_NSSA)
|
if (IS_DEBUG_OSPF_NSSA)
|
||||||
zlog_debug("%s: LOCAL NSSA FLOOD of Type-7.", __func__);
|
zlog_debug("%s: LOCAL NSSA FLOOD of Type-7.", __func__);
|
||||||
/* Fallthrough */
|
fallthrough;
|
||||||
default:
|
default:
|
||||||
lsa_ack_flag = ospf_flood_through_area(lsa->area, inbr, lsa);
|
lsa_ack_flag = ospf_flood_through_area(lsa->area, inbr, lsa);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1167,7 +1167,7 @@ static int ospf_vl_set_params(struct ospf_area *area,
|
||||||
if (IS_DEBUG_OSPF_EVENT)
|
if (IS_DEBUG_OSPF_EVENT)
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"found back link through VL");
|
"found back link through VL");
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case LSA_LINK_TYPE_TRANSIT:
|
case LSA_LINK_TYPE_TRANSIT:
|
||||||
case LSA_LINK_TYPE_POINTOPOINT:
|
case LSA_LINK_TYPE_POINTOPOINT:
|
||||||
if (!IPV4_ADDR_SAME(&vl_data->peer_addr,
|
if (!IPV4_ADDR_SAME(&vl_data->peer_addr,
|
||||||
|
|
|
@ -3096,13 +3096,14 @@ struct ospf_lsa *ospf_lsa_install(struct ospf *ospf, struct ospf_interface *oi,
|
||||||
/* Incoming "oi" for this LSA has set at LSUpd
|
/* Incoming "oi" for this LSA has set at LSUpd
|
||||||
* reception. */
|
* reception. */
|
||||||
}
|
}
|
||||||
/* Fallthrough */
|
fallthrough;
|
||||||
case OSPF_OPAQUE_AREA_LSA:
|
case OSPF_OPAQUE_AREA_LSA:
|
||||||
case OSPF_OPAQUE_AS_LSA:
|
case OSPF_OPAQUE_AS_LSA:
|
||||||
new = ospf_opaque_lsa_install(lsa, rt_recalc);
|
new = ospf_opaque_lsa_install(lsa, rt_recalc);
|
||||||
break;
|
break;
|
||||||
case OSPF_AS_NSSA_LSA:
|
case OSPF_AS_NSSA_LSA:
|
||||||
new = ospf_external_lsa_install(ospf, lsa, rt_recalc);
|
new = ospf_external_lsa_install(ospf, lsa, rt_recalc);
|
||||||
|
break;
|
||||||
default: /* type-6,8,9....nothing special */
|
default: /* type-6,8,9....nothing special */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,7 +107,7 @@ static void nsm_timer_set(struct ospf_neighbor *nbr)
|
||||||
case NSM_Down:
|
case NSM_Down:
|
||||||
EVENT_OFF(nbr->t_inactivity);
|
EVENT_OFF(nbr->t_inactivity);
|
||||||
EVENT_OFF(nbr->t_hello_reply);
|
EVENT_OFF(nbr->t_hello_reply);
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case NSM_Attempt:
|
case NSM_Attempt:
|
||||||
case NSM_Init:
|
case NSM_Init:
|
||||||
case NSM_TwoWay:
|
case NSM_TwoWay:
|
||||||
|
|
|
@ -1042,7 +1042,7 @@ static void ospf_db_desc_proc(struct stream *s, struct ospf_interface *oi,
|
||||||
/* Neighbour has a more recent LSA, we must request it
|
/* Neighbour has a more recent LSA, we must request it
|
||||||
*/
|
*/
|
||||||
ospf_ls_request_add(nbr, new);
|
ospf_ls_request_add(nbr, new);
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case 0:
|
case 0:
|
||||||
/* If we have a copy of this LSA, it's either less
|
/* If we have a copy of this LSA, it's either less
|
||||||
* recent
|
* recent
|
||||||
|
@ -1231,7 +1231,7 @@ static void ospf_db_desc(struct ip *iph, struct ospf_header *ospfh,
|
||||||
through to case ExStart below. */
|
through to case ExStart below. */
|
||||||
if (nbr->state != NSM_ExStart)
|
if (nbr->state != NSM_ExStart)
|
||||||
break;
|
break;
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case NSM_ExStart:
|
case NSM_ExStart:
|
||||||
/* Initial DBD */
|
/* Initial DBD */
|
||||||
if ((IS_SET_DD_ALL(dd->flags) == OSPF_DD_FLAG_ALL)
|
if ((IS_SET_DD_ALL(dd->flags) == OSPF_DD_FLAG_ALL)
|
||||||
|
@ -1641,7 +1641,7 @@ static struct list *ospf_ls_upd_list_lsa(struct ospf_neighbor *nbr,
|
||||||
case OSPF_OPAQUE_LINK_LSA:
|
case OSPF_OPAQUE_LINK_LSA:
|
||||||
lsa->oi = oi; /* Remember incoming interface for
|
lsa->oi = oi; /* Remember incoming interface for
|
||||||
flooding control. */
|
flooding control. */
|
||||||
/* Fallthrough */
|
fallthrough;
|
||||||
default:
|
default:
|
||||||
lsa->area = oi->area;
|
lsa->area = oi->area;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -534,6 +534,7 @@ void pbr_nht_set_seq_nhg_data(struct pbr_map_sequence *pbrms,
|
||||||
case NEXTHOP_TYPE_IPV4:
|
case NEXTHOP_TYPE_IPV4:
|
||||||
case NEXTHOP_TYPE_IPV4_IFINDEX:
|
case NEXTHOP_TYPE_IPV4_IFINDEX:
|
||||||
pbrms->family = AF_INET;
|
pbrms->family = AF_INET;
|
||||||
|
break;
|
||||||
case NEXTHOP_TYPE_IFINDEX:
|
case NEXTHOP_TYPE_IFINDEX:
|
||||||
case NEXTHOP_TYPE_BLACKHOLE:
|
case NEXTHOP_TYPE_BLACKHOLE:
|
||||||
break;
|
break;
|
||||||
|
@ -889,7 +890,7 @@ static void pbr_nht_individual_nexthop_update(struct pbr_nexthop_cache *pnhc,
|
||||||
pbr_nht_individual_nexthop_interface_update(pnhc, pnhi);
|
pbr_nht_individual_nexthop_interface_update(pnhc, pnhi);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* Intentional fall thru */
|
fallthrough;
|
||||||
case NEXTHOP_TYPE_IPV4_IFINDEX:
|
case NEXTHOP_TYPE_IPV4_IFINDEX:
|
||||||
case NEXTHOP_TYPE_IPV4:
|
case NEXTHOP_TYPE_IPV4:
|
||||||
case NEXTHOP_TYPE_IPV6:
|
case NEXTHOP_TYPE_IPV6:
|
||||||
|
|
|
@ -338,7 +338,7 @@ bool pim_nht_bsr_rpf_check(struct pim_instance *pim, pim_addr bsr_addr,
|
||||||
if (nh->ifindex == IFINDEX_INTERNAL)
|
if (nh->ifindex == IFINDEX_INTERNAL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case NEXTHOP_TYPE_IPV4_IFINDEX:
|
case NEXTHOP_TYPE_IPV4_IFINDEX:
|
||||||
nhaddr = nh->gate.ipv4;
|
nhaddr = nh->gate.ipv4;
|
||||||
break;
|
break;
|
||||||
|
@ -350,7 +350,7 @@ bool pim_nht_bsr_rpf_check(struct pim_instance *pim, pim_addr bsr_addr,
|
||||||
if (nh->ifindex == IFINDEX_INTERNAL)
|
if (nh->ifindex == IFINDEX_INTERNAL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
case NEXTHOP_TYPE_IPV6_IFINDEX:
|
case NEXTHOP_TYPE_IPV6_IFINDEX:
|
||||||
nhaddr = nh->gate.ipv6;
|
nhaddr = nh->gate.ipv6;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -835,7 +835,7 @@ static void parse_test(struct peer *peer, struct test_segment *t, int type)
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case CAPABILITY:
|
case CAPABILITY:
|
||||||
len += 2; /* to cover the OPT-Param header */
|
len += 2; /* to cover the OPT-Param header */
|
||||||
_FALLTHROUGH
|
fallthrough;
|
||||||
case OPT_PARAM:
|
case OPT_PARAM:
|
||||||
printf("len: %u\n", len);
|
printf("len: %u\n", len);
|
||||||
/* peek_for_as4 wants getp at capibility*/
|
/* peek_for_as4 wants getp at capibility*/
|
||||||
|
|
|
@ -231,7 +231,7 @@ static void walk_const_fptrs(struct json_object *js_call, LLVMValueRef value,
|
||||||
"%s: calls function pointer from unhandled const GEP\n",
|
"%s: calls function pointer from unhandled const GEP\n",
|
||||||
prefix);
|
prefix);
|
||||||
*hdr_written = true;
|
*hdr_written = true;
|
||||||
/* fallthru */
|
fallthrough;
|
||||||
default:
|
default:
|
||||||
/* to help the user / development */
|
/* to help the user / development */
|
||||||
if (!*hdr_written) {
|
if (!*hdr_written) {
|
||||||
|
|
|
@ -908,7 +908,7 @@ static void phase_check(void)
|
||||||
"Phased restart: all routing daemon stop jobs have completed.");
|
"Phased restart: all routing daemon stop jobs have completed.");
|
||||||
set_phase(PHASE_WAITING_DOWN);
|
set_phase(PHASE_WAITING_DOWN);
|
||||||
|
|
||||||
/*FALLTHRU*/
|
fallthrough;
|
||||||
case PHASE_WAITING_DOWN:
|
case PHASE_WAITING_DOWN:
|
||||||
if (gs.numdown + IS_UP(gs.special) < gs.numdaemons)
|
if (gs.numdown + IS_UP(gs.special) < gs.numdaemons)
|
||||||
break;
|
break;
|
||||||
|
@ -918,7 +918,7 @@ static void phase_check(void)
|
||||||
1);
|
1);
|
||||||
set_phase(PHASE_ZEBRA_RESTART_PENDING);
|
set_phase(PHASE_ZEBRA_RESTART_PENDING);
|
||||||
|
|
||||||
/*FALLTHRU*/
|
fallthrough;
|
||||||
case PHASE_ZEBRA_RESTART_PENDING:
|
case PHASE_ZEBRA_RESTART_PENDING:
|
||||||
if (gs.special->restart.pid)
|
if (gs.special->restart.pid)
|
||||||
break;
|
break;
|
||||||
|
@ -927,7 +927,7 @@ static void phase_check(void)
|
||||||
gs.special->name);
|
gs.special->name);
|
||||||
set_phase(PHASE_WAITING_ZEBRA_UP);
|
set_phase(PHASE_WAITING_ZEBRA_UP);
|
||||||
|
|
||||||
/*FALLTHRU*/
|
fallthrough;
|
||||||
case PHASE_WAITING_ZEBRA_UP:
|
case PHASE_WAITING_ZEBRA_UP:
|
||||||
if (!IS_UP(gs.special))
|
if (!IS_UP(gs.special))
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -859,7 +859,7 @@ static int fpm_nl_enqueue(struct fpm_nl_ctx *fnc, struct zebra_dplane_ctx *ctx)
|
||||||
if (op == DPLANE_OP_ROUTE_DELETE)
|
if (op == DPLANE_OP_ROUTE_DELETE)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* FALL THROUGH */
|
fallthrough;
|
||||||
case DPLANE_OP_ROUTE_INSTALL:
|
case DPLANE_OP_ROUTE_INSTALL:
|
||||||
rv = netlink_route_multipath_msg_encode(RTM_NEWROUTE, ctx,
|
rv = netlink_route_multipath_msg_encode(RTM_NEWROUTE, ctx,
|
||||||
&nl_buf[nl_buf_len],
|
&nl_buf[nl_buf_len],
|
||||||
|
|
|
@ -366,7 +366,8 @@ static inline int proto2zebra(int proto, int family, bool is_nexthop)
|
||||||
proto = ZEBRA_ROUTE_NHG;
|
proto = ZEBRA_ROUTE_NHG;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* Intentional fall thru */
|
proto = ZEBRA_ROUTE_KERNEL;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
/*
|
/*
|
||||||
* When a user adds a new protocol this will show up
|
* When a user adds a new protocol this will show up
|
||||||
|
|
|
@ -1182,6 +1182,7 @@ static char *nhlfe2str(const struct zebra_nhlfe *nhlfe, char *buf, int size)
|
||||||
break;
|
break;
|
||||||
case NEXTHOP_TYPE_IFINDEX:
|
case NEXTHOP_TYPE_IFINDEX:
|
||||||
snprintf(buf, size, "Ifindex: %u", nexthop->ifindex);
|
snprintf(buf, size, "Ifindex: %u", nexthop->ifindex);
|
||||||
|
break;
|
||||||
case NEXTHOP_TYPE_BLACKHOLE:
|
case NEXTHOP_TYPE_BLACKHOLE:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1310,6 +1310,7 @@ int nhg_ctx_process(struct nhg_ctx *ctx)
|
||||||
break;
|
break;
|
||||||
case NHG_CTX_OP_DEL:
|
case NHG_CTX_OP_DEL:
|
||||||
ret = nhg_ctx_process_del(ctx);
|
ret = nhg_ctx_process_del(ctx);
|
||||||
|
break;
|
||||||
case NHG_CTX_OP_NONE:
|
case NHG_CTX_OP_NONE:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4082,7 +4082,6 @@ static void _route_entry_dump_nh(const struct route_entry *re,
|
||||||
ifp ? ifp->name : "Unknown");
|
ifp ? ifp->name : "Unknown");
|
||||||
break;
|
break;
|
||||||
case NEXTHOP_TYPE_IPV4:
|
case NEXTHOP_TYPE_IPV4:
|
||||||
/* fallthrough */
|
|
||||||
case NEXTHOP_TYPE_IPV4_IFINDEX:
|
case NEXTHOP_TYPE_IPV4_IFINDEX:
|
||||||
inet_ntop(AF_INET, &nexthop->gate, nhname, INET6_ADDRSTRLEN);
|
inet_ntop(AF_INET, &nexthop->gate, nhname, INET6_ADDRSTRLEN);
|
||||||
break;
|
break;
|
||||||
|
@ -5043,7 +5042,7 @@ struct route_table *rib_tables_iter_next(rib_tables_iter_t *iter)
|
||||||
iter->vrf_id = VRF_DEFAULT;
|
iter->vrf_id = VRF_DEFAULT;
|
||||||
iter->afi_safi_ix = -1;
|
iter->afi_safi_ix = -1;
|
||||||
|
|
||||||
/* Fall through */
|
fallthrough;
|
||||||
|
|
||||||
case RIB_TABLES_ITER_S_ITERATING:
|
case RIB_TABLES_ITER_S_ITERATING:
|
||||||
iter->afi_safi_ix++;
|
iter->afi_safi_ix++;
|
||||||
|
|
Loading…
Reference in a new issue