diff options
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 744af67a5989..181b70ebd964 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -426,13 +426,15 @@ void tcp_init_sock(struct sock *sk) | |||
426 | } | 426 | } |
427 | EXPORT_SYMBOL(tcp_init_sock); | 427 | EXPORT_SYMBOL(tcp_init_sock); |
428 | 428 | ||
429 | void tcp_tx_timestamp(struct sock *sk, struct sk_buff *skb) | 429 | static void tcp_tx_timestamp(struct sock *sk, struct sk_buff *skb) |
430 | { | 430 | { |
431 | struct skb_shared_info *shinfo = skb_shinfo(skb); | 431 | if (sk->sk_tsflags) { |
432 | struct skb_shared_info *shinfo = skb_shinfo(skb); | ||
432 | 433 | ||
433 | sock_tx_timestamp(sk, &shinfo->tx_flags); | 434 | sock_tx_timestamp(sk, &shinfo->tx_flags); |
434 | if (shinfo->tx_flags & SKBTX_ANY_SW_TSTAMP) | 435 | if (shinfo->tx_flags & SKBTX_ANY_TSTAMP) |
435 | shinfo->tskey = TCP_SKB_CB(skb)->seq + skb->len - 1; | 436 | shinfo->tskey = TCP_SKB_CB(skb)->seq + skb->len - 1; |
437 | } | ||
436 | } | 438 | } |
437 | 439 | ||
438 | /* | 440 | /* |