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
diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c
index 1445a56..5dfce16 100644
--- a/src/gb/gprs_bssgp.c
+++ b/src/gb/gprs_bssgp.c
@@ -1052,6 +1052,8 @@
 	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;
 	}