path: root/src/mnl.c
diff options
authorFlorian Westphal <>2019-08-13 20:44:08 +0200
committerFlorian Westphal <>2019-08-13 21:37:49 +0200
commit463811e9681188813264f572aca230273ccd1375 (patch)
treed3e09e9ae86e616d87474eae4c8be16164a46cea /src/mnl.c
parentc9bd0aa99876ca6a6d24f6c135d732c3ad69fdc0 (diff)
src: mnl: fix setting rcvbuffer size
Kernel expects socklen_t (int). Using size_t causes kernel to read upper 0-bits. This caused tests/shell/testcases/transactions/0049huge_0 to fail on s390x -- it uses 'echo' mode and will quickly overrun the tiny buffer size set due to this bug. Fixes: 89c82c261bb5 ("mnl: estimate receiver buffer size") Signed-off-by: Florian Westphal <> Acked-by: Pablo Neira Ayuso <>
Diffstat (limited to 'src/mnl.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mnl.c b/src/mnl.c
index f24d2ce0..97a2e076 100644
--- a/src/mnl.c
+++ b/src/mnl.c
@@ -240,7 +240,7 @@ static void mnl_set_sndbuffer(const struct mnl_socket *nl,
static unsigned int nlsndbufsiz;
-static int mnl_set_rcvbuffer(const struct mnl_socket *nl, size_t bufsiz)
+static int mnl_set_rcvbuffer(const struct mnl_socket *nl, socklen_t bufsiz)
socklen_t len = sizeof(nlsndbufsiz);
int ret;