summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInaky Perez-Gonzalez <inaky@linux.intel.com>2009-05-13 15:05:36 -0700
committerInaky Perez-Gonzalez <inaky@linux.intel.com>2009-05-13 15:12:16 -0700
commit4ab72e18ea98eff13e8dc0246547579b3134d802 (patch)
tree9a1bf64a6fb1b91aa7708ac8fe62c2eb961dae8e
parent503cf6ce10704acc59d45a0b31b714f9dcd1edea (diff)
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 <inaky@linux.intel.com>
-rw-r--r--lib/op-open.c3
1 files changed, 3 insertions, 0 deletions
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 */