From ae3da5f8c3761567c69c2bb8866ac6a5a51eeb7f Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 10 May 2018 17:25:52 +0200 Subject: 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 --- src/common/l1sap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/common/l1sap.c') 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; -- cgit v1.2.3