Skip to content

Commit 382a320

Browse files
golangekuba-moo
authored andcommitted
net: Implement missing SO_TIMESTAMPING_NEW cmsg support
Commit 9718475 ("socket: Add SO_TIMESTAMPING_NEW") added the new socket option SO_TIMESTAMPING_NEW. However, it was never implemented in __sock_cmsg_send thus breaking SO_TIMESTAMPING cmsg for platforms using SO_TIMESTAMPING_NEW. Fixes: 9718475 ("socket: Add SO_TIMESTAMPING_NEW") Link: https://lore.kernel.org/netdev/6a7281bf-bc4a-4f75-bb88-7011908ae471@app.fastmail.com/ Signed-off-by: Thomas Lange <thomas@corelatus.se> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://lore.kernel.org/r/20240104085744.49164-1-thomas@corelatus.se Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent e009b2e commit 382a320

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/core/sock.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2813,6 +2813,7 @@ int __sock_cmsg_send(struct sock *sk, struct cmsghdr *cmsg,
28132813
sockc->mark = *(u32 *)CMSG_DATA(cmsg);
28142814
break;
28152815
case SO_TIMESTAMPING_OLD:
2816+
case SO_TIMESTAMPING_NEW:
28162817
if (cmsg->cmsg_len != CMSG_LEN(sizeof(u32)))
28172818
return -EINVAL;
28182819

0 commit comments

Comments
 (0)