]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
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)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Wed, 17 May 2017 16:39:01 +0000 (13:39 -0300)
commit9e80911cfd32c61d4b4f2fc8ed28b6482ab1ee54
treee3eb43527427b54f04e2d1bab78407ee99677edf
parent1972c29b44e96c4387fd7520c00d5a1741bd6166
tcp: mark skbs with SCM_TIMESTAMPING_OPT_STATS

BugLink: http://bugs.launchpad.net/bugs/1688499
[ Upstream commit 4ef1b2869447411ad3ef91ad7d4891a83c1a509a ]

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: 1c885808e456 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
include/linux/errqueue.h
net/core/skbuff.c
net/socket.c