l1sap: Fix abort on big RTP packet received
Recently while testing new osmo-mgw, big RTP packets (around 4K bytes, see OS#2625 for more info), were being received on the BTS, which was aborting with the following message: "msgb(0xff208): Not enough tailroom msgb_put (348 < 1488)" The crash can be reproduced in a sysmobts as well as on my PC locally with osmo-bts-trx. I used osmo-bts-trx to test that the patch solved the abort. Fixes: OS#2624 Change-Id: Idfde1dacc3dc3d3d5e239cf1f7e39ade7fc25975
This commit is contained in:
parent
80117acba6
commit
2564756296
|
@ -117,7 +117,9 @@ static void queue_limit_to(const char *prefix, struct llist_head *queue, unsigne
|
|||
* in front and behind data pointer */
|
||||
struct msgb *l1sap_msgb_alloc(unsigned int l2_len)
|
||||
{
|
||||
struct msgb *msg = msgb_alloc_headroom(512, 128, "l1sap_prim");
|
||||
int headroom = 128;
|
||||
int size = headroom + sizeof(struct osmo_phsap_prim) + l2_len;
|
||||
struct msgb *msg = msgb_alloc_headroom(size, headroom, "l1sap_prim");
|
||||
|
||||
if (!msg)
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue