After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 740681 - adding bridge slave with default bridge-port values fails
adding bridge slave with default bridge-port values fails
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: nm-connection-editor
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-11-25 12:59 UTC by Jiri Klimes
Modified: 2014-11-25 17:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jiri Klimes 2014-11-25 12:59:35 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.
Comment 1 Jiri Klimes 2014-11-25 13:03:42 UTC
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.
Comment 2 Dan Winship 2014-11-25 13:40:24 UTC
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.
Comment 3 Thomas Haller 2014-11-25 17:09:26 UTC
LGTM
Comment 4 Jiri Klimes 2014-11-25 17:42:05 UTC
ad73a7a libnm-util: return empty hash, not NULL in nm_setting_to_hash() (bgo #740681)