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.
diff --git a/openbsc/src/gprs/gprs_ns.c b/openbsc/src/gprs/gprs_ns.c
index bf563cc..adb5524 100644
--- a/openbsc/src/gprs/gprs_ns.c
+++ b/openbsc/src/gprs/gprs_ns.c
@@ -842,7 +842,7 @@
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",