libmsc: Refuse service to anyone not attached

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
Sylvain Munaut 2012-12-28 00:33:04 +01:00 committed by Holger Hans Peter Freyther
parent 977cd13741
commit 11c1b6e014
1 changed files with 4 additions and 0 deletions

View File

@ -909,6 +909,10 @@ static int gsm48_rx_mm_serv_req(struct gsm_subscriber_connection *conn, struct m
if (!subscr)
return gsm48_tx_mm_serv_rej(conn,
GSM48_REJECT_IMSI_UNKNOWN_IN_HLR);
else if (subscr->lac == GSM_LAC_RESERVED_DETACHED)
/* If the subscriber is not attached, reject service */
return gsm48_tx_mm_serv_rej(conn,
GSM48_REJECT_IMSI_UNKNOWN_IN_VLR);
if (!conn->subscr)
conn->subscr = subscr;