Chrony comes with sample NetworkManager dispatcher script that offlines NTP sources when interface goes down and onlines them when interface comes up. Technically it runs "chronyc onoffline" which tries to determine whether each source can be reached. This script is actually installed by distributions (openSUSE and Ubuntu for sure).
When system goes to suspend NetworkManager offlines interfaces that causes chrony to offline its sources. On resume chrony is expected to online them again. This works well for IPv4 sources but IPv6 sources remain offline. Like $ chronyc -n sources 210 Number of sources = 8 MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== ^? 2001:67c:1560:8003::c8 0 6 0 - +0ns[ +0ns] +/- 0ns ^? 2001:67c:1560:8003::c7 0 6 0 - +0ns[ +0ns] +/- 0ns ^- 91.189.89.199 2 8 377 108 -2030us[-2209us] +/- 53ms ^- 91.189.94.4 2 8 377 49 -2878us[-3067us] +/- 60ms ^+ 79.111.152.5 1 8 377 51 -2960us[-3149us] +/- 18ms ^* 188.225.9.167 2 8 377 49 -1819us[-2008us] +/- 15ms ^+ 85.21.78.91 2 8 377 116 -3053us[-3230us] +/- 19ms ^+ 185.209.85.222 2 8 377 50 +6182us[+5993us] +/- 23ms $ The reason is - when ifup dispatcher script runs, IPv6 is not yet configured. Here are route entries default via 192.168.1.1 dev wlan0 proto dhcp metric 20600 169.254.0.0/16 dev wlan0 scope link metric 1000 192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.6 metric 600 ::1 dev lo proto kernel metric 256 pref medium fe80::/64 dev wlan0 proto kernel metric 600 pref medium So IPv4 is up and has default route but IPv6 still only link-local address. Couple of seconds later ::1 dev lo proto kernel metric 256 pref medium 2a00:xxxx:yyyy:zzzz::/64 dev wlan0 proto ra metric 600 pref medium fe80::/64 dev wlan0 proto kernel metric 600 pref medium default via fe80::1 dev wlan0 proto ra metric 20600 pref medium Is it possible to run dispatcher script after both IPv4 and IPv6 are configured on interface? Or only IPv6 for that matter - it does not matter if "chronyc onoffline" runs multiple times. Both IPv4 and IPv6 are set to auto. _______________________________________________ networkmanager-list mailing list networkmanager-list@gnome.org https://mail.gnome.org/mailman/listinfo/networkmanager-list