diff options
| author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-07-21 04:22:45 -0400 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-07-21 04:22:45 -0400 |
| commit | 14764b01a5576ce23a9d0c95a027049206a19cef (patch) | |
| tree | fa7f4e3b9b62598076baf7d312dd37d6c91b0d56 /net/ipv4 | |
| parent | fc4978b796e5e52ab3a709495a968199afe0a108 (diff) | |
| parent | 5ccd4302a20bfe56eb72a5e27ad0be046fc820a5 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/nico/orion into devel-stable
Diffstat (limited to 'net/ipv4')
| -rw-r--r-- | net/ipv4/ip_output.c | 9 | ||||
| -rw-r--r-- | net/ipv4/xfrm4_policy.c | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 9a4a6c96cb0d..041d41df1224 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->u.dst.dev->features & NETIF_F_UFO)) { | 881 | (rt->u.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->u.dst.dev->features & NETIF_F_UFO)) { | 1128 | (rt->u.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; |
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index 1705476670ef..23883a48ebfb 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c | |||
| @@ -108,6 +108,8 @@ _decode_session4(struct sk_buff *skb, struct flowi *fl, int reverse) | |||
| 108 | u8 *xprth = skb_network_header(skb) + iph->ihl * 4; | 108 | u8 *xprth = skb_network_header(skb) + iph->ihl * 4; |
| 109 | 109 | ||
| 110 | memset(fl, 0, sizeof(struct flowi)); | 110 | memset(fl, 0, sizeof(struct flowi)); |
| 111 | fl->mark = skb->mark; | ||
| 112 | |||
| 111 | if (!(iph->frag_off & htons(IP_MF | IP_OFFSET))) { | 113 | if (!(iph->frag_off & htons(IP_MF | IP_OFFSET))) { |
| 112 | switch (iph->protocol) { | 114 | switch (iph->protocol) { |
| 113 | case IPPROTO_UDP: | 115 | case IPPROTO_UDP: |
