diff options
| author | Michael Biebl <biebl@debian.org> | 2022-08-16 18:25:29 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2022-08-16 18:25:29 +0200 |
| commit | e8c0c4050b07c08cc0f34d41cdff98f2cdc1cc93 (patch) | |
| tree | 79a3d9572e508d4b193ea175c8ed103b2024f727 /src/libnm-core-impl/nm-setting-bridge.c | |
| parent | 49ac65f875a36d7ebcbc8270cf0fc60acbb2e052 (diff) | |
| parent | 0018d1f3cf71d680d7b6bceda55a5717244d8b26 (diff) | |
Update upstream source from tag 'upstream/1.39.90'
Update to upstream version '1.39.90' with Debian dir 898f1bfdb7bf17595463e4195c78d8455df545e6
Diffstat (limited to 'src/libnm-core-impl/nm-setting-bridge.c')
| -rw-r--r-- | src/libnm-core-impl/nm-setting-bridge.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libnm-core-impl/nm-setting-bridge.c b/src/libnm-core-impl/nm-setting-bridge.c index 41cd6632..39a3fb60 100644 --- a/src/libnm-core-impl/nm-setting-bridge.c +++ b/src/libnm-core-impl/nm-setting-bridge.c @@ -435,7 +435,7 @@ nm_bridge_vlan_to_str(const NMBridgeVlan *vlan, GError **error) * future if more parameters are added to the object that could * make it invalid. */ - nm_str_buf_init(&string, NM_UTILS_GET_NEXT_REALLOC_SIZE_32, FALSE); + string = NM_STR_BUF_INIT(NM_UTILS_GET_NEXT_REALLOC_SIZE_32, FALSE); if (vlan->vid_start == vlan->vid_end) nm_str_buf_append_printf(&string, "%u", vlan->vid_start); @@ -1311,6 +1311,15 @@ verify(NMSetting *setting, NMConnection *connection, GError **error) NM_SETTING_BRIDGE_VLANS)) return NM_SETTING_VERIFY_NORMALIZABLE; + if (connection && !nm_connection_get_setting_wired(connection)) { + g_set_error_literal(error, + NM_CONNECTION_ERROR, + NM_CONNECTION_ERROR_SETTING_NOT_FOUND, + _("bridge connection should have a ethernet setting as well")); + g_prefix_error(error, "%s: ", NM_SETTING_BRIDGE_SETTING_NAME); + return NM_SETTING_VERIFY_NORMALIZABLE; + } + return TRUE; } |