Bug 629644 - NetworkManager 0.8.1-4 always reset wireless MAC address despite user setting
Summary: NetworkManager 0.8.1-4 always reset wireless MAC address despite user setting
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Dan Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-02 15:02 UTC by Rajeesh
Modified: 2013-02-04 21:06 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-01 05:13:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Rajeesh 2010-09-02 15:02:20 UTC
Description of problem:
I need to change (spoof) MAC address of my WiFi card before able to connect to the network because of MAC address filtering. Doing "service NetworkManager stop; ifconfig wlan0 hw ether XX:XX:XX:XX:XX:XX; service NetworkManager start" used to work till NM 0.8.1-0.1.git20100510. Now NM is unable to connect to the WiFi network. Checking /var/log/messages says "NetworkManager[4661]: <info> (wlan0): reset MAC address to YY:YY:YY:YY:YY:YY" which is the original MAC address. Another "ifconfig wlan0" shows that the MAC address is indeed reset.

I have tried setting the MAC address in "Clone Address" field but of no help.

Version-Release number of selected component (if applicable):
0.8.1-4.git20100817

How reproducible:
Always

Steps to Reproduce:
1. service NetworkManager stop; ifconfig wlan0 hw ether XX:XX:XX:XX:XX:XX; service NetworkManager start
2. ifconfig wlan0 still shows original MAC address
3.
  
Actual results:
MAC address set by user is reset

Expected results:
MAC address set by user is preserved

Additional info:
Please ask if any additional info is required.
Relevant dmesg below:

Sep  2 19:19:27 phoenix NetworkManager[4661]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) complete.
Sep  2 19:19:27 phoenix NetworkManager[4661]: <info> Config: set interface ap_scan to 1
Sep  2 19:19:27 phoenix NetworkManager[4661]: <info> (wlan0): supplicant connection state:  scanning -> disconnected
Sep  2 19:19:27 phoenix NetworkManager[4661]: <info> (wlan0): supplicant connection state:  disconnected -> associating
Sep  2 19:19:43 phoenix NetworkManager[4661]: <warn> (wlan0): link timed out.
Sep  2 19:19:46 phoenix NetworkManager[4661]: <info> (wlan0): device state change: 5 -> 3 (reason 39)
Sep  2 19:19:46 phoenix NetworkManager[4661]: <info> (wlan0): deactivating device (reason: 39).
Sep  2 19:19:46 phoenix NetworkManager[4661]: <info> (wlan0): reset MAC address to YY:YY:YY:YY:YY:YY
Sep  2 19:19:46 phoenix kernel: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Sep  2 19:22:41 phoenix NetworkManager[4661]: user_connection_updated_cb: assertion `old_connection != NULL' failed

Comment 1 Jirka Klimes 2010-09-03 08:36:59 UTC
NetworkManager supports MAC spoofing feature now. The 'Cloned MAC address' box is designed for that.
Unfortunately, there is an issue in wpa_supplicant with *WPA* WiFi connections. A patch has been prepared for wpa_suplicant, but still not applied.
See bug 447827 for more info.
You could try a hack temporarily: http://markmail.org/message/5ary4cvzlirvro73

Comment 2 Rajeesh 2010-09-04 07:05:28 UTC
Hi Jirka,

I've missed to mention that this happens on *WEP* network, not WPA. Restarting NM *after* 'ifconfig wlan0 hw ether' should make wpa_supplicant to take the new HW_ADDR, right?

Comment 3 Jirka Klimes 2010-09-06 09:12:53 UTC
Well, you are lucky using WEP for MAC spoofing use case.
MAC cloning feature in the NetworkManager works out-of-box for both WiFi WEP and wired connections without any need for messing with ifconfig or other commands.

So, you should just fill your desired MAC to the 'Cloned MAC address' box in the 'Wireless' tab of your connection and that's it. Then when you activate the connection, the MAC will be set on the interface; on disconnecting the interface will be reset with the permanent MAC again.

(The hack was just for WPA WiFi connections).

Comment 4 Rajeesh 2010-09-07 19:02:07 UTC
Tested NetworkManager-0.8.1-4.git20100817 again for WEP network, and "Cloned MAC Address" works perfectly.

It would be nice to have if NM respects "ifconfig wlan0 hw ether" also.

Comment 5 Jirka Klimes 2010-10-04 09:04:56 UTC
Now NM reads MAC it sees on interfaces when it starts. Then when it disconnects it resets this MAC.

Upstream fix is:
358261ccd9d1cf4b97969136d657e7c49be52bc3 (master)
33c09a99453528a8bf4d9c7aa0dcf2e8946de6ef (NM_0_8)

Comment 6 Rajeesh 2010-10-04 10:48:14 UTC
Awesome.

I'll build the RPMs and test it out - or is there a plan to update NM 0.8 in F13?

Comment 7 Bug Zapper 2011-05-31 14:41:40 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 Rajeesh 2011-06-01 05:13:39 UTC
Using NetworkManager 0.8.999-3.git20110526 on F15, this bug is fixed. Hence closing the bug (guess that is okay).


Note You need to log in before you can comment on or make changes to this bug.