experimental P2P-NAT-T for IKEv2 merged back from branch
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
/* automatic handling of confread struct arguments
|
||||
* Copyright (C) 2007 Tobias Brunner
|
||||
* Copyright (C) 2006 Andreas Steffen
|
||||
* Hochschule fuer Technik Rapperswil, Switzerland
|
||||
*
|
||||
@@ -210,6 +211,9 @@ static const token_info_t token_info[] =
|
||||
{ ARG_ENUM, offsetof(starter_conn_t, dpd_action), LST_dpd_action },
|
||||
{ ARG_MISC, 0, NULL /* KW_MODECONFIG */ },
|
||||
{ ARG_MISC, 0, NULL /* KW_XAUTH */ },
|
||||
{ ARG_ENUM, offsetof(starter_conn_t, p2p_mediation), LST_bool },
|
||||
{ ARG_STR, offsetof(starter_conn_t, p2p_mediated_by), NULL },
|
||||
{ ARG_STR, offsetof(starter_conn_t, p2p_peerid), NULL },
|
||||
|
||||
/* ca section keywords */
|
||||
{ ARG_STR, offsetof(starter_ca_t, name), NULL },
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
/* strongSwan IPsec config file parser
|
||||
* Copyright (C) 2001-2002 Mathieu Lafon - Arkoon Network Security
|
||||
* Copyright (C) 2007 Tobias Brunner
|
||||
* Hochschule fuer Technik Rapperswil
|
||||
* Copyright (C) 2001-2002 Mathieu Lafon
|
||||
* Arkoon Network Security
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -125,6 +128,10 @@ struct starter_conn {
|
||||
time_t dpd_timeout;
|
||||
dpd_action_t dpd_action;
|
||||
int dpd_count;
|
||||
|
||||
bool p2p_mediation;
|
||||
char *p2p_mediated_by;
|
||||
char *p2p_peerid;
|
||||
|
||||
starter_conn_t *next;
|
||||
};
|
||||
|
||||
@@ -779,6 +779,36 @@ Accepted values are
|
||||
and
|
||||
.B client
|
||||
(the default).
|
||||
|
||||
.SS "CONN PARAMETERS: PEER-TO-PEER"
|
||||
The following parameters are relevant to Peer-to-Peer NAT-T operation
|
||||
only.
|
||||
.TP 14
|
||||
.B p2p_mediation
|
||||
whether this connection is a P2P mediation connection, ie. whether this
|
||||
connection is used to mediate other connections. Mediation connections
|
||||
create no child SA. Acceptable values are
|
||||
.B no
|
||||
(the default) and
|
||||
.BR yes .
|
||||
.TP
|
||||
.B p2p_mediated_by
|
||||
the name of the connection to mediate this connection through. If given,
|
||||
the connection will be mediated through the named mediation connection.
|
||||
The mediation connection must set
|
||||
.BR p2p_mediation=yes .
|
||||
.TP
|
||||
.B p2p_peerid
|
||||
ID as which the peer is known to the mediation server, ie. which the other
|
||||
end of this connection uses as its
|
||||
.B leftid
|
||||
on its connection to the mediation server. This is the ID we request the
|
||||
mediation server to mediate us with. If
|
||||
.B p2p_peerid
|
||||
is not given, the
|
||||
.B rightid
|
||||
of this connection will be used as peer ID.
|
||||
|
||||
.SH "CA SECTIONS"
|
||||
This are optional sections that can be used to assign special
|
||||
parameters to a Certification Authority (CA). These parameters are not
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* strongSwan keywords
|
||||
* Copyright (C) 2007 Tobias Brunner
|
||||
* Copyright (C) 2005 Andreas Steffen
|
||||
* Hochschule fuer Technik Rapperswil, Switzerland
|
||||
*
|
||||
@@ -87,9 +88,12 @@ typedef enum {
|
||||
KW_DPDACTION,
|
||||
KW_MODECONFIG,
|
||||
KW_XAUTH,
|
||||
KW_P2P_MEDIATION,
|
||||
KW_P2P_MEDIATED_BY,
|
||||
KW_P2P_PEERID,
|
||||
|
||||
#define KW_CONN_FIRST KW_CONN_SETUP
|
||||
#define KW_CONN_LAST KW_XAUTH
|
||||
#define KW_CONN_LAST KW_P2P_PEERID
|
||||
|
||||
/* ca section keywords */
|
||||
KW_CA_NAME,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
%{
|
||||
/* strongSwan keywords
|
||||
* Copyright (C) 2007 Tobias Brunner
|
||||
* Copyright (C) 2005 Andreas Steffen
|
||||
* Hochschule fuer Technik Rapperswil, Switzerland
|
||||
*
|
||||
@@ -76,6 +77,9 @@ dpdtimeout, KW_DPDTIMEOUT
|
||||
dpdaction, KW_DPDACTION
|
||||
modeconfig, KW_MODECONFIG
|
||||
xauth, KW_XAUTH
|
||||
p2p_mediation, KW_P2P_MEDIATION
|
||||
p2p_mediated_by, KW_P2P_MEDIATED_BY
|
||||
p2p_peerid, KW_P2P_PEERID
|
||||
cacert, KW_CACERT
|
||||
ldaphost, KW_LDAPHOST
|
||||
ldapbase, KW_LDAPBASE
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/* Stroke for charon is the counterpart to whack from pluto
|
||||
* Copyright (C) 2006 Martin Willi - Hochschule fuer Technik Rapperswil
|
||||
* Copyright (C) 2007 Tobias Brunner
|
||||
* Copyright (C) 2006 Martin Willi
|
||||
* Hochschule fuer Technik Rapperswil
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
@@ -233,6 +235,9 @@ int starter_stroke_add_conn(starter_conn_t *conn)
|
||||
msg.add_conn.algorithms.esp = push_string(&msg, conn->esp);
|
||||
msg.add_conn.dpd.delay = conn->dpd_delay;
|
||||
msg.add_conn.dpd.action = conn->dpd_action;
|
||||
msg.add_conn.p2p.mediation = conn->p2p_mediation;
|
||||
msg.add_conn.p2p.mediated_by = push_string(&msg, conn->p2p_mediated_by);
|
||||
msg.add_conn.p2p.peerid = push_string(&msg, conn->p2p_peerid);
|
||||
|
||||
starter_stroke_add_end(&msg, &msg.add_conn.me, &conn->left);
|
||||
starter_stroke_add_end(&msg, &msg.add_conn.other, &conn->right);
|
||||
|
||||
Reference in New Issue
Block a user