strongswan.org
Wiki/Project Management
Downloads
Gitweb
projects
/
strongswan.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7fd6c07
)
Reuse existing DH value when retrying IKE_SA_INIT with a COOKIE
author
Martin Willi
<martin@revosec.ch>
Mon, 16 Apr 2012 14:55:14 +0000
(16:55 +0200)
committer
Martin Willi
<martin@revosec.ch>
Tue, 17 Apr 2012 08:02:21 +0000
(10:02 +0200)
src/libcharon/sa/tasks/ike_init.c
patch
|
blob
|
history
diff --git
a/src/libcharon/sa/tasks/ike_init.c
b/src/libcharon/sa/tasks/ike_init.c
index
b8e66c7
..
dd8a4b0
100644
(file)
--- a/
src/libcharon/sa/tasks/ike_init.c
+++ b/
src/libcharon/sa/tasks/ike_init.c
@@
-517,8
+517,11
@@
METHOD(task_t, migrate, void,
this->ike_sa = ike_sa;
this->keymat = ike_sa->get_keymat(ike_sa);
this->proposal = NULL;
this->ike_sa = ike_sa;
this->keymat = ike_sa->get_keymat(ike_sa);
this->proposal = NULL;
- DESTROY_IF(this->dh);
- this->dh = this->keymat->create_dh(this->keymat, this->dh_group);
+ if (this->dh && this->dh->get_dh_group(this->dh) != this->dh_group)
+ { /* reset DH value only if group changed (INVALID_KE_PAYLOAD) */
+ this->dh->destroy(this->dh);
+ this->dh = this->keymat->create_dh(this->keymat, this->dh_group);
+ }
}
METHOD(task_t, destroy, void,
}
METHOD(task_t, destroy, void,