]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Change online status also for unresolved sources
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 28 Apr 2010 14:11:24 +0000 (16:11 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 28 Apr 2010 15:18:03 +0000 (17:18 +0200)
ntp_sources.c

index 01a1b045996dbaed870ed905a8a855b3f3c7dcfb..00f8e3e47fe3011f31a512e6e9bdb39d379989cd 100644 (file)
@@ -403,6 +403,15 @@ NSR_TakeSourcesOnline(IPAddr *mask, IPAddr *address)
     }
   }
 
+  if (address->family == IPADDR_UNSPEC) {
+    struct UnresolvedSource *us;
+
+    for (us = unresolved_sources; us; us = us->next) {
+      any = 1;
+      us->params.online = 1;
+    }
+  }
+
   return any;
 }
 
@@ -434,6 +443,15 @@ NSR_TakeSourcesOffline(IPAddr *mask, IPAddr *address)
     NCR_TakeSourceOffline(records[syncpeer].data);
   }
 
+  if (address->family == IPADDR_UNSPEC) {
+    struct UnresolvedSource *us;
+
+    for (us = unresolved_sources; us; us = us->next) {
+      any = 1;
+      us->params.online = 0;
+    }
+  }
+
   return any;
 }