Re: [PATCH net-next v2 2/4] xfrm: invalidate dst on policy insertion/deletion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le 10/09/2012 16:21, Vlad Yasevich a écrit :
On 09/10/2012 09:22 AM, Nicolas Dichtel wrote:
When a policy is inserted or deleted, all dst should be recalculated.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@xxxxxxxxx>
---
  net/xfrm/xfrm_policy.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 741a32a..67f456d 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -602,6 +602,7 @@ int xfrm_policy_insert(int dir, struct xfrm_policy
*policy, int excl)
      xfrm_pol_hold(policy);
      net->xfrm.policy_count[dir]++;
      atomic_inc(&flow_cache_genid);
+    rt_genid_bump(net);
      if (delpol)
          __xfrm_policy_unlink(delpol, dir);
      policy->index = delpol ? delpol->index : xfrm_gen_index(net, dir);


What about security_load_policy() and security_set_bools(). They also bumps the
flow_cache_genid by way of selinux_xfrm_notify_policyload().
Right. I'm not familiar with this part, but it seems you're right, rt_genid should be bumped too.
--
To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Networking Development]     [Linux OMAP]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux