summaryrefslogtreecommitdiff
path: root/lib/tsocket/tsocket_bsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tsocket/tsocket_bsd.c')
-rw-r--r--lib/tsocket/tsocket_bsd.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/tsocket/tsocket_bsd.c b/lib/tsocket/tsocket_bsd.c
index 13680ec0c5..9027bc9711 100644
--- a/lib/tsocket/tsocket_bsd.c
+++ b/lib/tsocket/tsocket_bsd.c
@@ -883,10 +883,12 @@ static void tdgram_bsd_recvfrom_handler(void *private_data)
return;
}
- if (ret != state->len) {
- tevent_req_error(req, EIO);
- return;
- }
+ /*
+ * some systems too much bytes in tsocket_bsd_pending()
+ * the return value includes some IP/UDP header bytes
+ */
+ state->len = ret;
+ talloc_realloc(state, state->buf, uint8_t, ret);
tevent_req_done(req);
}