diff options
author | Tobias Brunner <tobias@strongswan.org> | 2011-05-10 14:00:03 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2011-07-06 09:43:45 +0200 |
commit | 3ee8fed445465b49c3f13d946aca9468c3186c2c (patch) | |
tree | 0a226d71d637cc4916d79261a92dff5dea0e99aa /src/libhydra | |
parent | 1f3b5c7778dcf4e1d14f0bb8777fb63a240bafa5 (diff) | |
download | strongswan-3ee8fed445465b49c3f13d946aca9468c3186c2c.tar.bz2 strongswan-3ee8fed445465b49c3f13d946aca9468c3186c2c.tar.xz |
Cache the most recent reqid in the PF_KEY kernel interface.
This makes the PF_KEY kernel interface behave the same as the Netlink
kernel interface.
Diffstat (limited to 'src/libhydra')
-rw-r--r-- | src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c b/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c index 75336f2f6..3958ca857 100644 --- a/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c +++ b/src/libhydra/plugins/kernel_pfkey/kernel_pfkey_ipsec.c @@ -1618,8 +1618,9 @@ METHOD(kernel_ipsec_t, add_policy, status_t, if (this->policies->find_first(this->policies, (linked_list_match_t)policy_entry_equals, (void**)&found, policy) == SUCCESS) { - /* use existing policy */ + /* use existing policy, but cache the most recent reqid */ found->refcount++; + found->reqid = policy->reqid; DBG2(DBG_KNL, "policy %R === %R %N already exists, increasing " "refcount", src_ts, dst_ts, policy_dir_names, direction); |