Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > e8916e5cb6487118130934db089d8fa5 > files > 22

openswan-2.6.32-9.el5.src.rpm

diff -urNp openswan-2.6.32-patched/programs/pluto/ikev2_parent.c openswan-2.6.32-current/programs/pluto/ikev2_parent.c
--- openswan-2.6.32-patched/programs/pluto/ikev2_parent.c	2012-01-31 13:03:14.078405474 -0500
+++ openswan-2.6.32-current/programs/pluto/ikev2_parent.c	2012-01-31 13:12:09.011667513 -0500
@@ -757,9 +757,24 @@ ikev2_parent_inI1outR1_tail(struct pluto
 	    return STF_FAIL + rn;
     }
 
+    {
+	notification_t rn;
+	chunk_t dc;
     keyex_pbs = &md->chain[ISAKMP_NEXT_v2KE]->pbs;
     /* KE in */
-    RETURN_STF_FAILURE(accept_KE(&st->st_gi, "Gi", st->st_oakley.group, keyex_pbs));
+	rn=accept_KE(&st->st_gi, "Gi", st->st_oakley.group, keyex_pbs);
+	if(rn != NOTHING_WRONG) {
+	//char group_number[2];
+	u_int16_t group_number = htons(st->st_oakley.group->group);
+	dc.ptr = (char *)&group_number;
+	dc.len = 2;
+	SEND_NOTIFICATION_AA(INVALID_KE_PAYLOAD, &dc);
+	delete_state(st);
+	return STF_FAIL + rn;
+	}
+    //RETURN_STF_FAILURE(accept_KE(&st->st_gi, "Gi", st->st_oakley.group, keyex_pbs));
+
+    } 
 
     /* Ni in */
     RETURN_STF_FAILURE(accept_v2_nonce(md, &st->st_ni, "Ni"));