diff options
author | Stefan Sperling <ssperling@sysmocom.de> | 2018-06-25 12:20:43 +0200 |
---|---|---|
committer | Stefan Sperling <ssperling@sysmocom.de> | 2018-06-25 12:59:23 +0200 |
commit | f1e13d6081920b7f65c0ff70c19fb638a7fc86fa (patch) | |
tree | 18b8907029eb4724dd7d905306b317257bfc343e | |
parent | 2b544b257f3f855e50e27d4e599223862e282b53 (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
-rw-r--r-- | src/gb/gprs_bssgp.c | 2 |
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; } |