From 9164e49ac096db02e6bf9ac92bfbc52af6f90ae8 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Wed, 29 Aug 2007 12:11:25 +0000 Subject: 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 --- src/starter/args.c | 1 + src/starter/confread.c | 6 +++++- src/starter/keywords.h | 1 + src/starter/keywords.txt | 1 + src/starter/starterstroke.c | 1 + 5 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src/starter') 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; -- cgit v1.2.3