diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-05-28 03:25:36 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-05-28 03:25:36 +0800 |
commit | 26c325151a7680d41d05a5df67fc4af3eb2b98e6 (patch) | |
tree | 061b8d71c30423d3aca2bdafd5e14e04edce984b | |
parent | c8f39391bf22c8f663016839de3f107674122b47 (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.c | 2 |
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", |