diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/ip_output.c | 6 |
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, | |||
799 | int csummode = CHECKSUM_NONE; | 799 | int csummode = CHECKSUM_NONE; |
800 | struct rtable *rt = (struct rtable *)cork->dst; | 800 | struct rtable *rt = (struct rtable *)cork->dst; |
801 | 801 | ||
802 | exthdrlen = transhdrlen ? rt->dst.header_len : 0; | 802 | skb = skb_peek_tail(queue); |
803 | |||
804 | exthdrlen = !skb ? rt->dst.header_len : 0; | ||
803 | length += exthdrlen; | 805 | length += exthdrlen; |
804 | transhdrlen += exthdrlen; | 806 | transhdrlen += exthdrlen; |
805 | mtu = cork->fragsize; | 807 | mtu = cork->fragsize; |
@@ -825,8 +827,6 @@ static int __ip_append_data(struct sock *sk, | |||
825 | !exthdrlen) | 827 | !exthdrlen) |
826 | csummode = CHECKSUM_PARTIAL; | 828 | csummode = CHECKSUM_PARTIAL; |
827 | 829 | ||
828 | skb = skb_peek_tail(queue); | ||
829 | |||
830 | cork->length += length; | 830 | cork->length += length; |
831 | if (((length > mtu) || (skb && skb_is_gso(skb))) && | 831 | if (((length > mtu) || (skb && skb_is_gso(skb))) && |
832 | (sk->sk_protocol == IPPROTO_UDP) && | 832 | (sk->sk_protocol == IPPROTO_UDP) && |