Created attachment 1240720 [details] Example keyfile Description of problem: I recently upgraded from Fedora 24 to 25, and when I open one of my previously created Wi-Fi connections in nm-connection-editor, the "Save" button is disabled. It looks like the problem is that the "Cloned MAC address" field is set to "permanent"; if I clear the field, then I can save. It looks like this happens because the keyfile does not contain the wifi.mac-address-randomization property, so the code at https://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/libnm-core/nm-keyfile-reader.c?id=1.4.2#n1324 is setting wifi.mac-address-randomization to NEVER, which causes the code at https://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/libnm-core/nm-connection.c?id=1.4.2#n900 to set wifi.cloned-mac-address to "permanent". I know the configuration format for MAC address cloning has changed in NetworkManager 1.4 (https://blogs.gnome.org/thaller/2016/08/26/mac-address-spoofing-in-networkmanager-1-4-0/) and I'm not sure how this is supposed to work or whether the NetworkManager or network-manager-applet component should be blamed. For connections created in Fedora 25, wifi.mac-address-randomization is set to DEFAULT (0) in the keyfile and the problem doesn't occur. Version-Release number of selected component (if applicable): NetworkManager-1.4.2-2.fc25 network-manager-applet-1.4.0-1.fc25 How reproducible: Always Steps to Reproduce: 1. Save the attached keyfile (based on one I actually had before the F25 upgrade) to /etc/NetworkManager/system-connections and restart NetworkManager. 2. Open the "test" connection in nm-connection-editor. Actual results: The "Cloned MAC address" field says "permanent" and the "Save" button is disabled. Expected results: The "Save" button is enabled. I'm not sure what the "Cloned MAC address" field should say.
thanks for the analysis. It is wrong that keyfile reader sets mac-address-randomization in absence of the field. That is fixed upstream: master: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=46d53e11012c047e09d04f663c1c36e6c47dc298 nm-1-4: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=2a960d3936d78087d74ba556df8ac808639c96a0 This causes old keyfiles (that pre-date mac-address-randomization property) to be interpreted as wifi.mac-address-randomization=1 wifi.cloned-mac-address=permanent as they don't specify one of the settings explicitly. It's not too bad, because adding a new property obviously needs that we choose some value in those old connections. "permanent" is not too bad as a default value, because that is also what old versions of NetworkManager did implicitly. So, on upgrade, NetworkManager still behaves the same. Better would be of course to leave the value unspecified. Because: - we changed the default value to no longer mean "permanent" but "preserve". So, leaving the value unspecified, allows for the desired(?) change in behavior (https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=fae5ecec5a4d9987a1915441602cb78275a9f490) - it allows the default value to be overwritten by global connection defaults (https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=8eed67122c58540360b617eb42d5df8328e21b5d) Another problem is that nm-connection-editor doesn't know how to handle the special values like cloned-mac-address=permanent. It's not too bad however, because the user can delete the word "permanent" and use nm-c-e to edit the connection. Of course, he is unable to save those unsupported values, but for that he can use nmcli or nmtui. (this is TODO)
(In reply to Thomas Haller from comment #1) > - we changed the default value to no longer mean "permanent" but > "preserve". So, leaving the value unspecified, allows for the desired(?) > change in behavior > (https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/ > ?id=fae5ecec5a4d9987a1915441602cb78275a9f490) (btw, the change of the final fallback for the default value of cloned-mac-adress from "permanent" to "preserve" will be part of 1.6.0. It will not reach Fedora 25 (but Fedora 26+).
So is the idea that https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=2a960d3936d78087d74ba556df8ac808639c96a0 will be released to Fedora 25 and this bug will go away as a consequence?
NetworkManager-1.4.4-3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-3b8bd593c7
(In reply to Matt McCutchen from comment #3) > So is the idea that > https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/ > ?id=2a960d3936d78087d74ba556df8ac808639c96a0 will be released to Fedora 25 > and this bug will go away as a consequence? Correct. Please try NetworkManager-1.4.4-3.fc25. Thanks.
Verified that NetworkManager-1.4.4-3.fc25 fixes this bug for me.
NetworkManager-1.4.4-3.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-3b8bd593c7
(In reply to Thomas Haller from comment #1) > Another problem is that nm-connection-editor doesn't know how to handle the > special values like cloned-mac-address=permanent. > (this is TODO) Fixed upstream with commit: https://git.gnome.org/browse/network-manager-applet/commit/?id=85b6b659a140a59c3df787062e089a0b4e2a547d
NetworkManager-1.4.4-3.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.
I am bitten by the same bug. I don't think it is fully fixed. Now I know I can delete the text "permanent" in "Cloned MAC" field to make changes able to "Save". However, every time I save the changes (with an empty Cloned MAC), "MACADDR=permanent" still gets written to the ifcfg-SSID file, and next time I want to edit the connection, I need to delete "permanent" again... This is quite annoying. Besides, it is confusing to not able to "Save" in the GUI because of this automatic generated entry. Finally, why is the bug still ON_QA after so many months?
(In reply to Alick Zhao from comment #10) > I am bitten by the same bug. I don't think it is fully fixed. you don't say which version of NetworkManager/nm-connection-editor you are using. On Fedora25, the patch https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=7f63c875f973f3b7cc136130c61348b36e280ab6 is not present. That could cause what you describe. Probably the workaround is to reset wifi.mac-address-randomization: https://mail.gnome.org/archives/networkmanager-list/2017-January/msg00061.html
(In reply to Thomas Haller from comment #11) > (In reply to Alick Zhao from comment #10) > > I am bitten by the same bug. I don't think it is fully fixed. > > you don't say which version of NetworkManager/nm-connection-editor you are > using. Sorry I forgot to mention, but this is a fully updated Fedora 25 laptop: NetworkManager-1.4.4-5.fc25 network-manager-applet-1.4.0-1.fc25 (contains nm-connection-editor) > > On Fedora25, the patch > https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/ > ?id=7f63c875f973f3b7cc136130c61348b36e280ab6 is not present. That could > cause what you describe. > I think so. Would be good to make it a patch for fc25. > Probably the workaround is to reset wifi.mac-address-randomization: > https://mail.gnome.org/archives/networkmanager-list/2017-January/msg00061. > html I agree, and will test when I have access to the laptop.
NetworkManager-1.4.6-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-a2f2ef5a3c
please try NetworkManager-1.4.6-1.fc25
NetworkManager-1.4.6-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-a2f2ef5a3c
(In reply to Thomas Haller from comment #14) > please try NetworkManager-1.4.6-1.fc25 Seems fixed with this version. Thanks!
NetworkManager-1.4.6-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.