Skip to content

Commit 18203c4

Browse files
golangegregkh
authored andcommitted
net: Implement missing SO_TIMESTAMPING_NEW cmsg support
[ Upstream commit 382a320 ] 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/[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]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 701b03f commit 18203c4

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
@@ -2395,6 +2395,7 @@ int __sock_cmsg_send(struct sock *sk, struct msghdr *msg, struct cmsghdr *cmsg,
23952395
sockc->mark = *(u32 *)CMSG_DATA(cmsg);
23962396
break;
23972397
case SO_TIMESTAMPING_OLD:
2398+
case SO_TIMESTAMPING_NEW:
23982399
if (cmsg->cmsg_len != CMSG_LEN(sizeof(u32)))
23992400
return -EINVAL;
24002401

0 commit comments

Comments
 (0)