added a "purgeike" command to stroke, deleting all IKE_SAs without a CHILD_SA

This commit is contained in:
Martin Willi committed 2009-05-15 11:02:56 +02:00
1 parent bb51102b89
commit 832427064c
7 files changed
+69 -6

No files matched your search

+5 -1
View File
@@ -248,7 +248,8 @@ static int reread(stroke_keyword_t kw)
}
static int purge_flags[] = {
PURGE_OCSP
PURGE_OCSP,
PURGE_IKE,
};
static int purge(stroke_keyword_t kw)
@@ -332,6 +333,8 @@ static void exit_usage(char *error)
printf(" stroke rereadsecrets|rereadcrls|rereadall\n");
printf(" Purge ocsp cache entries:\n");
printf(" stroke purgeocsp\n");
printf(" Purge IKE_SAs without a CHILD_SA:\n");
printf(" stroke purgeike\n");
printf(" Show leases of a pool:\n");
printf(" stroke leases [POOL [ADDRESS]]\n");
exit_error(error);
@@ -443,6 +446,7 @@ int main(int argc, char *argv[])
res = reread(token->kw);
break;
case STROKE_PURGE_OCSP:
case STROKE_PURGE_IKE:
res = purge(token->kw);
break;
case STROKE_LEASES:
+1
View File
@@ -48,6 +48,7 @@ typedef enum {
STROKE_REREAD_CRLS,
STROKE_REREAD_ALL,
STROKE_PURGE_OCSP,
STROKE_PURGE_IKE,
STROKE_LEASES
} stroke_keyword_t;
+1
View File
@@ -55,4 +55,5 @@ rereadacerts, STROKE_REREAD_ACERTS
rereadcrls, STROKE_REREAD_CRLS
rereadall, STROKE_REREAD_ALL
purgeocsp, STROKE_PURGE_OCSP
purgeike, STROKE_PURGE_IKE
leases, STROKE_LEASES
+2
View File
@@ -103,6 +103,8 @@ enum purge_flag_t {
PURGE_NONE = 0x0000,
/** purge ocsp cache entries */
PURGE_OCSP = 0x0001,
/** purge IKE_SAs without a CHILD_SA */
PURGE_IKE = 0x0002,
};
/**