Bug 1010387 - NetworkManager forgets wireless networks when HWADDR changes
NetworkManager forgets wireless networks when HWADDR changes
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: NetworkManager (Show other bugs)
18
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Dan Williams
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-20 12:30 EDT by CJ Kucera
Modified: 2013-10-07 11:52 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-07 07:13:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description CJ Kucera 2013-09-20 12:30:01 EDT
Description of problem:

When NetworkManager stores wireless networks, it includes the MAC address of the adapter in the HWADDR field inside /etc/sysconfig/network-scripts/ifcfg-*.  Because of this, if your wireless adapter's MAC changes, NetworkManager will "forget" all of your wireless networks, and you'll have to put in your WPA2 keys again, etc.  That's easy enough to recover with sed (or whatever) but if NetworkManager would instead omit the HWADDR field entirely, wireless networks would be available regardless of the adapter.

Version-Release number of selected component (if applicable):

NetworkManager-0.9.8.2-1.fc18.x86_64

Steps to Reproduce:
1. Authenticate to a wireless network which requires a passphrase
2. systemctl stop NetworkManager.service
3. Change your wireless MAC via whatever method (hardware swap or otherwise)
4. systemctl start NetworkManager.service

Actual results:

Wireless network is no longer remembered, /etc/sysconfig/network-scripts/ifcfg-<essid> contains a HWADDR line with the original MAC.

Expected results:

Wireless networks should still be remembered.

Additional info:

I can see how MAC address tracking could be useful in a number of circumstances, but I'm not sure it makes sense for wireless networks.  What's in the air is in the air regardless of the adapter you're using to get to it.
Comment 1 Jirka Klimes 2013-10-07 07:13:47 EDT
HWADDR variable in ifcfg-* file corresponds to "Device MAC address" in nm-connection-editor. The field is used to "lock" particular connection with a Wi-Fi device.
If you create a connection using nm-connection-editor, the field is empty by default, which means the connection can be used with any compatible device.
However, when the connection is created first time by clicking a Wi-Fi network in nm-applet, nm-applet creates (*and* activates) a connection that is "locked" to the device. But you can easily edit that "Auto blahblah" connection in nm-connection-editor and remove "Device MAC address" if you prefer.
Comment 2 CJ Kucera 2013-10-07 09:27:31 EDT
Is that really a sensible default, though?  Who, when connecting to a wifi network, actually wants that connection to be locked to that particular wifi adapter?  I have a hard time thinking of a situation where that would be the case.  I suppose it's nice that there's a way to disassociate it via the nm-applet GUI, but in the event of an adapter swap, asking a user to manually go in and disassociate every single wifi network they might care about seems hardly ideal (and a mass 'sed' like the one I used would be far more efficient).

I won't keep harping on it, 'cause it's not really that big of a deal, especially given Fedora's short life cycle, but IMO the *default* for a wireless network should be to omit the HWADDR, rather than requiring a user to have the foresight to modify every single wifi connection they encounter.
Comment 3 Dan Williams 2013-10-07 11:52:24 EDT
Unlocked connections have a number of problems, two off the top of my head:

1) wifi device and driver capabilities can be quite different; if you have your connection set up for a network with specific requirements and then change your device, the old connection may fail to work and you'll have no idea why

2) unlocked connections apply to all wifi devices; which means if you plug two devices into your system, both devices will immediately connect to the same wifi network.  This is almost always unexpected and not the intention of the user.

Most users do not change the wifi adapter, or change it quite rarely.  Changing hardware is not a minor event and thus some system changes can also be expected.  Basically, locking is the lesser of two evils is most situations and this is the direction we've chosen.

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