File ntp-ENOBUFS.patch of Package ntp.9120
--- ntp-4.2.8p6.orig/ntpd/ntp_io.c
+++ ntp-4.2.8p6/ntpd/ntp_io.c
@@ -4568,6 +4568,7 @@
struct rt_msghdr rtm;
char *p;
#endif
+ static int netlink_warn = 1;
if (disable_dynamic_updates) {
/*
@@ -4582,14 +4583,15 @@
cnt = read(reader->fd, buffer, sizeof(buffer));
if (cnt < 0) {
- if (errno == ENOBUFS) {
- msyslog(LOG_ERR,
- "routing socket reports: %m");
- } else {
+ if (errno != ENOBUFS) {
msyslog(LOG_ERR,
"routing socket reports: %m - disabling");
remove_asyncio_reader(reader);
delete_asyncio_reader(reader);
+ } else if (netlink_warn == 1) {
+ msyslog(LOG_ERR,
+ "routing socket reports: %m");
+ netlink_warn = 0;
}
return;
}