summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-06-25 12:20:43 +0200
committerStefan Sperling <ssperling@sysmocom.de>2018-06-25 12:59:23 +0200
commitf1e13d6081920b7f65c0ff70c19fb638a7fc86fa (patch)
tree18b8907029eb4724dd7d905306b317257bfc343e /src
parent2b544b257f3f855e50e27d4e599223862e282b53 (diff)
return error to sender upon bssgp_tlv_parse() failure
Return "invalid mandatory information" error status to the sender in case bssgp_tlv_parse() failed. To avoid loops, do not respond with an error status to STATUS PDUs which failed parsing. Change-Id: If73719b75a94d6742bdefc9b6572525cb00a96ee Related: OS#3178
Diffstat (limited to 'src')
-rw-r--r--src/gb/gprs_bssgp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c
index 1445a56b..5dfce16c 100644
--- a/src/gb/gprs_bssgp.c
+++ b/src/gb/gprs_bssgp.c
@@ -1052,6 +1052,8 @@ int bssgp_rcvmsg(struct msgb *msg)
if (rc < 0) {
LOGP(DBSSGP, LOGL_ERROR, "Failed to parse BSSGP %s message. Invalid message was: %s\n",
bssgp_pdu_str(pdu_type), msgb_hexdump(msg));
+ if (pdu_type != BSSGP_PDUT_STATUS)
+ return bssgp_tx_status(BSSGP_CAUSE_INV_MAND_INF, NULL, msg);
return rc;
}