Change in osmo-msc[master]: libmsc/gsm_04_08.c: fix: print proper length value

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun May 12 10:35:18 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13906 )

Change subject: libmsc/gsm_04_08.c: fix: print proper length value
......................................................................

libmsc/gsm_04_08.c: fix: print proper length value

Since in parse_umts_auth_resp() we are checking the length of
GSM48_IE_AUTH_RES_EXT TLV, we need to print its length, but
not the length of the whole L3.

Change-Id: I2bfebce6d017be834bfe7628ffa2b341eb82c11c
---
M src/libmsc/gsm_04_08.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index 79488cd..280c341 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -916,8 +916,8 @@
 	data_len = msgb_l3len(msg) - (data - (uint8_t*)msgb_l3(msg));
 
 	if (data_len < 3) {
-		LOG_MSC_A_CAT(msc_a, DMM, LOGL_ERROR, "MM AUTHENTICATION RESPONSE: l3 length invalid: %u\n",
-			      msgb_l3len(msg));
+		LOG_MSC_A_CAT(msc_a, DMM, LOGL_ERROR, "MM AUTHENTICATION RESPONSE: "
+			      "message length=%u is too short\n", data_len);
 		return -EINVAL;
 	}
 

-- 
To view, visit https://gerrit.osmocom.org/13906
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I2bfebce6d017be834bfe7628ffa2b341eb82c11c
Gerrit-Change-Number: 13906
Gerrit-PatchSet: 4
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190512/3f75f884/attachment.html>


More information about the gerrit-log mailing list