]> git.baikalelectronics.ru Git - kernel.git/commit
net-timestamp: SOCK_RAW and PING timestamping
authorWillem de Bruijn <willemb@google.com>
Mon, 14 Jul 2014 21:55:06 +0000 (17:55 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Jul 2014 23:32:45 +0000 (16:32 -0700)
commit4d617975761af9e2cd577433896af0544db57a44
treee7fa05e4bc8d22865c7877e05bff85c3ecee1dc8
parentb47f9da8b205a99b78a05cbe172c91edee5f5ca3
net-timestamp: SOCK_RAW and PING timestamping

Add SO_TIMESTAMPING to sockets of type PF_INET[6]/SOCK_RAW:

Add the necessary sock_tx_timestamp calls to the datapath for RAW
sockets (ping sockets already had these calls).

Fix the IP output path to pass the timestamp flags on the first
fragment also for these sockets. The existing code relies on
transhdrlen != 0 to indicate a first fragment. For these sockets,
that assumption does not hold.

This fixes http://bugzilla.kernel.org/show_bug.cgi?id=77221

Tested SOCK_RAW on IPv4 and IPv6, not PING.

Signed-off-by: Willem de Bruijn <willemb@google.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_output.c
net/ipv4/raw.c
net/ipv6/ip6_output.c