On Tue, Sep 20, 2016 at 5:44 PM, Martin Townsend
<mtownsend1...@gmail.com> wrote:
>>> +++ busybox-1.24.1/networking/ifupdown.c 2016-09-06 13:39:59.288380571 +0100
>>> @@ -501,7 +501,7 @@
>>>  {
>>>   int result;
>>>  # if ENABLE_FEATURE_IFUPDOWN_IP
>>> - result = execute("ip addr flush dev %iface%", ifd, exec);
>>> + result = execute("ip addr flush dev %iface% [[ label %label%]]", ifd, 
>>> exec);
>>>   result += execute("ip link set %iface% down", ifd, exec);
>>>  # else
>>>   /* result = execute("[[route del default gw %gateway% %iface%]]",
>>> ifd, exec); */
>>
>> This looks correct, applied to git.
>>
>> However, the entire ifup/down thing is a bad idea.
>> It's too inflexible. I suggest using something else.
>
> I'm using ifplugd which uses ifup/down it does seem to now work but
> out of interest what are the alternatives? and I will take a look at
> them as I have to support an Ethernet gadget interface soon so I have
> the option of moving to something different.

Everyone seems to be inventing their own ways of dealing with
the problem of setting up complex networks.

Fedora has it's (in)famous NetworkManager. I'm not too familiar with that.

I dealt with it by hooking necessary daemons into the service manager
I use, runsvdir.

General idea is described here:
https://busybox.net/~vda/no_ifup.txt

Implementation details: some examples of my runsvdir setup are
in examples/var_service/* in busybox source tree. See README file there.

Specific examples in subdirectories are:
- DHCP configured interface
- interface watched by ifplugd (plug/unplug detection, DHCP does not do that)
- add/maintain a ZeroConf IP address
- watchdog service which tests (pings router) and resets iface
- "reconfigure me" one-shot "service" which handles the case when
  IP is static (and more: it is used by other networking services;
  also it configures iptables)

They can all be present at once, or only a subset of them.

I probably need to add a WPA supplicant service example. I used to use
openvpn, ppp, and vpnc-managed connections similarly to dhcp
(by creating a service for them).
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to