tcp: mark skbs with SCM_TIMESTAMPING_OPT_STATS
authorSoheil Hassas Yeganeh <soheil@google.com>
Sat, 18 Mar 2017 21:03:00 +0000 (17:03 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Mar 2017 01:44:17 +0000 (18:44 -0700)
commit05a2e25de61f8c8754c3a4b87e271748a2df97b7
treeb9dc299784a3231231e21cf46df312b6b1c40c9d
parent5433c8668a23ba5253ef87da29c613b965bc7fef
tcp: mark skbs with SCM_TIMESTAMPING_OPT_STATS

SOF_TIMESTAMPING_OPT_STATS can be enabled and disabled
while packets are collected on the error queue.
So, checking SOF_TIMESTAMPING_OPT_STATS in sk->sk_tsflags
is not enough to safely assume that the skb contains
OPT_STATS data.

Add a bit in sock_exterr_skb to indicate whether the
skb contains opt_stats data.

Fixes: 096a2fafde79 ("tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING")
Reported-by: JongHwan Kim <zzoru007@gmail.com>
Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/errqueue.h
net/core/skbuff.c
net/socket.c