summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Catanzaro <mcatanzaro@gnome.org>2020-07-16 11:12:14 -0500
committerRobert Ancell <robert.ancell@gmail.com>2020-07-16 23:41:07 +0000
commited15c1a2f0817a0b4d7cc20c35cfcf63caf75bfe (patch)
tree0b0ea15d5871d3a246b6b65bcdd63aaacd8aacd2
parent5cc129439005a25d79ab085371ef5bcd169c567f (diff)
downloadgnome-control-center-ed15c1a2f0817a0b4d7cc20c35cfcf63caf75bfe.tar.gz
Fix setting to disable IPv6
The setting to disable IPv6 did not actually work. Instead, it just caused NetworkManager to ignore IPv6 entirely. From the libnm documentation of NM_SETTING_IP6_CONFIG_METHOD_IGNORE: "IPv6 is not required or is handled by some other mechanism, and NetworkManager should not configure IPv6 for this connection." It's just the wrong enum to use here. I considered adding a new radio button to use the older ignore setting, but it doesn't make a ton of sense since that setting allows IPv6 to be configured outside NetworkManager, and what is the point of exposing graphical configuration for that? So instead, we can have the GUI change the value from IGNORE to DISABLED if set. Fixes #593
-rw-r--r--meson.build2
-rw-r--r--panels/network/connection-editor/ce-page-ip6.c11
2 files changed, 7 insertions, 6 deletions
diff --git a/meson.build b/meson.build
index aac6789e1..56c15767b 100644
--- a/meson.build
+++ b/meson.build
@@ -218,7 +218,7 @@ config_h.set('HAVE_MALCONTENT', enable_malcontent,
if host_is_linux
# network manager
network_manager_deps = [
- dependency('libnm', version: '>= 1.12.0'),
+ dependency('libnm', version: '>= 1.20.0'),
dependency('libnma', version: '>= 1.8.0'),
dependency('mm-glib', version: '>= 0.7')
]
diff --git a/panels/network/connection-editor/ce-page-ip6.c b/panels/network/connection-editor/ce-page-ip6.c
index a86cd89ff..8442841cc 100644
--- a/panels/network/connection-editor/ce-page-ip6.c
+++ b/panels/network/connection-editor/ce-page-ip6.c
@@ -79,7 +79,7 @@ enum {
IP6_METHOD_MANUAL,
IP6_METHOD_LINK_LOCAL,
IP6_METHOD_SHARED,
- IP6_METHOD_IGNORE
+ IP6_METHOD_DISABLED
};
static void
@@ -498,8 +498,9 @@ connect_ip6_page (CEPageIP6 *self)
method = IP6_METHOD_MANUAL;
} else if (g_strcmp0 (str_method, NM_SETTING_IP6_CONFIG_METHOD_SHARED) == 0) {
method = IP6_METHOD_SHARED;
- } else if (g_strcmp0 (str_method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE) == 0) {
- method = IP6_METHOD_IGNORE;
+ } else if (g_strcmp0 (str_method, NM_SETTING_IP6_CONFIG_METHOD_DISABLED ||
+ g_strcmp_0 (str_method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE)) == 0) {
+ method = IP6_METHOD_DISABLED;
}
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->never_default_check),
@@ -528,7 +529,7 @@ connect_ip6_page (CEPageIP6 *self)
case IP6_METHOD_SHARED:
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->shared_radio), TRUE);
break;
- case IP6_METHOD_IGNORE:
+ case IP6_METHOD_DISABLED:
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (self->disabled_radio), TRUE);
break;
default:
@@ -552,7 +553,7 @@ ui_to_setting (CEPageIP6 *self)
guint i;
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (self->disabled_radio)))
- method = NM_SETTING_IP6_CONFIG_METHOD_IGNORE;
+ method = NM_SETTING_IP6_CONFIG_METHOD_DISABLED;
else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (self->manual_radio)))
method = NM_SETTING_IP6_CONFIG_METHOD_MANUAL;
else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (self->local_radio)))