summaryrefslogtreecommitdiffstats
path: root/meta/conf
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2017-09-13 14:01:07 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-13 22:07:42 +0100
commit4dc8f4fbf52c50a56e01aead6dec35194b613ddb (patch)
tree5e3c4afcc6824ff44b5cdb24f2967738eeaa54b1 /meta/conf
parent597b1aaafc6619c313eef9c0417e465f5cb912fd (diff)
downloadpoky-4dc8f4fbf52c50a56e01aead6dec35194b613ddb.tar.gz
busybox: using ip instead of ifconfig for ifup/ifdown
There is an issue for requesting dynamic IP with ifup/ifdown command when using dhclient. Steps to reproduce: 1. Build a full-cmdline image and install dhcp-client as the default DHCP client. 2. Configure a static IP for eth0 in /etc/networking/interfaces and reboot. $ ifconfig eth0 eth0 inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0 $ ifdown eth0 3. Modify /etc/networking/interfaces to configure a dynamic IP for eth0 $ ifup eth0 $ ifconfig eth0 eth0 inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0 You could see the eth0 still has a static IP. But actually it also has a dynamic IP: $ ip addr show eth0 eth0: inet 192.168.1.2/24 brd 192.168.1.255 scope global eth0 inet 128.224.162.173/23 brd 128.224.163.255 scope global eth0 The root cause is the ifdown invokes "ifconfig" to down the eth0 but doesn't remove its IP. The dhclient would invoke "ip" to configure the interface. It can not remove an IP from down interface with "ip addr flush" and "ip addr add" command can set multiple IPs on one interface. To fix this issue, we should use the "ip" command to implement ifup/ifdown, rather than using the older "ifconfig". It will flush the IP before down the interface. (From OE-Core rev: 4304ed013a015bfb6f054017cb273578b874b4c2) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/conf')
0 files changed, 0 insertions, 0 deletions