Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timesyncd mangles reported IPv6 address of NTP server #11169

Closed
bjh21 opened this issue Dec 15, 2018 · 2 comments
Closed

timesyncd mangles reported IPv6 address of NTP server #11169

bjh21 opened this issue Dec 15, 2018 · 2 comments
Labels
Milestone

Comments

@bjh21
Copy link
Contributor

bjh21 commented Dec 15, 2018

systemd version the issue has been seen with

239-13

Used distribution

Debian testing

Expected behaviour you didn't see

timedatectl timesync-status should display IPv6 address of NTP server.

Unexpected behaviour you saw

timedatectl timesync-status displays an IPv6 address that isn't the address of the NTP server.

Steps to reproduce the problem

1: Configure timesyncd to use an IPv6-capable NTP server. For instance, in /etc/systemd/timesyncd.conf write:

[Time]
NTP=sntp.cam.ac.uk

2: Start or restart systemd-timesyncd:

wraith:~# systemctl restart systemd-timesyncd

3: Check that this has worked:

wraith:~# systemctl status systemd-timesyncd | grep Status
   Status: "Synchronized to time server [2001:630:212:8::123:20]:123 (sntp.cam.ac.uk)."

4: Ask timedatectl what it thinks the server IP address is:

wraith:~# timedatectl timesync-status | head -1
       Server: ::2001:630:212:8:0:0 (sntp.cam.ac.uk)
wraith:~# timedatectl show-timesync | grep ^ServerAddress=
ServerAddress=::2001:630:212:8:0:0

Note that the address shown by timedatectl is different from the one reported in the journal by systemd-timesyncd, but appears to be the correct one shifted right by 32 bits:

right: 2001:0630:0212:0008:0000:0000:0123:0020
wrong: 0000:0000:2001:0630:0212:0008:0000:0000

NB: I have only tested this against the Debian version of systemd: I haven't attempted to rebuild systemd from upstream sources. I originally reported the problem to Debian, but a Debian developer suggested that I should report it upstream.

@bjh21
Copy link
Contributor Author

bjh21 commented Dec 16, 2018

It looks like the problem is on the timesyncd side:

bjh21@fugloy:~ $ gdbus call --system --dest org.freedesktop.timesync1 --object-path /org/freedesktop/timesync1 --method org.freedesktop.DBus.Properties.Get org.freedesktop.timesync1.Manager ServerAddress
(<(10, [byte 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x06, 0x30, 0x02, 0x12, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00])>,)

@bjh21 bjh21 changed the title timedatectl mangles displayed IPv6 address of NTP server timedatesyncd mangles reported IPv6 address of NTP server Dec 16, 2018
@bjh21 bjh21 changed the title timedatesyncd mangles reported IPv6 address of NTP server timesyncd mangles reported IPv6 address of NTP server Dec 16, 2018
poettering added a commit to poettering/systemd that referenced this issue Dec 17, 2018
@poettering
Copy link
Member

Fix waiting in #11186

@poettering poettering added this to the v240 milestone Dec 17, 2018
yuwata pushed a commit that referenced this issue Dec 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants