diff options
author | Timo Teräs <timo.teras@iki.fi> | 2016-03-26 14:19:31 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2016-03-26 14:19:44 +0000 |
commit | 131cca54d72069d76358c4cd4ac31efaa81ab6e8 (patch) | |
tree | 980182044014964034ce45830b68ee8ff9f136b3 /main/strongswan/1001-charon-add-optional-source-and-remote-overrides-for-.patch | |
parent | 00efbea7aa2a383c4f3a7322a6a669bdea5c04bb (diff) | |
download | aports-131cca54d72069d76358c4cd4ac31efaa81ab6e8.tar.bz2 aports-131cca54d72069d76358c4cd4ac31efaa81ab6e8.tar.xz |
main/strongswan: upgrade to 5.4.0
Diffstat (limited to 'main/strongswan/1001-charon-add-optional-source-and-remote-overrides-for-.patch')
-rw-r--r-- | main/strongswan/1001-charon-add-optional-source-and-remote-overrides-for-.patch | 61 |
1 files changed, 31 insertions, 30 deletions
diff --git a/main/strongswan/1001-charon-add-optional-source-and-remote-overrides-for-.patch b/main/strongswan/1001-charon-add-optional-source-and-remote-overrides-for-.patch index 3dda65152..b722ad65c 100644 --- a/main/strongswan/1001-charon-add-optional-source-and-remote-overrides-for-.patch +++ b/main/strongswan/1001-charon-add-optional-source-and-remote-overrides-for-.patch @@ -1,4 +1,4 @@ -From 9ff109798ae6d9dab4a60e0b26ef7242252bc735 Mon Sep 17 00:00:00 2001 +From 8cea97341b063bde31cbc4cdf6834fd2a57f609c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> Date: Mon, 21 Sep 2015 13:41:58 +0300 Subject: [PATCH] charon: add optional source and remote overrides for initiate @@ -182,10 +182,10 @@ index 2e96f8f..e594a71 100644 { peer_cfg->destroy(peer_cfg); diff --git a/src/libcharon/plugins/stroke/stroke_control.c b/src/libcharon/plugins/stroke/stroke_control.c -index 5a1a507..9100883 100644 +index 36da5ff..f2910ab 100644 --- a/src/libcharon/plugins/stroke/stroke_control.c +++ b/src/libcharon/plugins/stroke/stroke_control.c -@@ -109,7 +109,7 @@ static void charon_initiate(private_stroke_control_t *this, peer_cfg_t *peer_cfg +@@ -108,7 +108,7 @@ static void charon_initiate(private_stroke_control_t *this, peer_cfg_t *peer_cfg if (msg->output_verbosity < 0) { charon->controller->initiate(charon->controller, peer_cfg, child_cfg, @@ -194,7 +194,7 @@ index 5a1a507..9100883 100644 } else { -@@ -117,7 +117,8 @@ static void charon_initiate(private_stroke_control_t *this, peer_cfg_t *peer_cfg +@@ -116,7 +116,8 @@ static void charon_initiate(private_stroke_control_t *this, peer_cfg_t *peer_cfg status_t status; status = charon->controller->initiate(charon->controller, @@ -205,10 +205,10 @@ index 5a1a507..9100883 100644 switch (status) { diff --git a/src/libcharon/plugins/vici/vici_config.c b/src/libcharon/plugins/vici/vici_config.c -index ea6d295..5537ed9 100644 +index 6ebbedc..94222cc 100644 --- a/src/libcharon/plugins/vici/vici_config.c +++ b/src/libcharon/plugins/vici/vici_config.c -@@ -1589,7 +1589,7 @@ static void run_start_action(private_vici_config_t *this, peer_cfg_t *peer_cfg, +@@ -1693,7 +1693,7 @@ static void run_start_action(private_vici_config_t *this, peer_cfg_t *peer_cfg, DBG1(DBG_CFG, "initiating '%s'", child_cfg->get_name(child_cfg)); charon->controller->initiate(charon->controller, peer_cfg->get_ref(peer_cfg), child_cfg->get_ref(child_cfg), @@ -218,10 +218,10 @@ index ea6d295..5537ed9 100644 case ACTION_ROUTE: DBG1(DBG_CFG, "installing '%s'", child_cfg->get_name(child_cfg)); diff --git a/src/libcharon/plugins/vici/vici_control.c b/src/libcharon/plugins/vici/vici_control.c -index 752007c..174bae4 100644 +index c526d2f..593d3c7 100644 --- a/src/libcharon/plugins/vici/vici_control.c +++ b/src/libcharon/plugins/vici/vici_control.c -@@ -13,6 +13,28 @@ +@@ -16,6 +16,28 @@ * for more details. */ @@ -250,20 +250,20 @@ index 752007c..174bae4 100644 #include "vici_control.h" #include "vici_builder.h" -@@ -159,9 +181,11 @@ static child_cfg_t* find_child_cfg(char *name, peer_cfg_t **out) +@@ -167,9 +189,11 @@ static child_cfg_t* find_child_cfg(char *name, char *pname, peer_cfg_t **out) CALLBACK(initiate, vici_message_t*, private_vici_control_t *this, char *name, u_int id, vici_message_t *request) { + vici_message_t* msg; child_cfg_t *child_cfg = NULL; peer_cfg_t *peer_cfg; -- char *child; +- char *child, *ike; + host_t *my_host = NULL, *other_host = NULL; -+ char *child, *my_host_str, *other_host_str; - u_int timeout; ++ char *child, *ike, *my_host_str, *other_host_str; + int timeout; bool limits; - log_info_t log = { -@@ -173,34 +197,55 @@ CALLBACK(initiate, vici_message_t*, + controller_cb_t log_cb = NULL; +@@ -183,6 +207,8 @@ CALLBACK(initiate, vici_message_t*, timeout = request->get_int(request, 0, "timeout"); limits = request->get_bool(request, FALSE, "init-limits"); log.level = request->get_int(request, 1, "loglevel"); @@ -272,7 +272,8 @@ index 752007c..174bae4 100644 if (!child) { - return send_reply(this, "missing configuration name"); +@@ -193,28 +219,47 @@ CALLBACK(initiate, vici_message_t*, + log_cb = (controller_cb_t)log_vici; } - DBG1(DBG_CFG, "vici initiate '%s'", child); @@ -287,7 +288,7 @@ index 752007c..174bae4 100644 + + DBG1(DBG_CFG, "vici initiate '%s', me %H, other %H, limits %d", child, my_host, other_host, limits); - child_cfg = find_child_cfg(child, &peer_cfg); + child_cfg = find_child_cfg(child, ike, &peer_cfg); if (!child_cfg) { - return send_reply(this, "CHILD_SA config '%s' not found", child); @@ -295,10 +296,10 @@ index 752007c..174bae4 100644 + goto ret; } - switch (charon->controller->initiate(charon->controller, peer_cfg, -- child_cfg, (controller_cb_t)log_vici, &log, timeout, limits)) +- child_cfg, log_cb, &log, timeout, limits)) + switch (charon->controller->initiate(charon->controller, + peer_cfg, child_cfg, my_host, other_host, -+ (controller_cb_t)log_vici, &log, timeout, limits)) ++ log_cb, &log, timeout, limits)) { case SUCCESS: - return send_reply(this, NULL); @@ -341,7 +342,7 @@ index 5e88ac2..7043332 100644 case ACTION_ROUTE: DBG1(DBG_JOB, "start action: route '%s'", name); diff --git a/src/libcharon/sa/ike_sa_manager.c b/src/libcharon/sa/ike_sa_manager.c -index aeed6fe..b2791cb 100644 +index e8190a9..38a6b9d 100644 --- a/src/libcharon/sa/ike_sa_manager.c +++ b/src/libcharon/sa/ike_sa_manager.c @@ -16,6 +16,28 @@ @@ -371,9 +372,9 @@ index aeed6fe..b2791cb 100644 + */ + #include <string.h> + #include <inttypes.h> - #include "ike_sa_manager.h" -@@ -1374,7 +1396,8 @@ METHOD(ike_sa_manager_t, checkout_by_message, ike_sa_t*, +@@ -1390,7 +1412,8 @@ out: } METHOD(ike_sa_manager_t, checkout_by_config, ike_sa_t*, @@ -383,7 +384,7 @@ index aeed6fe..b2791cb 100644 { enumerator_t *enumerator; entry_t *entry; -@@ -1383,7 +1406,17 @@ METHOD(ike_sa_manager_t, checkout_by_config, ike_sa_t*, +@@ -1399,7 +1422,17 @@ METHOD(ike_sa_manager_t, checkout_by_config, ike_sa_t*, ike_cfg_t *current_ike; u_int segment; @@ -400,9 +401,9 @@ index aeed6fe..b2791cb 100644 + DBG2(DBG_MGR, "checkout IKE_SA by config '%s', me %H, other %H", + peer_cfg->get_name(peer_cfg), my_host, other_host); - if (this->reuse_ikesa) + if (this->reuse_ikesa || peer_cfg->get_ike_version(peer_cfg) == IKEV1) { -@@ -1399,6 +1432,16 @@ METHOD(ike_sa_manager_t, checkout_by_config, ike_sa_t*, +@@ -1415,6 +1448,16 @@ METHOD(ike_sa_manager_t, checkout_by_config, ike_sa_t*, entry->condvar->signal(entry->condvar); continue; } @@ -419,7 +420,7 @@ index aeed6fe..b2791cb 100644 current_peer = entry->ike_sa->get_peer_cfg(entry->ike_sa); if (current_peer && current_peer->equals(current_peer, peer_cfg)) { -@@ -1430,6 +1473,10 @@ METHOD(ike_sa_manager_t, checkout_by_config, ike_sa_t*, +@@ -1446,6 +1489,10 @@ METHOD(ike_sa_manager_t, checkout_by_config, ike_sa_t*, return NULL; } ike_sa = checkout_new(this, peer_cfg->get_ike_version(peer_cfg), TRUE); @@ -429,7 +430,7 @@ index aeed6fe..b2791cb 100644 + } } charon->bus->set_sa(charon->bus, ike_sa); - return ike_sa; + diff --git a/src/libcharon/sa/ike_sa_manager.h b/src/libcharon/sa/ike_sa_manager.h index f1b7c25..dbe1e7d 100644 --- a/src/libcharon/sa/ike_sa_manager.h @@ -460,10 +461,10 @@ index f1b7c25..dbe1e7d 100644 /** * Check for duplicates of the given IKE_SA. diff --git a/src/libcharon/sa/trap_manager.c b/src/libcharon/sa/trap_manager.c -index 90ad7e4..8e642e8 100644 +index 85e2207..2760f0b 100644 --- a/src/libcharon/sa/trap_manager.c +++ b/src/libcharon/sa/trap_manager.c -@@ -403,7 +403,7 @@ METHOD(trap_manager_t, acquire, void, +@@ -401,7 +401,7 @@ METHOD(trap_manager_t, acquire, void, peer_cfg_t *peer; child_cfg_t *child; ike_sa_t *ike_sa; @@ -472,7 +473,7 @@ index 90ad7e4..8e642e8 100644 bool wildcard, ignore = FALSE; this->lock->read_lock(this->lock); -@@ -479,36 +479,28 @@ METHOD(trap_manager_t, acquire, void, +@@ -477,36 +477,28 @@ METHOD(trap_manager_t, acquire, void, this->lock->unlock(this->lock); if (wildcard) @@ -607,5 +608,5 @@ index eb7b6ad..706fa57 100644 {"raw", 'r', 0, "dump raw response message"}, {"pretty", 'P', 0, "dump raw response message in pretty print"}, -- -2.6.3 +2.7.4 |