|
@@ -328,6 +328,15 @@ struct sock *udp6_lib_lookup(struct net *net, const struct in6_addr *saddr, __be
|
|
|
EXPORT_SYMBOL_GPL(udp6_lib_lookup);
|
|
|
#endif
|
|
|
|
|
|
+/* do not use the scratch area len for jumbogram: their length execeeds the
|
|
|
+ * scratch area space; note that the IP6CB flags is still in the first
|
|
|
+ * cacheline, so checking for jumbograms is cheap
|
|
|
+ */
|
|
|
+static int udp6_skb_len(struct sk_buff *skb)
|
|
|
+{
|
|
|
+ return unlikely(inet6_is_jumbogram(skb)) ? skb->len : udp_skb_len(skb);
|
|
|
+}
|
|
|
+
|
|
|
/*
|
|
|
* This should be easy, if there is something there we
|
|
|
* return it, otherwise we block.
|
|
@@ -358,7 +367,7 @@ try_again:
|
|
|
if (!skb)
|
|
|
return err;
|
|
|
|
|
|
- ulen = udp_skb_len(skb);
|
|
|
+ ulen = udp6_skb_len(skb);
|
|
|
copied = len;
|
|
|
if (copied > ulen - off)
|
|
|
copied = ulen - off;
|