From f294d01ebd825ba95d9a2cd0f609578eac0baf4f Mon Sep 17 00:00:00 2001 From: tobhe Date: Sun, 14 Jul 2024 13:13:33 +0000 Subject: [PATCH] Fail explicitly on unexptected imsg->hdr_type. Otherwise the following comparison is undefined. --- sbin/iked/vroute.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 @@ -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) -- 2.20.1