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

2018-05-24 Thread Harald Welte
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 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


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

2018-05-15 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/67/9167/1

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: newchange
Gerrit-Change-Id: Iaef1648f35ceae9d7f4cd1d9d5409e05115d199a
Gerrit-Change-Number: 9167
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte