Skip to content
Commit 59e611a5 authored by Christian Eggers's avatar Christian Eggers Committed by Jakub Kicinski
Browse files

socket: fix option SO_TIMESTAMPING_NEW



The comparison of optname with SO_TIMESTAMPING_NEW is wrong way around,
so SOCK_TSTAMP_NEW will first be set and than reset again. Additionally
move it out of the test for SOF_TIMESTAMPING_RX_SOFTWARE as this seems
unrelated.

This problem happens on 32 bit platforms were the libc has already
switched to struct timespec64 (from SO_TIMExxx_OLD to SO_TIMExxx_NEW
socket options). ptp4l complains with "missing timestamp on transmitted
peer delay request" because the wrong format is received (and
discarded).

Fixes: 9718475e ("socket: Add SO_TIMESTAMPING_NEW")
Signed-off-by: default avatarChristian Eggers <ceggers@arri.de>
Reviewed-by: default avatarWillem de Bruijn <willemdebruijn.kernel@gmail.com>
Reviewed-by: default avatarDeepa Dinamani <deepa.kernel@gmail.com>
Acked-by: default avatarWillem de Bruijn <willemb@google.com>
Acked-by: default avatarDeepa Dinamani <deepa.kernel@gmail.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 254941f3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment