[PATCH net] ipv4: Fix updating SOF_TIMESTAMPING_OPT_ID when SKBTX_HW_TSTAMP is enabled

Stephen Mallon
2019-04-28T05:53:05Z

Ensure that the unique timestamp identifier is incremented for skb hardware
timestamps, not just software timestamps.

Signed-off-by: Stephen Mallon <stephen.mallon@sydney.edu.au>
---
net/ipv4/ip_output.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index c80188875f39..96ef1d467ba7 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -891,7 +891,7 @@ static int __ip_append_data(struct sock *sk,
mtu = cork->gso_size ? IP_MAX_MTU : cork->fragsize;
paged = !!cork->gso_size;

- if (cork->tx_flags & SKBTX_ANY_SW_TSTAMP &&
+ if (cork->tx_flags & SKBTX_ANY_TSTAMP &&
sk->sk_tsflags & SOF_TIMESTAMPING_OPT_ID)
tskey = sk->sk_tskey++;

--
2.18.1