core: take over connections with IPv6 method 'ignore' for 'auto' (rh #1083196)

If we had a connection with IPv6.method = ignore, we simply ignored IPv6. So
we should assume this connection even if there is an SLAAC address on the
interface.

https://bugzilla.redhat.com/show_bug.cgi?id=1083196
This commit is contained in:
Jiří Klimeš
2014-05-29 16:36:24 +02:00
parent b5a94ae479
commit fbdf8857c3
2 changed files with 40 additions and 3 deletions

View File

@@ -707,11 +707,12 @@ check_ip6_method (NMConnection *orig,
allow = TRUE;
}
/* If the original connection method is 'link-local' and the candidate method
* is 'ignore' we can take the connection, because NM didn't simply take care
/* 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 ( strcmp (orig_ip6_method, NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL) == 0
if ( ( strcmp (orig_ip6_method, NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL) == 0
|| strcmp (orig_ip6_method, NM_SETTING_IP6_CONFIG_METHOD_AUTO) == 0)
&& strcmp (candidate_ip6_method, NM_SETTING_IP6_CONFIG_METHOD_IGNORE) == 0) {
allow = TRUE;
}