From 559636a4a2f08cb9126dcae0193c04c6a19be213 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 8 Oct 2022 20:24:22 +0300 Subject: [PATCH] SNDCP: log more details on failure Related: OS#5349 Change-Id: Iad3ebbc28909a827db7b3a0ae2d3e1de7991210f --- src/sgsn/gprs_sndcp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sgsn/gprs_sndcp.c b/src/sgsn/gprs_sndcp.c index d8982accb..24262e4b7 100644 --- a/src/sgsn/gprs_sndcp.c +++ b/src/sgsn/gprs_sndcp.c @@ -723,13 +723,14 @@ int sndcp_unitdata_req(struct msgb *msg, struct gprs_llc_lle *lle, uint8_t nsapi sne = gprs_sndcp_entity_by_lle(lle, nsapi); if (!sne) { - LOGP(DSNDCP, LOGL_ERROR, "Cannot find SNDCP Entity\n"); + LOGP(DSNDCP, LOGL_ERROR, "Cannot find SNDCP Entity (lle=%p, TLLI=%08x, SAPI=%u, NSAPI=%u)\n", + lle, lle->llme->tlli, lle->sapi, nsapi); msgb_free(msg); return -EIO; } /* Check if we need to fragment this N-PDU into multiple SN-PDUs */ - if (msg->len > lle->params.n201_u - + if (msg->len > lle->params.n201_u - (sizeof(*sch) + sizeof(*suh) + sizeof(*scomph))) { /* initialize the fragmenter state */ fs.msg = msg;