]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
We should not be setting IFF_RUNNING - that's the job of the interface driver.
authorRoy Marples <roy@marples.name>
Tue, 3 Jun 2008 22:21:51 +0000 (22:21 +0000)
committerRoy Marples <roy@marples.name>
Tue, 3 Jun 2008 22:21:51 +0000 (22:21 +0000)
net.c

diff --git a/net.c b/net.c
index 7b3f73b1c51e88e05059caf00d8f9d41d28c32b2..1a05f91e6ae5b2d5c7dfaddba807866e87735d76 100644 (file)
--- 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;
        }