gprs: Send GSUP error reply for requests without IMSI
Currently gprs_subscr_rx_gsup_message returns immediately after it detects that an IMSI has not been given in the received GSUP message. While this is ok for responses (result or error), a request should always be answered. This commit adds code to reply with a corresponding error message ("Invalid mandatory information") when it receives a request without an IMSI. Note that the generated error message will not contain an IMSI either. Sponsored-by: On-Waves ehf
This commit is contained in:
parent
8000e0ea50
commit
07f6e36ab4
|
@ -505,8 +505,14 @@ int gprs_subscr_rx_gsup_message(struct msgb *msg)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gsup_msg.imsi[0])
|
if (!gsup_msg.imsi[0]) {
|
||||||
|
LOGP(DGPRS, LOGL_ERROR, "Missing IMSI in GSUP message\n");
|
||||||
|
|
||||||
|
if (GPRS_GSUP_IS_MSGT_REQUEST(gsup_msg.message_type))
|
||||||
|
gprs_subscr_tx_gsup_error_reply(NULL, &gsup_msg,
|
||||||
|
GMM_CAUSE_INV_MAND_INFO);
|
||||||
return -GMM_CAUSE_INV_MAND_INFO;
|
return -GMM_CAUSE_INV_MAND_INFO;
|
||||||
|
}
|
||||||
|
|
||||||
subscr = gprs_subscr_get_by_imsi(gsup_msg.imsi);
|
subscr = gprs_subscr_get_by_imsi(gsup_msg.imsi);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue