summaryrefslogtreecommitdiff
path: root/zebra/router-id.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-01-30 10:05:58 -0500
committerDonald Sharp <sharpd@nvidia.com>2023-01-31 15:15:42 -0500
commita98701f0531c54e425ef4ffa5f3f2c67aad2ae17 (patch)
treea687a0a3d59723339d3e6f111ce9539e73b9382e /zebra/router-id.c
parent58cf0823bf41e104b51f2f350ee370d51734b314 (diff)
zebra: Add missing enums to switch statements
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/router-id.c')
-rw-r--r--zebra/router-id.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/zebra/router-id.c b/zebra/router-id.c
index 9f56cf0e6a..ea429f683a 100644
--- a/zebra/router-id.c
+++ b/zebra/router-id.c
@@ -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;
}