GNOME Bugzilla – Bug 544790
FreeBSD: GDM issues CRITICAL warning on harmless issue [patch]
Last modified: 2008-07-28 08:20:41 UTC
Please describe the problem: On FreeBSD SIOCGIFFLAGS yields ENXIO for non-IP/non-configured interfaces. GDM (gdmchooser) prints a warning at level CRITICAL to the log, making the user think that there's a problem. Steps to reproduce: 1. Run XDMCP browser on FreeBSD 7 Actual results: Syslog shows e.g.: Jul 25 19:52:31 pc139 gdmchooser[2547]: CRITICAL: Could not get SIOCGIFFLAGS for ^\b Jul 25 19:52:31 pc139 gdmchooser[2547]: CRITICAL: Could not get SIOCGIFFLAGS for 8^R^C Expected results: no warnings in syslog Does this happen every time? yes Other information: The corresponding ioctl-call should fail silently. Nothing to see here, please move along (why not also print strerror(errno) while we are here?): --- gui/gdmchooser.c.orig +++ gui/gdmchooser.c @@ -727,7 +727,7 @@ /* paranoia */ ifreq.ifr_name[sizeof (ifreq.ifr_name) - 1] = '\0'; - if (ioctl (sock, SIOCGIFFLAGS, &ifreq) < 0) + if ((ioctl (sock, SIOCGIFFLAGS, &ifreq) < 0) && (errno != ENXIO)) gdm_common_error ("Could not get SIOCGIFFLAGS for %s", ifr[i].ifr_name); if ((ifreq.ifr_flags & IFF_UP) == 0 ||
Fixed in 2.20 branch.