Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1372799 - regression in libnm serializing "cloned-mac-address" which causes failure to edit property in nmtui
regression in libnm serializing "cloned-mac-address" which causes failure to ...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: NetworkManager (Show other bugs)
7.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Thomas Haller
Desktop QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-09-02 14:09 EDT by Thomas Haller
Modified: 2016-11-03 15:29 EDT (History)
8 users (show)

See Also:
Fixed In Version: NetworkManager-1.4.0-5.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 15:29:55 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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2581 normal SHIPPED_LIVE Low: NetworkManager security, bug fix, and enhancement update 2016-11-03 08:08:07 EDT

  None (edit)
Description Thomas Haller 2016-09-02 14:09:01 EDT
The regression in libnm causes for example nmtui to be unable to edit the cloned-mac-address as NULL.



Reproduce:

Edit an ethernet or wifi connection that has "cloned-mac-address" unset.
Notice, as long as you don't touch the cloned-mac-address input text field in nmtui, you can successfully save the connection (by selecting "OK").
Once you edit the text field, you can no longer clear the value. If you enter an empty text (which should be a supported value), the server will reject saving the connection.




to quote the commit-message from the patch:

>>>

    libnm: fix regression serializing empty "cloned-mac-address"
    
    For "cloned-mac-address", the empty string "" is an invalid
    value that is rejected by verify().
    
    Commit 8eed671 changed how the property is serialized to D-Bus.
    Before, it was serialized using _nm_utils_hwaddr_to_dbus().
    For invalid or empty addresses, this would not serialize the
    value on D-Bus (or before commit 76aa6f8e0, it would create
    a bogus value with no array elements).
    
    With commit 8eed671, the cloned-mac-address gets also serialized
    as "assigned-mac-address" via _nm_utils_hwaddr_cloned_data_synth(),
    which would pass on invalid strings that the server would then reject.
    
    That breaks for example nmtui. Try editing a connection with
    "cloned-mac-address" set to NULL. Note, as long as you don't edit
    the cloned MAC address in nmtui, you can save the modification.
    Once you start modifying the entry, you can no longer set an empty
    MAC address as the server now receiveds the empty string as
    invalid. Thus, the "OK" button fails with
       Unable to save connection:
       802-3-ethernet.cloned-mac-address:
       is not a valid MAC address
    It also means, nmtui cannot modify the "cloned-mac-address" field to
    become empty.
    
    Fix that problem at various places by coercing "" to NULL.
Comment 1 Thomas Haller 2016-09-02 14:10:06 EDT
please review: th/empty-cloned-mac-address-rh1372799
Comment 3 Beniamino Galvani 2016-09-05 04:54:13 EDT
(In reply to Thomas Haller from comment #1)
> please review: th/empty-cloned-mac-address-rh1372799

LGTM
Comment 4 Francesco Giudici 2016-09-06 10:00:12 EDT
LGTM.

Maybe a tiny change in the comment:
         * field "assigned-mac-address"), libnm and _nm_utils_hwaddr_to_dbus
-        * would drop invalid values as it was unable to serialize them.
+        * would drop invalid values as they were unable to serialize them.
Comment 5 Thomas Haller 2016-09-06 10:07:35 EDT
(In reply to Francesco Giudici from comment #4)
> LGTM.
> 
> Maybe a tiny change in the comment:
>          * field "assigned-mac-address"), libnm and _nm_utils_hwaddr_to_dbus
> -        * would drop invalid values as it was unable to serialize them.
> +        * would drop invalid values as they were unable to serialize them.

thanks. Reworded it samewhat differently.
Comment 9 errata-xmlrpc 2016-11-03 15:29:55 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-2581.html

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