aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lange <[email protected]>2024-01-04 09:57:44 +0100
committerJakub Kicinski <[email protected]>2024-01-04 08:18:55 -0800
commit382a32018b74f407008615e0e831d05ed28e81cd (patch)
treea24cbc4c3eb23c5d5c44347b1c7aadf07c745547
parente009b2efb7a8850498796b360043ac25c8d3d28f (diff)
net: Implement missing SO_TIMESTAMPING_NEW cmsg support
Commit 9718475e6908 ("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: 9718475e6908 ("socket: Add SO_TIMESTAMPING_NEW") Link: https://lore.kernel.org/netdev/[email protected]/ Signed-off-by: Thomas Lange <[email protected]> Reviewed-by: Willem de Bruijn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
-rw-r--r--net/core/sock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/sock.c b/net/core/sock.c
index 51d52859e942..d02534c77413 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -2813,6 +2813,7 @@ int __sock_cmsg_send(struct sock *sk, struct cmsghdr *cmsg,
sockc->mark = *(u32 *)CMSG_DATA(cmsg);
break;
case SO_TIMESTAMPING_OLD:
+ case SO_TIMESTAMPING_NEW:
if (cmsg->cmsg_len != CMSG_LEN(sizeof(u32)))
return -EINVAL;