mirror of
https://github.com/troglobit/finit.git
synced 2026-11-21 19:51:46 +00:00
Revert "plugins: fix #173, increase size of netlink socket receive buffer"
This reverts commit add55cfc2a.
This commit is contained in:
1 parent
243b8f025b
commit
b9cc4cd629
1 file changed
-10
@@ -413,8 +413,6 @@ static plugin_t plugin = {
|
|||||||
PLUGIN_INIT(plugin_init)
|
PLUGIN_INIT(plugin_init)
|
||||||
{
|
{
|
||||||
struct sockaddr_nl sa;
|
struct sockaddr_nl sa;
|
||||||
socklen_t sz;
|
|
||||||
int rcvbuf;
|
|
||||||
int sd;
|
int sd;
|
||||||
|
|
||||||
sd = socket(AF_NETLINK, SOCK_RAW | SOCK_NONBLOCK | SOCK_CLOEXEC, NETLINK_ROUTE);
|
sd = socket(AF_NETLINK, SOCK_RAW | SOCK_NONBLOCK | SOCK_CLOEXEC, NETLINK_ROUTE);
|
||||||
@@ -423,14 +421,6 @@ PLUGIN_INIT(plugin_init)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
rcvbuf = 320 << 10; /* default: 212992 bytes, now 425984 bytes */
|
|
||||||
if (setsockopt(sd, SOL_SOCKET, SO_RCVBUF, &rcvbuf, sizeof(rcvbuf)))
|
|
||||||
_pe("failed adjusting netlink socket recive buffer size");
|
|
||||||
|
|
||||||
sz = sizeof(rcvbuf);
|
|
||||||
if (!getsockopt(sd, SOL_SOCKET, SO_RCVBUF, &rcvbuf, &sz))
|
|
||||||
_d("New size of netlink receive buffer: %d bytes", rcvbuf);
|
|
||||||
|
|
||||||
memset(&sa, 0, sizeof(sa));
|
memset(&sa, 0, sizeof(sa));
|
||||||
sa.nl_family = AF_NETLINK;
|
sa.nl_family = AF_NETLINK;
|
||||||
sa.nl_groups = RTMGRP_IPV4_ROUTE | RTMGRP_LINK;
|
sa.nl_groups = RTMGRP_IPV4_ROUTE | RTMGRP_LINK;
|
||||||
|
|||||||
Reference in new issue
Block a user