core: fail IPv6 early if disabled in kernel

Adds the following info message in case ipv6 is disabled:

    <info>  device (enp0s18f2u3): The kernel does not support IPv6.

[thaller@redhat.com: modified original patch]

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/401
This commit is contained in:
Björn Lindqvist 2021-06-07 19:14:42 +02:00 committed by Thomas Haller
parent 9330d29a68
commit 44481bd7c7
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -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);