Browse Source

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec

Steffen Klassert says:

====================
pull request (net): ipsec 2017-04-28

1) Do garbage collecting after a policy flush to remove old
   bundles immediately. From Xin Long.

2) Fix GRO if netfilter is not defined.
   From Sabrina Dubroca.

Please pull or let me know if there are problems.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller 8 năm trước cách đây
mục cha
commit
5577e67956
2 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 1 1
      net/xfrm/xfrm_input.c
  2. 4 0
      net/xfrm/xfrm_policy.c

+ 1 - 1
net/xfrm/xfrm_input.c

@@ -395,7 +395,7 @@ resume:
 		if (xo)
 		if (xo)
 			xfrm_gro = xo->flags & XFRM_GRO;
 			xfrm_gro = xo->flags & XFRM_GRO;
 
 
-		err = x->inner_mode->afinfo->transport_finish(skb, async);
+		err = x->inner_mode->afinfo->transport_finish(skb, xfrm_gro || async);
 		if (xfrm_gro) {
 		if (xfrm_gro) {
 			skb_dst_drop(skb);
 			skb_dst_drop(skb);
 			gro_cells_receive(&gro_cells, skb);
 			gro_cells_receive(&gro_cells, skb);

+ 4 - 0
net/xfrm/xfrm_policy.c

@@ -1006,6 +1006,10 @@ int xfrm_policy_flush(struct net *net, u8 type, bool task_valid)
 		err = -ESRCH;
 		err = -ESRCH;
 out:
 out:
 	spin_unlock_bh(&net->xfrm.xfrm_policy_lock);
 	spin_unlock_bh(&net->xfrm.xfrm_policy_lock);
+
+	if (cnt)
+		xfrm_garbage_collect(net);
+
 	return err;
 	return err;
 }
 }
 EXPORT_SYMBOL(xfrm_policy_flush);
 EXPORT_SYMBOL(xfrm_policy_flush);