aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-05-28 03:25:36 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-05-28 03:25:36 +0800
commit900aeaf41539a0577f33b501b2cc0c525ce4ce34 (patch)
treeabc7397804fd0b7aef60010e2e8393aa6adc5b84
parent34b5480a6a8310732d28bd6d04d803e62023fa73 (diff)
gprs: Subtract the headroom for what we can receive
The buffer got allocated with headroom and we need to subtract that from the size of the buffer.
-rw-r--r--openbsc/src/gprs/gprs_ns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/gprs/gprs_ns.c b/openbsc/src/gprs/gprs_ns.c
index bf563cc60..adb552478 100644
--- a/openbsc/src/gprs/gprs_ns.c
+++ b/openbsc/src/gprs/gprs_ns.c
@@ -842,7 +842,7 @@ static struct msgb *read_nsip_msg(struct bsc_fd *bfd, int *error,
return NULL;
}
- ret = recvfrom(bfd->fd, msg->data, NS_ALLOC_SIZE, 0,
+ ret = recvfrom(bfd->fd, msg->data, NS_ALLOC_SIZE - NS_ALLOC_HEADROOM, 0,
(struct sockaddr *)saddr, &saddr_len);
if (ret < 0) {
LOGP(DNS, LOGL_ERROR, "recv error %s during NSIP recv\n",