diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2013-06-16 13:26:14 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2015-09-22 16:39:04 +0200 |
commit | 75caaf294980e258b63d300284f9b7bf26fd35c9 (patch) | |
tree | f9604f00187fdca2648fa9a51d8f9c16933d5700 /src/common/l1sap.c | |
parent | 5027e122a885eab21772706d39915464c887150d (diff) |
sysmobts: Clean up transitions for lchan cipher state
There are three transitions:
1. LCHAN_CIPH_NONE -> LCHAN_CIPH_RX_REQ -> LCHAN_CIPH_RX_CONF
It is used to enable ciphering in RX (uplink) direction only.
2. LCHAN_CIPH_RX_CONF -> LCHAN_CIPH_RX_CONF_TX_REQ -> LCHAN_CIPH_RXTX_CONF
It is used to additionally enable ciphering in TX (downlink) direction.
3. LCHAN_CIPH_NONE -> LCHAN_CIPH_RXTX_REQ -> LCHAN_CIPH_RX_CONF_TX_REQ
-> LCHAN_CIPH_RXTX_CONF
It is used to enable ciphering in both TX and RX directions. This is used
when the channel is activated with encryption already enabled. (assignment
or handover)
In order to follow the order of these transitions, the RX direction must
always be set before the TX direction.
If no cipher key is set (A5/0), ciphering is set to ALG 0, but lchan cipher
state remains at LCHAN_CIPH_NONE.
Diffstat (limited to 'src/common/l1sap.c')
-rw-r--r-- | src/common/l1sap.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/common/l1sap.c b/src/common/l1sap.c index b9d5a2d0..d2534362 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -96,7 +96,6 @@ static int check_for_ciph_cmd(struct msgb *msg, struct gsm_lchan *lchan, /* only do this if we are in the right state */ switch (lchan->ciph_state) { case LCHAN_CIPH_NONE: - case LCHAN_CIPH_RX_REQ: break; default: return 0; |