Commit c31d5326 authored by Sridhar Samudrala's avatar Sridhar Samudrala Committed by David S. Miller

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: default avatarSridhar Samudrala <sri@us.ibm.com>
Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 493c6be3
...@@ -1087,9 +1087,11 @@ static inline int ip6_ufo_append_data(struct sock *sk, ...@@ -1087,9 +1087,11 @@ static inline int ip6_ufo_append_data(struct sock *sk,
if (!err) { if (!err) {
struct frag_hdr fhdr; struct frag_hdr fhdr;
/* specify the length of each IP datagram fragment*/ /* Specify the length of each IPv6 datagram fragment.
skb_shinfo(skb)->gso_size = mtu - fragheaderlen - * It has to be a multiple of 8.
sizeof(struct frag_hdr); */
skb_shinfo(skb)->gso_size = (mtu - fragheaderlen -
sizeof(struct frag_hdr)) & ~7;
skb_shinfo(skb)->gso_type = SKB_GSO_UDP; skb_shinfo(skb)->gso_type = SKB_GSO_UDP;
ipv6_select_ident(skb, &fhdr); ipv6_select_ident(skb, &fhdr);
skb_shinfo(skb)->ip6_frag_id = fhdr.identification; skb_shinfo(skb)->ip6_frag_id = fhdr.identification;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment