Am 05.08.2015 um 17:57 schrieb Dan Williams:
The real address likely comes from the kernel allowing IPv6 RA by
default when the interface is set IFF_UP early in boot. You appear to
have an IPv6 router on your LAN :) So in this case, I would expect NM
to set ipv4.method=disabled, ipv6.method=auto.
Of course, that still doesn't match your manual configuration, and in
this case the fixes I talked about for NM won't have any effect, because
the interface already has some configuration and NM will try very hard
not to blow that away.
So in addition to the fix I talk about, you could modify your accept_ra
default sysctl (at boot time) to be accept_ra=0, which will prevent the
interface from receiving an IPv6 address from the router when the
interface is initially brought up in early boot, and then allow NM to
handle IPv6 instead.
it's not that easy to prevent debian from doing autoconf.
Finally I added to sysctl.conf each device explicitly:
net.ipv6.conf.all.autoconf = 0
net.ipv6.conf.all.accept_ra = 0
net.ipv6.conf.default.autoconf = 0
net.ipv6.conf.default.accept_ra = 0
net.ipv6.conf.eth0.autoconf = 0
net.ipv6.conf.eth0.autoconf = 0
net.ipv6.conf.wlan0.autoconf = 0
net.ipv6.conf.wlan0.autoconf = 0
attached backport patch for 0.9.10.0
Kind regards,
Ingo Flaschberger
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;
}
_______________________________________________
networkmanager-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/networkmanager-list