From 824fd06c341543436366fa4f7f7e991a8b5cded0 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 25 Mar 2013 15:26:51 -0500 Subject: [PATCH] ppp: ignore errors getting final PPP stats The PPP interface may be gone already, especially if the connection was terminated by the PPP peer. It's pointless to warn in these cases since getitng the final stats is best-effort anyway. --- src/ppp-manager/nm-ppp-manager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c index 73cc566fab..aa03c82a5b 100644 --- a/src/ppp-manager/nm-ppp-manager.c +++ b/src/ppp-manager/nm-ppp-manager.c @@ -315,7 +315,8 @@ monitor_cb (gpointer user_data) strncpy (req.ifr_name, priv->ip_iface, sizeof (req.ifr_name)); if (ioctl (priv->monitor_fd, SIOCGPPPSTATS, &req) < 0) { - nm_log_warn (LOGD_PPP, "could not read ppp stats: %s", strerror (errno)); + if (errno != ENODEV) + nm_log_warn (LOGD_PPP, "could not read ppp stats: %s", strerror (errno)); } else { g_signal_emit (manager, signals[STATS], 0, stats.p.ppp_ibytes,