diff options
Diffstat (limited to 'src/libcharon')
-rw-r--r-- | src/libcharon/config/peer_cfg.c | 18 | ||||
-rw-r--r-- | src/libcharon/config/peer_cfg.h | 12 | ||||
-rw-r--r-- | src/libcharon/plugins/ha/ha_tunnel.c | 4 | ||||
-rw-r--r-- | src/libcharon/plugins/load_tester/load_tester_config.c | 2 | ||||
-rw-r--r-- | src/libcharon/plugins/maemo/maemo_service.c | 2 | ||||
-rw-r--r-- | src/libcharon/plugins/medcli/medcli_config.c | 6 | ||||
-rw-r--r-- | src/libcharon/plugins/medsrv/medsrv_config.c | 2 | ||||
-rw-r--r-- | src/libcharon/plugins/sql/sql_config.c | 2 | ||||
-rw-r--r-- | src/libcharon/plugins/stroke/stroke_config.c | 1 | ||||
-rw-r--r-- | src/libcharon/plugins/uci/uci_config.c | 2 |
10 files changed, 37 insertions, 14 deletions
diff --git a/src/libcharon/config/peer_cfg.c b/src/libcharon/config/peer_cfg.c index eb983199b..d198503d0 100644 --- a/src/libcharon/config/peer_cfg.c +++ b/src/libcharon/config/peer_cfg.c @@ -100,6 +100,11 @@ struct private_peer_cfg_t { bool aggressive; /** + * Use pull or push in mode config? + */ + bool pull_mode; + + /** * Time before starting rekeying */ u_int32_t rekey_time; @@ -390,6 +395,12 @@ METHOD(peer_cfg_t, use_aggressive, bool, return this->aggressive; } +METHOD(peer_cfg_t, use_pull_mode, bool, + private_peer_cfg_t *this) +{ + return this->pull_mode; +} + METHOD(peer_cfg_t, get_dpd, u_int32_t, private_peer_cfg_t *this) { @@ -588,6 +599,7 @@ METHOD(peer_cfg_t, equals, bool, this->over_time == other->over_time && this->dpd == other->dpd && this->aggressive == other->aggressive && + this->pull_mode == other->pull_mode && auth_cfg_equal(this, other) #ifdef ME && this->mediation == other->mediation && @@ -638,8 +650,8 @@ peer_cfg_t *peer_cfg_create(char *name, unique_policy_t unique, u_int32_t keyingtries, u_int32_t rekey_time, u_int32_t reauth_time, u_int32_t jitter_time, u_int32_t over_time, - bool mobike, bool aggressive, u_int32_t dpd, - u_int32_t dpd_timeout, + bool mobike, bool aggressive, bool pull_mode, + u_int32_t dpd, u_int32_t dpd_timeout, bool mediation, peer_cfg_t *mediated_by, identification_t *peer_id) { @@ -671,6 +683,7 @@ peer_cfg_t *peer_cfg_create(char *name, .get_over_time = _get_over_time, .use_mobike = _use_mobike, .use_aggressive = _use_aggressive, + .use_pull_mode = _use_pull_mode, .get_dpd = _get_dpd, .get_dpd_timeout = _get_dpd_timeout, .add_virtual_ip = _add_virtual_ip, @@ -701,6 +714,7 @@ peer_cfg_t *peer_cfg_create(char *name, .over_time = over_time, .use_mobike = mobike, .aggressive = aggressive, + .pull_mode = pull_mode, .dpd = dpd, .dpd_timeout = dpd_timeout, .vips = linked_list_create(), diff --git a/src/libcharon/config/peer_cfg.h b/src/libcharon/config/peer_cfg.h index e62e03ec5..7e82b517f 100644 --- a/src/libcharon/config/peer_cfg.h +++ b/src/libcharon/config/peer_cfg.h @@ -248,6 +248,13 @@ struct peer_cfg_t { bool (*use_aggressive)(peer_cfg_t *this); /** + * Use pull or push mode for mode config? + * + * @return TRUE to use pull, FALSE to use push mode + */ + bool (*use_pull_mode)(peer_cfg_t *this); + + /** * Get the DPD check interval. * * @return dpd_delay in seconds @@ -366,6 +373,7 @@ struct peer_cfg_t { * @param over_time maximum overtime before closing a rekeying/reauth SA * @param mobike use MOBIKE (RFC4555) if peer supports it * @param aggressive use/accept aggressive mode with IKEv1 + * @param pullmode TRUE to use modeconfig pull, FALSE for push * @param dpd DPD check interval, 0 to disable * @param dpd_timeout DPD timeout interval (IKEv1 only), if 0 default applies * @param mediation TRUE if this is a mediation connection @@ -378,8 +386,8 @@ peer_cfg_t *peer_cfg_create(char *name, unique_policy_t unique, u_int32_t keyingtries, u_int32_t rekey_time, u_int32_t reauth_time, u_int32_t jitter_time, u_int32_t over_time, - bool mobike, bool aggressive, u_int32_t dpd, - u_int32_t dpd_timeout, + bool mobike, bool aggressive, bool pull_mode, + u_int32_t dpd, u_int32_t dpd_timeout, bool mediation, peer_cfg_t *mediated_by, identification_t *peer_id); diff --git a/src/libcharon/plugins/ha/ha_tunnel.c b/src/libcharon/plugins/ha/ha_tunnel.c index 4e656e73b..26d152c8f 100644 --- a/src/libcharon/plugins/ha/ha_tunnel.c +++ b/src/libcharon/plugins/ha/ha_tunnel.c @@ -208,8 +208,8 @@ static void setup_tunnel(private_ha_tunnel_t *this, remote, FALSE, IKEV2_UDP_PORT, FRAGMENTATION_NO, 0); ike_cfg->add_proposal(ike_cfg, proposal_create_default(PROTO_IKE)); peer_cfg = peer_cfg_create("ha", ike_cfg, CERT_NEVER_SEND, - UNIQUE_KEEP, 0, 86400, 0, 7200, 3600, FALSE, FALSE, 30, - 0, FALSE, NULL, NULL); + UNIQUE_KEEP, 0, 86400, 0, 7200, 3600, FALSE, FALSE, + TRUE, 30, 0, FALSE, NULL, NULL); auth_cfg = auth_cfg_create(); auth_cfg->add(auth_cfg, AUTH_RULE_AUTH_CLASS, AUTH_CLASS_PSK); diff --git a/src/libcharon/plugins/load_tester/load_tester_config.c b/src/libcharon/plugins/load_tester/load_tester_config.c index ebadf44ca..26c9871f0 100644 --- a/src/libcharon/plugins/load_tester/load_tester_config.c +++ b/src/libcharon/plugins/load_tester/load_tester_config.c @@ -561,7 +561,7 @@ static peer_cfg_t* generate_config(private_load_tester_config_t *this, uint num) CERT_SEND_IF_ASKED, UNIQUE_NO, 1, /* keytries */ this->ike_rekey, 0, /* rekey, reauth */ 0, this->ike_rekey, /* jitter, overtime */ - FALSE, FALSE, /* mobike, aggressive mode */ + FALSE, FALSE, TRUE, /* mobike, aggressive, pull */ this->dpd_delay, /* dpd_delay */ this->dpd_timeout, /* dpd_timeout */ FALSE, NULL, NULL); diff --git a/src/libcharon/plugins/maemo/maemo_service.c b/src/libcharon/plugins/maemo/maemo_service.c index d7539c2da..f04bc5a4c 100644 --- a/src/libcharon/plugins/maemo/maemo_service.c +++ b/src/libcharon/plugins/maemo/maemo_service.c @@ -334,7 +334,7 @@ static gboolean initiate_connection(private_maemo_service_t *this, UNIQUE_REPLACE, 1, /* keyingtries */ 36000, 0, /* rekey 10h, reauth none */ 600, 600, /* jitter, over 10min */ - TRUE, FALSE, /* mobike, aggressive */ + TRUE, FALSE, TRUE, /* mobike, aggressive, pull */ 0, 0, /* DPD delay, timeout */ FALSE, NULL, NULL); /* mediation */ peer_cfg->add_virtual_ip(peer_cfg, host_create_from_string("0.0.0.0", 0)); diff --git a/src/libcharon/plugins/medcli/medcli_config.c b/src/libcharon/plugins/medcli/medcli_config.c index 2bff70307..e852e3f47 100644 --- a/src/libcharon/plugins/medcli/medcli_config.c +++ b/src/libcharon/plugins/medcli/medcli_config.c @@ -112,7 +112,7 @@ METHOD(backend_t, get_peer_cfg_by_name, peer_cfg_t*, CERT_NEVER_SEND, UNIQUE_REPLACE, 1, this->rekey*60, 0, /* keytries, rekey, reauth */ this->rekey*5, this->rekey*3, /* jitter, overtime */ - TRUE, FALSE, /* mobike, aggressive */ + TRUE, FALSE, TRUE, /* mobike, aggressive, pull */ this->dpd, 0, /* DPD delay, timeout */ TRUE, NULL, NULL); /* mediation, med by, peer id */ e->destroy(e); @@ -149,7 +149,7 @@ METHOD(backend_t, get_peer_cfg_by_name, peer_cfg_t*, CERT_NEVER_SEND, UNIQUE_REPLACE, 1, this->rekey*60, 0, /* keytries, rekey, reauth */ this->rekey*5, this->rekey*3, /* jitter, overtime */ - TRUE, FALSE, /* mobike, aggressive */ + TRUE, FALSE, TRUE, /* mobike, aggressive, pull */ this->dpd, 0, /* DPD delay, timeout */ FALSE, med_cfg, /* mediation, med by */ identification_create_from_encoding(ID_KEY_ID, other)); @@ -224,7 +224,7 @@ METHOD(enumerator_t, peer_enumerator_enumerate, bool, CERT_NEVER_SEND, UNIQUE_REPLACE, 1, this->rekey*60, 0, /* keytries, rekey, reauth */ this->rekey*5, this->rekey*3, /* jitter, overtime */ - TRUE, FALSE, /* mobike, aggressive */ + TRUE, FALSE, TRUE, /* mobike, aggressive, pull */ this->dpd, 0, /* DPD delay, timeout */ FALSE, NULL, NULL); /* mediation, med by, peer id */ diff --git a/src/libcharon/plugins/medsrv/medsrv_config.c b/src/libcharon/plugins/medsrv/medsrv_config.c index 06339220a..45487a976 100644 --- a/src/libcharon/plugins/medsrv/medsrv_config.c +++ b/src/libcharon/plugins/medsrv/medsrv_config.c @@ -92,7 +92,7 @@ METHOD(backend_t, create_peer_cfg_enumerator, enumerator_t*, CERT_NEVER_SEND, UNIQUE_REPLACE, 1, this->rekey*60, 0, /* keytries, rekey, reauth */ this->rekey*5, this->rekey*3, /* jitter, overtime */ - TRUE, FALSE, /* mobike, aggressiv */ + TRUE, FALSE, TRUE, /* mobike, aggressive, pull */ this->dpd, 0, /* DPD delay, timeout */ TRUE, NULL, NULL); /* mediation, med by, peer id */ e->destroy(e); diff --git a/src/libcharon/plugins/sql/sql_config.c b/src/libcharon/plugins/sql/sql_config.c index c3471a078..e6b69a4f4 100644 --- a/src/libcharon/plugins/sql/sql_config.c +++ b/src/libcharon/plugins/sql/sql_config.c @@ -374,7 +374,7 @@ static peer_cfg_t *build_peer_cfg(private_sql_config_t *this, enumerator_t *e, peer_cfg = peer_cfg_create( name, ike, cert_policy, uniqueid, keyingtries, rekeytime, reauthtime, jitter, overtime, - mobike, FALSE, dpd_delay, 0, + mobike, FALSE, TRUE, dpd_delay, 0, mediation, mediated_cfg, peer_id); if (vip) { diff --git a/src/libcharon/plugins/stroke/stroke_config.c b/src/libcharon/plugins/stroke/stroke_config.c index 079e65f11..facea5e6f 100644 --- a/src/libcharon/plugins/stroke/stroke_config.c +++ b/src/libcharon/plugins/stroke/stroke_config.c @@ -731,6 +731,7 @@ static peer_cfg_t *build_peer_cfg(private_stroke_config_t *this, msg->add_conn.me.sendcert, unique, msg->add_conn.rekey.tries, rekey, reauth, jitter, over, msg->add_conn.mobike, msg->add_conn.aggressive, + TRUE, msg->add_conn.dpd.delay, msg->add_conn.dpd.timeout, msg->add_conn.ikeme.mediation, mediated_by, peer_id); diff --git a/src/libcharon/plugins/uci/uci_config.c b/src/libcharon/plugins/uci/uci_config.c index b58d120c1..040d8a84f 100644 --- a/src/libcharon/plugins/uci/uci_config.c +++ b/src/libcharon/plugins/uci/uci_config.c @@ -162,7 +162,7 @@ METHOD(enumerator_t, peer_enumerator_enumerate, bool, name, ike_cfg, CERT_SEND_IF_ASKED, UNIQUE_NO, 1, create_rekey(ike_rekey), 0, /* keytries, rekey, reauth */ 1800, 900, /* jitter, overtime */ - TRUE, FALSE, /* mobike, aggressive */ + TRUE, FALSE, TRUE, /* mobike, aggressive, pull */ 60, 0, /* DPD delay, timeout */ FALSE, NULL, NULL); /* mediation, med by, peer id */ auth = auth_cfg_create(); |