From: Martin Willi Date: Mon, 19 Mar 2007 10:00:56 +0000 (-0000) Subject: always update reqid on policy install, fixes dpdaction=hold issue X-Git-Tag: 4.1.0~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e59bd409abe41b94ea67d9473bada15de726d89e;p=thirdparty%2Fstrongswan.git always update reqid on policy install, fixes dpdaction=hold issue --- diff --git a/src/charon/threads/kernel_interface.c b/src/charon/threads/kernel_interface.c index a2a4265a7f..43956b0554 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(¤t->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;