Bug 12706 - ifupdown: remove interface from state_list if iface_up fails
Summary: ifupdown: remove interface from state_list if iface_up fails
Status: RESOLVED INVALID
Alias: None
Product: Busybox
Classification: Unclassified
Component: Networking (show other bugs)
Version: 1.31.x
Hardware: All Linux
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-27 09:49 UTC by mingli.yu
Modified: 2020-03-31 02:39 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mingli.yu 2020-03-27 09:49:58 UTC
The interface is set to the configured state even if
configuration has been failed

#  ifup eth1
Internet Systems Consortium DHCP Client 4.4.2
Copyright 2004-2020 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

[  506.720497] e1000: eth1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
[  506.754841] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
Listening on LPF/eth1/52:54:00:12:34:56
Sending on   LPF/eth1/52:54:00:12:34:56
Sending on   Socket/fallback
Created duid "\000\001\000\001&\020\210BRT\000\0224V".
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 17
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

#  ifup eth1
ifup: interface eth1 already configured
#
Comment 1 mingli.yu 2020-03-27 14:29:18 UTC
And Test on another host which also installed with BusyBox v1.31.1

# ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:1E:67:65:8D:9D
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:2551 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3983 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:617252 (602.7 KiB)  TX bytes:1347016 (1.2 MiB)
          Memory:d0940000-d095ffff

# ifup -v eth1
run-parts /etc/network/if-pre-up.d
run-parts: /etc/network/if-pre-up.d: No such file or directory
ip link set eth1 up
udhcpc -R -b -p /var/run/udhcpc.eth1.pid -i eth1
udhcpc: started, v1.31.1
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending discover
udhcpc: no lease, forking to background
run-parts /etc/network/if-up.d
run-parts: /etc/network/if-up.d: No such file or directory

# ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:1E:67:65:8D:9D
          inet6 addr: fe80::21e:67ff:fe65:8d9d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2554 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3997 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:618248 (603.7 KiB)  TX bytes:1348510 (1.2 MiB)
          Memory:d0940000-d095ffff

# ifup -v eth1
ifup: interface eth1 already configured
Comment 2 mingli.yu 2020-03-31 02:39:12 UTC
Maybe it is not issue as it indicate "udhcpc: no lease, forking to background" in the first run, so it makes sense get "ifup: interface eth1 already configured" if rerun "ifup eth1".