[PATCH] ifupdown - allow custom mac when using dhcp

Wade Berrier wberrier at gmail.com
Fri Aug 15 20:29:15 UTC 2008


On Thu, 2008-08-07 at 15:15 -0600, Wade Berrier wrote:
> Hi,
> 
> According to: http://www.annodex.net/cgi-bin/man/man2html?interfaces
> 
> it is possible to set a custom mac address when using dhcp.
> 
> The attached patch allows this for both 'ifconfig' and 'ip'.
> 
> Wade

Also is attached a patch to make 'ifdown' work.

Without this patch, ifdown doesn't bring down the interface.  So when do
you ifup after running ifdown, it tries to set the hwaddress and thus
fails.

This patch calls static_down in dhcp_down in order to properly bring
down the interface.

(Side note: I had to sleep for a bit because it appeared that bringing
down the interface too soon brought it right back up presumptuously
because udhcpc was still in the process of shutting down).

Wade
-------------- next part --------------
A non-text attachment was scrubbed...
Name: busybox-1.11.1-dhcp_hwaddress_ifdown.patch
Type: text/x-patch
Size: 2246 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20080815/827f8c70/attachment-0002.bin 


More information about the busybox mailing list