From: Sergei Trofimovich <hidden> Date: 2021-07-07 09:35:09
I noticed the problem as a systemd-timesyncd (and ntpsec) sync failures:
systemd-timesyncd[586]: Timed out waiting for reply from ...
systemd-timesyncd[586]: Invalid packet timestamp.
Bisected it down to commit 371087aa476
("sock: expose so_timestamp options for mptcp").
The commit should be a no-op but it accidentally reordered option type
and option value:
+void sock_set_timestamp(struct sock *sk, int optname, bool valbool);
...
- __sock_set_timestamps(sk, valbool, true, true);
+ sock_set_timestamp(sk, valbool, optname);
Tested the fix on systemd-timesyncd. The sync failures went away.
CC: Paolo Abeni <pabeni@redhat.com>
CC: Florian Westphal <fw@strlen.de>
CC: Mat Martineau <redacted>
CC: David S. Miller <davem@davemloft.net>
CC: Jakub Kicinski <kuba@kernel.org>
CC: Eric Dumazet <edumazet@google.com>
Signed-off-by: Sergei Trofimovich <redacted>
---
net/core/sock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -1068,7 +1068,7 @@ int sock_setsockopt(struct socket *sock, int level, int optname,caseSO_TIMESTAMP_NEW:caseSO_TIMESTAMPNS_OLD:caseSO_TIMESTAMPNS_NEW:-sock_set_timestamp(sk,valbool,optname);+sock_set_timestamp(sk,optname,valbool);break;caseSO_TIMESTAMPING_NEW:
From: Eric Dumazet <edumazet@google.com> Date: 2021-07-07 12:34:28
On Wed, Jul 7, 2021 at 11:27 AM Sergei Trofimovich [off-list ref] wrote:
I noticed the problem as a systemd-timesyncd (and ntpsec) sync failures:
systemd-timesyncd[586]: Timed out waiting for reply from ...
systemd-timesyncd[586]: Invalid packet timestamp.
Bisected it down to commit 371087aa476
("sock: expose so_timestamp options for mptcp").
The commit should be a no-op but it accidentally reordered option type
and option value:
+void sock_set_timestamp(struct sock *sk, int optname, bool valbool);
...
- __sock_set_timestamps(sk, valbool, true, true);
+ sock_set_timestamp(sk, valbool, optname);
Tested the fix on systemd-timesyncd. The sync failures went away.
CC: Paolo Abeni <pabeni@redhat.com>
CC: Florian Westphal <fw@strlen.de>
CC: Mat Martineau <redacted>
CC: David S. Miller <davem@davemloft.net>
CC: Jakub Kicinski <kuba@kernel.org>
CC: Eric Dumazet <edumazet@google.com>
Signed-off-by: Sergei Trofimovich <redacted>
---
From: Sergei Trofimovich <hidden> Date: 2021-07-07 14:20:52
On Wed, 7 Jul 2021 14:32:01 +0200
Eric Dumazet [off-list ref] wrote:
On Wed, Jul 7, 2021 at 11:27 AM Sergei Trofimovich [off-list ref] wrote:
quoted
I noticed the problem as a systemd-timesyncd (and ntpsec) sync failures:
systemd-timesyncd[586]: Timed out waiting for reply from ...
systemd-timesyncd[586]: Invalid packet timestamp.
Bisected it down to commit 371087aa476
("sock: expose so_timestamp options for mptcp").
The commit should be a no-op but it accidentally reordered option type
and option value:
+void sock_set_timestamp(struct sock *sk, int optname, bool valbool);
...
- __sock_set_timestamps(sk, valbool, true, true);
+ sock_set_timestamp(sk, valbool, optname);
Tested the fix on systemd-timesyncd. The sync failures went away.
CC: Paolo Abeni <pabeni@redhat.com>
CC: Florian Westphal <fw@strlen.de>
CC: Mat Martineau <redacted>
CC: David S. Miller <davem@davemloft.net>
CC: Jakub Kicinski <kuba@kernel.org>
CC: Eric Dumazet <edumazet@google.com>
Signed-off-by: Sergei Trofimovich <redacted>
---