mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-19 13:48:06 +00:00
Prevent "SIOCSIFHWADDR: Device or resource busy" when trying to change mac address
SVN-Revision: 13258
This commit is contained in:
parent
8a0ac9897f
commit
789848d327
@ -232,6 +232,7 @@ setup_interface() {
|
||||
config_get mtu "$config" mtu
|
||||
config_get macaddr "$config" macaddr
|
||||
grep "$iface:" /proc/net/dev > /dev/null && \
|
||||
$DEBUG ifconfig "$iface" down && \
|
||||
$DEBUG ifconfig "$iface" ${macaddr:+hw ether "$macaddr"} ${mtu:+mtu $mtu} up
|
||||
set_interface_ifname "$config" "$iface"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user