Commit abc19bea authored by schmitting's avatar schmitting
Browse files

Receive IKE_SA_INIT added to f_ikeSaUp

parent 75a8570e
Loading
Loading
Loading
Loading
+15 −11
Original line number Diff line number Diff line
@@ -814,22 +814,22 @@ module LibIpv6_Rfc4306Ikev2_Functions {
					if (v_ret == e_success)
					{ vc_ikeSad[0].iDr := v_ikePayload.idInitiator.data; }
					else
					{ log("**** f_waitForAurhreq: ERROR: No Identification payload in payload list **** "); }
					{ log("**** f_waitForAurhres: ERROR: No Identification payload in payload list **** "); }

					// get Traffic selector initiator payload data
					v_ret := f_getPayload(v_ikePayloadList,v_nextPayload,c_tsInitiatorPL,v_ikePayload);
					if (v_ret == e_error)
					{ log("**** f_waitForIkeAuthreq: ERROR: No Traffic selector initiator payload in payload list **** "); }
					{ log("**** f_waitForIkeAuthres: ERROR: No Traffic selector initiator payload in payload list **** "); }

					// get Traffic selector responder payload data
					v_ret := f_getPayload(v_ikePayloadList,v_nextPayload,c_tsResponderPL,v_ikePayload);
					if (v_ret == e_error)
					{ log("**** f_waitForIkeAuthreq: ERROR: No Traffic selector responder payload in payload list **** "); }
					{ log("**** f_waitForIkeAuthres: ERROR: No Traffic selector responder payload in payload list **** "); }

					// get Authentication payload data
					v_ret := f_getPayload(v_ikePayloadList,v_nextPayload,c_authenticationPL,v_ikePayload);
					if (v_ret == e_error)
					{ log("**** f_waitForIkeAuthreq: ERROR: No Authentication payload in payload list **** "); }
					{ log("**** f_waitForIkeAuthres: ERROR: No Authentication payload in payload list **** "); }

					// get Security Association payload proposal data
					v_ret := f_getPayload(v_ikePayloadList,v_nextPayload,c_saPL,v_ikePayload);
@@ -850,7 +850,7 @@ module LibIpv6_Rfc4306Ikev2_Functions {
							    return e_error;}
							}
							else
							{ log("**** f_waitForIkeAuthtreq: ERROR: No encryption algorithm transform in 1st proposal of Security Association payload **** "); }
							{ log("**** f_waitForIkeAuthtres: ERROR: No encryption algorithm transform in 1st proposal of Security Association payload **** "); }
						}

						if (v_protocolId == c_protocolAh)
@@ -864,7 +864,7 @@ module LibIpv6_Rfc4306Ikev2_Functions {
							    return e_error;}
							}
							else
							{ log("**** f_waitForIkeAuthtreq: ERROR: No integrity algorithm transform in 1st proposal of Security Association payload **** "); }
							{ log("**** f_waitForIkeAuthtres: ERROR: No integrity algorithm transform in 1st proposal of Security Association payload **** "); }
						}

						// check extended sequence numbers 
@@ -876,17 +876,17 @@ module LibIpv6_Rfc4306Ikev2_Functions {
						    return e_error;}
						}
						else
						{ log("**** f_waitForIkeAuthtreq: ERROR: No extended sequence numbers transform in 1st proposal of Security Association payload **** "); }
						{ log("**** f_waitForIkeAuthtres: ERROR: No extended sequence numbers transform in 1st proposal of Security Association payload **** "); }
					}

					else
					{ log("**** f_waitForIkeAuthreq: ERROR: No Security Association payload in payload list **** "); }
					{ log("**** f_waitForIkeAuthres: ERROR: No Security Association payload in payload list **** "); }
				}

			[]	tc_wait.timeout
				{
					v_ret :=  e_timeout;
					log("**** f_waitForIkeAuthreq: ERROR: tc_wait.timeout **** ");
					log("**** f_waitForIkeAuthres: ERROR: tc_wait.timeout **** ");
					return v_ret;
				}		
		} // end alt
@@ -1106,6 +1106,10 @@ group establishSAFns {
			
		//TODO tunnel mode	
		}
		// wait for IKE_SA_INIT
		v_ret := f_waitForIkeSaInitres(p_addrIut,p_addrTn);
		// calculate and store the seven secrets
		vc_ikeSad[0].sevenSecrets := f_calculateSevenSecrets(vc_ikeSad[0]);

		return v_ret;