diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2015-11-19 13:01:22 +0100 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2015-11-19 13:48:40 +0100 |
commit | bc8a79526ac5c3361f6fc0df272df8ad6d8f6738 (patch) | |
tree | 2a382399c98dabaeb400b5b83736b48b2d213d2f | |
parent | d67d4aab1fbe93dabbf21d2c894a548035540f18 (diff) | |
download | network-manager-applet-bc8a79526ac5c3361f6fc0df272df8ad6d8f6738.tar.gz |
editor: do not add new IP config settings if they are already present
This would erase existing IP config data. There can be an existing IP setting
in the connection, for example when importing VPN connections.
Fixes: f06b8e3f972c76cb48437d384622cbb2f8ee8584
-rw-r--r-- | src/connection-editor/nm-connection-list.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/connection-editor/nm-connection-list.c b/src/connection-editor/nm-connection-list.c index e28da679..1c912ad5 100644 --- a/src/connection-editor/nm-connection-list.c +++ b/src/connection-editor/nm-connection-list.c @@ -279,9 +279,9 @@ really_add_connection (NMConnection *connection, return; } - if (connection_supports_ip4 (connection)) + if (connection_supports_ip4 (connection) && !nm_connection_get_setting_ip4_config (connection)) nm_connection_add_setting (connection, nm_setting_ip4_config_new ()); - if (connection_supports_ip6 (connection)) + if (connection_supports_ip6 (connection) && !nm_connection_get_setting_ip6_config (connection)) nm_connection_add_setting (connection, nm_setting_ip6_config_new ()); editor = nm_connection_editor_new (GTK_WINDOW (list->dialog), connection, list->client); |