mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-19 02:00:45 +02:00
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".
This commit is contained in:
parent
6185502ee9
commit
bc57c79d57
2 changed files with 4 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
"",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue