Bug in bb 1.5.0 ifupdown applet
Denis Vlasenko
vda.linux at googlemail.com
Tue May 1 17:38:48 PDT 2007
On Tuesday 01 May 2007 02:27, Nathan Angelacos wrote:
> Hello,
>
> The ifupdown applet in 1.5.0 appears to have a bug that was not present
> in 1.4.1. The bug is that /var/run/ifstate is not updated with all
> interfaces if an interface stanza calls ifup statement to bring up a
> second interface.
1.4.1 never reads /var/run/ifstate. It only writes it.
So I highly doubt that 1.4.1 was better than 1.5.0.
Most likely it was broken in a different way.
Anyway, I'm attaching full diff between 1.4.1 and current svn
for easy reference.
> Given the following interfaces file:
>
> iface lo inet static
> address 127.0.0.1
> netmask 255.0.0.0
> up ifup tunl
> down ifdown tunl
>
> iface tunl inet manual
> up modprobe ipip || true
> up ip tun add tunl mode ipip local 127.0.0.1 remote 192.168.0.1
> up ip link set tunl up
> down ip link set tunl down
> down ip tunl del
So you configured "ifup lo" to spawn another: "ifup tunl".
> "ifup lo" correctly brings up lo and the tunl interface. However,
> /var/run/ifstate only lists "lo=lo".
>
> An strace for "ifup lo" shows:
>
> 1. the "parent" ifup reads /var/run/ifstate
> 2. the "parent" forks to run the child ifup
> 2. the "child" ifup reads /var/run/ifstate
> 3. the "child" writes its interface to /var/run/ifstate
> 4. the "child" exits
> 5. the "parent" writes its interface to /var/run/ifstate, using the info
> from step 1
>
> That is, the parent does not re-read ifstate before writing.
You can attempt to go after these solutions:
(a) provide a patch for ifupdown to read/write
/var/run/ifstate AFTER child if done.
(b) stop using ifup for network configuration, as it is unable
to cover more complex cases anyway (like firewalls, traffic shaping etc).
--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ifup_1.4.1-svn.diff
Type: text/x-diff
Size: 4297 bytes
Desc: not available
Url : http://busybox.net/lists/busybox/attachments/20070502/d74ff92c/attachment.bin
More information about the busybox
mailing list