Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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 3Beniamino Galvani
2016-09-05 08:54:13 UTC
(In reply to Thomas Haller from comment #1)
> please review: th/empty-cloned-mac-address-rh1372799
LGTM
Comment 4Francesco Giudici
2016-09-06 14:00:12 UTC
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.
(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.
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
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.