summaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gprs_ns.c
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
commit26c325151a7680d41d05a5df67fc4af3eb2b98e6 (patch)
tree061b8d71c30423d3aca2bdafd5e14e04edce984b /openbsc/src/gprs/gprs_ns.c
parentc8f39391bf22c8f663016839de3f107674122b47 (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.
Diffstat (limited to 'openbsc/src/gprs/gprs_ns.c')
-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 bf563cc6..adb55247 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",