httpd: fix handling of range requests
[oweals/busybox.git] / networking / ifplugd.c
index 28c49e218866b1221fe0da2aeac9bb0e77ab3721..4f8a274b0afde8ed45d6b54e13914c1c390e3dc1 100644 (file)
@@ -6,6 +6,16 @@
  *
  * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  */
+//config:config IFPLUGD
+//config:      bool "ifplugd"
+//config:      default y
+//config:      select PLATFORM_LINUX
+//config:      help
+//config:        Network interface plug detection daemon.
+
+//applet:IF_IFPLUGD(APPLET(ifplugd, BB_DIR_USR_SBIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_IFPLUGD) += ifplugd.o
 
 //usage:#define ifplugd_trivial_usage
 //usage:       "[OPTIONS]"
@@ -358,8 +368,12 @@ static void up_iface(void)
                ifrequest.ifr_flags |= IFF_UP;
                /* Let user know we mess up with interface */
                bb_error_msg("upping interface");
-               if (network_ioctl(SIOCSIFFLAGS, &ifrequest, "setting interface flags") < 0)
-                       xfunc_die();
+               if (network_ioctl(SIOCSIFFLAGS, &ifrequest, "setting interface flags") < 0) {
+                       if (errno != ENODEV)
+                               xfunc_die();
+                       G.iface_exists = 0;
+                       return;
+               }
        }
 
 #if 0 /* why do we mess with IP addr? It's not our business */