mirror of
https://git.proxmox.com/git/mirror_frr
synced 2026-01-06 07:21:34 +00:00
zebra: Add missing enums to switch statements
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
58cf0823bf
commit
a98701f053
@ -247,7 +247,9 @@ void connected_up(struct interface *ifp, struct connected *ifc)
|
||||
return;
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
case AFI_UNSPEC:
|
||||
case AFI_L2VPN:
|
||||
case AFI_MAX:
|
||||
flog_warn(EC_ZEBRA_CONNECTED_AFI_UNKNOWN,
|
||||
"Received unknown AFI: %s", afi2str(afi));
|
||||
return;
|
||||
@ -435,7 +437,9 @@ void connected_down(struct interface *ifp, struct connected *ifc)
|
||||
if (IN6_IS_ADDR_UNSPECIFIED(&p.u.prefix6))
|
||||
return;
|
||||
break;
|
||||
default:
|
||||
case AFI_UNSPEC:
|
||||
case AFI_L2VPN:
|
||||
case AFI_MAX:
|
||||
zlog_warn("Unknown AFI: %s", afi2str(afi));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1362,7 +1362,57 @@ static ssize_t netlink_intf_msg_encoder(struct zebra_dplane_ctx *ctx, void *buf,
|
||||
case DPLANE_OP_INTF_DELETE:
|
||||
cmd = RTM_DELLINK;
|
||||
break;
|
||||
default:
|
||||
case DPLANE_OP_NONE:
|
||||
case DPLANE_OP_ROUTE_INSTALL:
|
||||
case DPLANE_OP_ROUTE_UPDATE:
|
||||
case DPLANE_OP_ROUTE_DELETE:
|
||||
case DPLANE_OP_ROUTE_NOTIFY:
|
||||
case DPLANE_OP_NH_INSTALL:
|
||||
case DPLANE_OP_NH_UPDATE:
|
||||
case DPLANE_OP_NH_DELETE:
|
||||
case DPLANE_OP_LSP_INSTALL:
|
||||
case DPLANE_OP_LSP_DELETE:
|
||||
case DPLANE_OP_LSP_NOTIFY:
|
||||
case DPLANE_OP_LSP_UPDATE:
|
||||
case DPLANE_OP_PW_INSTALL:
|
||||
case DPLANE_OP_PW_UNINSTALL:
|
||||
case DPLANE_OP_SYS_ROUTE_ADD:
|
||||
case DPLANE_OP_SYS_ROUTE_DELETE:
|
||||
case DPLANE_OP_ADDR_INSTALL:
|
||||
case DPLANE_OP_ADDR_UNINSTALL:
|
||||
case DPLANE_OP_MAC_INSTALL:
|
||||
case DPLANE_OP_MAC_DELETE:
|
||||
case DPLANE_OP_NEIGH_INSTALL:
|
||||
case DPLANE_OP_NEIGH_UPDATE:
|
||||
case DPLANE_OP_NEIGH_DELETE:
|
||||
case DPLANE_OP_NEIGH_DISCOVER:
|
||||
case DPLANE_OP_VTEP_ADD:
|
||||
case DPLANE_OP_VTEP_DELETE:
|
||||
case DPLANE_OP_RULE_ADD:
|
||||
case DPLANE_OP_RULE_DELETE:
|
||||
case DPLANE_OP_RULE_UPDATE:
|
||||
case DPLANE_OP_BR_PORT_UPDATE:
|
||||
case DPLANE_OP_IPTABLE_ADD:
|
||||
case DPLANE_OP_IPTABLE_DELETE:
|
||||
case DPLANE_OP_IPSET_ADD:
|
||||
case DPLANE_OP_IPSET_ENTRY_ADD:
|
||||
case DPLANE_OP_IPSET_ENTRY_DELETE:
|
||||
case DPLANE_OP_IPSET_DELETE:
|
||||
case DPLANE_OP_NEIGH_IP_INSTALL:
|
||||
case DPLANE_OP_NEIGH_IP_DELETE:
|
||||
case DPLANE_OP_NEIGH_TABLE_UPDATE:
|
||||
case DPLANE_OP_GRE_SET:
|
||||
case DPLANE_OP_INTF_ADDR_ADD:
|
||||
case DPLANE_OP_INTF_ADDR_DEL:
|
||||
case DPLANE_OP_INTF_NETCONFIG:
|
||||
case DPLANE_OP_TC_QDISC_INSTALL:
|
||||
case DPLANE_OP_TC_QDISC_UNINSTALL:
|
||||
case DPLANE_OP_TC_CLASS_ADD:
|
||||
case DPLANE_OP_TC_CLASS_DELETE:
|
||||
case DPLANE_OP_TC_CLASS_UPDATE:
|
||||
case DPLANE_OP_TC_FILTER_ADD:
|
||||
case DPLANE_OP_TC_FILTER_DELETE:
|
||||
case DPLANE_OP_TC_FILTER_UPDATE:
|
||||
flog_err(
|
||||
EC_ZEBRA_NHG_FIB_UPDATE,
|
||||
"Context received for kernel interface update with incorrect OP code (%u)",
|
||||
|
||||
@ -1226,7 +1226,8 @@ int rtm_write(int message, union sockunion *dest, union sockunion *mask,
|
||||
case BLACKHOLE_REJECT:
|
||||
msg.rtm.rtm_flags |= RTF_REJECT;
|
||||
break;
|
||||
default:
|
||||
case BLACKHOLE_NULL:
|
||||
case BLACKHOLE_ADMINPROHIB:
|
||||
msg.rtm.rtm_flags |= RTF_BLACKHOLE;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -113,9 +113,13 @@ int router_id_get(afi_t afi, struct prefix *p, struct zebra_vrf *zvrf)
|
||||
if (addr)
|
||||
memcpy(&p->u.prefix6, addr, sizeof(struct in6_addr));
|
||||
return 0;
|
||||
default:
|
||||
case AFI_UNSPEC:
|
||||
case AFI_L2VPN:
|
||||
case AFI_MAX:
|
||||
return -1;
|
||||
}
|
||||
|
||||
assert(!"Reached end of function we should never hit");
|
||||
}
|
||||
|
||||
static int router_id_set(afi_t afi, struct prefix *p, struct zebra_vrf *zvrf)
|
||||
@ -133,7 +137,9 @@ static int router_id_set(afi_t afi, struct prefix *p, struct zebra_vrf *zvrf)
|
||||
case AFI_IP6:
|
||||
zvrf->rid6_user_assigned.u.prefix6 = p->u.prefix6;
|
||||
break;
|
||||
default:
|
||||
case AFI_UNSPEC:
|
||||
case AFI_L2VPN:
|
||||
case AFI_MAX:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
@ -1569,7 +1569,16 @@ static bool _netlink_route_build_singlepath(const struct prefix *p,
|
||||
ctx->table))
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
case ZEBRA_SEG6_LOCAL_ACTION_END_DX2:
|
||||
case ZEBRA_SEG6_LOCAL_ACTION_END_DX6:
|
||||
case ZEBRA_SEG6_LOCAL_ACTION_END_B6:
|
||||
case ZEBRA_SEG6_LOCAL_ACTION_END_B6_ENCAP:
|
||||
case ZEBRA_SEG6_LOCAL_ACTION_END_BM:
|
||||
case ZEBRA_SEG6_LOCAL_ACTION_END_S:
|
||||
case ZEBRA_SEG6_LOCAL_ACTION_END_AS:
|
||||
case ZEBRA_SEG6_LOCAL_ACTION_END_AM:
|
||||
case ZEBRA_SEG6_LOCAL_ACTION_END_BPF:
|
||||
case ZEBRA_SEG6_LOCAL_ACTION_UNSPEC:
|
||||
zlog_err("%s: unsupport seg6local behaviour action=%u",
|
||||
__func__,
|
||||
nexthop->nh_srv6->seg6local_action);
|
||||
@ -2151,7 +2160,8 @@ ssize_t netlink_route_multipath_msg_encode(int cmd,
|
||||
case BLACKHOLE_REJECT:
|
||||
req->r.rtm_type = RTN_UNREACHABLE;
|
||||
break;
|
||||
default:
|
||||
case BLACKHOLE_UNSPEC:
|
||||
case BLACKHOLE_NULL:
|
||||
req->r.rtm_type = RTN_BLACKHOLE;
|
||||
break;
|
||||
}
|
||||
@ -4448,7 +4458,7 @@ static int netlink_neigh_table_update_ctx(const struct zebra_dplane_ctx *ctx,
|
||||
static ssize_t netlink_neigh_msg_encoder(struct zebra_dplane_ctx *ctx,
|
||||
void *buf, size_t buflen)
|
||||
{
|
||||
ssize_t ret;
|
||||
ssize_t ret = 0;
|
||||
|
||||
switch (dplane_ctx_get_op(ctx)) {
|
||||
case DPLANE_OP_NEIGH_INSTALL:
|
||||
@ -4472,7 +4482,51 @@ static ssize_t netlink_neigh_msg_encoder(struct zebra_dplane_ctx *ctx,
|
||||
case DPLANE_OP_NEIGH_TABLE_UPDATE:
|
||||
ret = netlink_neigh_table_update_ctx(ctx, buf, buflen);
|
||||
break;
|
||||
default:
|
||||
case DPLANE_OP_ROUTE_INSTALL:
|
||||
case DPLANE_OP_ROUTE_UPDATE:
|
||||
case DPLANE_OP_ROUTE_DELETE:
|
||||
case DPLANE_OP_ROUTE_NOTIFY:
|
||||
case DPLANE_OP_NH_INSTALL:
|
||||
case DPLANE_OP_NH_UPDATE:
|
||||
case DPLANE_OP_NH_DELETE:
|
||||
case DPLANE_OP_LSP_INSTALL:
|
||||
case DPLANE_OP_LSP_UPDATE:
|
||||
case DPLANE_OP_LSP_DELETE:
|
||||
case DPLANE_OP_LSP_NOTIFY:
|
||||
case DPLANE_OP_PW_INSTALL:
|
||||
case DPLANE_OP_PW_UNINSTALL:
|
||||
case DPLANE_OP_SYS_ROUTE_ADD:
|
||||
case DPLANE_OP_SYS_ROUTE_DELETE:
|
||||
case DPLANE_OP_ADDR_INSTALL:
|
||||
case DPLANE_OP_ADDR_UNINSTALL:
|
||||
case DPLANE_OP_MAC_INSTALL:
|
||||
case DPLANE_OP_MAC_DELETE:
|
||||
case DPLANE_OP_RULE_ADD:
|
||||
case DPLANE_OP_RULE_DELETE:
|
||||
case DPLANE_OP_RULE_UPDATE:
|
||||
case DPLANE_OP_BR_PORT_UPDATE:
|
||||
case DPLANE_OP_IPTABLE_ADD:
|
||||
case DPLANE_OP_IPTABLE_DELETE:
|
||||
case DPLANE_OP_IPSET_ADD:
|
||||
case DPLANE_OP_IPSET_DELETE:
|
||||
case DPLANE_OP_IPSET_ENTRY_ADD:
|
||||
case DPLANE_OP_IPSET_ENTRY_DELETE:
|
||||
case DPLANE_OP_GRE_SET:
|
||||
case DPLANE_OP_INTF_ADDR_ADD:
|
||||
case DPLANE_OP_INTF_ADDR_DEL:
|
||||
case DPLANE_OP_INTF_NETCONFIG:
|
||||
case DPLANE_OP_INTF_INSTALL:
|
||||
case DPLANE_OP_INTF_UPDATE:
|
||||
case DPLANE_OP_INTF_DELETE:
|
||||
case DPLANE_OP_TC_QDISC_INSTALL:
|
||||
case DPLANE_OP_TC_QDISC_UNINSTALL:
|
||||
case DPLANE_OP_TC_CLASS_ADD:
|
||||
case DPLANE_OP_TC_CLASS_DELETE:
|
||||
case DPLANE_OP_TC_CLASS_UPDATE:
|
||||
case DPLANE_OP_TC_FILTER_ADD:
|
||||
case DPLANE_OP_TC_FILTER_DELETE:
|
||||
case DPLANE_OP_TC_FILTER_UPDATE:
|
||||
case DPLANE_OP_NONE:
|
||||
ret = -1;
|
||||
}
|
||||
|
||||
|
||||
@ -745,7 +745,8 @@ int netlink_qdisc_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
|
||||
case TC_QDISC_NOQUEUE:
|
||||
/* "noqueue" is the default qdisc */
|
||||
break;
|
||||
default:
|
||||
case TC_QDISC_HTB:
|
||||
case TC_QDISC_UNSPEC:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -143,7 +143,7 @@ static int zserv_encode_nexthop(struct stream *s, struct nexthop *nexthop)
|
||||
case NEXTHOP_TYPE_IFINDEX:
|
||||
stream_putl(s, nexthop->ifindex);
|
||||
break;
|
||||
default:
|
||||
case NEXTHOP_TYPE_BLACKHOLE:
|
||||
/* do nothing */
|
||||
break;
|
||||
}
|
||||
@ -576,7 +576,9 @@ int zsend_redistribute_route(int cmd, struct zserv *client,
|
||||
else
|
||||
client->redist_v6_del_cnt++;
|
||||
break;
|
||||
default:
|
||||
case AFI_L2VPN:
|
||||
case AFI_MAX:
|
||||
case AFI_UNSPEC:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -3424,7 +3426,10 @@ static inline void zread_tc_filter(ZAPI_HANDLER_ARGS)
|
||||
STREAM_GETL(s, filter.filter.u.flower.classid);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
case TC_FILTER_BPF:
|
||||
case TC_FILTER_FLOW:
|
||||
case TC_FILTER_U32:
|
||||
case TC_FILTER_UNSPEC:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -902,7 +902,7 @@ static inline int zfpm_encode_route(rib_dest_t *dest, struct route_entry *re,
|
||||
#endif /* HAVE_NETLINK */
|
||||
break;
|
||||
|
||||
default:
|
||||
case ZFPM_MSG_FORMAT_NONE:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -315,7 +315,7 @@ static int netlink_route_info_fill(struct netlink_route_info *ri, int cmd,
|
||||
ri->rtm_type = RTN_UNREACHABLE;
|
||||
break;
|
||||
case BLACKHOLE_NULL:
|
||||
default:
|
||||
case BLACKHOLE_UNSPEC:
|
||||
ri->rtm_type = RTN_BLACKHOLE;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -186,7 +186,8 @@ static Fpm__AddRoute *create_add_route_message(qpb_allocator_t *allocator,
|
||||
msg->route_type = FPM__ROUTE_TYPE__UNREACHABLE;
|
||||
break;
|
||||
case BLACKHOLE_NULL:
|
||||
default:
|
||||
case BLACKHOLE_UNSPEC:
|
||||
case BLACKHOLE_ADMINPROHIB:
|
||||
msg->route_type = FPM__ROUTE_TYPE__BLACKHOLE;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -888,7 +888,14 @@ int zebra_mlag_protobuf_encode_client_data(struct stream *s, uint32_t *msg_type)
|
||||
if (cleanup)
|
||||
return -1;
|
||||
} break;
|
||||
default:
|
||||
case MLAG_REGISTER:
|
||||
case MLAG_DEREGISTER:
|
||||
case MLAG_STATUS_UPDATE:
|
||||
case MLAG_DUMP:
|
||||
case MLAG_PIM_CFG_DUMP:
|
||||
case MLAG_VXLAN_UPDATE:
|
||||
case MLAG_PEER_FRR_STATUS:
|
||||
case MLAG_MSG_NONE:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -1848,7 +1848,57 @@ void zebra_mpls_lsp_dplane_result(struct zebra_dplane_ctx *ctx)
|
||||
ZEBRA_SR_POLICY_LABEL_REMOVED);
|
||||
break;
|
||||
|
||||
default:
|
||||
case DPLANE_OP_LSP_NOTIFY:
|
||||
case DPLANE_OP_NONE:
|
||||
case DPLANE_OP_ROUTE_INSTALL:
|
||||
case DPLANE_OP_ROUTE_UPDATE:
|
||||
case DPLANE_OP_ROUTE_DELETE:
|
||||
case DPLANE_OP_ROUTE_NOTIFY:
|
||||
case DPLANE_OP_NH_INSTALL:
|
||||
case DPLANE_OP_NH_UPDATE:
|
||||
case DPLANE_OP_NH_DELETE:
|
||||
case DPLANE_OP_PW_INSTALL:
|
||||
case DPLANE_OP_PW_UNINSTALL:
|
||||
case DPLANE_OP_SYS_ROUTE_ADD:
|
||||
case DPLANE_OP_SYS_ROUTE_DELETE:
|
||||
case DPLANE_OP_ADDR_INSTALL:
|
||||
case DPLANE_OP_ADDR_UNINSTALL:
|
||||
case DPLANE_OP_MAC_INSTALL:
|
||||
case DPLANE_OP_MAC_DELETE:
|
||||
case DPLANE_OP_NEIGH_INSTALL:
|
||||
case DPLANE_OP_NEIGH_UPDATE:
|
||||
case DPLANE_OP_NEIGH_DELETE:
|
||||
case DPLANE_OP_VTEP_ADD:
|
||||
case DPLANE_OP_VTEP_DELETE:
|
||||
case DPLANE_OP_RULE_ADD:
|
||||
case DPLANE_OP_RULE_DELETE:
|
||||
case DPLANE_OP_RULE_UPDATE:
|
||||
case DPLANE_OP_NEIGH_DISCOVER:
|
||||
case DPLANE_OP_BR_PORT_UPDATE:
|
||||
case DPLANE_OP_IPTABLE_ADD:
|
||||
case DPLANE_OP_IPTABLE_DELETE:
|
||||
case DPLANE_OP_IPSET_ADD:
|
||||
case DPLANE_OP_IPSET_DELETE:
|
||||
case DPLANE_OP_IPSET_ENTRY_ADD:
|
||||
case DPLANE_OP_IPSET_ENTRY_DELETE:
|
||||
case DPLANE_OP_NEIGH_IP_INSTALL:
|
||||
case DPLANE_OP_NEIGH_IP_DELETE:
|
||||
case DPLANE_OP_NEIGH_TABLE_UPDATE:
|
||||
case DPLANE_OP_GRE_SET:
|
||||
case DPLANE_OP_INTF_ADDR_ADD:
|
||||
case DPLANE_OP_INTF_ADDR_DEL:
|
||||
case DPLANE_OP_INTF_NETCONFIG:
|
||||
case DPLANE_OP_INTF_INSTALL:
|
||||
case DPLANE_OP_INTF_UPDATE:
|
||||
case DPLANE_OP_INTF_DELETE:
|
||||
case DPLANE_OP_TC_QDISC_INSTALL:
|
||||
case DPLANE_OP_TC_QDISC_UNINSTALL:
|
||||
case DPLANE_OP_TC_CLASS_ADD:
|
||||
case DPLANE_OP_TC_CLASS_DELETE:
|
||||
case DPLANE_OP_TC_CLASS_UPDATE:
|
||||
case DPLANE_OP_TC_FILTER_ADD:
|
||||
case DPLANE_OP_TC_FILTER_DELETE:
|
||||
case DPLANE_OP_TC_FILTER_UPDATE:
|
||||
break;
|
||||
|
||||
} /* Switch */
|
||||
|
||||
@ -255,7 +255,57 @@ static int kernel_lsp_cmd(struct zebra_dplane_ctx *ctx)
|
||||
case DPLANE_OP_LSP_UPDATE:
|
||||
action = RTM_CHANGE;
|
||||
break;
|
||||
default:
|
||||
case DPLANE_OP_NONE:
|
||||
case DPLANE_OP_ROUTE_INSTALL:
|
||||
case DPLANE_OP_ROUTE_UPDATE:
|
||||
case DPLANE_OP_ROUTE_DELETE:
|
||||
case DPLANE_OP_ROUTE_NOTIFY:
|
||||
case DPLANE_OP_NH_INSTALL:
|
||||
case DPLANE_OP_NH_UPDATE:
|
||||
case DPLANE_OP_NH_DELETE:
|
||||
case DPLANE_OP_LSP_NOTIFY:
|
||||
case DPLANE_OP_PW_INSTALL:
|
||||
case DPLANE_OP_PW_UNINSTALL:
|
||||
case DPLANE_OP_SYS_ROUTE_ADD:
|
||||
case DPLANE_OP_SYS_ROUTE_DELETE:
|
||||
case DPLANE_OP_ADDR_INSTALL:
|
||||
case DPLANE_OP_ADDR_UNINSTALL:
|
||||
case DPLANE_OP_MAC_INSTALL:
|
||||
case DPLANE_OP_MAC_DELETE:
|
||||
case DPLANE_OP_NEIGH_INSTALL:
|
||||
case DPLANE_OP_NEIGH_UPDATE:
|
||||
case DPLANE_OP_NEIGH_DELETE:
|
||||
case DPLANE_OP_VTEP_ADD:
|
||||
case DPLANE_OP_VTEP_DELETE:
|
||||
case DPLANE_OP_RULE_ADD:
|
||||
case DPLANE_OP_RULE_DELETE:
|
||||
case DPLANE_OP_RULE_UPDATE:
|
||||
case DPLANE_OP_NEIGH_DISCOVER:
|
||||
case DPLANE_OP_BR_PORT_UPDATE:
|
||||
case DPLANE_OP_IPTABLE_ADD:
|
||||
case DPLANE_OP_IPTABLE_DELETE:
|
||||
case DPLANE_OP_IPSET_ADD:
|
||||
case DPLANE_OP_IPSET_DELETE:
|
||||
case DPLANE_OP_IPSET_ENTRY_ADD:
|
||||
case DPLANE_OP_IPSET_ENTRY_DELETE:
|
||||
case DPLANE_OP_NEIGH_IP_INSTALL:
|
||||
case DPLANE_OP_NEIGH_IP_DELETE:
|
||||
case DPLANE_OP_NEIGH_TABLE_UPDATE:
|
||||
case DPLANE_OP_GRE_SET:
|
||||
case DPLANE_OP_INTF_ADDR_ADD:
|
||||
case DPLANE_OP_INTF_ADDR_DEL:
|
||||
case DPLANE_OP_INTF_NETCONFIG:
|
||||
case DPLANE_OP_INTF_INSTALL:
|
||||
case DPLANE_OP_INTF_UPDATE:
|
||||
case DPLANE_OP_INTF_DELETE:
|
||||
case DPLANE_OP_TC_QDISC_INSTALL:
|
||||
case DPLANE_OP_TC_QDISC_UNINSTALL:
|
||||
case DPLANE_OP_TC_CLASS_ADD:
|
||||
case DPLANE_OP_TC_CLASS_DELETE:
|
||||
case DPLANE_OP_TC_CLASS_UPDATE:
|
||||
case DPLANE_OP_TC_FILTER_ADD:
|
||||
case DPLANE_OP_TC_FILTER_DELETE:
|
||||
case DPLANE_OP_TC_FILTER_UPDATE:
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -415,7 +465,58 @@ enum zebra_dplane_result kernel_pw_update(struct zebra_dplane_ctx *ctx)
|
||||
case DPLANE_OP_PW_UNINSTALL:
|
||||
result = kmpw_uninstall(ctx);
|
||||
break;
|
||||
default:
|
||||
case DPLANE_OP_NONE:
|
||||
case DPLANE_OP_ROUTE_INSTALL:
|
||||
case DPLANE_OP_ROUTE_UPDATE:
|
||||
case DPLANE_OP_ROUTE_DELETE:
|
||||
case DPLANE_OP_ROUTE_NOTIFY:
|
||||
case DPLANE_OP_NH_INSTALL:
|
||||
case DPLANE_OP_NH_UPDATE:
|
||||
case DPLANE_OP_NH_DELETE:
|
||||
case DPLANE_OP_LSP_INSTALL:
|
||||
case DPLANE_OP_LSP_UPDATE:
|
||||
case DPLANE_OP_LSP_DELETE:
|
||||
case DPLANE_OP_LSP_NOTIFY:
|
||||
case DPLANE_OP_SYS_ROUTE_ADD:
|
||||
case DPLANE_OP_SYS_ROUTE_DELETE:
|
||||
case DPLANE_OP_ADDR_INSTALL:
|
||||
case DPLANE_OP_ADDR_UNINSTALL:
|
||||
case DPLANE_OP_MAC_INSTALL:
|
||||
case DPLANE_OP_MAC_DELETE:
|
||||
case DPLANE_OP_NEIGH_INSTALL:
|
||||
case DPLANE_OP_NEIGH_UPDATE:
|
||||
case DPLANE_OP_NEIGH_DELETE:
|
||||
case DPLANE_OP_VTEP_ADD:
|
||||
case DPLANE_OP_VTEP_DELETE:
|
||||
case DPLANE_OP_RULE_ADD:
|
||||
case DPLANE_OP_RULE_DELETE:
|
||||
case DPLANE_OP_RULE_UPDATE:
|
||||
case DPLANE_OP_NEIGH_DISCOVER:
|
||||
case DPLANE_OP_BR_PORT_UPDATE:
|
||||
case DPLANE_OP_IPTABLE_ADD:
|
||||
case DPLANE_OP_IPTABLE_DELETE:
|
||||
case DPLANE_OP_IPSET_ADD:
|
||||
case DPLANE_OP_IPSET_DELETE:
|
||||
case DPLANE_OP_IPSET_ENTRY_ADD:
|
||||
case DPLANE_OP_IPSET_ENTRY_DELETE:
|
||||
case DPLANE_OP_NEIGH_IP_INSTALL:
|
||||
case DPLANE_OP_NEIGH_IP_DELETE:
|
||||
case DPLANE_OP_NEIGH_TABLE_UPDATE:
|
||||
case DPLANE_OP_GRE_SET:
|
||||
case DPLANE_OP_INTF_ADDR_ADD:
|
||||
case DPLANE_OP_INTF_ADDR_DEL:
|
||||
case DPLANE_OP_INTF_NETCONFIG:
|
||||
case DPLANE_OP_INTF_INSTALL:
|
||||
case DPLANE_OP_INTF_UPDATE:
|
||||
case DPLANE_OP_INTF_DELETE:
|
||||
case DPLANE_OP_TC_QDISC_INSTALL:
|
||||
case DPLANE_OP_TC_QDISC_UNINSTALL:
|
||||
case DPLANE_OP_TC_CLASS_ADD:
|
||||
case DPLANE_OP_TC_CLASS_DELETE:
|
||||
case DPLANE_OP_TC_CLASS_UPDATE:
|
||||
case DPLANE_OP_TC_FILTER_ADD:
|
||||
case DPLANE_OP_TC_FILTER_DELETE:
|
||||
case DPLANE_OP_TC_FILTER_UPDATE:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -706,7 +706,7 @@ lib_vrf_zebra_ribs_rib_route_route_entry_nexthop_group_nexthop_nh_type_get_elem(
|
||||
case NEXTHOP_TYPE_IPV6_IFINDEX:
|
||||
return yang_data_new_string(args->xpath, "ip6-ifindex");
|
||||
break;
|
||||
default:
|
||||
case NEXTHOP_TYPE_BLACKHOLE:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -2250,7 +2250,9 @@ static int nexthop_active(struct nexthop *nexthop, struct nhg_hash_entry *nhe,
|
||||
endpoint.ipa_type = IPADDR_V6;
|
||||
endpoint.ipaddr_v6 = nexthop->gate.ipv6;
|
||||
break;
|
||||
default:
|
||||
case AFI_UNSPEC:
|
||||
case AFI_L2VPN:
|
||||
case AFI_MAX:
|
||||
flog_err(EC_LIB_DEVELOPMENT,
|
||||
"%s: unknown address-family: %u", __func__,
|
||||
afi);
|
||||
@ -2291,7 +2293,9 @@ static int nexthop_active(struct nexthop *nexthop, struct nhg_hash_entry *nhe,
|
||||
p.prefixlen = IPV6_MAX_BITLEN;
|
||||
p.u.prefix6 = nexthop->gate.ipv6;
|
||||
break;
|
||||
default:
|
||||
case AFI_UNSPEC:
|
||||
case AFI_L2VPN:
|
||||
case AFI_MAX:
|
||||
assert(afi != AFI_IP && afi != AFI_IP6);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -648,7 +648,8 @@ static void zebra_pbr_expand_rule(struct zebra_pbr_rule *rule)
|
||||
zebra_neigh_ref(action->ifindex, &ip, rule);
|
||||
break;
|
||||
|
||||
default:
|
||||
case NEXTHOP_TYPE_BLACKHOLE:
|
||||
case NEXTHOP_TYPE_IFINDEX:
|
||||
action->afi = AFI_UNSPEC;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2158,7 +2158,58 @@ static void rib_process_result(struct zebra_dplane_ctx *ctx)
|
||||
(old_re && RIB_SYSTEM_ROUTE(old_re)))
|
||||
zebra_rib_fixup_system(rn);
|
||||
break;
|
||||
default:
|
||||
|
||||
case DPLANE_OP_NONE:
|
||||
case DPLANE_OP_ROUTE_NOTIFY:
|
||||
case DPLANE_OP_NH_INSTALL:
|
||||
case DPLANE_OP_NH_UPDATE:
|
||||
case DPLANE_OP_NH_DELETE:
|
||||
case DPLANE_OP_LSP_INSTALL:
|
||||
case DPLANE_OP_LSP_UPDATE:
|
||||
case DPLANE_OP_LSP_DELETE:
|
||||
case DPLANE_OP_LSP_NOTIFY:
|
||||
case DPLANE_OP_PW_INSTALL:
|
||||
case DPLANE_OP_PW_UNINSTALL:
|
||||
case DPLANE_OP_SYS_ROUTE_ADD:
|
||||
case DPLANE_OP_SYS_ROUTE_DELETE:
|
||||
case DPLANE_OP_ADDR_INSTALL:
|
||||
case DPLANE_OP_ADDR_UNINSTALL:
|
||||
case DPLANE_OP_MAC_INSTALL:
|
||||
case DPLANE_OP_MAC_DELETE:
|
||||
case DPLANE_OP_NEIGH_INSTALL:
|
||||
case DPLANE_OP_NEIGH_UPDATE:
|
||||
case DPLANE_OP_NEIGH_DELETE:
|
||||
case DPLANE_OP_VTEP_ADD:
|
||||
case DPLANE_OP_VTEP_DELETE:
|
||||
case DPLANE_OP_RULE_ADD:
|
||||
case DPLANE_OP_RULE_DELETE:
|
||||
case DPLANE_OP_RULE_UPDATE:
|
||||
case DPLANE_OP_NEIGH_DISCOVER:
|
||||
case DPLANE_OP_BR_PORT_UPDATE:
|
||||
case DPLANE_OP_IPTABLE_ADD:
|
||||
case DPLANE_OP_IPTABLE_DELETE:
|
||||
case DPLANE_OP_IPSET_ADD:
|
||||
case DPLANE_OP_IPSET_DELETE:
|
||||
case DPLANE_OP_IPSET_ENTRY_ADD:
|
||||
case DPLANE_OP_IPSET_ENTRY_DELETE:
|
||||
case DPLANE_OP_NEIGH_IP_INSTALL:
|
||||
case DPLANE_OP_NEIGH_IP_DELETE:
|
||||
case DPLANE_OP_NEIGH_TABLE_UPDATE:
|
||||
case DPLANE_OP_GRE_SET:
|
||||
case DPLANE_OP_INTF_ADDR_ADD:
|
||||
case DPLANE_OP_INTF_ADDR_DEL:
|
||||
case DPLANE_OP_INTF_NETCONFIG:
|
||||
case DPLANE_OP_INTF_INSTALL:
|
||||
case DPLANE_OP_INTF_UPDATE:
|
||||
case DPLANE_OP_INTF_DELETE:
|
||||
case DPLANE_OP_TC_QDISC_INSTALL:
|
||||
case DPLANE_OP_TC_QDISC_UNINSTALL:
|
||||
case DPLANE_OP_TC_CLASS_ADD:
|
||||
case DPLANE_OP_TC_CLASS_DELETE:
|
||||
case DPLANE_OP_TC_CLASS_UPDATE:
|
||||
case DPLANE_OP_TC_FILTER_ADD:
|
||||
case DPLANE_OP_TC_FILTER_DELETE:
|
||||
case DPLANE_OP_TC_FILTER_UPDATE:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -4334,7 +4385,7 @@ void rib_update_table(struct route_table *table, enum rib_update_event event,
|
||||
case RIB_UPDATE_OTHER:
|
||||
rib_update_route_node(rn, rtype);
|
||||
break;
|
||||
default:
|
||||
case RIB_UPDATE_MAX:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1401,7 +1401,8 @@ void show_nexthop_json_helper(json_object *json_nexthop,
|
||||
json_object_string_addf(json_nexthop, "source", "%pI6",
|
||||
&nexthop->src.ipv6);
|
||||
break;
|
||||
default:
|
||||
case NEXTHOP_TYPE_IFINDEX:
|
||||
case NEXTHOP_TYPE_BLACKHOLE:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1523,7 +1524,8 @@ void show_route_nexthop_helper(struct vty *vty, const struct route_entry *re,
|
||||
if (!IPV6_ADDR_SAME(&nexthop->src.ipv6, &in6addr_any))
|
||||
vty_out(vty, ", src %pI6", &nexthop->src.ipv6);
|
||||
break;
|
||||
default:
|
||||
case NEXTHOP_TYPE_IFINDEX:
|
||||
case NEXTHOP_TYPE_BLACKHOLE:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@ -1049,7 +1049,9 @@ route_match_ip_next_hop(void *rule, const struct prefix *prefix, void *object)
|
||||
p.prefix = nh_data->nexthop->gate.ipv4;
|
||||
p.prefixlen = IPV4_MAX_BITLEN;
|
||||
break;
|
||||
default:
|
||||
case NEXTHOP_TYPE_IPV6:
|
||||
case NEXTHOP_TYPE_IPV6_IFINDEX:
|
||||
case NEXTHOP_TYPE_BLACKHOLE:
|
||||
return RMAP_NOMATCH;
|
||||
}
|
||||
alist = access_list_lookup(AFI_IP, (char *)rule);
|
||||
@ -1105,7 +1107,9 @@ route_match_ip_next_hop_prefix_list(void *rule, const struct prefix *prefix,
|
||||
p.prefix = nh_data->nexthop->gate.ipv4;
|
||||
p.prefixlen = IPV4_MAX_BITLEN;
|
||||
break;
|
||||
default:
|
||||
case NEXTHOP_TYPE_IPV6:
|
||||
case NEXTHOP_TYPE_IPV6_IFINDEX:
|
||||
case NEXTHOP_TYPE_BLACKHOLE:
|
||||
return RMAP_NOMATCH;
|
||||
}
|
||||
plist = prefix_list_lookup(AFI_IP, (char *)rule);
|
||||
@ -1364,7 +1368,9 @@ route_match_ip_nexthop_prefix_len(void *rule, const struct prefix *prefix,
|
||||
p.prefix = nh_data->nexthop->gate.ipv4;
|
||||
p.prefixlen = IPV4_MAX_BITLEN;
|
||||
break;
|
||||
default:
|
||||
case NEXTHOP_TYPE_IPV6:
|
||||
case NEXTHOP_TYPE_IPV6_IFINDEX:
|
||||
case NEXTHOP_TYPE_BLACKHOLE:
|
||||
return RMAP_NOMATCH;
|
||||
}
|
||||
return ((p.prefixlen == *prefixlen) ? RMAP_MATCH : RMAP_NOMATCH);
|
||||
|
||||
@ -140,7 +140,7 @@ static int zebra_sr_policy_notify_update_client(struct zebra_sr_policy *policy,
|
||||
stream_putc(s, IPV6_MAX_BITLEN);
|
||||
stream_put(s, &policy->endpoint.ipaddr_v6, IPV6_MAX_BYTELEN);
|
||||
break;
|
||||
default:
|
||||
case IPADDR_NONE:
|
||||
flog_warn(EC_LIB_DEVELOPMENT,
|
||||
"%s: unknown policy endpoint address family: %u",
|
||||
__func__, policy->endpoint.ipa_type);
|
||||
@ -202,7 +202,7 @@ static void zebra_sr_policy_notify_update(struct zebra_sr_policy *policy)
|
||||
p.prefixlen = IPV6_MAX_BITLEN;
|
||||
p.u.prefix6 = policy->endpoint.ipaddr_v6;
|
||||
break;
|
||||
default:
|
||||
case IPADDR_NONE:
|
||||
flog_warn(EC_LIB_DEVELOPMENT,
|
||||
"%s: unknown policy endpoint address family: %u",
|
||||
__func__, policy->endpoint.ipa_type);
|
||||
|
||||
@ -405,7 +405,8 @@ static void show_nexthop_detail_helper(struct vty *vty,
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
case NEXTHOP_TYPE_IFINDEX:
|
||||
case NEXTHOP_TYPE_BLACKHOLE:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user