diff options
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/socket.c b/net/socket.c index e89884e2197b..5087f9e40f3a 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -669,7 +669,7 @@ static bool skb_is_err_queue(const struct sk_buff *skb) | |||
669 | * before the software timestamp is received, a hardware TX timestamp may be | 669 | * before the software timestamp is received, a hardware TX timestamp may be |
670 | * returned only if there is no software TX timestamp. Ignore false software | 670 | * returned only if there is no software TX timestamp. Ignore false software |
671 | * timestamps, which may be made in the __sock_recv_timestamp() call when the | 671 | * timestamps, which may be made in the __sock_recv_timestamp() call when the |
672 | * option SO_TIMESTAMP(NS) is enabled on the socket, even when the skb has a | 672 | * option SO_TIMESTAMP_OLD(NS) is enabled on the socket, even when the skb has a |
673 | * hardware timestamp. | 673 | * hardware timestamp. |
674 | */ | 674 | */ |
675 | static bool skb_is_swtx_tstamp(const struct sk_buff *skb, int false_tstamp) | 675 | static bool skb_is_swtx_tstamp(const struct sk_buff *skb, int false_tstamp) |
@@ -721,12 +721,12 @@ void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk, | |||
721 | if (!sock_flag(sk, SOCK_RCVTSTAMPNS)) { | 721 | if (!sock_flag(sk, SOCK_RCVTSTAMPNS)) { |
722 | struct timeval tv; | 722 | struct timeval tv; |
723 | skb_get_timestamp(skb, &tv); | 723 | skb_get_timestamp(skb, &tv); |
724 | put_cmsg(msg, SOL_SOCKET, SCM_TIMESTAMP, | 724 | put_cmsg(msg, SOL_SOCKET, SO_TIMESTAMP_OLD, |
725 | sizeof(tv), &tv); | 725 | sizeof(tv), &tv); |
726 | } else { | 726 | } else { |
727 | struct timespec ts; | 727 | struct timespec ts; |
728 | skb_get_timestampns(skb, &ts); | 728 | skb_get_timestampns(skb, &ts); |
729 | put_cmsg(msg, SOL_SOCKET, SCM_TIMESTAMPNS, | 729 | put_cmsg(msg, SOL_SOCKET, SO_TIMESTAMPNS_OLD, |
730 | sizeof(ts), &ts); | 730 | sizeof(ts), &ts); |
731 | } | 731 | } |
732 | } | 732 | } |
@@ -746,7 +746,7 @@ void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk, | |||
746 | } | 746 | } |
747 | if (!empty) { | 747 | if (!empty) { |
748 | put_cmsg(msg, SOL_SOCKET, | 748 | put_cmsg(msg, SOL_SOCKET, |
749 | SCM_TIMESTAMPING, sizeof(tss), &tss); | 749 | SO_TIMESTAMPING_OLD, sizeof(tss), &tss); |
750 | 750 | ||
751 | if (skb_is_err_queue(skb) && skb->len && | 751 | if (skb_is_err_queue(skb) && skb->len && |
752 | SKB_EXT_ERR(skb)->opt_stats) | 752 | SKB_EXT_ERR(skb)->opt_stats) |