| | | | |
| Offset 19, 15 lines modified | Offset 19, 14 lines modified |
| 19 | import·java.io.IOException; | 19 | import·java.io.IOException; |
| 20 | import·android.system.ErrnoException; | 20 | import·android.system.ErrnoException; |
| 21 | import·android.net.ipsec.ike.exceptions.InvalidSyntaxException; | 21 | import·android.net.ipsec.ike.exceptions.InvalidSyntaxException; |
| 22 | import·android.os.Parcelable; | 22 | import·android.os.Parcelable; |
| 23 | import·android.os.Bundle; | 23 | import·android.os.Bundle; |
| 24 | import·android.content.Intent; | 24 | import·android.content.Intent; |
| 25 | import·android.app.PendingIntent; | 25 | import·android.app.PendingIntent; |
| 26 | import·com.android.internal.net.ipsec.ike.utils.IkeAlarm$IkeAlarmConfig; | |
| 27 | import·java.net.Inet4Address; | 26 | import·java.net.Inet4Address; |
| 28 | import·com.android.internal.net.ipsec.ike.message.IkeNotifyPayload; | 27 | import·com.android.internal.net.ipsec.ike.message.IkeNotifyPayload; |
| 29 | import·com.android.internal.net.ipsec.ike.message.IkeMessage; | 28 | import·com.android.internal.net.ipsec.ike.message.IkeMessage; |
| 30 | import·android.os.Message; | 29 | import·android.os.Message; |
| 31 | import·android.os.PowerManager; | 30 | import·android.os.PowerManager; |
| 32 | import·java.util.HashSet; | 31 | import·java.util.HashSet; |
| 33 | import·android.content.BroadcastReceiver; | 32 | import·android.content.BroadcastReceiver; |
| Offset 86, 27 lines modified | Offset 85, 28 lines modified |
| 86 | ····static·final·int·CMD_EAP_OUTBOUND_MSG_READY·=·310; | 85 | ····static·final·int·CMD_EAP_OUTBOUND_MSG_READY·=·310; |
| 87 | ····static·final·int·CMD_EAP_START_EAP_AUTH·=·309; | 86 | ····static·final·int·CMD_EAP_START_EAP_AUTH·=·309; |
| 88 | ····static·final·int·CMD_EXECUTE_LOCAL_REQ·=·307; | 87 | ····static·final·int·CMD_EXECUTE_LOCAL_REQ·=·307; |
| 89 | ····static·final·int·CMD_FORCE_TRANSITION·=·399; | 88 | ····static·final·int·CMD_FORCE_TRANSITION·=·399; |
| 90 | ····private·static·final·int·CMD_GENERAL_BASE·=·300; | 89 | ····private·static·final·int·CMD_GENERAL_BASE·=·300; |
| 91 | ····static·final·int·CMD_HANDLE_FIRST_CHILD_NEGOTIATION·=·306; | 90 | ····static·final·int·CMD_HANDLE_FIRST_CHILD_NEGOTIATION·=·306; |
| 92 | ····static·final·int·CMD_IKE_LOCAL_REQUEST_BASE·=·400; | 91 | ····static·final·int·CMD_IKE_LOCAL_REQUEST_BASE·=·400; |
| | 92 | ····static·final·int·CMD_KILL_SESSION·=·317; |
| 93 | ····static·final·int·CMD_LOCAL_REQUEST_CREATE_IKE·=·401; | 93 | ····static·final·int·CMD_LOCAL_REQUEST_CREATE_IKE·=·401; |
| 94 | ····static·final·int·CMD_LOCAL_REQUEST_DELETE_IKE·=·402; | 94 | ····static·final·int·CMD_LOCAL_REQUEST_DELETE_IKE·=·402; |
| 95 | ····static·final·int·CMD_LOCAL_REQUEST_DPD·=·405; | 95 | ····static·final·int·CMD_LOCAL_REQUEST_DPD·=·405; |
| 96 | ····static·final·int·CMD_LOCAL_REQUEST_INFO·=·404; | 96 | ····static·final·int·CMD_LOCAL_REQUEST_INFO·=·404; |
| 97 | ····static·final·int·CMD_LOCAL_REQUEST_MOBIKE·=·406; | 97 | ····static·final·int·CMD_LOCAL_REQUEST_MOBIKE·=·406; |
| 98 | ····static·final·int·CMD_LOCAL_REQUEST_REKEY_IKE·=·403; | 98 | ····static·final·int·CMD_LOCAL_REQUEST_REKEY_IKE·=·403; |
| 99 | ····static·final·int·CMD_OUTBOUND_CHILD_PAYLOADS_READY·=·304; | 99 | ····static·final·int·CMD_OUTBOUND_CHILD_PAYLOADS_READY·=·304; |
| 100 | ····static·final·int·CMD_RECEIVE_IKE_PACKET·=·301; | 100 | ····static·final·int·CMD_RECEIVE_IKE_PACKET·=·301; |
| 101 | ····static·final·int·CMD_RECEIVE_PACKET_INVALID_IKE_SPI·=·302; | 101 | ····static·final·int·CMD_RECEIVE_PACKET_INVALID_IKE_SPI·=·302; |
| 102 | ····static·final·int·CMD_RECEIVE_REQUEST_FOR_CHILD·=·303; | 102 | ····static·final·int·CMD_RECEIVE_REQUEST_FOR_CHILD·=·303; |
| 103 | ····public·static·final·int·CMD_RETRANSMIT·=·308; | 103 | ····public·static·final·int·CMD_RETRANSMIT·=·308; |
| 104 | ····static·final·int·CMD_SEND_KEEPALIVE·=·316; | 104 | ····static·final·int·CMD_SEND_KEEPALIVE·=·316; |
| 105 | ····static·final·int·CMD_SET_NETWORK·=·317; | 105 | ····static·final·int·CMD_SET_NETWORK·=·318; |
| 106 | ····private·static·final·SparseArray·CMD_TO_STR; | 106 | ····private·static·final·SparseArray·CMD_TO_STR; |
| 107 | ····static·final·int·DEFAULT_FRAGMENT_SIZE·=·1280; | 107 | ····static·final·int·DEFAULT_FRAGMENT_SIZE·=·1280; |
| 108 | ····public·static·final·SparseArray·EXCHANGE_SUBTYPE_TO_STRING; | 108 | ····public·static·final·SparseArray·EXCHANGE_SUBTYPE_TO_STRING; |
| 109 | ····public·static·final·int·IKE_EXCHANGE_SUBTYPE_CREATE_CHILD·=·3; | 109 | ····public·static·final·int·IKE_EXCHANGE_SUBTYPE_CREATE_CHILD·=·3; |
| 110 | ····public·static·final·int·IKE_EXCHANGE_SUBTYPE_DELETE_CHILD·=·5; | 110 | ····public·static·final·int·IKE_EXCHANGE_SUBTYPE_DELETE_CHILD·=·5; |
| 111 | ····public·static·final·int·IKE_EXCHANGE_SUBTYPE_DELETE_IKE·=·4; | 111 | ····public·static·final·int·IKE_EXCHANGE_SUBTYPE_DELETE_IKE·=·4; |
| 112 | ····public·static·final·int·IKE_EXCHANGE_SUBTYPE_GENERIC_INFO·=·8; | 112 | ····public·static·final·int·IKE_EXCHANGE_SUBTYPE_GENERIC_INFO·=·8; |
| Offset 237, 15 lines modified | Offset 237, 15 lines modified |
| 237 | ········cmd_TO_STR.put(308,·(Object)"Retransmit"); | 237 | ········cmd_TO_STR.put(308,·(Object)"Retransmit"); |
| 238 | ········cmd_TO_STR.put(309,·(Object)"Start·EAP"); | 238 | ········cmd_TO_STR.put(309,·(Object)"Start·EAP"); |
| 239 | ········cmd_TO_STR.put(310,·(Object)"EAP·outbound·msg·ready"); | 239 | ········cmd_TO_STR.put(310,·(Object)"EAP·outbound·msg·ready"); |
| 240 | ········cmd_TO_STR.put(311,·(Object)"EAP·errored"); | 240 | ········cmd_TO_STR.put(311,·(Object)"EAP·errored"); |
| 241 | ········cmd_TO_STR.put(312,·(Object)"EAP·failed"); | 241 | ········cmd_TO_STR.put(312,·(Object)"EAP·failed"); |
| 242 | ········cmd_TO_STR.put(314,·(Object)"Finish·EAP"); | 242 | ········cmd_TO_STR.put(314,·(Object)"Finish·EAP"); |
| 243 | ········cmd_TO_STR.put(315,·(Object)"Alarm·Fired"); | 243 | ········cmd_TO_STR.put(315,·(Object)"Alarm·Fired"); |
| 244 | ········cmd_TO_STR.put(317,·(Object)"Update·underlying·Network"); | 244 | ········cmd_TO_STR.put(318,·(Object)"Update·underlying·Network"); |
| 245 | ········cmd_TO_STR.put(401,·(Object)"Create·IKE"); | 245 | ········cmd_TO_STR.put(401,·(Object)"Create·IKE"); |
| 246 | ········cmd_TO_STR.put(402,·(Object)s); | 246 | ········cmd_TO_STR.put(402,·(Object)s); |
| 247 | ········cmd_TO_STR.put(403,·(Object)s2); | 247 | ········cmd_TO_STR.put(403,·(Object)s2); |
| 248 | ········cmd_TO_STR.put(404,·(Object)"Info"); | 248 | ········cmd_TO_STR.put(404,·(Object)"Info"); |
| 249 | ········cmd_TO_STR.put(405,·(Object)"DPD"); | 249 | ········cmd_TO_STR.put(405,·(Object)"DPD"); |
| 250 | ········cmd_TO_STR.put(406,·(Object)"MOBIKE·migration·event"); | 250 | ········cmd_TO_STR.put(406,·(Object)"MOBIKE·migration·event"); |
| 251 | ····} | 251 | ····} |
| Offset 415, 18 lines modified | Offset 415, 15 lines modified |
| 415 | ····private·static·void·addNatDetectionPayloadsToList(final·List·list,·final·InetAddress·inetAddress,·final·InetAddress·inetAddress2,·final·int·n,·final·int·n2,·final·long·n3,·final·long·n4)·{ | 415 | ····private·static·void·addNatDetectionPayloadsToList(final·List·list,·final·InetAddress·inetAddress,·final·InetAddress·inetAddress2,·final·int·n,·final·int·n2,·final·long·n3,·final·long·n4)·{ |
| 416 | ········list.add(new·IkeNotifyPayload(16388,·IkeNotifyPayload.generateNatDetectionData(n3,·n4,·inetAddress,·n))); | 416 | ········list.add(new·IkeNotifyPayload(16388,·IkeNotifyPayload.generateNatDetectionData(n3,·n4,·inetAddress,·n))); |
| 417 | ········list.add(new·IkeNotifyPayload(16389,·IkeNotifyPayload.generateNatDetectionData(n3,·n4,·inetAddress2,·n2))); | 417 | ········list.add(new·IkeNotifyPayload(16389,·IkeNotifyPayload.generateNatDetectionData(n3,·n4,·inetAddress2,·n2))); |
| 418 | ····} | 418 | ····} |
| 419 | ···· | 419 | ···· |
| 420 | ····private·IkeNattKeepalive·buildAndStartNattKeepalive()·{ | 420 | ····private·IkeNattKeepalive·buildAndStartNattKeepalive()·{ |
| 421 | ········if·(this.mIkeSocket·instanceof·IkeUdpEncapSocket)·{ | 421 | ········if·(this.mIkeSocket·instanceof·IkeUdpEncapSocket)·{ |
| | 422 | ············final·IkeNattKeepalive·ikeNattKeepalive·=·new·IkeNattKeepalive(this.mContext,·this.mConnectivityManager,·this.mIkeSessionParams.getNattKeepAliveDelaySeconds(),·(Inet4Address)this.mLocalAddress,·(Inet4Address)this.mRemoteAddress,·((IkeUdpEncapSocket)this.mIkeSocket).getUdpEncapsulationSocket(),·this.mIkeSocket.getIkeSocketConfig().getNetwork(),·buildIkeAlarmIntent(this.mContext,·"IkeAlarmReceiver.ACTION_KEEPALIVE",·this.getIntentIdentifier(),·this.obtainMessage(315,·this.mIkeSessionId,·316))); |
| 422 | ············final·Message·obtainMessage·=·this.obtainMessage(315,·this.mIkeSessionId,·316); | |
| 423 | ············final·PendingIntent·buildIkeAlarmIntent·=·buildIkeAlarmIntent(this.mContext,·"IkeAlarmReceiver.ACTION_KEEPALIVE",·this.getIntentIdentifier(),·obtainMessage); | |
| 424 | ············final·int·nattKeepAliveDelaySeconds·=·this.mIkeSessionParams.getNattKeepAliveDelaySeconds(); | |
| 425 | ············final·IkeNattKeepalive·ikeNattKeepalive·=·new·IkeNattKeepalive(this.mContext,·this.mConnectivityManager,·nattKeepAliveDelaySeconds,·this.mLocalAddress,·this.mRemoteAddress,·((IkeUdpEncapSocket)this.mIkeSocket).getUdpEncapsulationSocket(),·this.mIkeSocket.getIkeSocketConfig().getNetwork(),·new·IkeAlarm$IkeAlarmConfig(this.mContext,·"IkeAlarmReceiver.ACTION_KEEPALIVE",·TimeUnit.SECONDS.toMillis(nattKeepAliveDelaySeconds),·buildIkeAlarmIntent,·obtainMessage)); | |
| 426 | ············ikeNattKeepalive.start(); | 423 | ············ikeNattKeepalive.start(); |
| 427 | ············return·ikeNattKeepalive; | 424 | ············return·ikeNattKeepalive; |
| 428 | ········} | 425 | ········} |
| 429 | ········throw·new·IllegalStateException("Cannot·start·NAT-T·keepalive·when·IKE·Session·is·not·using·UDP·Encap·socket"); | 426 | ········throw·new·IllegalStateException("Cannot·start·NAT-T·keepalive·when·IKE·Session·is·not·using·UDP·Encap·socket"); |
| 430 | ····} | 427 | ····} |
| 431 | ···· | 428 | ···· |
| 432 | ····static·PendingIntent·buildIkeAlarmIntent(final·Context·context,·final·String·s,·final·String·identifier,·final·Message·message)·{ | 429 | ····static·PendingIntent·buildIkeAlarmIntent(final·Context·context,·final·String·s,·final·String·identifier,·final·Message·message)·{ |
| Offset 683, 20 lines modified | Offset 680, 14 lines modified |
| 683 | ········throw·new·IOException(sb3.toString()); | 680 | ········throw·new·IOException(sb3.toString()); |
| 684 | ····} | 681 | ····} |
| 685 | ···· | 682 | ···· |
| 686 | ····private·void·scheduleRetry(final·IkeLocalRequestScheduler$LocalRequest·ikeLocalRequestScheduler$LocalRequest)·{ | 683 | ····private·void·scheduleRetry(final·IkeLocalRequestScheduler$LocalRequest·ikeLocalRequestScheduler$LocalRequest)·{ |
| 687 | ········this.sendMessageDelayed(ikeLocalRequestScheduler$LocalRequest.procedureType,·(Object)ikeLocalRequestScheduler$LocalRequest,·IkeSessionStateMachine.RETRY_INTERVAL_MS); | 684 | ········this.sendMessageDelayed(ikeLocalRequestScheduler$LocalRequest.procedureType,·(Object)ikeLocalRequestScheduler$LocalRequest,·IkeSessionStateMachine.RETRY_INTERVAL_MS); |
| 688 | ····} | 685 | ····} |
| 689 | ···· | 686 | ···· |
| 690 | ····private·void·sendEncryptedIkePackets(final·byte[][]·array)·{ | |
| 691 | ········for·(int·length·=·array.length,·i·=·0;·i·<·length;·++i)·{ | |
| 692 | ············this.mIkeSocket.sendIkePacket(array[i],·this.mRemoteAddress); | |
| 693 | ········} | |
| 694 | ····} | |
| 695 | ···· | |
| 696 | ····private·void·setRemoteAddress()·{ | 687 | ····private·void·setRemoteAddress()·{ |
| 697 | ········final·LinkProperties·linkProperties·=·this.mConnectivityManager.getLinkProperties(this.mNetwork); | 688 | ········final·LinkProperties·linkProperties·=·this.mConnectivityManager.getLinkProperties(this.mNetwork); |
| 698 | ········if·(!this.mRemoteAddressesV6.isEmpty()·&&·linkProperties.hasGlobalIpv6Address())·{ | 689 | ········if·(!this.mRemoteAddressesV6.isEmpty()·&&·linkProperties.hasGlobalIpv6Address())·{ |
| 699 | ············this.mRemoteAddress·=·this.mRemoteAddressesV6.get(0); | 690 | ············this.mRemoteAddress·=·this.mRemoteAddressesV6.get(0); |
| 700 | ········} | 691 | ········} |
| 701 | ········else·{ | 692 | ········else·{ |
| 702 | ············if·(this.mRemoteAddressesV4.isEmpty())·{ | 693 | ············if·(this.mRemoteAddressesV4.isEmpty())·{ |
| Offset 761, 17 lines modified | Offset 752, 15 lines modified |
| 761 | ····} | 752 | ····} |
| 762 | ···· | 753 | ···· |
| 763 | ····IkeMessage·buildEncryptedNotificationMessage(final·SaRecord$IkeSaRecord·saRecord$IkeSaRecord,·final·IkeInformationalPayload[]·a,·final·int·n,·final·boolean·b,·final·int·n2)·{ | 754 | ····IkeMessage·buildEncryptedNotificationMessage(final·SaRecord$IkeSaRecord·saRecord$IkeSaRecord,·final·IkeInformationalPayload[]·a,·final·int·n,·final·boolean·b,·final·int·n2)·{ |
| 764 | ········return·new·IkeMessage(new·IkeHeader(saRecord$IkeSaRecord.getInitiatorSpi(),·saRecord$IkeSaRecord.getResponderSpi(),·46,·n,·b,·saRecord$IkeSaRecord.isLocalInit,·n2),·(List)Arrays.asList(a)); | 755 | ········return·new·IkeMessage(new·IkeHeader(saRecord$IkeSaRecord.getInitiatorSpi(),·saRecord$IkeSaRecord.getResponderSpi(),·46,·n,·b,·saRecord$IkeSaRecord.isLocalInit,·n2),·(List)Arrays.asList(a)); |
| 765 | ····} | 756 | ····} |
| 766 | ···· | 757 | ···· |
| 767 | ····SaRecord$SaLifetimeAlarmScheduler·buildSaLifetimeAlarmScheduler(final·long·n)·{ | 758 | ····SaRecord$SaLifetimeAlarmScheduler·buildSaLifetimeAlarmScheduler(final·long·n)·{ |
| | 759 | ········return·new·SaRecord$SaLifetimeAlarmScheduler(this.mIkeSessionParams.getHardLifetimeMsInternal(),·this.mIkeSessionParams.getSoftLifetimeMsInternal(),·buildIkeAlarmIntent(this.mContext,·"IkeAlarmReceiver.ACTION_DELETE_IKE",·this.getIntentIdentifier(n),·this.getIntentIkeSmMsg(402,·n)),·buildIkeAlarmIntent(this.mContext,·"IkeAlarmReceiver.ACTION_REKEY_IKE",·this.getIntentIdentifier(n),·this.getIntentIkeSmMsg(403,·n)),·this.mAlarmManager); |
| 768 | ········final·Message·intentIkeSmMsg·=·this.getIntentIkeSmMsg(402,·n); | |
| 769 | ········final·Message·intentIkeSmMsg2·=·this.getIntentIkeSmMsg(403,·n); | |
| 770 | ········return·new·SaRecord$SaLifetimeAlarmScheduler(new·IkeAlarm$IkeAlarmConfig(this.mContext,·"IkeAlarmReceiver.ACTION_DELETE_IKE",·this.mIkeSessionParams.getHardLifetimeMsInternal(),·buildIkeAlarmIntent(this.mContext,·"IkeAlarmReceiver.ACTION_DELETE_IKE",·this.getIntentIdentifier(n),·intentIkeSmMsg),·intentIkeSmMsg),·new·IkeAlarm$IkeAlarmConfig(this.mContext,·"IkeAlarmReceiver.ACTION_REKEY_IKE",·this.mIkeSessionParams.getSoftLifetimeMsInternal(),·buildIkeAlarmIntent(this.mContext,·"IkeAlarmReceiver.ACTION_REKEY_IKE",·this.getIntentIdentifier(n),·intentIkeSmMsg2),·intentIkeSmMsg2)); | |
| 771 | ····} | 760 | ····} |
| 772 | ···· | 761 | ···· |
| 773 | ····public·void·closeChildSession(final·ChildSessionCallback·childSessionCallback)·{ | 762 | ····public·void·closeChildSession(final·ChildSessionCallback·childSessionCallback)·{ |
| 774 | ········if·(childSessionCallback·==·null)·{ | 763 | ········if·(childSessionCallback·==·null)·{ |
| 775 | ············throw·new·IllegalArgumentException("Child·Session·Callback·must·be·provided"); | 764 | ············throw·new·IllegalArgumentException("Child·Session·Callback·must·be·provided"); |
| 776 | ········} | 765 | ········} |
| 777 | ········if·(this.hasChildSessionCallback(childSessionCallback))·{ | 766 | ········if·(this.hasChildSessionCallback(childSessionCallback))·{ |
| Offset 785, 14 lines modified | Offset 774, 18 lines modified |
| 785 | ···· | 774 | ···· |
| 786 | ····public·void·closeSession()·{ | 775 | ····public·void·closeSession()·{ |
| 787 | ········final·IkeLocalRequestScheduler$LocalRequestFactory·mLocalRequestFactory·=·this.mLocalRequestFactory; | 776 | ········final·IkeLocalRequestScheduler$LocalRequestFactory·mLocalRequestFactory·=·this.mLocalRequestFactory; |
| 788 | ········final·int·n·=·402; | 777 | ········final·int·n·=·402; |
| 789 | ········this.sendMessage(n,·(Object)mLocalRequestFactory.getIkeLocalRequest(n)); | 778 | ········this.sendMessage(n,·(Object)mLocalRequestFactory.getIkeLocalRequest(n)); |
| 790 | ····} | 779 | ····} |
| 791 | ···· | 780 | ···· |
| | 781 | ····public·void·killSession()·{ |
| | 782 | ········this.sendMessage(317); |
| | 783 | ····} |
| | 784 | ···· |
| 792 | ····protected·void·onQuitting()·{ | 785 | ····protected·void·onQuitting()·{ |
| 793 | ········this.closeAllSaRecords(true); | 786 | ········this.closeAllSaRecords(true); |
| 794 | ········Object·o·=·this.mChildCbToSessions; | 787 | ········Object·o·=·this.mChildCbToSessions; |
| 795 | ········synchronized·(o)·{ | 788 | ········synchronized·(o)·{ |
| 796 | ············final·Iterator<ChildSessionStateMachine>·iterator·=·this.mChildCbToSessions.values().iterator(); | 789 | ············final·Iterator<ChildSessionStateMachine>·iterator·=·this.mChildCbToSessions.values().iterator(); |
| 797 | ············while·(iterator.hasNext())·{ | 790 | ············while·(iterator.hasNext())·{ |
| 798 | ················((ChildSessionStateMachine)iterator.next()).killSession(); | 791 | ················((ChildSessionStateMachine)iterator.next()).killSession(); |
| Offset 963, 15 lines modified | Offset 956, 15 lines modified |
| 963 | ········Label_0050:·{ | 956 | ········Label_0050:·{ |
| 964 | ············if·(b)·{ | 957 | ············if·(b)·{ |
| 965 | ················break·Label_0050; | 958 | ················break·Label_0050; |
| 966 | ············} | 959 | ············} |
| 967 | ············try·{ | 960 | ············try·{ |
| 968 | ················if·(this.getCurrentState()·!=·null)·{ | 961 | ················if·(this.getCurrentState()·!=·null)·{ |
| 969 | ····················final·HashMap·mChildCbToSessions2·=·this.mChildCbToSessions; | 962 | ····················final·HashMap·mChildCbToSessions2·=·this.mChildCbToSessions; |
| 970 | ····················childSessionStateMachine·=·ChildSessionStateMachineFactory.makeChildSessionStateMachine(this.getHandler().getLooper(),·this.mContext,·this.mIkeSessionId,·this.getHandler(),·this.mRandomFactory,·this.mIpSecSpiGenerator,·childSessionParams,·this.mUserCbExecutor,·childSessionCallback,·(ChildSessionStateMachine$IChildSessionSmCallback)new·IkeSessionStateMachine$ChildSessionSmCallback(this)); | 963 | ····················childSessionStateMachine·=·ChildSessionStateMachineFactory.makeChildSessionStateMachine(this.getHandler().getLooper(),·this.mContext,·this.mIkeSessionId,·this.mAlarmManager,·this.mRandomFactory,·this.mIpSecSpiGenerator,·childSessionParams,·this.mUserCbExecutor,·childSessionCallback,·(ChildSessionStateMachine$IChildSessionSmCallback)new·IkeSessionStateMachine$ChildSessionSmCallback(this)); |
| 971 | ····················hashMap·=·mChildCbToSessions2; | 964 | ····················hashMap·=·mChildCbToSessions2; |
| 972 | ····················final·ChildSessionStateMachine·childSessionStateMachine2·=·childSessionStateMachine; | 965 | ····················final·ChildSessionStateMachine·childSessionStateMachine2·=·childSessionStateMachine; |
| 973 | ····················hashMap.put(childSessionCallback,·childSessionStateMachine2); | 966 | ····················hashMap.put(childSessionCallback,·childSessionStateMachine2); |
| 974 | ····················final·HashMap·hashMap2·=·mChildCbToSessions; | 967 | ····················final·HashMap·hashMap2·=·mChildCbToSessions; |
| 975 | ····················//·monitorexit(hashMap2) | 968 | ····················//·monitorexit(hashMap2) |
| 976 | ····················return; | 969 | ····················return; |
| 977 | ················} | 970 | ················} |
| Offset 1002, 15 lines modified | Offset 995, 17 lines modified |
| 1002 | ····void·removeIkeSaRecord(final·SaRecord$IkeSaRecord·saRecord$IkeSaRecord)·{ | 995 | ····void·removeIkeSaRecord(final·SaRecord$IkeSaRecord·saRecord$IkeSaRecord)·{ |
| 1003 | ········this.mIkeSocket.unregisterIke(saRecord$IkeSaRecord.getLocalSpi()); | 996 | ········this.mIkeSocket.unregisterIke(saRecord$IkeSaRecord.getLocalSpi()); |
| 1004 | ········this.mLocalSpiToIkeSaRecordMap.remove(saRecord$IkeSaRecord.getLocalSpi()); | 997 | ········this.mLocalSpiToIkeSaRecordMap.remove(saRecord$IkeSaRecord.getLocalSpi()); |
| 1005 | ····} | 998 | ····} |
| 1006 | ···· | 999 | ···· |
| 1007 | ····void·sendEncryptedIkeMessage(final·SaRecord$IkeSaRecord·saRecord$IkeSaRecord,·final·IkeMessage·ikeMessage)·{ | 1000 | ····void·sendEncryptedIkeMessage(final·SaRecord$IkeSaRecord·saRecord$IkeSaRecord,·final·IkeMessage·ikeMessage)·{ |
| 1008 | ········final·byte[][]·encryptAndEncode·=·ikeMessage.encryptAndEncode(this.mIkeIntegrity,·this.mIkeCipher,·saRecord$IkeSaRecord,·this.mSupportFragment,·1280); | 1001 | ········final·byte[][]·encryptAndEncode·=·ikeMessage.encryptAndEncode(this.mIkeIntegrity,·this.mIkeCipher,·saRecord$IkeSaRecord,·this.mSupportFragment,·1280); |
| 1009 | ········this.sendEncryptedIkePackets(encryptAndEncode); | 1002 | ········for·(int·length·=·encryptAndEncode.length,·i·=·0;·i·<·length;·++i)·{ |
| | 1003 | ············this.mIkeSocket.sendIkePacket(encryptAndEncode[i],·this.mRemoteAddress); |
| | 1004 | ········} |
| 1010 | ········if·(ikeMessage.ikeHeader.isResponseMsg)·{ | 1005 | ········if·(ikeMessage.ikeHeader.isResponseMsg)·{ |
| 1011 | ············saRecord$IkeSaRecord.updateLastSentRespAllPackets((List)Arrays.asList(encryptAndEncode),·ikeMessage.ikeHeader.messageId); | 1006 | ············saRecord$IkeSaRecord.updateLastSentRespAllPackets((List)Arrays.asList(encryptAndEncode),·ikeMessage.ikeHeader.messageId); |
| 1012 | ········} | 1007 | ········} |
| 1013 | ····} | 1008 | ····} |
| 1014 | ···· | 1009 | ···· |
| 1015 | ····void·sendEncryptedIkeMessage(final·IkeMessage·ikeMessage)·{ | 1010 | ····void·sendEncryptedIkeMessage(final·IkeMessage·ikeMessage)·{ |
| 1016 | ········this.sendEncryptedIkeMessage(this.mCurrentIkeSaRecord,·ikeMessage); | 1011 | ········this.sendEncryptedIkeMessage(this.mCurrentIkeSaRecord,·ikeMessage); |
| Offset 1020, 13 lines modified | Offset 1015, 13 lines modified |
| 1020 | ········if·(network·==·null)·{ | 1015 | ········if·(network·==·null)·{ |
| 1021 | ············throw·new·IllegalArgumentException("network·must·not·be·null"); | 1016 | ············throw·new·IllegalArgumentException("network·must·not·be·null"); |
| 1022 | ········} | 1017 | ········} |
| 1023 | ········if·(!this.mIkeSessionParams.hasIkeOption(2))·{ | 1018 | ········if·(!this.mIkeSessionParams.hasIkeOption(2))·{ |
| 1024 | ············throw·new·IllegalStateException("IKE_OPTION_MOBIKE·is·not·set"); | 1019 | ············throw·new·IllegalStateException("IKE_OPTION_MOBIKE·is·not·set"); |
| 1025 | ········} | 1020 | ········} |
| 1026 | ········if·(this.mIkeSessionParams.getConfiguredNetwork()·!=·null)·{ | 1021 | ········if·(this.mIkeSessionParams.getConfiguredNetwork()·!=·null)·{ |
| 1027 | ············this.sendMessage(317,·(Object)network); | 1022 | ············this.sendMessage(318,·(Object)network); |
| 1028 | ············return; | 1023 | ············return; |
| 1029 | ········} | 1024 | ········} |
| 1030 | ········throw·new·IllegalStateException("setNetwork()·requires·this·IkeSession·to·be·configured·to·use·caller-specified·network·instead·of·default·network"); | 1025 | ········throw·new·IllegalStateException("setNetwork()·requires·this·IkeSession·to·be·configured·to·use·caller-specified·network·instead·of·default·network"); |
| 1031 | ····} | 1026 | ····} |
| 1032 | } | 1027 | } |