From 5217c20a82ac161e88a3b8bca3e57deaba75acaa Mon Sep 17 00:00:00 2001 From: Markus Friedl Date: Tue, 18 Feb 2014 13:10:49 +0000 Subject: check the error from ikev2_cp_setaddr --- sbin/iked/ikev2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sbin') 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 @@ -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); -- cgit v1.2.3