PyIface icon indicating copy to clipboard operation
PyIface copied to clipboard

MAC address change references non-existent sin_addr

Open blayne opened this issue 11 years ago • 1 comments

Thanks for the fantastic module!

I run into an issue when attempting to change the MAC address on an interface. Can you tell me about the code path you expected this to follow? I see that sockaddr_dl wasn't used. Is this functionality still pending?

Traceback (most recent call last): File "", line 1, in File "/root/ConfigApp/speedy/lib/python2.7/site-packages/pyiface/iface.py", line 295, in hwaddr ifr.data.ifr_hwaddr.sin_addr.s_addr = val AttributeError: 'sockaddr' object has no attribute 'sin_addr'

blayne avatar Jul 03 '14 23:07 blayne

Hello Blayne.

Always nice to hear someone likes the module. Looks like a bug in my code. Obviously a problem with the structures. I will look into it soon. In the meantime if you figure it out feel free to send me a patch.

Currently the module is very linux specific. What kernel version are you using.

2014-07-04 2:04 GMT+03:00 Blayne [email protected]:

Thanks for the fantastic module!

I run into an issue when attempting to change the MAC address on an interface. Can you tell me about the code path you expected this to follow? I see that sockaddr_dl wasn't used. Is this functionality still pending?

Traceback (most recent call last): File "", line 1, in File "/root/ConfigApp/speedy/lib/python2.7/site-packages/pyiface/iface.py", line 295, in hwaddr ifr.data.ifr_hwaddr.sin_addr.s_addr = val AttributeError: 'sockaddr' object has no attribute 'sin_addr'

— Reply to this email directly or view it on GitHub https://github.com/bat-serjo/PyIface/issues/3.

bat-serjo avatar Jul 07 '14 10:07 bat-serjo