aboutsummaryrefslogtreecommitdiffstats
path: root/src/libvlr/vlr_lu_fsm.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-12-23 18:51:48 +0100
committerHarald Welte <laforge@gnumonks.org>2018-01-28 00:09:41 +0000
commit71c51df07dfbc60cb41cb43385576a9d89c0c269 (patch)
treef072cda567e76232653a32e1ff781b917f8ea4ef /src/libvlr/vlr_lu_fsm.c
parent14e051776fe07cbc7f9c5775ea62f04fe79bd357 (diff)
Shift ciphering algorithm selection from VLR to MSC
The VLR code seems to have the assumption that there is one particular algorithm to be used, as opposed to one of a set of algorithms. What's missing is basically to decide when/where to pick the best algorithm within the capabilities of the phone (classmark) and the network configuration (net->a5_encryption_mask). So far, libvlr has no notion of classmark. Rather, libmsc has. Why does the VLR care about the particular algorithm at all? The VLR should probably simply decide if it should use encryption or not, and if so, the MSC will figure which algorithm to use. Change-Id: I5ed80ca2086560a5975a758ec568a034a9a8ab89
Diffstat (limited to 'src/libvlr/vlr_lu_fsm.c')
-rw-r--r--src/libvlr/vlr_lu_fsm.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libvlr/vlr_lu_fsm.c b/src/libvlr/vlr_lu_fsm.c
index e540e2ae9..6c8b53adb 100644
--- a/src/libvlr/vlr_lu_fsm.c
+++ b/src/libvlr/vlr_lu_fsm.c
@@ -644,7 +644,7 @@ struct lu_fsm_priv {
struct osmo_location_area_id old_lai;
struct osmo_location_area_id new_lai;
bool authentication_required;
- enum vlr_ciph ciphering_required;
+ bool ciphering_required;
bool is_r99;
bool is_utran;
bool assign_tmsi;
@@ -665,14 +665,13 @@ static bool is_auth_required(struct lu_fsm_priv *lfp)
/* The cases where the authentication procedure should be used
* are defined in 3GPP TS 33.102 */
/* For now we use a default value passed in to vlr_lu_fsm(). */
- return lfp->authentication_required
- || (lfp->ciphering_required != VLR_CIPH_NONE);
+ return lfp->authentication_required || lfp->ciphering_required;
}
/* Determine if ciphering is required */
static bool is_ciph_required(struct lu_fsm_priv *lfp)
{
- return lfp->ciphering_required != VLR_CIPH_NONE;
+ return lfp->ciphering_required;
}
/* Determine if a HLR Update is required */
@@ -1391,7 +1390,7 @@ vlr_loc_update(struct osmo_fsm_inst *parent,
const struct osmo_location_area_id *old_lai,
const struct osmo_location_area_id *new_lai,
bool authentication_required,
- enum vlr_ciph ciphering_required,
+ bool ciphering_required,
bool is_r99, bool is_utran,
bool assign_tmsi)
{