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.
This commit is contained in:
Dan Williams 2013-03-25 15:26:51 -05:00
parent f515df39b5
commit 824fd06c34

View file

@ -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,