[gnome-control-center] network: Fix IPv6 settings not being applicable when method changes



commit a90dc605d63c50fa8b640f2dcd743c261cf7599f
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jun 14 14:03:07 2016 +0200

    network: Fix IPv6 settings not being applicable when method changes
    
    When changing the method from Manual to Automatic, we need to clear the
    gateway setting, otherwise the settings verification will fail:
    ipv6.gateway: gateway cannot be set if there are no addresses configured
    
    Another fallout of the libnm 1.2 port
    
    https://bugzilla.gnome.org/show_bug.cgi?id=769230

 panels/network/connection-editor/ce-page-ip6.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/panels/network/connection-editor/ce-page-ip6.c b/panels/network/connection-editor/ce-page-ip6.c
index 62203ed..abf9f69 100644
--- a/panels/network/connection-editor/ce-page-ip6.c
+++ b/panels/network/connection-editor/ce-page-ip6.c
@@ -654,10 +654,14 @@ ui_to_setting (CEPageIP6 *page)
         }
 
         nm_setting_ip_config_clear_addresses (page->setting);
-        if (g_str_equal (method, NM_SETTING_IP6_CONFIG_METHOD_MANUAL))
+        if (g_str_equal (method, NM_SETTING_IP6_CONFIG_METHOD_MANUAL)) {
                 children = gtk_container_get_children (GTK_CONTAINER (page->address_list));
-        else
+        } else {
+                g_object_set (G_OBJECT (page->setting),
+                              NM_SETTING_IP_CONFIG_GATEWAY, NULL,
+                              NULL);
                 children = NULL;
+       }
 
         for (l = children; l; l = l->next) {
                 GtkWidget *row = l->data;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]