From aa2fd36db47abb2dc66ae3927790df6c32aff26e Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 17 Jun 2022 08:24:09 +0200 Subject: [PATCH] platform: require generic netlink socket Sockets are really a fundamental thing we require to operate. We cannot meaningfully operate, if we fail to create them. That is also why a too low file descriptor limit is fatal and unsupported. This is similar with out of memory situations. Just require that we always are able to create the generic netlink socket. --- src/libnm-platform/nm-linux-platform.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libnm-platform/nm-linux-platform.c b/src/libnm-platform/nm-linux-platform.c index 7bd7b9d960..48b64169df 100644 --- a/src/libnm-platform/nm-linux-platform.c +++ b/src/libnm-platform/nm-linux-platform.c @@ -9713,8 +9713,7 @@ constructed(GObject *_object) nm_platform_get_cache_tc(platform) ? "use" : "no"); nle = nl_socket_new(&priv->genl, NETLINK_GENERIC); - if (nle) - _LOGE("unable to connect the generic netlink socket \"%s\" (%d)", nm_strerror(nle), -nle); + g_assert(!nle); nle = nl_socket_new(&priv->nlh, NETLINK_ROUTE); g_assert(!nle);