Commit a3005843 authored by berge's avatar berge
Browse files

fixed authenticator calculation issue

parent 0cc5b32e
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -177,7 +177,7 @@ group rfc3775Mipv6_ExtHdrFunctions {
						vc_mobileSec.mnSimuParams.kbm := fx_mac(		e_sha1, c_1ZeroByte,
																		bit2oct(vc_mobileSec.mnSimuParams.receivedHomeKeygenToken)
																		& bit2oct(vc_mobileSec.mnSimuParams.receivedCareOfKeygenToken));
																		
						// ok 'til here												
						//set Authenticator option with dummy Authenticator
						p_mobileHeader.mobileMessage.bindingUpdateMsg.mobileOptions[v_position].mobileBindingAuthorizationData := {
														mobileOptType := 5,
@@ -192,7 +192,7 @@ group rfc3775Mipv6_ExtHdrFunctions {
				
					p_mobileHeader.mobileMessage.bindingUpdateMsg.mobileOptions[v_position].mobileBindingAuthorizationData.authenticator 
								 := fx_mac(	e_hmac_sha1_96, vc_mobileSec.mnSimuParams.kbm,
																		p_srcAddr//careOfaddr 
																		p_ipv6Packet.ipv6Hdr.sourceAddress // p_srcAddr //careOfaddr 
																		& p_dstAddr//cnAddr
																		& fx_mipHdrToOct(p_mobileHeader) );
				}
@@ -209,9 +209,10 @@ group rfc3775Mipv6_ExtHdrFunctions {
		p_mobileHeader.headerLen := fx_mipHeaderLength(p_mobileHeader);

		// modified by PK to easily send packets with wrong checksum
		//set mobileChecksum to zero
		//set mipChecksum to zero
		//p_mobileHeader.checksum := c_2ZeroBytes;  
		//calc mobileChecksum
		
		//calc mipChecksum
		p_mobileHeader.checksum := fx_mipHeaderChecksum ( p_srcAddr,
														p_dstAddr,
														p_mobileHeader);
+1 −1
Original line number Diff line number Diff line
@@ -499,8 +499,8 @@ module LibIpv6_Rfc3775Mipv6_Functions {
	*/
	function f_mn_cn_sendBindUpAndWaitForBindAckOffHome(
				in template Ipv6Address p_mnCoaTn,
				in template Ipv6Address p_mnHoaTn,
				in template Ipv6Address p_haGlaNut,
				in template Ipv6Address p_mnHoaTn,
				in UInt16 p_seqNr,
				in UInt16 p_timeUnits)
	runs on Ipv6Node