Re: [PATCH] net: core: fix SO_TIMESTAMP_* option setting

From: Sergei Trofimovich
Date: Wed Jul 07 2021 - 10:20:52 EST


On Wed, 7 Jul 2021 14:32:01 +0200
Eric Dumazet <edumazet@xxxxxxxxxx> wrote:

> On Wed, Jul 7, 2021 at 11:27 AM Sergei Trofimovich <slyfox@xxxxxxxxxx> 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@xxxxxxxxxx>
> > CC: Florian Westphal <fw@xxxxxxxxx>
> > CC: Mat Martineau <mathew.j.martineau@xxxxxxxxxxxxxxx>
> > CC: David S. Miller <davem@xxxxxxxxxxxxx>
> > CC: Jakub Kicinski <kuba@xxxxxxxxxx>
> > CC: Eric Dumazet <edumazet@xxxxxxxxxx>
> > Signed-off-by: Sergei Trofimovich <slyfox@xxxxxxxxxx>
> > ---
>
> I think this has been fixed five days ago in
>
> https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=81b4a0cc7565b08cadd0d02bae3434f127d1d72a

Aha, looks good! Thank you!

--

Sergei