[BusyBox 0001122]: ifupdown on non-existent interface segfaults, busybox-1.3
bugs at busybox.net
bugs at busybox.net
Tue Dec 19 22:06:25 UTC 2006
A NOTE has been added to this issue.
======================================================================
http://busybox.net/bugs/view.php?id=1122
======================================================================
Reported By: espakman
Assigned To: BusyBox
======================================================================
Project: BusyBox
Issue ID: 1122
Category: Networking Support
Reproducibility: always
Severity: minor
Priority: normal
Status: feedback
======================================================================
Date Submitted: 12-17-2006 12:10 PST
Last Modified: 12-19-2006 14:06 PST
======================================================================
Summary: ifupdown on non-existent interface segfaults,
busybox-1.3
Description:
When running ifup on a non-existent interface (but configured in
/etc/network/interfaces) gives a segfault. Revision 16646 seems to
introduce the segfault.
======================================================================
----------------------------------------------------------------------
vda - 12-18-06 11:57
----------------------------------------------------------------------
Show your /etc/network/interfaces please.
----------------------------------------------------------------------
vda - 12-18-06 13:00
----------------------------------------------------------------------
Try attached c.patch and let us know whether that works
----------------------------------------------------------------------
vda - 12-18-06 13:02
----------------------------------------------------------------------
c.patch applied in rev 16994, waiting for feedback
----------------------------------------------------------------------
espakman - 12-19-06 11:52
----------------------------------------------------------------------
The segfault is gone, but now the following message is displayed on every
interface:
"ifup: don't see to have all variables for ethx/inet"
(x is 0, 1, ..)
I think it's because of the "[[ ip ....%gateway% ]]". Removed extra spaces
w/o checking" change. But haven't tested it yet.
----------------------------------------------------------------------
espakman - 12-19-06 12:37
----------------------------------------------------------------------
Just tested and the "don't seem to have all variables" problem is not gone
with reverting the "Removed extra spaces w/o checking" part (although I'm
not sure why you did that).
----------------------------------------------------------------------
vda - 12-19-06 12:42
----------------------------------------------------------------------
>(although I'm not sure why you did that)
Because there is no reason why we should issue " ip ... " with leading
space, I think.
Show your /etc/network/interfaces. Please.
----------------------------------------------------------------------
espakman - 12-19-06 12:46
----------------------------------------------------------------------
My /etc/network/interfaces file:
# Loopback interface.
auto lo
iface lo inet loopback
# dhcp
auto eth0
iface eth0 inet dhcp
# fixed
auto eth1
iface eth1 inet static
address 192.168.1.254
netmask 255.255.255.0
broadcast 192.168.1.255
----------------------------------------------------------------------
bernhardf - 12-19-06 13:29
----------------------------------------------------------------------
1) add -a in the commands below, if you specify it please.
Just curious as to what libc are you using?
$ ifdown -v
$ ifup -v
----------------------------------------------------------------------
espakman - 12-19-06 14:05
----------------------------------------------------------------------
> Just curious as to what libc are you using?
Using uClibc-0.9.28
> $ ifdown -va
> $ ifup -v
I have to run it in Qemu, running it on my router will bring my connection
down and hard to repair (have to switch busybox too..). I will give the
differences in output between busybox-1.2.2.1 and 1.3.0 + your ifupdown
patch.
ifdown -va
with 1.3.0:
....
ip addr flush dev eth1
Nothing to flush.
ip link set eth1 down
with 1.2.2.1:
ip addr flush dev eth1
ip link set eth1 down
ifup -va
with 1.3.0:
......
ifup: don't seem to have all the variables for eth1/inet
with 1.2.2.1:
......
run-parts /etc/network/if-pre-up.d
ip addr add 192.168.1.254/24 broadcast 192.168.1.255 dev eth1 label eth1
ip link set eth1 up
run-parts /etc/network/if-up.d
The /etc/network/interfaces file is exactly the same in both cases.
----------------------------------------------------------------------
vda - 12-19-06 14:06
----------------------------------------------------------------------
Hmmm.... indeed. Looks like parse() returning "" and returning NULL
actually means different things! Attached (possibly fixed) ifup comes
further on my system:
# ./ifup eth1
run-parts: cannot open '/etc/network/if-pre-up.d': No such file or
directory
Please test-and-report and/or send me your entire /etc/network/*.
Issue History
Date Modified Username Field Change
======================================================================
12-17-06 12:10 espakman New Issue
12-17-06 12:10 espakman Status new => assigned
12-17-06 12:10 espakman Assigned To => BusyBox
12-18-06 11:57 vda Note Added: 0001877
12-18-06 13:00 vda File Added: c.patch
12-18-06 13:00 vda Note Added: 0001878
12-18-06 13:02 vda Note Added: 0001879
12-18-06 14:52 vda Status assigned => feedback
12-19-06 11:52 espakman Note Added: 0001886
12-19-06 12:37 espakman Note Added: 0001887
12-19-06 12:42 vda Note Added: 0001888
12-19-06 12:46 espakman Note Added: 0001889
12-19-06 13:29 bernhardf Note Added: 0001890
12-19-06 14:05 espakman Note Added: 0001891
12-19-06 14:06 vda Note Added: 0001892
======================================================================
More information about the busybox-cvs
mailing list