mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-03 13:33:29 +00:00
gprs: Don't create a subscr entry on InsertSubscriberData
Currently gprs_subscr_rx_gsup_message creates a subscriber entry if
such an entry doesn't exist for the IMSI within an
InsertSubscriberData GSUP message. This behaviour is not compliant to
GSM 09.02, 20.3.3.2 (Subscriber data management/SGSN) where it is
defined, that an error ("Unidentified subscriber") shall be returned.
This patch removes the case distinction, so that an existing
subscriber entry is required for all incoming GSUP messages.
Sponsored-by: On-Waves ehf
This commit is contained in:
committed by
Holger Hans Peter Freyther
parent
9999fd9026
commit
4dedb27d7e
@@ -536,10 +536,7 @@ int gprs_subscr_rx_gsup_message(struct msgb *msg)
|
||||
if (!gsup_msg.imsi[0])
|
||||
return -GMM_CAUSE_INV_MAND_INFO;
|
||||
|
||||
if (gsup_msg.message_type == GPRS_GSUP_MSGT_INSERT_DATA_REQUEST)
|
||||
subscr = gprs_subscr_get_or_create(gsup_msg.imsi);
|
||||
else
|
||||
subscr = gprs_subscr_get_by_imsi(gsup_msg.imsi);
|
||||
subscr = gprs_subscr_get_by_imsi(gsup_msg.imsi);
|
||||
|
||||
if (!subscr)
|
||||
return gprs_subscr_handle_unknown_imsi(&gsup_msg);
|
||||
|
||||
@@ -573,8 +573,7 @@ static void test_subscriber_gsup(void)
|
||||
/* Inject InsertSubscrData GSUP message (unknown IMSI) */
|
||||
last_updated_subscr = NULL;
|
||||
rc = rx_gsup_message(insert_data_req, sizeof(insert_data_req));
|
||||
/* TODO: Remove the comments when this is fixed */
|
||||
/* OSMO_ASSERT(rc == -GMM_CAUSE_IMSI_UNKNOWN); */
|
||||
OSMO_ASSERT(rc == -GMM_CAUSE_IMSI_UNKNOWN);
|
||||
OSMO_ASSERT(last_updated_subscr == NULL);
|
||||
|
||||
/* Inject DeleteSubscrData GSUP message (unknown IMSI) */
|
||||
|
||||
Reference in New Issue
Block a user