mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 18:30:11 +01:00
Currently both bridge.mac-address and ethernet.cloned-mac-address get written to the same MACADDR ifcfg-rh variable; the ethernet property wins if both are present. When one property is set and the connection is saved (and thus reread) both properties are populated with the same value. This is wrong because, even if the properties have the same meaning, the setting plugin should not read something different from what was written. Also consider that after the following steps: $ nmcli con mod c ethernet.cloned-mac-address 00:11:22:33:44:55 $ nmcli con mod c ethernet.cloned-mac-address "" the connection will still have the new mac address set in the bridge.mac-address property, which is certainly unexpected. In general, mapping multiple properties to the same variable is harmful and must be avoided. Therefore, let's use a different variable for bridge.mac-address. This changes behavior, but not so much: - connections that have MACADDR set will behave as before; the only difference will be that the MAC will be present in the wired setting instead of the bridge one; - initscripts compatibility is not relevant because MACADDR for bridges was a NM extension; - if someone creates a new connection and sets bridge.mac-address NM will set the BRIDGE_MACADDR property instead of MACADDR. But this shouldn't be a big concern as bridge.mac-address is documented as deprecated and should not be used for new connections. https://bugzilla.redhat.com/show_bug.cgi?id=1516659 |
||
|---|---|---|
| .. | ||
| tests | ||
| nm-ifcfg-rh.conf | ||
| nm-ifcfg-rh.xml | ||
| nms-ifcfg-rh-common.h | ||
| nms-ifcfg-rh-connection.c | ||
| nms-ifcfg-rh-connection.h | ||
| nms-ifcfg-rh-plugin.c | ||
| nms-ifcfg-rh-plugin.h | ||
| nms-ifcfg-rh-reader.c | ||
| nms-ifcfg-rh-reader.h | ||
| nms-ifcfg-rh-utils.c | ||
| nms-ifcfg-rh-utils.h | ||
| nms-ifcfg-rh-writer.c | ||
| nms-ifcfg-rh-writer.h | ||
| shvar.c | ||
| shvar.h | ||