aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r--net/ipv4/ip_output.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 8d3b6b0e9857..215af2b155cb 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -855,11 +855,15 @@ static int __ip_append_data(struct sock *sk,
855 unsigned int maxfraglen, fragheaderlen, maxnonfragsize; 855 unsigned int maxfraglen, fragheaderlen, maxnonfragsize;
856 int csummode = CHECKSUM_NONE; 856 int csummode = CHECKSUM_NONE;
857 struct rtable *rt = (struct rtable *)cork->dst; 857 struct rtable *rt = (struct rtable *)cork->dst;
858 u32 tskey = 0;
858 859
859 skb = skb_peek_tail(queue); 860 skb = skb_peek_tail(queue);
860 861
861 exthdrlen = !skb ? rt->dst.header_len : 0; 862 exthdrlen = !skb ? rt->dst.header_len : 0;
862 mtu = cork->fragsize; 863 mtu = cork->fragsize;
864 if (cork->tx_flags & SKBTX_ANY_SW_TSTAMP &&
865 sk->sk_tsflags & SOF_TIMESTAMPING_OPT_ID)
866 tskey = sk->sk_tskey++;
863 867
864 hh_len = LL_RESERVED_SPACE(rt->dst.dev); 868 hh_len = LL_RESERVED_SPACE(rt->dst.dev);
865 869
@@ -962,10 +966,6 @@ alloc_new_skb:
962 sk->sk_allocation); 966 sk->sk_allocation);
963 if (unlikely(skb == NULL)) 967 if (unlikely(skb == NULL))
964 err = -ENOBUFS; 968 err = -ENOBUFS;
965 else
966 /* only the initial fragment is
967 time stamped */
968 cork->tx_flags = 0;
969 } 969 }
970 if (skb == NULL) 970 if (skb == NULL)
971 goto error; 971 goto error;
@@ -976,7 +976,12 @@ alloc_new_skb:
976 skb->ip_summed = csummode; 976 skb->ip_summed = csummode;
977 skb->csum = 0; 977 skb->csum = 0;
978 skb_reserve(skb, hh_len); 978 skb_reserve(skb, hh_len);
979
980 /* only the initial fragment is time stamped */
979 skb_shinfo(skb)->tx_flags = cork->tx_flags; 981 skb_shinfo(skb)->tx_flags = cork->tx_flags;
982 cork->tx_flags = 0;
983 skb_shinfo(skb)->tskey = tskey;
984 tskey = 0;
980 985
981 /* 986 /*
982 * Find where to start putting bytes. 987 * Find where to start putting bytes.