ike_cfg->add_proposal(ike_cfg, proposal_create_default(PROTO_IKE));
peer_cfg = peer_cfg_create("android", IKEV2, ike_cfg, CERT_SEND_IF_ASKED,
- UNIQUE_REPLACE, 1, /* keyingtries */
+ UNIQUE_REPLACE, 0, /* keyingtries */
36000, 0, /* rekey 10h, reauth none */
600, 600, /* jitter, over 10min */
TRUE, FALSE, /* mobike, aggressive */
peer_cfg->add_auth_cfg(peer_cfg, auth, FALSE);
child_cfg = child_cfg_create("android", &lifetime, NULL, TRUE, MODE_TUNNEL,
- ACTION_NONE, ACTION_NONE, ACTION_NONE, FALSE,
- 0, 0, NULL, NULL, 0);
+ ACTION_NONE, ACTION_RESTART, ACTION_RESTART,
+ FALSE, 0, 0, NULL, NULL, 0);
/* create an ESP proposal with the algorithms currently supported by
* libipsec, no PFS for now */
child_cfg->add_proposal(child_cfg, proposal_create_from_string(PROTO_ESP,
switch (status)
{
case STATE_CHILD_SA_DOWN:
- synchronized (mServiceLock)
- {
- /* if we are not actively disconnecting we assume the remote terminated
- * the connection and call disconnect() to deinitialize charon properly */
- if (mService != null && !mIsDisconnecting)
- {
- mService.disconnect();
- }
- }
+ /* we ignore this as we use closeaction=restart */
break;
case STATE_CHILD_SA_UP:
setState(State.CONNECTED);