summaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc/gsm_subscriber.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/libmsc/gsm_subscriber.c')
-rw-r--r--openbsc/src/libmsc/gsm_subscriber.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/openbsc/src/libmsc/gsm_subscriber.c b/openbsc/src/libmsc/gsm_subscriber.c
index 5078422..9a6c7a8 100644
--- a/openbsc/src/libmsc/gsm_subscriber.c
+++ b/openbsc/src/libmsc/gsm_subscriber.c
@@ -139,7 +139,14 @@ int subscr_rx_paging_response(struct msgb *msg,
pr = (struct gsm48_pag_resp *)gh->data;
/* Secure the connection */
- return gsm48_secure_channel(conn, pr->key_seq, subscr_paging_sec_cb, NULL);
+ if (subscr_authorized(conn->subscr))
+ return gsm48_secure_channel(conn, pr->key_seq,
+ subscr_paging_sec_cb, NULL);
+
+ /* Not authorized. Failure. */
+ subscr_paging_sec_cb(GSM_HOOK_RR_SECURITY, GSM_SECURITY_AUTH_FAILED,
+ msg, conn, NULL);
+ return -1;
}
struct subscr_request *subscr_request_channel(struct vlr_subscr *vsub,