aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
authorDeepa Dinamani <deepa.kernel@gmail.com>2019-02-02 10:34:46 -0500
committerDavid S. Miller <davem@davemloft.net>2019-02-03 14:17:30 -0500
commit7f1bc6e95d7840d4305595b3e4025cddda88cee5 (patch)
tree9b867e3563ccf7fa168dc4696ca8cbb1ac61fc59 /net/ipv4/tcp.c
parent2edfd8e06145da646cb4ec3e6ed2a68dc8b746bb (diff)
sockopt: Rename SO_TIMESTAMP* to SO_TIMESTAMP*_OLD
SO_TIMESTAMP, SO_TIMESTAMPNS and SO_TIMESTAMPING options, the way they are currently defined, are not y2038 safe. Subsequent patches in the series add new y2038 safe versions of these options which provide 64 bit timestamps on all architectures uniformly. Hence, rename existing options with OLD tag suffixes. Also note that kernel will not use the untagged SO_TIMESTAMP* and SCM_TIMESTAMP* options internally anymore. Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com> Acked-by: Willem de Bruijn <willemb@google.com> Cc: deller@gmx.de Cc: dhowells@redhat.com Cc: jejb@parisc-linux.org Cc: ralf@linux-mips.org Cc: rth@twiddle.net Cc: linux-afs@lists.infradead.org Cc: linux-alpha@vger.kernel.org Cc: linux-arch@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-parisc@vger.kernel.org Cc: linux-rdma@vger.kernel.org Cc: sparclinux@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 6f8d292ad501..e29aec59cad1 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1867,13 +1867,13 @@ static void tcp_recv_timestamp(struct msghdr *msg, const struct sock *sk,
1867 if (tss->ts[0].tv_sec || tss->ts[0].tv_nsec) { 1867 if (tss->ts[0].tv_sec || tss->ts[0].tv_nsec) {
1868 if (sock_flag(sk, SOCK_RCVTSTAMP)) { 1868 if (sock_flag(sk, SOCK_RCVTSTAMP)) {
1869 if (sock_flag(sk, SOCK_RCVTSTAMPNS)) { 1869 if (sock_flag(sk, SOCK_RCVTSTAMPNS)) {
1870 put_cmsg(msg, SOL_SOCKET, SCM_TIMESTAMPNS, 1870 put_cmsg(msg, SOL_SOCKET, SO_TIMESTAMPNS_OLD,
1871 sizeof(tss->ts[0]), &tss->ts[0]); 1871 sizeof(tss->ts[0]), &tss->ts[0]);
1872 } else { 1872 } else {
1873 tv.tv_sec = tss->ts[0].tv_sec; 1873 tv.tv_sec = tss->ts[0].tv_sec;
1874 tv.tv_usec = tss->ts[0].tv_nsec / 1000; 1874 tv.tv_usec = tss->ts[0].tv_nsec / 1000;
1875 1875
1876 put_cmsg(msg, SOL_SOCKET, SCM_TIMESTAMP, 1876 put_cmsg(msg, SOL_SOCKET, SO_TIMESTAMP_OLD,
1877 sizeof(tv), &tv); 1877 sizeof(tv), &tv);
1878 } 1878 }
1879 } 1879 }
@@ -1893,7 +1893,7 @@ static void tcp_recv_timestamp(struct msghdr *msg, const struct sock *sk,
1893 1893
1894 if (has_timestamping) { 1894 if (has_timestamping) {
1895 tss->ts[1] = (struct timespec) {0}; 1895 tss->ts[1] = (struct timespec) {0};
1896 put_cmsg(msg, SOL_SOCKET, SCM_TIMESTAMPING, 1896 put_cmsg(msg, SOL_SOCKET, SO_TIMESTAMPING_OLD,
1897 sizeof(*tss), tss); 1897 sizeof(*tss), tss);
1898 } 1898 }
1899} 1899}