diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2023-01-30 10:05:58 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2023-01-31 15:15:42 -0500 |
| commit | a98701f0531c54e425ef4ffa5f3f2c67aad2ae17 (patch) | |
| tree | a687a0a3d59723339d3e6f111ce9539e73b9382e /zebra/zebra_nhg.c | |
| parent | 58cf0823bf41e104b51f2f350ee370d51734b314 (diff) | |
zebra: Add missing enums to switch statements
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/zebra_nhg.c')
| -rw-r--r-- | zebra/zebra_nhg.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index 758fed7280..0bca00ced3 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -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; } |
