diff options
author | David S. Miller <davem@davemloft.net> | 2017-04-28 15:42:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-04-28 15:42:11 -0400 |
commit | 5577e679564702664aaecce3c96036ace3ab64fa (patch) | |
tree | 2e2538f37afc9b38a4e83d63e757ddf0d76dc425 /net | |
parent | c51847171162212618b3227812f007a654de2f4b (diff) | |
parent | cfcf99f987ba321a3d122580716beb9b08d52eb8 (diff) | |
download | linux-stable-5577e679564702664aaecce3c96036ace3ab64fa.tar.gz linux-stable-5577e679564702664aaecce3c96036ace3ab64fa.tar.bz2 linux-stable-5577e679564702664aaecce3c96036ace3ab64fa.zip |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/xfrm/xfrm_input.c | 2 | ||||
-rw-r--r-- | net/xfrm/xfrm_policy.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c index 46bdb4fbed0b..e23570b647ae 100644 --- a/net/xfrm/xfrm_input.c +++ b/net/xfrm/xfrm_input.c @@ -395,7 +395,7 @@ resume: if (xo) 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) { skb_dst_drop(skb); gro_cells_receive(&gro_cells, skb); diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 236cbbc0ab9c..dfc77b9c5e5a 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -1006,6 +1006,10 @@ int xfrm_policy_flush(struct net *net, u8 type, bool task_valid) err = -ESRCH; out: spin_unlock_bh(&net->xfrm.xfrm_policy_lock); + + if (cnt) + xfrm_garbage_collect(net); + return err; } EXPORT_SYMBOL(xfrm_policy_flush); |