VPN reconnection fails after manually disabling VPN
When disabling VPN manually, there was no trigger for ipsec-tools to
send “delete message” to VPN server. Therefore, connection information
is left in VPN server and next connection fails.
Fix this issue as below:
- Add “delete message” sending via flush in ipsec-tools when racoon
daemon stops
- Keep daemon alive when VPN.java exit() to let it finish sending to
VPN server
- Since daemon will stop itself when monitor socket is closed, replace
stop(daemon) with close(socket); thus remove redundant socket closing
in VPN exit()
(cherry picked from commit cb1e9555c0938513dc78b35f3f6e661848b0de9a)
Bug: 28279646
Bug: 33467086
Change-Id: I64591874a1de5d0dd4b5834211d07effb962cd6b
2 files changed