[Xorp-hackers] Patch for a netlink problem: Can't set MAC address

Rick Balocca rbalocca at vyatta.com
Tue Aug 1 14:08:21 PDT 2006


In fea/ifconfig_set_netlink.cc , there is code that attempts to set interface MAC addresses.  This code fails to work correctly because the netlink payload that it sends is a simple MAC address.  The kernel code is looking for a struct sockaddr.

One odd-ball thing is that the payload length (rta_len) must be truncated.  It must be set to the sizeof sa_family+mac_address_length rather than the larger, and more correct, sizeof sockaddr .
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20060801/4f5df01a/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ifconfig_set_netlink.cc.patch
Type: application/octet-stream
Size: 1500 bytes
Desc: not available
Url : http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20060801/4f5df01a/attachment.obj 


More information about the Xorp-hackers mailing list