utils: alow matching ipv6 new method 'disable'

Make nm_utils_match_connection() match 'ignore' connections with
connections that are generated to have ipv6.method of 'disable'.
Perhaps the ipv6 was disabled globally.

[lkundrak@v3.sk: commit message fixup]

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/336
(cherry picked from commit 87c9583282)
This commit is contained in:
Frank Deng 2019-11-15 14:12:28 -08:00 committed by Lubomir Rintel
parent b35fb49a28
commit e1acd336bb

View file

@ -359,11 +359,12 @@ check_ip6_method (NMConnection *orig,
*/
allow = TRUE;
} else if ( NM_IN_STRSET (orig_ip6_method, NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL,
NM_SETTING_IP6_CONFIG_METHOD_DISABLED,
NM_SETTING_IP6_CONFIG_METHOD_AUTO)
&& nm_streq0 (candidate_ip6_method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE)) {
/* If the generated connection method is 'link-local' or 'auto' and the candidate
* method is 'ignore' we can take the connection, because NM didn't simply take care
* of IPv6.
/* If the generated connection method is 'link-local', disabled' or 'auto' and
* the candidate method is 'ignore' we can take the connection, because NM didn't
* simply take care of IPv6.
*/
allow = TRUE;
}