diff options
author | Thomas Haller <thaller@redhat.com> | 2021-07-02 09:35:01 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2021-07-08 17:20:15 +0200 |
commit | bc57c79d57a3209b5211b572742c43ae8b248ebf (patch) | |
tree | defebf5f0649c029123cae86cf11876696d8a9ab | |
parent | 6185502ee9315ea88f4d0c6839ba13736c35233f (diff) | |
download | NetworkManager-bc57c79d57a3209b5211b572742c43ae8b248ebf.tar.gz |
libnm: change behavior for normalizing wireguard/dummy profiles to use ipv6.method=disabled
"ipv6.method=ignore" really exists for historic reasons, from a time when
NetworkManager didn't support IPv6 autoconf and let kernel handle it.
Nowadays, we should choose an explicit mode, like "link-local" or
"disabled".
Let nm_connection_normalize() treat WireGuard and dummy profiles
different and set the IPv6 method to "disabled".
-rw-r--r-- | src/libnm-core-impl/nm-connection.c | 2 | ||||
-rw-r--r-- | src/libnm-core-impl/tests/test-setting.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libnm-core-impl/nm-connection.c b/src/libnm-core-impl/nm-connection.c index 60105f05f8..a8563cffac 100644 --- a/src/libnm-core-impl/nm-connection.c +++ b/src/libnm-core-impl/nm-connection.c @@ -1279,7 +1279,7 @@ _normalize_ip_config(NMConnection *self, GHashTable *parameters) if (NM_IN_STRSET(type, NM_SETTING_WIREGUARD_SETTING_NAME, NM_SETTING_DUMMY_SETTING_NAME)) - default_ip6_method = NM_SETTING_IP6_CONFIG_METHOD_IGNORE; + default_ip6_method = NM_SETTING_IP6_CONFIG_METHOD_DISABLED; else default_ip6_method = NM_SETTING_IP6_CONFIG_METHOD_AUTO; } diff --git a/src/libnm-core-impl/tests/test-setting.c b/src/libnm-core-impl/tests/test-setting.c index 15f0294cca..58e5e1a4a7 100644 --- a/src/libnm-core-impl/tests/test-setting.c +++ b/src/libnm-core-impl/tests/test-setting.c @@ -3651,7 +3651,7 @@ test_roundtrip_conversion(gconstpointer test_data) g_assert_cmpstr(nm_setting_ip_config_get_method(s_ip.s_4), ==, "disabled"); s_ip.s_6 = NM_SETTING_IP_CONFIG(nm_connection_get_setting(con, NM_TYPE_SETTING_IP6_CONFIG)); - g_assert_cmpstr(nm_setting_ip_config_get_method(s_ip.s_6), ==, "ignore"); + g_assert_cmpstr(nm_setting_ip_config_get_method(s_ip.s_6), ==, "disabled"); g_ptr_array_add(kf_data_arr, g_strdup_printf("[connection]\n" @@ -3670,7 +3670,7 @@ test_roundtrip_conversion(gconstpointer test_data) "[ipv6]\n" "addr-gen-mode=stable-privacy\n" "dns-search=\n" - "method=ignore\n" + "method=disabled\n" "\n" "[proxy]\n" "", @@ -3727,7 +3727,7 @@ test_roundtrip_conversion(gconstpointer test_data) "[ipv6]\n" "addr-gen-mode=stable-privacy\n" "dns-search=\n" - "method=ignore\n" + "method=disabled\n" "\n" "[proxy]\n" "", |