diff options
author | David S. Miller <davem@davemloft.net> | 2010-06-23 21:26:27 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-23 21:26:27 -0400 |
commit | 8244132ea89cdd128003f5b9980fab50d8d36d72 (patch) | |
tree | c6cf9327cf9b6bab5bb830bbf389a514f4d7bb95 /net/ipv4 | |
parent | 7b2ff18ee7b0ec4bc3162f821e221781aaca48bd (diff) | |
parent | 38000a94a902e94ca8b5498f7871c6316de8957a (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
net/ipv4/ip_output.c
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/ip_output.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 6cbeb2e108de..7d1f4b4481a9 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -873,8 +873,10 @@ int ip_append_data(struct sock *sk, | |||
873 | !exthdrlen) | 873 | !exthdrlen) |
874 | csummode = CHECKSUM_PARTIAL; | 874 | csummode = CHECKSUM_PARTIAL; |
875 | 875 | ||
876 | skb = skb_peek_tail(&sk->sk_write_queue); | ||
877 | |||
876 | inet->cork.length += length; | 878 | inet->cork.length += length; |
877 | if (((length> mtu) || !skb_queue_empty(&sk->sk_write_queue)) && | 879 | if (((length > mtu) || (skb && skb_is_gso(skb))) && |
878 | (sk->sk_protocol == IPPROTO_UDP) && | 880 | (sk->sk_protocol == IPPROTO_UDP) && |
879 | (rt->dst.dev->features & NETIF_F_UFO)) { | 881 | (rt->dst.dev->features & NETIF_F_UFO)) { |
880 | err = ip_ufo_append_data(sk, getfrag, from, length, hh_len, | 882 | err = ip_ufo_append_data(sk, getfrag, from, length, hh_len, |
@@ -892,7 +894,7 @@ int ip_append_data(struct sock *sk, | |||
892 | * adding appropriate IP header. | 894 | * adding appropriate IP header. |
893 | */ | 895 | */ |
894 | 896 | ||
895 | if ((skb = skb_peek_tail(&sk->sk_write_queue)) == NULL) | 897 | if (!skb) |
896 | goto alloc_new_skb; | 898 | goto alloc_new_skb; |
897 | 899 | ||
898 | while (length > 0) { | 900 | while (length > 0) { |
@@ -1121,7 +1123,8 @@ ssize_t ip_append_page(struct sock *sk, struct page *page, | |||
1121 | return -EINVAL; | 1123 | return -EINVAL; |
1122 | 1124 | ||
1123 | inet->cork.length += size; | 1125 | inet->cork.length += size; |
1124 | if ((sk->sk_protocol == IPPROTO_UDP) && | 1126 | if ((size + skb->len > mtu) && |
1127 | (sk->sk_protocol == IPPROTO_UDP) && | ||
1125 | (rt->dst.dev->features & NETIF_F_UFO)) { | 1128 | (rt->dst.dev->features & NETIF_F_UFO)) { |
1126 | skb_shinfo(skb)->gso_size = mtu - fragheaderlen; | 1129 | skb_shinfo(skb)->gso_size = mtu - fragheaderlen; |
1127 | skb_shinfo(skb)->gso_type = SKB_GSO_UDP; | 1130 | skb_shinfo(skb)->gso_type = SKB_GSO_UDP; |