summaryrefslogtreecommitdiff
path: root/src/starter
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2009-03-01 10:48:08 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2009-03-01 10:48:08 +0000
commita6f902baed7abb17a1a9c014e01bb100077f8198 (patch)
tree82114e22e251e9260d9a712f1232e52e1ef494e3 /src/starter
parent1450c9df799b0870477f6e63357f4bcb63537f4f (diff)
downloadvyos-strongswan-a6f902baed7abb17a1a9c014e01bb100077f8198.tar.gz
vyos-strongswan-a6f902baed7abb17a1a9c014e01bb100077f8198.zip
- Updated to new upstream revision.
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/starterstroke.c33
6 files changed, 48 insertions, 38 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/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];