summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2014-02-18 13:10:49 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2014-02-18 13:10:49 +0000
commit5217c20a82ac161e88a3b8bca3e57deaba75acaa (patch)
treef43793918a53aa0c7b1b602e13797cac0c278730 /sbin
parent68e29895078a8c432f430f931d6d3353adfed7be (diff)
check the error from ikev2_cp_setaddr
Diffstat (limited to 'sbin')
-rw-r--r--sbin/iked/ikev2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/iked/ikev2.c b/sbin/iked/ikev2.c
index dbf8f1996a9..8ae7f8832ad 100644
--- a/sbin/iked/ikev2.c
+++ b/sbin/iked/ikev2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ikev2.c,v 1.94 2014/02/17 15:53:46 markus Exp $ */
+/* $OpenBSD: ikev2.c,v 1.95 2014/02/18 13:10:48 markus Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
@@ -2071,8 +2071,8 @@ ikev2_resp_ike_auth(struct iked *env, struct iked_sa *sa)
else if (!sa_stateok(sa, IKEV2_STATE_VALID))
return (0); /* ignore */
- if (sa->sa_cp)
- ikev2_cp_setaddr(env, sa);
+ if (ikev2_cp_setaddr(env, sa) < 0)
+ return (-1);
if (ikev2_childsa_negotiate(env, sa, sa->sa_hdr.sh_initiator) == -1)
return (-1);