libnl-tiny: fix receiving netlink messages larger than 4K
authorJonas Gorski <jogo@openwrt.org>
Thu, 11 Dec 2014 19:35:48 +0000 (19:35 +0000)
committerJonas Gorski <jogo@openwrt.org>
Thu, 11 Dec 2014 19:35:48 +0000 (19:35 +0000)
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

Makefile
src/nl.c

index b3957b0b14f973a0d2fe6c9b0b7eb1cbf5d29626..2445ad440b0d03463f416e633ea2dd6032c52ad3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libnl-tiny
 PKG_VERSION:=0.1
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_LICENSE:=LGPL-2.1
 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
index 99e9aebeba7cd77855f0175739f857c8e8eff89d..ea7d96898ba8f094dfa846e3f6a30798b316ff25 100644 (file)
--- a/src/nl.c
+++ b/src/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);