]> git.baikalelectronics.ru Git - kernel.git/commit
packet: fix second argument of sock_tx_timestamp()
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tue, 19 Jul 2016 05:40:51 +0000 (14:40 +0900)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Jul 2016 04:00:50 +0000 (21:00 -0700)
commitb6732e423fa7c9071ec8e26e555a1720b519d7e1
tree4f062bf4f363f4eefe44d002876aa5fc2d38d2d1
parent3f8b1ffd35645af52b09d836c5139e4ef4219d6a
packet: fix second argument of sock_tx_timestamp()

This patch fixes an issue that a syscall (e.g. sendto syscall) cannot
work correctly. Since the sendto syscall doesn't have msg_control buffer,
the sock_tx_timestamp() in packet_snd() cannot work correctly because
the socks.tsflags is set to 0.
So, this patch sets the socks.tsflags to sk->sk_tsflags as default.

Fixes: 1b4614be4286 ("sock: enable timestamping using control messages")
Reported-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
Reported-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/packet/af_packet.c