1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## ifstate_exact_check.dpatch by Eduard Bloch <blade@debian.org>
4 ## DP: Check the state of the interface with SIOCGIFFLAGS instead of traversing the SIOCGIFCONF output, also checking the link state more exactly (Debian bug #563371)
7 Index: icewm-1.3.7~pre2/src/apppstatus.cc
8 ===================================================================
9 --- icewm-1.3.7~pre2.orig/src/apppstatus.cc 2010-04-28 21:00:30.000000000 +0200
10 +++ icewm-1.3.7~pre2/src/apppstatus.cc 2010-04-29 22:11:16.961086255 +0200
15 - char buffer[32 * sizeof(struct ifreq)];
23 - int s = socket(PF_INET, SOCK_STREAM, 0);
25 + int s = socket(PF_INET, SOCK_STREAM, 0);
29 +#if BROWSE_SIOCGIFCONF_LIST
30 + char buffer[32 * sizeof(struct ifreq)];
34 ifc.ifc_len = sizeof(buffer);
36 if (ioctl(s, SIOCGIFCONF, &ifc) < 0) {
43 + fNetDev.copy(ifr.ifr_name, IFNAMSIZ-1);
44 + bool bUp = (ioctl(s, SIOCGIFFLAGS, &ifr) >= 0 && (ifr.ifr_flags & IFF_UP));