busybox/networking
Stefan Agner 2adaa90534 ifplugd: if SIOCSIFFLAGS fails with EADDRNOTAVAIL, don't die
When using ifplugd on a RNDIS interface with monitor mode, using
SIOCSIFFLAGS seems to fail with EADDRNOTAVAIL. Treat it the same
as if iface disappeared again.

This has been observed on a Tegra TK1 using Linux 4.14. There seem
to be a race when the kernel is creating the device:
  ifplugd(usb0): started: BusyBox v1.24.1 (2018-03-27 09:47:48 CEST)
  ifplugd(usb0): interface doesn't exist, waiting
  ifplugd(usb0): interface appeared
  ifplugd(usb0): upping interface
  ifplugd(usb0): setting interface flags failed: Cannot assign requested address
  <exit>

With this patch ifplugd is successful in upping the device the second
time around:

  ifplugd(usb0): upping interface
  ifplugd(usb0): using SIOCETHTOOL detection mode
  ifplugd(usb0): interface appeared
  ifplugd(usb0): upping interface
  ifplugd(usb0): setting interface flags failed: Cannot assign requested address
  ifplugd(usb0): interface appeared
  ifplugd(usb0): upping interface
  ifplugd(usb0): using SIOCETHTOOL detection mode
  ifplugd(usb0): link is up
  ifplugd(usb0): executing '/etc/ifplugd/ifplugd.usb.action usb0 up'
  ifplugd up
  ifplugd(usb0): exit code: 0

function                                             old     new   delta
up_iface                                             120     127      +7

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-03-29 18:45:11 +02:00
..
2017-07-21 09:50:55 +02:00
2018-02-11 21:16:24 +01:00
2017-08-06 20:14:02 +02:00
2017-07-21 09:50:55 +02:00
2017-07-21 09:50:55 +02:00
2018-02-06 15:48:12 +01:00
2013-01-14 01:34:48 +01:00
2018-03-06 18:11:47 +01:00
2018-03-08 16:06:18 +01:00
2017-08-08 21:55:02 +02:00
2017-07-21 09:50:55 +02:00
2014-01-09 20:09:43 +01:00
2017-08-08 21:55:02 +02:00
2017-07-21 09:50:55 +02:00
2016-03-04 07:36:04 +01:00
2017-08-08 21:55:02 +02:00
2017-08-08 21:55:02 +02:00
2018-03-20 11:41:51 +01:00
2018-02-08 08:42:37 +01:00
2017-08-08 21:55:02 +02:00
2017-12-31 17:30:02 +01:00
2017-04-03 21:53:29 +02:00
2017-01-19 15:51:00 +01:00
2017-01-19 15:51:00 +01:00
2018-02-14 17:37:41 +01:00
2017-07-15 17:13:08 +02:00
2017-08-08 21:55:02 +02:00