chiark / gitweb /
timesyncd: only attempt to connect when an address is configured
authorTom Gundersen <teg@jklm.no>
Mon, 19 May 2014 18:46:54 +0000 (20:46 +0200)
committerTom Gundersen <teg@jklm.no>
Mon, 19 May 2014 18:54:42 +0000 (20:54 +0200)
For now, we accept both link-local and routable addresses, maybe we want to
restrict ourselves to routable addresses only.

TODO
src/timesync/timesyncd.c

diff --git a/TODO b/TODO
index 07980653690064416df592a5c7bc04ce705e2480..9a50afbe8ed74f0bcb5eb8f6a3c6f6d515f50509 100644 (file)
--- a/TODO
+++ b/TODO
@@ -40,7 +40,6 @@ Features:
 
 * timesyncd:
   - hookup with networkd: NTP servers from dhcp
-  - hookup with networkd: listen to online/offline state
 
 * a way for container managers to turn off getty starting via $container_headless= or so...
 
index 6e63e34d876a30fa0d7ae39ecb12e3c0c7073ca6..6dcd942ec12fc968b644f19dcc4b7fb73d25632d 100644 (file)
@@ -1070,7 +1070,7 @@ static bool network_is_online(void) {
         int r;
 
         r = sd_network_get_operational_state(&state);
-        if (r >= 0 && streq("carrier", state))
+        if (r >= 0 && (streq("routable", state) || streq("degraded", state)))
                 return true;
         else
                 return false;