[PATCH] ifplugd: Allow ENODEV when upping interface for -M

Jate Sujjavanich jatedev at gmail.com
Thu Aug 11 15:21:15 UTC 2016


The following changes since commit 150dc7a2b483b8338a3e185c478b4b23ee884e71:

  ntpd: respond only to client and symmetric active packets (2016-08-01
20:25:06 +0200)

are available in the git repository at:

  https://github.com/jatedev/busybox work-ifplugd-device-detect

for you to fetch changes up to a5d29d0cc0ff79214465a66fc8cd49757bf72064:

  ifplugd: Allow ENODEV when upping interface for -M (2016-08-11 11:09:21
-0400)

----------------------------------------------------------------
Jate Sujjavanich (1):
      ifplugd: Allow ENODEV when upping interface for -M

 networking/ifplugd.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/networking/ifplugd.c b/networking/ifplugd.c
index 28c49e2..67251ae 100644
--- a/networking/ifplugd.c
+++ b/networking/ifplugd.c
@@ -359,7 +359,11 @@ static void up_iface(void)
                /* 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 (errno == ENODEV) {
+                               G.iface_exists = 0;
+                               return;
+                       } else
+                               xfunc_die();
        }

 #if 0 /* why do we mess with IP addr? It's not our business */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20160811/abd60125/attachment.html>


More information about the busybox mailing list