summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2010-09-30 12:54:25 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2010-09-30 12:54:25 +0000
commit090873a31881d0222489bfd38cdbad4b28b350b4 (patch)
tree16ac1404f9906446075fe2615a946c7b37f36409 /sbin
parent2f86274719242750592c6c1b67137245da02edc3 (diff)
check that there are transforms in the proposal before trying
to actually parse it. ok reyk
Diffstat (limited to 'sbin')
-rw-r--r--sbin/iked/ikev2_pld.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/iked/ikev2_pld.c b/sbin/iked/ikev2_pld.c
index 72857a122dc..a777843b638 100644
--- a/sbin/iked/ikev2_pld.c
+++ b/sbin/iked/ikev2_pld.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ikev2_pld.c,v 1.15 2010/09/22 09:12:18 mikeb Exp $ */
+/* $OpenBSD: ikev2_pld.c,v 1.16 2010/09/30 12:54:24 mikeb Exp $ */
/* $vantronix: ikev2.c,v 1.101 2010/06/03 07:57:33 reyk Exp $ */
/*
@@ -275,7 +275,8 @@ ikev2_pld_sa(struct iked *env, struct ikev2_payload *pld,
/*
* Parse the attached transforms
*/
- if (ikev2_pld_xform(env, &sap, msg, offset) != 0) {
+ if (sap.sap_transforms &&
+ ikev2_pld_xform(env, &sap, msg, offset) != 0) {
log_debug("%s: invalid proposal transforms", __func__);
return (-1);
}