diff options
author | Tobias Heider <tobhe@cvs.openbsd.org> | 2024-07-14 13:13:34 +0000 |
---|---|---|
committer | Tobias Heider <tobhe@cvs.openbsd.org> | 2024-07-14 13:13:34 +0000 |
commit | 4160a04015586f3ca1e8998da13a732bf09375bc (patch) | |
tree | a31d9be6bf75ef3dabc73d97de3133e1ef74b485 | |
parent | f48684a9f33403cda3880b4ee7148a6c4db16b92 (diff) |
Fail explicitly on unexptected imsg->hdr_type. Otherwise the following
comparison is undefined.
-rw-r--r-- | sbin/iked/vroute.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/iked/vroute.c b/sbin/iked/vroute.c index 5ef892d61ab..1e05d36cf70 100644 --- a/sbin/iked/vroute.c +++ b/sbin/iked/vroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vroute.c,v 1.19 2023/06/13 12:34:12 tb Exp $ */ +/* $OpenBSD: vroute.c,v 1.20 2024/07/14 13:13:33 tobhe Exp $ */ /* * Copyright (c) 2021 Tobias Heider <tobhe@openbsd.org> @@ -631,6 +631,8 @@ vroute_getroute(struct iked *env, struct imsg *imsg) case IMSG_VROUTE_DEL: type = RTM_DELETE; break; + default: + return (-1); } if (type == RTM_ADD) |