summaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_output.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2011-06-17 16:32:26 +0200
committerGrant Likely <grant.likely@secretlab.ca>2011-06-17 16:32:26 +0200
commitf8db4cc4f2b11bdded6c94f0d55906847474b982 (patch)
treed1b99d186edb9d203fafd896f19487125a2395af /net/ipv4/ip_output.c
parentspi/topcliff-pch: Support new device ML7223 IOH (diff)
parentspi/bfin_spi: fix handling of default bits per word setting (diff)
downloadlinux-f8db4cc4f2b11bdded6c94f0d55906847474b982.tar.xz
linux-f8db4cc4f2b11bdded6c94f0d55906847474b982.zip
Merge branch 'spi/merge' into spi/next
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r--net/ipv4/ip_output.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 98af3697c718..a8024eaa0e87 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -799,7 +799,9 @@ static int __ip_append_data(struct sock *sk,
int csummode = CHECKSUM_NONE;
struct rtable *rt = (struct rtable *)cork->dst;
- exthdrlen = transhdrlen ? rt->dst.header_len : 0;
+ skb = skb_peek_tail(queue);
+
+ exthdrlen = !skb ? rt->dst.header_len : 0;
length += exthdrlen;
transhdrlen += exthdrlen;
mtu = cork->fragsize;
@@ -825,8 +827,6 @@ static int __ip_append_data(struct sock *sk,
!exthdrlen)
csummode = CHECKSUM_PARTIAL;
- skb = skb_peek_tail(queue);
-
cork->length += length;
if (((length > mtu) || (skb && skb_is_gso(skb))) &&
(sk->sk_protocol == IPPROTO_UDP) &&