diff -u -r ../NetworkManager-0.9.10.0_org/man/NetworkManager.conf.5 ./man/NetworkManager.conf.5 --- ../NetworkManager-0.9.10.0_org/man/NetworkManager.conf.5 2014-07-04 00:51:26.000000000 +0000 +++ ./man/NetworkManager.conf.5 2015-08-05 13:58:18.565318720 +0000 @@ -143,6 +143,15 @@ Note that the "carrier" property of NMDevices and device D\-Bus interfaces will still reflect the actual device state; it\*(Aqs just that NetworkManager will not make use of that information\&. .RE .PP +\fIassume\-ipv6ll\-only\fR +.RS 4 +Comma\-separated list of devices for which NetworkManager will try to generate a connection based on initial configuration when the device only has an IPv6 link\-local address\&. +.sp +May have the special value +* +to apply to all devices\&. +.RE +.PP \fIdns\fR .RS 4 Set the DNS (resolv\&.conf) processing mode\&. diff -u -r ../NetworkManager-0.9.10.0_org/src/config/nm-config.c ./src/config/nm-config.c --- ../NetworkManager-0.9.10.0_org/src/config/nm-config.c 2014-07-04 00:44:13.000000000 +0000 +++ ./src/config/nm-config.c 2015-08-05 14:00:44.905318664 +0000 @@ -59,6 +59,7 @@ char **no_auto_default; char **ignore_carrier; + char **assume_ipv6ll_only; } NMConfigPrivate; static NMConfig *singleton = NULL; @@ -184,6 +185,14 @@ return nm_config_device_spec_match_list (device, (const char **) priv->ignore_carrier); } +gboolean +nm_config_get_assume_ipv6ll_only (NMConfig *config, NMConfigDevice *device) +{ + NMConfigPrivate *priv = NM_CONFIG_GET_PRIVATE (config); + + return nm_config_device_spec_match_list (device, (const char **) priv->assume_ipv6ll_only); +} + /************************************************************************/ static void @@ -545,6 +554,8 @@ priv->ignore_carrier = g_key_file_get_string_list (priv->keyfile, "main", "ignore-carrier", NULL, NULL); + priv->assume_ipv6ll_only = g_key_file_get_string_list (priv->keyfile, "main", "assume_ipv6ll_only", NULL, NULL); + return singleton; } @@ -579,6 +590,7 @@ g_free (priv->connectivity_response); g_strfreev (priv->no_auto_default); g_strfreev (priv->ignore_carrier); + g_strfreev (priv->assume_ipv6ll_only); singleton = NULL; diff -u -r ../NetworkManager-0.9.10.0_org/src/config/nm-config.h ./src/config/nm-config.h --- ../NetworkManager-0.9.10.0_org/src/config/nm-config.h 2014-07-04 00:44:13.000000000 +0000 +++ ./src/config/nm-config.h 2015-08-05 14:01:49.945318639 +0000 @@ -65,6 +65,7 @@ void nm_config_set_ethernet_no_auto_default (NMConfig *config, NMConfigDevice *device); gboolean nm_config_get_ignore_carrier (NMConfig *config, NMConfigDevice *device); +gboolean nm_config_get_assume_ipv6ll_only (NMConfig *config, NMConfigDevice *device); char *nm_config_get_value (NMConfig *config, const char *group, const char *key, GError **error); diff -u -r ../NetworkManager-0.9.10.0_org/src/devices/nm-device.c ./src/devices/nm-device.c --- ../NetworkManager-0.9.10.0_org/src/devices/nm-device.c 2014-07-04 00:44:19.000000000 +0000 +++ ./src/devices/nm-device.c 2015-08-05 20:28:12.633959760 +0000 @@ -1745,6 +1745,20 @@ connection = NULL; } + /* Ignore any IPv6LL-only, not master connections without slaves, + * unless they are in the assume-ipv6ll-only list. + */ + if ( connection + && g_strcmp0 (ip4_method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED) == 0 + && g_strcmp0 (ip6_method, NM_SETTING_IP6_CONFIG_METHOD_LINK_LOCAL) == 0 + && !nm_setting_connection_get_master (NM_SETTING_CONNECTION (s_con)) + && !priv->slaves + && !nm_config_get_assume_ipv6ll_only (nm_config_get(), NM_CONFIG_DEVICE (device))) { + nm_log_dbg (LOGD_DEVICE, "ignoring generated connection (IPv6LL-only and not in master-slave relationship)"); + g_object_unref (connection); + connection = NULL; + } + return connection; }