Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"No buffer space available" occurred when receive data from Netlink socket #31

Open
Nefurtity opened this issue Mar 1, 2018 · 0 comments

Comments

@Nefurtity
Copy link
Contributor

The following error may occur when too many packets received once upon a time.

"rv = -1. errno: 105. No buffer space available

while ((rv = recv(g_nfq_fd, buf, sizeof(buf), 0)) && rv >= 0) {
    //log_debugv("pkt received");
    nfq_handle_packet(g_nfq_h, buf, rv);
}
log_debug("rv = %d. errno: %d. %s", rv, errno, strerror(errno));

It looks like it might be worth trying to increase the buffer size of the netlink socket
From https://www.netfilter.org/documentation/FAQ/netfilter-faq-4.html

these are standard Netlink sockets, and you can tune their receive buffer sizes via /proc/sys/net/core, >sysctl, or use the SO_RCVBUF socket option on the file descriptor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant