diff options
author | Yves-Alexis Perez <corsac@debian.org> | 2013-02-07 13:27:27 +0100 |
---|---|---|
committer | Yves-Alexis Perez <corsac@debian.org> | 2013-02-07 13:27:27 +0100 |
commit | 7585facf05d927eb6df3929ce09ed5e60d905437 (patch) | |
tree | e4d14b4dc180db20356b6b01ce0112f3a2d7897e /src/stroke | |
parent | c1343b3278cdf99533b7902744d15969f9d6fdc1 (diff) | |
download | vyos-strongswan-7585facf05d927eb6df3929ce09ed5e60d905437.tar.gz vyos-strongswan-7585facf05d927eb6df3929ce09ed5e60d905437.zip |
Imported Upstream version 5.0.2
Diffstat (limited to 'src/stroke')
-rw-r--r-- | src/stroke/Makefile.in | 26 | ||||
-rw-r--r-- | src/stroke/stroke.c | 10 | ||||
-rw-r--r-- | src/stroke/stroke_keywords.c | 101 | ||||
-rw-r--r-- | src/stroke/stroke_keywords.h | 1 | ||||
-rw-r--r-- | src/stroke/stroke_keywords.txt | 1 | ||||
-rw-r--r-- | src/stroke/stroke_msg.h | 5 |
6 files changed, 80 insertions, 64 deletions
diff --git a/src/stroke/Makefile.in b/src/stroke/Makefile.in index acf9d3485..01288296e 100644 --- a/src/stroke/Makefile.in +++ b/src/stroke/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -98,6 +98,7 @@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLIB = @DLLIB@ +DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ @@ -125,6 +126,7 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MYSQLCFLAG = @MYSQLCFLAG@ MYSQLCONFIG = @MYSQLCONFIG@ @@ -152,6 +154,7 @@ RANLIB = @RANLIB@ RTLIB = @RTLIB@ RUBY = @RUBY@ RUBYINCLUDE = @RUBYINCLUDE@ +RUBYLIB = @RUBYLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ @@ -164,6 +167,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ @@ -217,7 +221,6 @@ libexecdir = @libexecdir@ linux_headers = @linux_headers@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ maemo_CFLAGS = @maemo_CFLAGS@ maemo_LIBS = @maemo_LIBS@ manager_plugins = @manager_plugins@ @@ -351,7 +354,7 @@ clean-ipsecPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -stroke$(EXEEXT): $(stroke_OBJECTS) $(stroke_DEPENDENCIES) +stroke$(EXEEXT): $(stroke_OBJECTS) $(stroke_DEPENDENCIES) $(EXTRA_stroke_DEPENDENCIES) @rm -f stroke$(EXEEXT) $(LINK) $(stroke_OBJECTS) $(stroke_LDADD) $(LIBS) @@ -492,10 +495,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/stroke/stroke.c b/src/stroke/stroke.c index 03890b517..e289296c1 100644 --- a/src/stroke/stroke.c +++ b/src/stroke/stroke.c @@ -144,6 +144,7 @@ static int add_connection(char *name, msg.add_conn.mode = 1; msg.add_conn.mobike = 1; msg.add_conn.dpd.action = 1; + msg.add_conn.install_policy = 1; msg.add_conn.me.id = push_string(&msg, my_id); msg.add_conn.me.address = push_string(&msg, my_addr); @@ -265,6 +266,7 @@ static int list_flags[] = { LIST_OCSP, LIST_ALGS, LIST_PLUGINS, + LIST_COUNTERS, LIST_ALL }; @@ -363,7 +365,6 @@ static int user_credentials(char *name, char *user, char *pass) return send_stroke_msg(&msg); } - static int set_loglevel(char *type, u_int level) { stroke_msg_t msg; @@ -389,7 +390,7 @@ static void exit_usage(char *error) printf("Usage:\n"); printf(" Add a connection:\n"); printf(" stroke add NAME MY_ID OTHER_ID MY_ADDR OTHER_ADDR\\\n"); - printf(" MY_NET OTHER_NET MY_NETBITS OTHER_NETBITS\n"); + printf(" MY_NET OTHER_NET\n"); printf(" where: ID is any IKEv2 ID \n"); printf(" ADDR is a IPv4 address\n"); printf(" NET is a IPv4 subnet in CIDR notation\n"); @@ -418,7 +419,7 @@ static void exit_usage(char *error) printf(" Show list of authority and attribute certificates:\n"); printf(" stroke listcacerts|listocspcerts|listaacerts|listacerts\n"); printf(" Show list of end entity certificates, ca info records and crls:\n"); - printf(" stroke listcerts|listcainfos|listcrls|listall\n"); + printf(" stroke listcerts|listcainfos|listcrls|listcounters|listall\n"); printf(" Show list of supported algorithms:\n"); printf(" stroke listalgs\n"); printf(" Reload authority and attribute certificates:\n"); @@ -470,7 +471,7 @@ int main(int argc, char *argv[]) switch (token->kw) { case STROKE_ADD: - if (argc < 11) + if (argc < 9) { exit_usage("\"add\" needs more parameters..."); } @@ -552,6 +553,7 @@ int main(int argc, char *argv[]) case STROKE_LIST_OCSP: case STROKE_LIST_ALGS: case STROKE_LIST_PLUGINS: + case STROKE_LIST_COUNTERS: case STROKE_LIST_ALL: res = list(token->kw, argc > 2 && strcmp(argv[2], "--utc") == 0); break; diff --git a/src/stroke/stroke_keywords.c b/src/stroke/stroke_keywords.c index b5ca2e143..3f53b7fa8 100644 --- a/src/stroke/stroke_keywords.c +++ b/src/stroke/stroke_keywords.c @@ -54,12 +54,12 @@ struct stroke_token { stroke_keyword_t kw; }; -#define TOTAL_KEYWORDS 41 +#define TOTAL_KEYWORDS 42 #define MIN_WORD_LENGTH 2 #define MAX_WORD_LENGTH 15 -#define MIN_HASH_VALUE 2 -#define MAX_HASH_VALUE 44 -/* maximum key range = 43, duplicates = 0 */ +#define MIN_HASH_VALUE 4 +#define MAX_HASH_VALUE 49 +/* maximum key range = 46, duplicates = 0 */ #ifdef __GNUC__ __inline @@ -75,32 +75,32 @@ hash (str, len) { static const unsigned char asso_values[] = { - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 15, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 0, 30, 1, - 1, 15, 45, 15, 45, 30, 45, 13, 0, 0, - 45, 9, 3, 45, 6, 18, 1, 0, 45, 45, - 5, 0, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, - 45, 45, 45, 45, 45, 45 + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 19, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 1, 12, 2, + 2, 16, 50, 14, 50, 11, 50, 16, 1, 8, + 50, 18, 7, 50, 6, 12, 1, 11, 50, 50, + 4, 3, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, + 50, 50, 50, 50, 50, 50 }; register int hval = len; @@ -125,17 +125,16 @@ hash (str, len) static const struct stroke_token wordlist[] = { - {"up", STROKE_UP}, {"add", STROKE_ADD}, {"del", STROKE_DEL}, {"down", STROKE_DOWN}, - {"listall", STROKE_LIST_ALL}, {"delete", STROKE_DELETE}, + {"listall", STROKE_LIST_ALL}, {"listcrls", STROKE_LIST_CRLS}, + {"up", STROKE_UP}, {"rekey", STROKE_REKEY}, {"listaacerts", STROKE_LIST_AACERTS}, {"listcacerts", STROKE_LIST_CACERTS}, - {"listplugins", STROKE_LIST_PLUGINS}, {"rereadall", STROKE_REREAD_ALL}, {"listcerts", STROKE_LIST_CERTS}, {"rereadcrls", STROKE_REREAD_CRLS}, @@ -143,37 +142,39 @@ static const struct stroke_token wordlist[] = {"rereadaacerts", STROKE_REREAD_AACERTS}, {"rereadcacerts", STROKE_REREAD_CACERTS}, {"leases", STROKE_LEASES}, - {"unroute", STROKE_UNROUTE}, {"listalgs", STROKE_LIST_ALGS}, - {"status", STROKE_STATUS}, - {"listacerts", STROKE_LIST_ACERTS}, + {"listcainfos", STROKE_LIST_CAINFOS}, + {"listcounters", STROKE_LIST_COUNTERS}, {"route", STROKE_ROUTE}, + {"listacerts", STROKE_LIST_ACERTS}, + {"status", STROKE_STATUS}, + {"listplugins", STROKE_LIST_PLUGINS}, + {"listpubkeys", STROKE_LIST_PUBKEYS}, + {"rereadsecrets", STROKE_REREAD_SECRETS}, {"statusall", STROKE_STATUSALL}, {"purgeocsp", STROKE_PURGE_OCSP}, {"statusallnb", STROKE_STATUSALL_NOBLK}, - {"rereadocspcerts", STROKE_REREAD_OCSPCERTS}, - {"user-creds", STROKE_USER_CREDS}, + {"exportx509", STROKE_EXPORT_X509}, {"down-srcip", STROKE_DOWN_SRCIP}, {"purgecrls", STROKE_PURGE_CRLS}, - {"listgroups", STROKE_LIST_GROUPS}, {"listocsp", STROKE_LIST_OCSP}, - {"exportx509", STROKE_EXPORT_X509}, - {"rereadsecrets", STROKE_REREAD_SECRETS}, + {"rereadocspcerts", STROKE_REREAD_OCSPCERTS}, {"loglevel", STROKE_LOGLEVEL}, - {"purgeike", STROKE_PURGE_IKE}, - {"listocspcerts", STROKE_LIST_OCSPCERTS}, {"memusage", STROKE_MEMUSAGE}, - {"listcainfos", STROKE_LIST_CAINFOS}, - {"purgecerts", STROKE_PURGE_CERTS}, - {"listpubkeys", STROKE_LIST_PUBKEYS} + {"listgroups", STROKE_LIST_GROUPS}, + {"listocspcerts", STROKE_LIST_OCSPCERTS}, + {"unroute", STROKE_UNROUTE}, + {"user-creds", STROKE_USER_CREDS}, + {"purgeike", STROKE_PURGE_IKE}, + {"purgecerts", STROKE_PURGE_CERTS} }; static const short lookup[] = { - -1, -1, 0, 1, 2, 3, -1, 4, 5, 6, -1, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40 + -1, -1, -1, -1, 0, 1, 2, -1, -1, 3, 4, -1, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, -1, 41 }; #ifdef __GNUC__ diff --git a/src/stroke/stroke_keywords.h b/src/stroke/stroke_keywords.h index 554d071f3..0ad87b705 100644 --- a/src/stroke/stroke_keywords.h +++ b/src/stroke/stroke_keywords.h @@ -42,6 +42,7 @@ typedef enum { STROKE_LIST_OCSP, STROKE_LIST_ALGS, STROKE_LIST_PLUGINS, + STROKE_LIST_COUNTERS, STROKE_LIST_ALL, STROKE_REREAD_SECRETS, STROKE_REREAD_CACERTS, diff --git a/src/stroke/stroke_keywords.txt b/src/stroke/stroke_keywords.txt index 1d7ab8a45..95b2981d9 100644 --- a/src/stroke/stroke_keywords.txt +++ b/src/stroke/stroke_keywords.txt @@ -49,6 +49,7 @@ listcrls, STROKE_LIST_CRLS listocsp, STROKE_LIST_OCSP listalgs, STROKE_LIST_ALGS listplugins, STROKE_LIST_PLUGINS +listcounters, STROKE_LIST_COUNTERS listall, STROKE_LIST_ALL rereadsecrets, STROKE_REREAD_SECRETS rereadcacerts, STROKE_REREAD_CACERTS diff --git a/src/stroke/stroke_msg.h b/src/stroke/stroke_msg.h index 662feed69..e972a5984 100644 --- a/src/stroke/stroke_msg.h +++ b/src/stroke/stroke_msg.h @@ -67,8 +67,10 @@ enum list_flag_t { LIST_ALGS = 0x0400, /** list plugin information */ LIST_PLUGINS = 0x0800, + /** list IKE counters */ + LIST_COUNTERS = 0x1000, /** all list options */ - LIST_ALL = 0x0FFF, + LIST_ALL = 0x1FFF, }; typedef enum reread_flag_t reread_flag_t; @@ -252,6 +254,7 @@ struct stroke_msg_t { int mobike; int aggressive; int force_encap; + int fragmentation; int ipcomp; time_t inactivity; int proxy_mode; |