|
|
ced5d35 |
Bugzilla: 1015905
|
|
|
ced5d35 |
Upstream-status: 3.13 (should hit stable)
|
|
|
ced5d35 |
|
|
|
ced5d35 |
From 90e4e23d52fd04f228eed2c3d341136c50058b37 Mon Sep 17 00:00:00 2001
|
|
|
ced5d35 |
From: Jiri Pirko <jiri@resnulli.us>
|
|
|
ced5d35 |
Date: Wed, 6 Nov 2013 17:52:19 +0100
|
|
|
ced5d35 |
Subject: [PATCH 1/2] ip6_output: fragment outgoing reassembled skb properly
|
|
|
ced5d35 |
|
|
|
ced5d35 |
If reassembled packet would fit into outdev MTU, it is not fragmented
|
|
|
ced5d35 |
according the original frag size and it is send as single big packet.
|
|
|
ced5d35 |
|
|
|
ced5d35 |
The second case is if skb is gso. In that case fragmentation does not happen
|
|
|
ced5d35 |
according to the original frag size.
|
|
|
ced5d35 |
|
|
|
ced5d35 |
This patch fixes these.
|
|
|
ced5d35 |
|
|
|
ced5d35 |
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
|
|
|
ced5d35 |
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
|
ced5d35 |
---
|
|
|
ced5d35 |
net/ipv6/ip6_output.c | 3 ++-
|
|
|
ced5d35 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
ced5d35 |
|
|
|
ced5d35 |
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
|
|
|
ced5d35 |
index 5b25f85..f80f2fa 100644
|
|
|
ced5d35 |
--- a/net/ipv6/ip6_output.c
|
|
|
ced5d35 |
+++ b/net/ipv6/ip6_output.c
|
|
|
ced5d35 |
@@ -150,7 +150,8 @@ static int ip6_finish_output2(struct sk_buff *skb)
|
|
|
ced5d35 |
static int ip6_finish_output(struct sk_buff *skb)
|
|
|
ced5d35 |
{
|
|
|
ced5d35 |
if ((skb->len > ip6_skb_dst_mtu(skb) && !skb_is_gso(skb)) ||
|
|
|
ced5d35 |
- dst_allfrag(skb_dst(skb)))
|
|
|
ced5d35 |
+ dst_allfrag(skb_dst(skb)) ||
|
|
|
ced5d35 |
+ (IP6CB(skb)->frag_max_size && skb->len > IP6CB(skb)->frag_max_size))
|
|
|
ced5d35 |
return ip6_fragment(skb, ip6_finish_output2);
|
|
|
ced5d35 |
else
|
|
|
ced5d35 |
return ip6_finish_output2(skb);
|
|
|
ced5d35 |
--
|
|
|
ced5d35 |
1.8.3.1
|
|
|
ced5d35 |
|