summaryrefslogtreecommitdiff
path: root/src/starter
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2009-02-28 22:02:31 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2009-02-28 22:02:31 +0000
commit19364e11c66714324bd3d5d0dc9212db397085cb (patch)
treefe7f5e55f0474dad1d0c29ba7c0a6f4546c99c3a /src/starter
parentc7f1b0530b85bc7654e68992f25ed8ced5d0a80d (diff)
downloadvyos-strongswan-19364e11c66714324bd3d5d0dc9212db397085cb.tar.gz
vyos-strongswan-19364e11c66714324bd3d5d0dc9212db397085cb.zip
[svn-upgrade] Integrating new upstream version, strongswan (4.2.12)
Diffstat (limited to 'src/starter')
-rw-r--r--src/starter/Makefile.am2
-rw-r--r--src/starter/Makefile.in20
-rw-r--r--src/starter/confread.c6
-rw-r--r--src/starter/invokecharon.c13
-rw-r--r--src/starter/ipsec.conf.512
-rw-r--r--src/starter/lex.yy.c51
-rw-r--r--src/starter/starterstroke.c33
7 files changed, 85 insertions, 52 deletions
diff --git a/src/starter/Makefile.am b/src/starter/Makefile.am
index 5ee614f1b..78320b4c7 100644
--- a/src/starter/Makefile.am
+++ b/src/starter/Makefile.am
@@ -5,7 +5,7 @@ starterstroke.h interfaces.c invokepluto.h confread.h interfaces.h args.c \
keywords.c files.h keywords.h cmp.c starter.c cmp.h exec.c invokecharon.c \
exec.h invokecharon.h lex.yy.c loglite.c klips.c klips.h
-INCLUDES = -I$(top_srcdir)/src/libfreeswan -I$(top_srcdir)/src/pluto -I$(top_srcdir)/src/whack -I$(top_srcdir)/src/stroke
+INCLUDES = -I${linuxdir} -I$(top_srcdir)/src/libfreeswan -I$(top_srcdir)/src/pluto -I$(top_srcdir)/src/whack -I$(top_srcdir)/src/stroke
AM_CFLAGS = -DIPSEC_DIR=\"${ipsecdir}\" -DIPSEC_CONFDIR=\"${confdir}\" -DIPSEC_PIDDIR=\"${piddir}\" -DIPSEC_EAPDIR=\"${eapdir}\" -DDEBUG
starter_LDADD = defs.o $(top_builddir)/src/libfreeswan/libfreeswan.a
EXTRA_DIST = parser.l parser.y keywords.txt ipsec.conf
diff --git a/src/starter/Makefile.in b/src/starter/Makefile.in
index 446edf8c5..1301b931d 100644
--- a/src/starter/Makefile.in
+++ b/src/starter/Makefile.in
@@ -88,22 +88,17 @@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DSYMUTIL = @DSYMUTIL@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
+FGREP = @FGREP@
GPERF = @GPERF@
GREP = @GREP@
INSTALL = @INSTALL@
@@ -113,6 +108,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
IPSEC_ROUTING_TABLE = @IPSEC_ROUTING_TABLE@
IPSEC_ROUTING_TABLE_PRIO = @IPSEC_ROUTING_TABLE_PRIO@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
LEXLIB = @LEXLIB@
@@ -121,12 +117,16 @@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LINUX_HEADERS = @LINUX_HEADERS@
+LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
+NM = @NM@
NMEDIT = @NMEDIT@
OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
@@ -149,8 +149,7 @@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -189,6 +188,7 @@ libstrongswan_plugins = @libstrongswan_plugins@
linuxdir = @linuxdir@
localedir = @localedir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
nm_CFLAGS = @nm_CFLAGS@
@@ -218,7 +218,7 @@ starterstroke.h interfaces.c invokepluto.h confread.h interfaces.h args.c \
keywords.c files.h keywords.h cmp.c starter.c cmp.h exec.c invokecharon.c \
exec.h invokecharon.h lex.yy.c loglite.c klips.c klips.h
-INCLUDES = -I$(top_srcdir)/src/libfreeswan -I$(top_srcdir)/src/pluto -I$(top_srcdir)/src/whack -I$(top_srcdir)/src/stroke
+INCLUDES = -I${linuxdir} -I$(top_srcdir)/src/libfreeswan -I$(top_srcdir)/src/pluto -I$(top_srcdir)/src/whack -I$(top_srcdir)/src/stroke
AM_CFLAGS = -DIPSEC_DIR=\"${ipsecdir}\" -DIPSEC_CONFDIR=\"${confdir}\" -DIPSEC_PIDDIR=\"${piddir}\" -DIPSEC_EAPDIR=\"${eapdir}\" -DDEBUG
starter_LDADD = defs.o $(top_builddir)/src/libfreeswan/libfreeswan.a
EXTRA_DIST = parser.l parser.y keywords.txt ipsec.conf
diff --git a/src/starter/confread.c b/src/starter/confread.c
index 1560266c1..d0d1f4ed8 100644
--- a/src/starter/confread.c
+++ b/src/starter/confread.c
@@ -11,7 +11,7 @@
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
- * RCSID $Id: confread.c 4612 2008-11-11 06:37:37Z andreas $
+ * RCSID $Id: confread.c 4882 2009-02-18 19:57:15Z tobias $
*/
#include <stddef.h>
@@ -621,6 +621,10 @@ load_conn(starter_conn_t *conn, kw_list_t *kw, starter_config_t *cfg)
{
conn->eap_type = 6;
}
+ else if (streq(kw->value, "mschapv2"))
+ {
+ conn->eap_type = 26;
+ }
else
{
conn->eap_type = atoi(kw->value);
diff --git a/src/starter/invokecharon.c b/src/starter/invokecharon.c
index 96baa4773..8028bbe54 100644
--- a/src/starter/invokecharon.c
+++ b/src/starter/invokecharon.c
@@ -14,7 +14,7 @@
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
- * RCSID $Id: invokecharon.c 4243 2008-08-01 10:35:59Z andreas $
+ * RCSID $Id: invokecharon.c 4833 2009-01-13 06:50:55Z andreas $
*/
#include <sys/types.h>
@@ -127,10 +127,13 @@ starter_start_charon (starter_config_t *cfg, bool no_fork)
arg[argc++] = "--use-syslog";
}
- { /* parse debug string */
- char *pos, *level, *buf_pos, type[4];
- pos = cfg->setup.charondebug;
- buf_pos = buffer;
+ /* parse debug string */
+ {
+ int level;
+ char type[4];
+ char *pos = cfg->setup.charondebug;
+ char *buf_pos = buffer;
+
while (pos && sscanf(pos, "%4s %d,", type, &level) == 2)
{
snprintf(buf_pos, buffer + sizeof(buffer) - buf_pos, "--debug-%s", type);
diff --git a/src/starter/ipsec.conf.5 b/src/starter/ipsec.conf.5
index 10ce8348e..9ad03eb60 100644
--- a/src/starter/ipsec.conf.5
+++ b/src/starter/ipsec.conf.5
@@ -1,5 +1,5 @@
.TH IPSEC.CONF 5 "27 Jun 2007"
-.\" RCSID $Id: ipsec.conf.5 4645 2008-11-13 06:29:53Z andreas $
+.\" RCSID $Id: ipsec.conf.5 4890 2009-02-19 22:12:04Z andreas $
.SH NAME
ipsec.conf \- IPsec configuration and connections
.SH DESCRIPTION
@@ -356,9 +356,13 @@ selected. Acceptable values are
.B aka
for EAP-AKA,
.B sim
-for EAP-SIM and
+for EAP-SIM,
+.B gtc
+for EAP-GTC,
.B md5
-for EAP-MD5.
+for EAP-MD5, and
+.B mschapv2
+for EAP-MS-CHAPv2.
Additionally, IANA assigned EAP method numbers are accepted, or a definition
in the form
.B eap=type-vendor
@@ -1008,6 +1012,7 @@ Accepted values are
and
.B no
(the default).
+Used by IKEv1 only, NAT traversal always being active in IKEv2.
.TP
.B nocrsend
no certificate request payloads will be sent.
@@ -1016,7 +1021,6 @@ Accepted values are
and
.B no
(the default).
-Used by IKEv1 only, NAT traversal always being active in IKEv2.
.TP
.B pkcs11initargs
non-standard argument string for PKCS#11 C_Initialize() function;
diff --git a/src/starter/lex.yy.c b/src/starter/lex.yy.c
index 4b3405eda..8edb9e3e6 100644
--- a/src/starter/lex.yy.c
+++ b/src/starter/lex.yy.c
@@ -8,7 +8,7 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
-#define YY_FLEX_SUBMINOR_VERSION 34
+#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@@ -53,7 +53,6 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -84,6 +83,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -178,13 +179,6 @@ extern FILE *yyin, *yyout;
#define unput(c) yyunput( c, (yytext_ptr) )
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- * Given that the standard has decreed that size_t exists since 1989,
- * I guess we can afford to depend on it. Manoj.
- */
-
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
@@ -618,7 +612,7 @@ int _parser_y_include (const char *filename)
return 0;
}
-#line 622 "lex.yy.c"
+#line 616 "lex.yy.c"
#define INITIAL 0
@@ -636,6 +630,35 @@ int _parser_y_include (const char *filename)
static int yy_init_globals (void );
+/* Accessor methods to globals.
+ These are made visible to non-reentrant scanners for convenience. */
+
+int yylex_destroy (void );
+
+int yyget_debug (void );
+
+void yyset_debug (int debug_flag );
+
+YY_EXTRA_TYPE yyget_extra (void );
+
+void yyset_extra (YY_EXTRA_TYPE user_defined );
+
+FILE *yyget_in (void );
+
+void yyset_in (FILE * in_str );
+
+FILE *yyget_out (void );
+
+void yyset_out (FILE * out_str );
+
+int yyget_leng (void );
+
+char *yyget_text (void );
+
+int yyget_lineno (void );
+
+void yyset_lineno (int line_number );
+
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
@@ -676,7 +699,7 @@ static int input (void );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -687,7 +710,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- int n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -775,7 +798,7 @@ YY_DECL
#line 135 "parser.l"
-#line 779 "lex.yy.c"
+#line 802 "lex.yy.c"
if ( !(yy_init) )
{
@@ -959,7 +982,7 @@ YY_RULE_SETUP
#line 185 "parser.l"
ECHO;
YY_BREAK
-#line 963 "lex.yy.c"
+#line 986 "lex.yy.c"
case YY_END_OF_BUFFER:
{
diff --git a/src/starter/starterstroke.c b/src/starter/starterstroke.c
index 481b7de34..a1339f2a5 100644
--- a/src/starter/starterstroke.c
+++ b/src/starter/starterstroke.c
@@ -12,7 +12,7 @@
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
- * RCSID $Id: starterstroke.c 4614 2008-11-11 07:28:52Z andreas $
+ * RCSID $Id: starterstroke.c 4856 2009-02-05 22:13:48Z andreas $
*/
#include <sys/types.h>
@@ -127,19 +127,6 @@ static void ip_address2string(ip_address *addr, char *buffer, size_t len)
{
switch (((struct sockaddr*)addr)->sa_family)
{
- case AF_INET:
- {
- struct sockaddr_in* sin = (struct sockaddr_in*)addr;
- u_int8_t zeroes[IPV4_LEN];
-
- memset(zeroes, 0, IPV4_LEN);
- if (memcmp(zeroes, &(sin->sin_addr.s_addr), IPV4_LEN) &&
- inet_ntop(AF_INET, &sin->sin_addr, buffer, len))
- {
- return;
- }
- break;
- }
case AF_INET6:
{
struct sockaddr_in6* sin6 = (struct sockaddr_in6*)addr;
@@ -151,16 +138,28 @@ static void ip_address2string(ip_address *addr, char *buffer, size_t len)
{
return;
}
+ snprintf(buffer, len, "%%any6");
break;
}
+ case AF_INET:
+ {
+ struct sockaddr_in* sin = (struct sockaddr_in*)addr;
+ u_int8_t zeroes[IPV4_LEN];
+
+ memset(zeroes, 0, IPV4_LEN);
+ if (memcmp(zeroes, &(sin->sin_addr.s_addr), IPV4_LEN) &&
+ inet_ntop(AF_INET, &sin->sin_addr, buffer, len))
+ {
+ return;
+ }
+ /* fall through to default */
+ }
default:
+ snprintf(buffer, len, "%%any");
break;
}
- /* default */
- snprintf(buffer, len, "%%any");
}
-
static void starter_stroke_add_end(stroke_msg_t *msg, stroke_end_t *msg_end, starter_end_t *conn_end)
{
char buffer[INET6_ADDRSTRLEN];