aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2007-03-19 10:00:56 +0000
committerMartin Willi <martin@strongswan.org>2007-03-19 10:00:56 +0000
commite59bd409abe41b94ea67d9473bada15de726d89e (patch)
tree42a03e0bc1ccbd28cf293cc8d64af3484607dfed /src
parentccf96c7e43adf7ac12b018b4d1efec2e01cf72d6 (diff)
downloadstrongswan-e59bd409abe41b94ea67d9473bada15de726d89e.tar.bz2
strongswan-e59bd409abe41b94ea67d9473bada15de726d89e.tar.xz
always update reqid on policy install, fixes dpdaction=hold issue
Diffstat (limited to 'src')
-rw-r--r--src/charon/threads/kernel_interface.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/charon/threads/kernel_interface.c b/src/charon/threads/kernel_interface.c
index a2a4265a7..43956b055 100644
--- a/src/charon/threads/kernel_interface.c
+++ b/src/charon/threads/kernel_interface.c
@@ -1585,22 +1585,14 @@ static status_t add_policy(private_kernel_interface_t *this,
if (memcmp(&current->sel, &policy->sel, sizeof(struct xfrm_selector)) == 0 &&
policy->direction == current->direction)
{
- free(policy);
/* use existing policy */
if (!update)
{
current->refcount++;
DBG2(DBG_KNL, "policy %R===%R already exists, increasing ",
"refcount", src_ts, dst_ts);
- if (!high_prio)
- {
- /* if added policy is for a ROUTED child_sa, do not
- * overwrite existing INSTALLED policy */
- iterator->destroy(iterator);
- pthread_mutex_unlock(&this->policies_mutex);
- return SUCCESS;
- }
}
+ free(policy);
policy = current;
found = TRUE;
break;