From: Roy Marples Date: Tue, 3 Jun 2008 22:21:51 +0000 (+0000) Subject: We should not be setting IFF_RUNNING - that's the job of the interface driver. X-Git-Tag: v4.0.2~299 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc7fc61240c85d07a4fa1cf5bb3584ef310be911;p=thirdparty%2Fdhcpcd.git We should not be setting IFF_RUNNING - that's the job of the interface driver. --- diff --git a/net.c b/net.c index 7b3f73b1..1a05f91e 100644 --- a/net.c +++ b/net.c @@ -340,6 +340,7 @@ read_interface(const char *ifname, _unused int metric) goto eexit; } + /* Bring the interface up if it's down */ strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); #ifdef __linux__ /* We can only bring the real interface up */ @@ -348,9 +349,8 @@ read_interface(const char *ifname, _unused int metric) #endif if (ioctl(s, SIOCGIFFLAGS, &ifr) == -1) goto eexit; - - if (!(ifr.ifr_flags & IFF_UP) || !(ifr.ifr_flags & IFF_RUNNING)) { - ifr.ifr_flags |= IFF_UP | IFF_RUNNING; + if (!(ifr.ifr_flags & IFF_UP)) { + ifr.ifr_flags |= IFF_UP; if (ioctl(s, SIOCSIFFLAGS, &ifr) != 0) goto eexit; }