summaryrefslogtreecommitdiff
path: root/nl.c
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2014-12-11 19:35:48 +0000
committerrofl0r <rofl0r@users.noreply.github.com>2022-09-16 01:12:16 +0000
commit7d3593619805abbd923ef02ee257c006476f64cd (patch)
tree26e48adf21d1188322c43cbbf33b58ecab7d7804 /nl.c
parentceec4bbe60e0b794214dccf953317690a43f069e (diff)
downloadlibnl-tiny-7d3593619805abbd923ef02ee257c006476f64cd.tar.gz
libnl-tiny: fix receiving netlink messages larger than 4K
Apply libnl commit 807fddc4cd9ecb12ba64e1b7fa26d86b6c2f19b0 ("nl: Increase receive buffer size to 4 pages") also to libnl-tiny to ensure netlink messages larger than 4KiB can be received, as the restart logic seems to be broken. This fixes iwinfo accessing info on dual band b43 cards, as they can support a lot of channels, breaking the 4K default limit (seen was >5k). Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 43633
Diffstat (limited to 'nl.c')
-rw-r--r--nl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nl.c b/nl.c
index 99e9aeb..ea7d968 100644
--- a/nl.c
+++ b/nl.c
@@ -397,7 +397,7 @@ int nl_recv(struct nl_sock *sk, struct sockaddr_nl *nla,
flags |= MSG_PEEK;
if (page_size == 0)
- page_size = getpagesize();
+ page_size = getpagesize() * 4;
iov.iov_len = page_size;
iov.iov_base = *buf = malloc(iov.iov_len);