diff mbox series

[net-next,02/11] net: ping6: support packet timestamping

Message ID 20220210003649.3120861-3-kuba@kernel.org (mailing list archive)
State Accepted
Commit e7b060460f29c31a550cb563819c69f2b1cb7b10
Headers show
Series net: ping6: support basic socket cmsgs | expand

Commit Message

Jakub Kicinski Feb. 10, 2022, 12:36 a.m. UTC
Nothing prevents the user from requesting timestamping
on ping6 sockets, yet timestamps are not going to be reported.
Plumb the flags through.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 net/ipv6/ping.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jakub Kicinski Feb. 10, 2022, 2:17 a.m. UTC | #1
On Wed, 9 Feb 2022 16:44:18 -0800 Maciej Żenczykowski wrote:
> probably deserves a fixes tag?

I went with a "never worked + unlikely a generic app (which depends
on TS) will use ICMP6 sockets" classification. Let's see if we get 
another vote to make this a fix.

> otherwise looks fine to me

Thanks!
David Ahern Feb. 10, 2022, 5:30 a.m. UTC | #2
On 2/9/22 4:36 PM, Jakub Kicinski wrote:
> Nothing prevents the user from requesting timestamping
> on ping6 sockets, yet timestamps are not going to be reported.
> Plumb the flags through.
> 
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
>  net/ipv6/ping.c | 1 +
>  1 file changed, 1 insertion(+)
> 

Reviewed-by: David Ahern <dsahern@kernel.org>

no opinion on the Fixes tag.
diff mbox series

Patch

diff --git a/net/ipv6/ping.c b/net/ipv6/ping.c
index 86a72f7a61cf..3228ccd8abf1 100644
--- a/net/ipv6/ping.c
+++ b/net/ipv6/ping.c
@@ -113,6 +113,7 @@  static int ping_v6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
 
 	ipcm6_init_sk(&ipc6, np);
 	ipc6.sockc.mark = sk->sk_mark;
+	ipc6.sockc.tsflags = sk->sk_tsflags;
 	fl6.flowlabel = ip6_make_flowinfo(ipc6.tclass, fl6.flowlabel);
 
 	dst = ip6_sk_dst_lookup_flow(sk, &fl6, daddr, false);