|
@@ -965,11 +965,12 @@ static int __ip_append_data(struct sock *sk,
|
|
|
csummode = CHECKSUM_PARTIAL;
|
|
|
|
|
|
cork->length += length;
|
|
|
- if ((((length + (skb ? skb->len : fragheaderlen)) > mtu) ||
|
|
|
- (skb && skb_is_gso(skb))) &&
|
|
|
+ if ((skb && skb_is_gso(skb)) ||
|
|
|
+ (((length + (skb ? skb->len : fragheaderlen)) > mtu) &&
|
|
|
+ (skb_queue_len(queue) <= 1) &&
|
|
|
(sk->sk_protocol == IPPROTO_UDP) &&
|
|
|
(rt->dst.dev->features & NETIF_F_UFO) && !dst_xfrm(&rt->dst) &&
|
|
|
- (sk->sk_type == SOCK_DGRAM) && !sk->sk_no_check_tx) {
|
|
|
+ (sk->sk_type == SOCK_DGRAM) && !sk->sk_no_check_tx)) {
|
|
|
err = ip_ufo_append_data(sk, queue, getfrag, from, length,
|
|
|
hh_len, fragheaderlen, transhdrlen,
|
|
|
maxfraglen, flags);
|
|
@@ -1288,6 +1289,7 @@ ssize_t ip_append_page(struct sock *sk, struct flowi4 *fl4, struct page *page,
|
|
|
return -EINVAL;
|
|
|
|
|
|
if ((size + skb->len > mtu) &&
|
|
|
+ (skb_queue_len(&sk->sk_write_queue) == 1) &&
|
|
|
(sk->sk_protocol == IPPROTO_UDP) &&
|
|
|
(rt->dst.dev->features & NETIF_F_UFO)) {
|
|
|
if (skb->ip_summed != CHECKSUM_PARTIAL)
|