kernel-netlink: Update cached reqid when updating policies
authorTobias Brunner <tobias@strongswan.org>
Thu, 18 Aug 2016 11:00:41 +0000 (13:00 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 28 Sep 2016 15:55:01 +0000 (17:55 +0200)
src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c

index 9c2a7c3..c680342 100644 (file)
@@ -2528,6 +2528,7 @@ METHOD(kernel_ipsec_t, add_policy, status_t,
                         id->dir, markstr, cur_priority, use_count);
                return SUCCESS;
        }
+       policy->reqid = assigned_sa->sa->cfg.reqid;
 
        if (this->policy_update)
        {
@@ -2720,6 +2721,7 @@ METHOD(kernel_ipsec_t, del_policy, status_t,
                        return SUCCESS;
                }
                current->used_by->get_first(current->used_by, (void**)&mapping);
+               current->reqid = mapping->sa->cfg.reqid;
 
                DBG2(DBG_KNL, "updating policy %R === %R %N%s [priority %u, "
                         "refcount %d]", id->src_ts, id->dst_ts, policy_dir_names, id->dir,