diff options
author | Sridhar Samudrala <sri@us.ibm.com> | 2009-07-09 04:09:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-12 17:29:26 -0400 |
commit | c31d5326902cebffcd83b1aede67a0e0ac923090 (patch) | |
tree | 4697c61c068ba7f6bc992539962e3bc7da5c5b38 /net/ipv6/ip6_output.c | |
parent | 493c6be3fedfe24aa676949b237b9b104d911abf (diff) |
udpv6: Fix gso_size setting in ip6_ufo_append_data
- fix gso_size setting for ipv6 fragment to be a multiple of 8 bytes.
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r-- | net/ipv6/ip6_output.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 7c76e3d18215..1c6f0fc43690 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -1087,9 +1087,11 @@ static inline int ip6_ufo_append_data(struct sock *sk, | |||
1087 | if (!err) { | 1087 | if (!err) { |
1088 | struct frag_hdr fhdr; | 1088 | struct frag_hdr fhdr; |
1089 | 1089 | ||
1090 | /* specify the length of each IP datagram fragment*/ | 1090 | /* Specify the length of each IPv6 datagram fragment. |
1091 | skb_shinfo(skb)->gso_size = mtu - fragheaderlen - | 1091 | * It has to be a multiple of 8. |
1092 | sizeof(struct frag_hdr); | 1092 | */ |
1093 | skb_shinfo(skb)->gso_size = (mtu - fragheaderlen - | ||
1094 | sizeof(struct frag_hdr)) & ~7; | ||
1093 | skb_shinfo(skb)->gso_type = SKB_GSO_UDP; | 1095 | skb_shinfo(skb)->gso_type = SKB_GSO_UDP; |
1094 | ipv6_select_ident(skb, &fhdr); | 1096 | ipv6_select_ident(skb, &fhdr); |
1095 | skb_shinfo(skb)->ip6_frag_id = fhdr.identification; | 1097 | skb_shinfo(skb)->ip6_frag_id = fhdr.identification; |