Strongswan與Andriod野蠻模式L2TPoverIPsec對接有時候不成功。

不成功的時候strongswan打印如下:
Dec 17 13:55:12 05[ENC] <net-net|8> generating AGGRESSIVE response 0 [ SA KE No ID V V V NAT-D NAT-D HASH ]
Dec 17 13:55:12 05[NET] <net-net|8> sending packet: from 192.168.0.132[500] to 192.168.0.124[500] (384 bytes)
Dec 17 13:55:12 04[NET] sending packet: from 192.168.0.132[500] to 192.168.0.124[500]
Dec 17 13:55:12 05[MGR] <net-net|8> checkin IKE_SA net-net[8]
Dec 17 13:55:12 05[MGR] <net-net|8> check-in of IKE_SA successful.
Dec 17 13:55:12 01[JOB] next event in 3s 999ms, waiting
Dec 17 13:55:13 03[NET] received packet: from 192.168.0.124[500] to 192.168.0.132[500]
Dec 17 13:55:13 03[NET] waiting for data on sockets
Dec 17 13:55:13 03[NET] received packet: from 192.168.0.124[500] to 192.168.0.132[500]
Dec 17 13:55:13 03[NET] waiting for data on sockets
Dec 17 13:55:13 06[MGR] checkout IKE_SA by message
Dec 17 13:55:13 06[MGR] IKE_SA net-net[8] successfully checked out
Dec 17 13:55:13 06[NET] <net-net|8> received packet: from 192.168.0.124[500] to 192.168.0.132[500] (92 bytes)
Dec 17 13:55:13 06[ENC] <net-net|8> parsed INFORMATIONAL_V1 request 2630201173 [ HASH N(INITIAL_CONTACT) ]
Dec 17 13:55:13 06[IKE] <net-net|8> calculated HASH does not match HASH payload
Dec 17 13:55:13 06[CFG] <net-net|8> no alternative config found
Dec 17 13:55:13 06[IKE] <net-net|8> queueing ISAKMP_DELETE task
Dec 17 13:55:13 06[IKE] <net-net|8> activating new tasks
Dec 17 13:55:13 06[IKE] <net-net|8>   activating ISAKMP_DELETE task
Dec 17 13:55:13 06[IKE] <net-net|8> deleting IKE_SA net-net[8] between 192.168.0.132[192.168.0.132]...192.168.0.124[123]
Dec 17 13:55:13 06[IKE] <net-net|8> sending DELETE for IKE_SA net-net[8]
Dec 17 13:55:13 06[IKE] <net-net|8> IKE_SA net-net[8] state change: CONNECTING => DELETING
Dec 17 13:55:13 06[ENC] <net-net|8> generating INFORMATIONAL_V1 request 3988102021 [ HASH D ]
Dec 17 13:55:13 06[NET] <net-net|8> sending packet: from 192.168.0.132[500] to 192.168.0.124[500] (84 bytes)
Dec 17 13:55:13 06[MGR] <net-net|8> checkin and destroy IKE_SA net-net[8]
Dec 17 13:55:13 06[IKE] <net-net|8> IKE_SA net-net[8] state change: DELETING => DESTROYING
Dec 17 13:55:13 06[MGR] check-in and destroy of IKE_SA successful

可以看出,原本應該期待收到AGG的第三條報文,但是卻收到了個通知載荷N(INITIAL_CONTACT) ]。通過抓包發現Andriod(racoon)確實也發了,
在strongswan的接收機器上通過tcpdump抓包如下順序。
agg1/agg2/agg3/info

但是strongswan卻先收到了information報文,導致處理錯誤。。。。謹記一下。
發佈了44 篇原創文章 · 獲贊 1 · 訪問量 7萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章