Skip `0.0.0.0` hosts in ntpd plugin
authorIvan Kurnosov <zerkms@zerkms.com>
Sat, 22 Jul 2017 04:38:01 +0000 (16:38 +1200)
committerIvan Kurnosov <zerkms@zerkms.com>
Sat, 22 Jul 2017 04:38:01 +0000 (16:38 +1200)
src/ntpd.c

index a19d05c..796d92c 100644 (file)
@@ -894,6 +894,12 @@ static int ntpd_read(void) {
       continue;
     }
 
+    // `0.0.0.0` hosts are caused by POOL servers
+    // see https://github.com/collectd/collectd/issues/2358
+    if (strcmp(peername, "0.0.0.0") == 0) {
+      continue;
+    }
+
     refclock_id = ntpd_get_refclock_id(ptr);
 
     /* Convert the `long floating point' offset value to double */