From 44481bd7c7e2f9360f0f5f206770fd8e72a98f2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Mon, 7 Jun 2021 19:14:42 +0200 Subject: [PATCH] core: fail IPv6 early if disabled in kernel Adds the following info message in case ipv6 is disabled: device (enp0s18f2u3): The kernel does not support IPv6. [thaller@redhat.com: modified original patch] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/401 --- src/core/devices/nm-device.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index 3ac985af84..68920bf888 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -10990,6 +10990,11 @@ addrconf6_start(NMDevice *self, NMSettingIP6ConfigPrivacy use_tempaddr) guint32 ra_timeout; guint32 default_ra_timeout; + if (!g_file_test("/proc/sys/net/ipv6", G_FILE_TEST_IS_DIR)) { + _LOGI(LOGD_IP6, "addrconf6: kernel does not support IPv6"); + return FALSE; + } + connection = nm_device_get_applied_connection(self); g_assert(connection);