summaryrefslogtreecommitdiffstats
path: root/net/xfrm
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-05-04 16:35:31 -0400
committerDavid S. Miller <davem@davemloft.net>2016-05-04 16:35:31 -0400
commit32b583a0cb9b757d68c44f2819fa6ccf95dbb953 (patch)
tree9715bb206a1dee466c854ce86e164aadef105aba /net/xfrm
parent5f8e44741f9f216e33736ea4ec65ca9ac03036e6 (diff)
parentd6af1a31cc72fbd558c7eddbc36f61bf09d1cf6a (diff)
downloadop-kernel-dev-32b583a0cb9b757d68c44f2819fa6ccf95dbb953.zip
op-kernel-dev-32b583a0cb9b757d68c44f2819fa6ccf95dbb953.tar.gz
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec
Steffen Klassert says: ==================== pull request (net): ipsec 2016-05-04 1) The flowcache can hit an OOM condition if too many entries are in the gc_list. Fix this by counting the entries in the gc_list and refuse new allocations if the value is too high. 2) The inner headers are invalid after a xfrm transformation, so reset the skb encapsulation field to ensure nobody tries access the inner headers. Otherwise tunnel devices stacked on top of xfrm may build the outer headers based on wrong informations. 3) Add pmtu handling to vti, we need it to report pmtu informations for local generated packets. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm')
-rw-r--r--net/xfrm/xfrm_output.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_output.c b/net/xfrm/xfrm_output.c
index ff4a91f..637387b 100644
--- a/net/xfrm/xfrm_output.c
+++ b/net/xfrm/xfrm_output.c
@@ -99,6 +99,9 @@ static int xfrm_output_one(struct sk_buff *skb, int err)
skb_dst_force(skb);
+ /* Inner headers are invalid now. */
+ skb->encapsulation = 0;
+
err = x->type->output(x, skb);
if (err == -EINPROGRESS)
goto out;
OpenPOWER on IntegriCloud