diff options
author | Tobias Brunner <tobias@strongswan.org> | 2015-03-12 11:50:20 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2015-03-23 15:55:28 +0100 |
commit | 7fa03b308cb73c68ea7e944fcbc19073d3a3f5fa (patch) | |
tree | 3024126a7047635ee344064bb0b84c40671c472d /src | |
parent | cb461de2a26b9e3a620018bb5f29cb40ebe51846 (diff) | |
download | strongswan-7fa03b308cb73c68ea7e944fcbc19073d3a3f5fa.tar.bz2 strongswan-7fa03b308cb73c68ea7e944fcbc19073d3a3f5fa.tar.xz |
trap-manager: Add option to ignore traffic selectors from acquire events
The specific traffic selectors from the acquire events, which are derived
from the triggering packet, are usually prepended to those from the
config. Some implementations might not be able to handle these properly.
References #860.
Diffstat (limited to 'src')
-rw-r--r-- | src/libcharon/sa/trap_manager.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libcharon/sa/trap_manager.c b/src/libcharon/sa/trap_manager.c index 534d4d5ff..d6ff3c8c5 100644 --- a/src/libcharon/sa/trap_manager.c +++ b/src/libcharon/sa/trap_manager.c @@ -65,6 +65,11 @@ struct private_trap_manager_t { * listener to track acquiring IKE_SAs */ trap_listener_t listener; + + /** + * Whether to ignore traffic selectors from acquires + */ + bool ignore_acquire_ts; }; /** @@ -353,7 +358,7 @@ METHOD(trap_manager_t, acquire, void, { ike_sa->set_peer_cfg(ike_sa, peer); } - if (ike_sa->get_version(ike_sa) == IKEV1) + if (this->ignore_acquire_ts || ike_sa->get_version(ike_sa) == IKEV1) { /* in IKEv1, don't prepend the acquiring packet TS, as we only * have a single TS that we can establish in a Quick Mode. */ src = dst = NULL; @@ -484,6 +489,8 @@ trap_manager_t *trap_manager_create(void) }, .traps = linked_list_create(), .lock = rwlock_create(RWLOCK_TYPE_DEFAULT), + .ignore_acquire_ts = lib->settings->get_bool(lib->settings, + "%s.ignore_acquire_ts", FALSE, lib->ns), ); charon->bus->add_listener(charon->bus, &this->listener.listener); |