aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/rsl.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-04-19 09:35:03 +0200
committerHarald Welte <laforge@gnumonks.org>2012-04-19 09:35:03 +0200
commitb03f8ae4f05b16997c3db5ed9454672a0d18e679 (patch)
tree6cb7c72d105387906241088fc52ef8f7c6179e33 /src/common/rsl.c
parentd9ab45d1aac21c761c461659e2179d1077b5b7a5 (diff)
ciphering: Better state tracking and HACK around L1 race condition
We now check if the received message is an LAPDm I frame in order to determine if we have received the first valid encrypted message on the radio link. This relates to the fact that we often see 'old' UI frames coming up from L1, even after it has confirmed decryption has been enabled.
Diffstat (limited to 'src/common/rsl.c')
-rw-r--r--src/common/rsl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c
index d0d38e86..2fc76af4 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -630,7 +630,8 @@ static int rsl_rx_chan_activ(struct msgb *msg)
if (encr_info2lchan(lchan, val, len) < 0)
return rsl_tx_error_report(msg->trx, RSL_ERR_IE_CONTENT);
- }
+ } else
+ memset(&lchan->encr, 0, sizeof(lchan->encr));
/* 9.3.9 Handover Reference */