mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 16:20:14 +01:00
platform/netlink: also set NETLINK_EXT_ACK for genl socket
There are only two callers of nl_socket_new(). One for NETLINK_GENERIC and one for NETLINK_ROUTE. We already were enabling ext-ack for the rtnetlink socket. Also enable it for the genl socket. Do that, but just moving this inside nl_socket_new(). I cannot imagine a case where we don't want this.
This commit is contained in:
parent
f96fbc8ebe
commit
67d64fd4e5
2 changed files with 2 additions and 4 deletions
|
|
@ -9739,10 +9739,6 @@ constructed(GObject *_object)
|
|||
nle = nl_socket_set_buffer_size(priv->nlh, 8 * 1024 * 1024, 0);
|
||||
g_assert(!nle);
|
||||
|
||||
nle = nl_socket_set_ext_ack(priv->nlh, TRUE);
|
||||
if (nle)
|
||||
_LOGD("could not enable extended acks on netlink socket");
|
||||
|
||||
/* explicitly set the msg buffer size and disable MSG_PEEK.
|
||||
* We use our own receive buffer priv->netlink_recv_buf.
|
||||
* If we encounter NME_NL_MSG_TRUNC, we will increase the buffer
|
||||
|
|
|
|||
|
|
@ -1101,6 +1101,8 @@ nl_socket_new(struct nl_sock **out_sk, int protocol)
|
|||
if (local.nl_family != AF_NETLINK)
|
||||
return -NME_UNSPEC;
|
||||
|
||||
(void) nl_socket_set_ext_ack(sk, TRUE);
|
||||
|
||||
sk->s_local = local;
|
||||
sk->s_proto = protocol;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue