[ntpsec commit] Forward-port NTP Classic [Bug 2890] Ignore ENOBUFS on routing netlink socket.

Eric S. Raymond esr at ntpsec.org
Fri Oct 23 04:26:06 UTC 2015


Module:    ntpsec
Branch:    master
Commit:    808829c04c85e608d8b69c37f15971dae7c18e19
Changeset: http://git.ntpsec.org/ntpsec/commit/?id=808829c04c85e608d8b69c37f15971dae7c18e19

Author:    Eric S. Raymond <esr at thyrsus.com>
Date:      Thu Oct 22 23:02:17 2015 -0400

Forward-port NTP Classic [Bug 2890] Ignore ENOBUFS on routing netlink socket.

---

 NEWS          |  2 +-
 ntpd/ntp_io.c | 13 +++++++++----
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/NEWS b/NEWS
index 75ef42c..699a3cc 100644
--- a/NEWS
+++ b/NEWS
@@ -27,6 +27,6 @@ on user-visible changes.
 * [Bug 2867] ntpd with autokey active crashed by 'ntpq -crv'
 * [Bug 2883] ntpd crashes on exit with empty driftfile.  Miroslav Lichvar.
 * [Bug 2886] Misspelling: "outlyer" should be "outlier"
-
+* [Bug 2890] Ignore ENOBUFS on routing netlink socket.  Konstantin Khlebnikov.
 
 // end
diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c
index 7686d7a..b9c5f83 100644
--- a/ntpd/ntp_io.c
+++ b/ntpd/ntp_io.c
@@ -4597,10 +4597,15 @@ process_routing_msgs(struct asyncio_reader *reader)
 	cnt = read(reader->fd, buffer, sizeof(buffer));
 
 	if (cnt < 0) {
-		msyslog(LOG_ERR,
-			"i/o error on routing socket %m - disabling");
-		remove_asyncio_reader(reader);
-		delete_asyncio_reader(reader);
+		if (errno == ENOBUFS) {
+			msyslog(LOG_ERR,
+				"routing socket reports: %m");
+		} else {
+			msyslog(LOG_ERR,
+				"routing socket reports: %m - disabling");
+			remove_asyncio_reader(reader);
+			delete_asyncio_reader(reader);
+		}
 		return;
 	}
 



More information about the vc mailing list