diff options
author | David S. Miller <davem@davemloft.net> | 2017-05-18 16:11:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-18 16:11:32 -0400 |
commit | c6cd850d6568872f66fc4a4582f34f9b910066ca (patch) | |
tree | e9a6370f7b0ce110e2916a6288a8fb0ee8323e37 /net/ipv6/udp_offload.c | |
parent | 27902f08065ba61514c331b7d6e85635c1655d82 (diff) | |
parent | 8b4822de59d5d9919b9b045183a36c673ce20b73 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/ipv6/udp_offload.c')
-rw-r--r-- | net/ipv6/udp_offload.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/ipv6/udp_offload.c b/net/ipv6/udp_offload.c index ac858c480f2f..a2267f80febb 100644 --- a/net/ipv6/udp_offload.c +++ b/net/ipv6/udp_offload.c @@ -29,6 +29,7 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb, u8 frag_hdr_sz = sizeof(struct frag_hdr); __wsum csum; int tnl_hlen; + int err; mss = skb_shinfo(skb)->gso_size; if (unlikely(skb->len <= mss)) @@ -90,7 +91,10 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb, /* Find the unfragmentable header and shift it left by frag_hdr_sz * bytes to insert fragment header. */ - unfrag_ip6hlen = ip6_find_1stfragopt(skb, &prevhdr); + err = ip6_find_1stfragopt(skb, &prevhdr); + if (err < 0) + return ERR_PTR(err); + unfrag_ip6hlen = err; nexthdr = *prevhdr; *prevhdr = NEXTHDR_FRAGMENT; unfrag_len = (skb_network_header(skb) - skb_mac_header(skb)) + |