diff options
author | Chia-chi Yeh <chiachi@android.com> | 2011-12-08 16:22:51 -0800 |
---|---|---|
committer | Chia-chi Yeh <chiachi@android.com> | 2011-12-08 16:22:51 -0800 |
commit | cadace43df20e28cc98c2068b327ec3ebe119418 (patch) | |
tree | 34f625701123bf142aa16b67efb378877ab33123 | |
parent | fdbd82ddd72c22e0ec446b1e30ab8a2146d7bdf6 (diff) | |
download | ipsec-tools-ics-mr1-release.tar.gz |
ipsec-tools: notify the death of racoon by touching a file.android-sdk-adt_r20android-sdk-4.0.3_r1android-sdk-4.0.3-tools_r1android-cts-verifier-4.0_r1android-cts-verifier-4.0.3_r1android-cts-4.0.3_r2android-cts-4.0.3_r1android-4.0.4_r2.1android-4.0.4_r2android-4.0.4_r1.2android-4.0.4_r1.1android-4.0.4_r1android-4.0.3_r1.1android-4.0.3_r1tools_r20ics-plus-aospics-mr1-releaseics-mr1
Since racoon removes SPD policies when it dies, packets from upper
VPN layers might pass through without IPSec's protection. Here we
add a mechanism to close the gap as much as possible.
Bug: 5714296
Change-Id: If5ebdea3ee1444c18e062b24db724b1575dbdf2d
-rw-r--r-- | main.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -42,12 +42,19 @@ #include <cutils/sockets.h> #include <private/android_filesystem_config.h> +static void notify_death() +{ + creat("/data/misc/vpn/abort", 0); +} + static int android_get_control_and_arguments(int *argc, char ***argv) { static char *args[32]; int control; int i; + atexit(notify_death); + if ((i = android_get_control_socket("racoon")) == -1) { return -1; } |