aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c16
-rw-r--r--setup.c4
-rw-r--r--src/racoon/pfkey.c11
3 files changed, 21 insertions, 10 deletions
diff --git a/main.c b/main.c
index 6ff1508..a17757b 100644
--- a/main.c
+++ b/main.c
@@ -150,34 +150,34 @@ int main(int argc, char **argv)
unsigned char code = argc - 1;
#endif
- do_plog(LLV_INFO, "ipsec-tools 0.7.2 (http://ipsec-tools.sf.net)\n");
-
- atexit(terminated);
signal(SIGHUP, terminate);
signal(SIGINT, terminate);
signal(SIGTERM, terminate);
signal(SIGPIPE, SIG_IGN);
+ setup(argc, argv);
+
+ do_plog(LLV_INFO, "ipsec-tools 0.7.2 (http://ipsec-tools.sf.net)\n");
+ atexit(terminated);
eay_init();
oakley_dhinit();
compute_vendorids();
sched_init();
- setup(argc, argv);
if (pfkey_init() < 0 || isakmp_init() < 0) {
exit(1);
}
+#ifdef ENABLE_NATT
+ natt_keepalive_init();
+#endif
+
#ifdef ANDROID_CHANGES
bind_interface();
send(control, &code, 1, 0);
setuid(AID_VPN);
#endif
-#ifdef ENABLE_NATT
- natt_keepalive_init();
-#endif
-
FD_ZERO(&fdset);
FD_SET(lcconf->sock_pfkey, &fdset);
fdset_size = lcconf->sock_pfkey;
diff --git a/setup.c b/setup.c
index 2acecc7..94cc9b8 100644
--- a/setup.c
+++ b/setup.c
@@ -63,8 +63,8 @@ static void set_default()
localconf.pad_randomlen = LC_DEFAULT_PAD_RANDOM;
localconf.pad_strict = LC_DEFAULT_PAD_STRICT;
localconf.pad_excltail = LC_DEFAULT_PAD_EXCLTAIL;
- localconf.retry_counter = LC_DEFAULT_RETRY_COUNTER;
- localconf.retry_interval = LC_DEFAULT_RETRY_INTERVAL;
+ localconf.retry_counter = 10;
+ localconf.retry_interval = 3;
localconf.count_persend = LC_DEFAULT_COUNT_PERSEND;
localconf.secret_size = LC_DEFAULT_SECRETSIZE;
localconf.retry_checkph1 = LC_DEFAULT_RETRY_CHECKPH1;
diff --git a/src/racoon/pfkey.c b/src/racoon/pfkey.c
index cbbf042..e73acc8 100644
--- a/src/racoon/pfkey.c
+++ b/src/racoon/pfkey.c
@@ -2718,6 +2718,8 @@ pk_recvspdflush(mhp)
return 0;
}
+#ifndef ANDROID_PATCHED
+
/*
* send error against acquire message to kenrel.
*/
@@ -2754,6 +2756,15 @@ pk_sendeacquire(iph2)
return 0;
}
+#else
+
+int pk_sendeacquire(struct ph2handle *iph2)
+{
+ exit(1);
+}
+
+#endif
+
/*
* check if the algorithm is supported or not.
* OUT 0: ok