Change in osmo-bts[master]: cosmetic: it's n_r in check_for_first_ciphrd(), not n_s

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu May 24 06:08:45 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/9167 )

Change subject: cosmetic: it's n_r in check_for_first_ciphrd(), not n_s
......................................................................

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
---
M src/common/l1sap.c
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index e7cef4e..3a40949 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -956,7 +956,7 @@
 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 @@
 	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;

-- 
To view, visit https://gerrit.osmocom.org/9167
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Iaef1648f35ceae9d7f4cd1d9d5409e05115d199a
Gerrit-Change-Number: 9167
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180524/15df0491/attachment.htm>


More information about the gerrit-log mailing list