aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2019-08-22 17:19:49 +0200
committerneels <nhofmeyr@sysmocom.de>2019-09-03 13:59:05 +0000
commitf092301a0f240ef6497a31e2f3075ff283504ad0 (patch)
treecaf87ceb1eb616cd4113e8420cafdf0d8b907392
parent4b78b29b8cd9f106c5f7784944e4b1e41eb02f77 (diff)
ran_dec logging: log message sizes on errors
-rw-r--r--src/libmsc/ran_msg_a.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libmsc/ran_msg_a.c b/src/libmsc/ran_msg_a.c
index fd8afdccd..43e27f6ca 100644
--- a/src/libmsc/ran_msg_a.c
+++ b/src/libmsc/ran_msg_a.c
@@ -761,13 +761,17 @@ static int ran_a_decode_bssmap(struct ran_dec *ran_dec, struct msgb *bssmap)
}
if (msgb_l3len(bssmap) < h->length) {
- LOG_RAN_A_DEC(ran_dec, LOGL_ERROR, "BSSMAP data truncated, discarding message\n");
+ LOG_RAN_A_DEC(ran_dec, LOGL_ERROR, "BSSMAP data truncated, discarding message:"
+ " msgb_l3len(bssmap) == %u < bssmap_header->length == %u\n",
+ msgb_l3len(bssmap), h->length);
return -1;
}
if (msgb_l3len(bssmap) > h->length) {
- LOG_RAN_A_DEC(ran_dec, LOGL_NOTICE, "There are %u extra bytes after the BSSMAP data, truncating\n",
- msgb_l3len(bssmap) - h->length);
+ LOG_RAN_A_DEC(ran_dec, LOGL_NOTICE, "There are %u extra bytes after the BSSMAP data, truncating:"
+ " msgb_l3len(bssmap) == %u > bssmap_header->length == %u\n",
+ msgb_l3len(bssmap) - h->length,
+ msgb_l3len(bssmap), h->length);
msgb_l3trim(bssmap, h->length);
}