aboutsummaryrefslogtreecommitdiffstats
path: root/src/starter
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2007-08-29 12:11:25 +0000
committerMartin Willi <martin@strongswan.org>2007-08-29 12:11:25 +0000
commit9164e49ac096db02e6bf9ac92bfbc52af6f90ae8 (patch)
tree757e57f36100cca7bda77d665e13f39dc6216fda /src/starter
parentc5dfb88ab8bb1f745bbc7bd6509f4481ba04bcf3 (diff)
downloadstrongswan-9164e49ac096db02e6bf9ac92bfbc52af6f90ae8.tar.bz2
strongswan-9164e49ac096db02e6bf9ac92bfbc52af6f90ae8.tar.xz
added mobike=yes|no connection option
yes: include mobike support notifies as initiator no: only enable mobike as responder when initiator supports it default: yes
Diffstat (limited to 'src/starter')
-rw-r--r--src/starter/args.c1
-rw-r--r--src/starter/confread.c6
-rw-r--r--src/starter/keywords.h1
-rw-r--r--src/starter/keywords.txt1
-rw-r--r--src/starter/starterstroke.c1
5 files changed, 9 insertions, 1 deletions
diff --git a/src/starter/args.c b/src/starter/args.c
index 605794281..bfb71470d 100644
--- a/src/starter/args.c
+++ b/src/starter/args.c
@@ -193,6 +193,7 @@ static const token_info_t token_info[] =
{ ARG_MISC, 0, NULL /* KW_AUTH */ },
{ ARG_MISC, 0, NULL /* KW_AUTHBY */ },
{ ARG_MISC, 0, NULL /* KW_EAP */ },
+ { ARG_MISC, 0, NULL /* KW_MOBIKE */ },
{ ARG_TIME, offsetof(starter_conn_t, sa_ike_life_seconds), NULL },
{ ARG_TIME, offsetof(starter_conn_t, sa_ipsec_life_seconds), NULL },
{ ARG_TIME, offsetof(starter_conn_t, sa_rekey_margin), NULL },
diff --git a/src/starter/confread.c b/src/starter/confread.c
index f754f267f..8ef115f52 100644
--- a/src/starter/confread.c
+++ b/src/starter/confread.c
@@ -67,7 +67,8 @@ static void default_values(starter_config_t *cfg)
cfg->conn_default.seen = LEMPTY;
cfg->conn_default.startup = STARTUP_NO;
cfg->conn_default.state = STATE_IGNORE;
- cfg->conn_default.policy = POLICY_ENCRYPT | POLICY_TUNNEL | POLICY_RSASIG | POLICY_PFS ;
+ cfg->conn_default.policy = POLICY_ENCRYPT | POLICY_TUNNEL | POLICY_RSASIG |
+ POLICY_PFS | POLICY_MOBIKE;
cfg->conn_default.ike = clone_str(ike_defaults, "ike_defaults");
cfg->conn_default.esp = clone_str(esp_defaults, "esp_defaults");
@@ -550,6 +551,9 @@ load_conn(starter_conn_t *conn, kw_list_t *kw, starter_config_t *cfg)
case KW_REAUTH:
KW_POLICY_FLAG("no", "yes", POLICY_DONT_REAUTH)
break;
+ case KW_MOBIKE:
+ KW_POLICY_FLAG("yes", "no", POLICY_MOBIKE)
+ break;
case KW_MODECONFIG:
KW_POLICY_FLAG("push", "pull", POLICY_MODECFG_PUSH)
break;
diff --git a/src/starter/keywords.h b/src/starter/keywords.h
index 8f5108ad8..69a4b6d86 100644
--- a/src/starter/keywords.h
+++ b/src/starter/keywords.h
@@ -70,6 +70,7 @@ typedef enum {
KW_AUTH,
KW_AUTHBY,
KW_EAP,
+ KW_MOBIKE,
KW_IKELIFETIME,
KW_KEYLIFE,
KW_REKEYMARGIN,
diff --git a/src/starter/keywords.txt b/src/starter/keywords.txt
index 573a2389a..5deecff90 100644
--- a/src/starter/keywords.txt
+++ b/src/starter/keywords.txt
@@ -49,6 +49,7 @@ keep_alive, KW_KEEP_ALIVE
virtual_private, KW_VIRTUAL_PRIVATE
eap, KW_EAP
eapdir, KW_EAPDIR
+mobike, KW_MOBIKE
pkcs11module, KW_PKCS11MODULE
pkcs11initargs, KW_PKCS11INITARGS
pkcs11keepstate, KW_PKCS11KEEPSTATE
diff --git a/src/starter/starterstroke.c b/src/starter/starterstroke.c
index 13c2f4326..69b5e5085 100644
--- a/src/starter/starterstroke.c
+++ b/src/starter/starterstroke.c
@@ -227,6 +227,7 @@ int starter_stroke_add_conn(starter_conn_t *conn)
msg.add_conn.rekey.tries = conn->sa_keying_tries;
msg.add_conn.rekey.fuzz = conn->sa_rekey_fuzz;
}
+ msg.add_conn.mobike = conn->policy & POLICY_MOBIKE;
msg.add_conn.algorithms.ike = push_string(&msg, conn->ike);
msg.add_conn.algorithms.esp = push_string(&msg, conn->esp);
msg.add_conn.dpd.delay = conn->dpd_delay;