summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2022-06-17 08:24:09 +0200
committerThomas Haller <thaller@redhat.com>2022-06-17 19:40:36 +0200
commitaa2fd36db47abb2dc66ae3927790df6c32aff26e (patch)
tree0b79bc277d5de4b49e5943aa99d58c4985d6949c
parent9c8b957704c33a28f9c3a499f8a41f5dbde158f1 (diff)
downloadNetworkManager-aa2fd36db47abb2dc66ae3927790df6c32aff26e.tar.gz
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.
-rw-r--r--src/libnm-platform/nm-linux-platform.c3
1 files changed, 1 insertions, 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);