aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2013-11-06 11:52:19 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-08 10:29:25 -0500
commit2d9a30962d0310d33372c245a6191499a06409f3 (patch)
tree73956eab13fe206527ab273788fce1e875be0acb /net
parent2d71627c5af3a50d3b22fe6900b6dd29e0445fd7 (diff)
ip6_output: fragment outgoing reassembled skb properly
[ Upstream commit 9037c3579a277f3a23ba476664629fda8c35f7c4 ] If reassembled packet would fit into outdev MTU, it is not fragmented according the original frag size and it is send as single big packet. The second case is if skb is gso. In that case fragmentation does not happen according to the original frag size. This patch fixes these. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/ip6_output.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 878f8027ebf6..53630d0d0f43 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -150,7 +150,8 @@ static int ip6_finish_output2(struct sk_buff *skb)
150static int ip6_finish_output(struct sk_buff *skb) 150static int ip6_finish_output(struct sk_buff *skb)
151{ 151{
152 if ((skb->len > ip6_skb_dst_mtu(skb) && !skb_is_gso(skb)) || 152 if ((skb->len > ip6_skb_dst_mtu(skb) && !skb_is_gso(skb)) ||
153 dst_allfrag(skb_dst(skb))) 153 dst_allfrag(skb_dst(skb)) ||
154 (IP6CB(skb)->frag_max_size && skb->len > IP6CB(skb)->frag_max_size))
154 return ip6_fragment(skb, ip6_finish_output2); 155 return ip6_fragment(skb, ip6_finish_output2);
155 else 156 else
156 return ip6_finish_output2(skb); 157 return ip6_finish_output2(skb);