aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/check_ntp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/check_ntp.c b/plugins/check_ntp.c
index 8a08af50..cf63eea6 100644
--- a/plugins/check_ntp.c
+++ b/plugins/check_ntp.c
@@ -475,7 +475,10 @@ double offset_request(const char *host, int *status){
}
/* cleanup */
- for(j=0; j<num_hosts; j++){ close(socklist[j]); }
+ /* FIXME: Not closing the socket to avoid re-use of the local port
+ * which can cause old NTP packets to be read instead of NTP control
+ * pactets in jitter_request(). THERE MUST BE ANOTHER WAY...
+ * for(j=0; j<num_hosts; j++){ close(socklist[j]); } */
free(socklist);
free(ufds);
free(servers);