GNOME Bugzilla – Bug 740681
adding bridge slave with default bridge-port values fails
Last modified: 2014-11-25 17:42:05 UTC
When a bridge connection is being added in nm-connection-editor, it is not possible to create a slave with default values in "Bridge Port" tab. 1. run nm-connection-editor 2. click Add button, select Bridge type and click "Create..." 3. click Add to add a slave profile (click Create... in the type dialog) 4. click Save to finish the slave dialog 5. "Connection add failed", "bridge-port: slave-type 'bridge' requires a 'bridge-port' setting in the connection" error appears If a value is changed in "Bridge Port" tab, the slave profile is successfully created.
The problem is that nm-connection-editor still uses libnm-util. The library serializes the connection to hashes for DBus. But if a setting has all default values, it is left out. This is the case for NMSettingBridgePort setting. The fix is in branch jk/bridge-slave-fix.
Yeah. The commit message should mention that libnm already behaves this way (since 6325c596c093e34d290604e2ef24219427a1078d) Also, I don't know if you really even need the comment. The original behavior ("no empty hashes") was surprising, so it needed a comment. Now we create a hash that exactly matches the connection, which is what you'd expect, so no comment is needed.
LGTM
ad73a7a libnm-util: return empty hash, not NULL in nm_setting_to_hash() (bgo #740681)