aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-05-10 17:25:52 +0200
committerHarald Welte <laforge@gnumonks.org>2018-05-24 06:08:44 +0000
commitae3da5f8c3761567c69c2bb8866ac6a5a51eeb7f (patch)
tree268389c96fe1bbe320d2b851d876001b6968ea7b /src
parent19080d531f81e7939cbcbbbd601ff3962e5a330d (diff)
cosmetic: it's n_r in check_for_first_ciphrd(), not n_s
When we introduced the n_s verification in 2cc37035d73191b71b9ba9c0d559a0da6a5f35e5, the variable name n_s was used for what is actually n_r N(R) read from the LAPDm frame Change-Id: Iaef1648f35ceae9d7f4cd1d9d5409e05115d199a
Diffstat (limited to 'src')
-rw-r--r--src/common/l1sap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index e7cef4e0..3a409493 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -956,7 +956,7 @@ static void radio_link_timeout(struct gsm_lchan *lchan, int bad_frame)
static inline int check_for_first_ciphrd(struct gsm_lchan *lchan,
uint8_t *data, int len)
{
- uint8_t n_s;
+ uint8_t n_r;
/* if this is the first valid message after enabling Rx
* decryption, we have to enable Tx encryption */
@@ -972,8 +972,8 @@ static inline int check_for_first_ciphrd(struct gsm_lchan *lchan,
if ((data[1] & 0x01) != 0)
return 0;
- n_s = data[1] >> 5;
- if (lchan->ciph_ns != n_s)
+ n_r = data[1] >> 5;
+ if (lchan->ciph_ns != n_r)
return 0;
return 1;