aboutsummaryrefslogtreecommitdiffstats
path: root/src/starter/starterstroke.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/starter/starterstroke.c')
-rw-r--r--src/starter/starterstroke.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/starter/starterstroke.c b/src/starter/starterstroke.c
index dc81acf8a..9d4e0a13a 100644
--- a/src/starter/starterstroke.c
+++ b/src/starter/starterstroke.c
@@ -194,7 +194,18 @@ int starter_stroke_add_conn(starter_conn_t *conn)
msg.add_conn.name = push_string(&msg, connection_name(conn));
msg.add_conn.auth_method = (conn->policy & POLICY_PSK)?
SHARED_KEY_MESSAGE_INTEGRITY_CODE : RSA_DIGITAL_SIGNATURE;
- msg.add_conn.mode = (conn->policy & POLICY_TUNNEL) ? 1 : 0;
+ if (conn->policy & POLICY_TUNNEL)
+ {
+ msg.add_conn.mode = 1; /* XFRM_MODE_TRANSPORT */
+ }
+ else if (conn->policy & POLICY_BEET)
+ {
+ msg.add_conn.mode = 4; /* XFRM_MODE_BEET */
+ }
+ else
+ {
+ msg.add_conn.mode = 0; /* XFRM_MODE_TUNNEL */
+ }
if (conn->policy & POLICY_DONT_REKEY)
{