diff options
author | 2020-11-12 22:17:21 +0000 | |
---|---|---|
committer | 2020-11-12 22:17:21 +0000 | |
commit | b133029802d13c65fde5edec5b0928d36ebeb4d8 (patch) | |
tree | abd030f76037fc8e9c23f22758c12d550e6c5eb5 | |
parent | Document art locking. (diff) | |
download | wireguard-openbsd-b133029802d13c65fde5edec5b0928d36ebeb4d8.tar.xz wireguard-openbsd-b133029802d13c65fde5edec5b0928d36ebeb4d8.zip |
Fail if ikev2_init_ike_auth() is entered with invalid state.
-rw-r--r-- | sbin/iked/ikev2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/iked/ikev2.c b/sbin/iked/ikev2.c index d4ffdb050c0..3348c1b16fc 100644 --- a/sbin/iked/ikev2.c +++ b/sbin/iked/ikev2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ikev2.c,v 1.277 2020/11/07 21:22:02 tobhe Exp $ */ +/* $OpenBSD: ikev2.c,v 1.278 2020/11/12 22:17:21 tobhe Exp $ */ /* * Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de> @@ -1388,7 +1388,7 @@ ikev2_init_ike_auth(struct iked *env, struct iked_sa *sa) ssize_t len; if (!sa_stateok(sa, IKEV2_STATE_SA_INIT)) - return (0); + return (-1); if (!sa->sa_localauth.id_type) { log_debug("%s: no local auth", __func__); |