Merge pull request #2376 from zerkms/ISSUE-2358
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 3 Apr 2018 21:29:17 +0000 (23:29 +0200)
committerGitHub <noreply@github.com>
Tue, 3 Apr 2018 21:29:17 +0000 (23:29 +0200)
Skip `0.0.0.0` hosts in ntpd plugin

src/ntpd.c

index 84512d2..ed3c042 100644 (file)
@@ -883,6 +883,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 */