From e1acd336bbed1ce5c41ef2133acb3855feaf0eb8 Mon Sep 17 00:00:00 2001 From: Frank Deng Date: Fri, 15 Nov 2019 14:12:28 -0800 Subject: [PATCH] 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 87c958328207088c02f7bfe02be63235b8878d4a) --- src/NetworkManagerUtils.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/NetworkManagerUtils.c b/src/NetworkManagerUtils.c index 1773405d5f..c33f36ec75 100644 --- a/src/NetworkManagerUtils.c +++ b/src/NetworkManagerUtils.c @@ -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; }