From 4ab72e18ea98eff13e8dc0246547579b3134d802 Mon Sep 17 00:00:00 2001 From: Inaky Perez-Gonzalez Date: Wed, 13 May 2009 15:05:36 -0700 Subject: libwimaxll: enable MSG_PEEK in handles to allow for big message reception In order for big messages to be received properly, SEEK has to be enabled in the netlink handle. Otherwise messages bigget than the page size get truncated and dropped for being invalid. Thanks to Johannes Berg for the diagnose and fix. Signed-off-by: Inaky Perez-Gonzalez --- lib/op-open.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/op-open.c b/lib/op-open.c index 73019d9..34874b0 100644 --- a/lib/op-open.c +++ b/lib/op-open.c @@ -405,6 +405,8 @@ struct wimaxll_handle *wimaxll_open(const char *device) result, nl_geterror()); goto error_nl_handle_alloc_tx; } + nl_socket_enable_msg_peek(wmx->nlh_tx); + result = nl_connect(wmx->nlh_tx, NETLINK_GENERIC); if (result < 0) { wimaxll_msg(wmx, "E: TX: cannot connect netlink: %d (%s)\n", @@ -426,6 +428,7 @@ struct wimaxll_handle *wimaxll_open(const char *device) result, nl_geterror()); goto error_nl_connect_rx; } + nl_socket_enable_msg_peek(wmx->nlh_rx); result = wimaxll_gnl_resolve(wmx); /* Get genl information */ if (result < 0) /* fills wmx->mcg_id */ -- cgit v1.2.3