diff options
author | Rene Mayrhofer <rene@mayrhofer.eu.org> | 2009-06-23 11:25:24 +0000 |
---|---|---|
committer | Rene Mayrhofer <rene@mayrhofer.eu.org> | 2009-06-23 11:25:24 +0000 |
commit | 41787e147279ff0695e9d759487266a60b80867b (patch) | |
tree | 8f28566c8fd7106c80d2536d2df540dbb4499cc5 /src/stroke/stroke.c | |
parent | c3e7f611ea8273c6b3909cb006ade4903a74aad0 (diff) | |
download | vyos-strongswan-41787e147279ff0695e9d759487266a60b80867b.tar.gz vyos-strongswan-41787e147279ff0695e9d759487266a60b80867b.zip |
[svn-upgrade] Integrating new upstream version, strongswan (4.3.2)
Diffstat (limited to 'src/stroke/stroke.c')
-rw-r--r-- | src/stroke/stroke.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/stroke/stroke.c b/src/stroke/stroke.c index 01cbcb5b0..c27a8ca3e 100644 --- a/src/stroke/stroke.c +++ b/src/stroke/stroke.c @@ -12,8 +12,6 @@ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. - * - * RCSID $Id: stroke.c 4783 2008-12-10 13:00:02Z martin $ */ #include <stdlib.h> @@ -27,6 +25,7 @@ #include <errno.h> #include <stdio.h> #include <stddef.h> +#include <string.h> #include "stroke_msg.h" #include "stroke_keywords.h" @@ -54,10 +53,13 @@ static char* push_string(stroke_msg_t *msg, char *string) static int send_stroke_msg (stroke_msg_t *msg) { - struct sockaddr_un ctl_addr = { AF_UNIX, STROKE_SOCKET }; + struct sockaddr_un ctl_addr; int sock; char buffer[64]; int byte_count; + + ctl_addr.sun_family = AF_UNIX; + strcpy(ctl_addr.sun_path, STROKE_SOCKET); msg->output_verbosity = 1; /* CONTROL */ @@ -246,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) @@ -330,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); @@ -441,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: |