diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2010-07-29 14:41:22 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2010-07-29 14:41:22 +0000 |
commit | 3b786c117f4a4d197e4947ecd0e48bb208fcd89d (patch) | |
tree | 35a1a9cf18c57a1e60bb4d45d8ac8ad2bf65dca9 /sbin | |
parent | 9095cff49635b1bbf093a4ca6ac28d159877edb1 (diff) |
some error cases returned 01 when they should have been returning -1
spotted by Mike Belopuhov.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/iked/ikev2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/iked/ikev2.c b/sbin/iked/ikev2.c index 426256569e4..2e074397a8b 100644 --- a/sbin/iked/ikev2.c +++ b/sbin/iked/ikev2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ikev2.c,v 1.22 2010/07/20 16:28:22 deraadt Exp $ */ +/* $OpenBSD: ikev2.c,v 1.23 2010/07/29 14:41:21 jsg Exp $ */ /* $vantronix: ikev2.c,v 1.101 2010/06/03 07:57:33 reyk Exp $ */ /* @@ -2369,7 +2369,7 @@ ikev2_sa_initiator(struct iked *env, struct iked_sa *sa, if (!ibuf_length(sa->sa_rnonce)) { if (!ibuf_length(msg->msg_nonce)) { log_debug("%s: invalid peer nonce", __func__); - return (01); + return (-1); } if ((sa->sa_rnonce = ibuf_dup(msg->msg_nonce)) == NULL) { log_debug("%s: failed to get peer nonce", __func__); @@ -2380,7 +2380,7 @@ ikev2_sa_initiator(struct iked *env, struct iked_sa *sa, if (!ibuf_length(sa->sa_dhrexchange)) { if (!ibuf_length(msg->msg_ke)) { log_debug("%s: invalid peer dh exchange", __func__); - return (01); + return (-1); } if ((ssize_t)ibuf_length(msg->msg_ke) != dh_getlen(sa->sa_dhgroup)) { |