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.
This commit is contained in:
Thomas Haller 2022-06-17 08:24:09 +02:00
parent 9c8b957704
commit aa2fd36db4
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

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