Change in libosmocore[master]: gprs_bssgp: abuse gsm48_encode_ra() to encode TAC

2021-01-11 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/21949 )

Change subject: gprs_bssgp: abuse gsm48_encode_ra() to encode TAC
..


Patch Set 3: Code-Review+2


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I986552aa52cf38b1c5290d2e5cd3ff2d1c36a4e5
Gerrit-Change-Number: 21949
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Mon, 11 Jan 2021 14:21:18 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: gprs_bssgp: abuse gsm48_encode_ra() to encode TAC

2021-01-11 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/21949 )

Change subject: gprs_bssgp: abuse gsm48_encode_ra() to encode TAC
..

gprs_bssgp: abuse gsm48_encode_ra() to encode TAC

Both LAC and TAC take 2 octets and follow MCC/MNC fields on the wire.
We abuse gsm48_encode_ra() for encoding of MCC/MNC, but it can also
be abused to encode TAC in bssgp_create_rim_ri().  There is no need
to encode ''O and then override it with osmo_store16be().

Change-Id: I986552aa52cf38b1c5290d2e5cd3ff2d1c36a4e5
---
M src/gb/gprs_bssgp.c
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  laforge: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c
index bf0e821..530c702 100644
--- a/src/gb/gprs_bssgp.c
+++ b/src/gb/gprs_bssgp.c
@@ -402,10 +402,11 @@
.mcc = ri->eutran.tai.mcc,
.mnc = ri->eutran.tai.mnc,
.mnc_3_digits = ri->eutran.tai.mnc_3_digits,
+   /* TAC is encoded in the same way as LAC */
+   .lac = ri->eutran.tai.tac,
};

gsm48_encode_ra((struct gsm48_ra_id *)buf, &raid_temp);
-   osmo_store16be(ri->eutran.tai.tac, buf + 3);
OSMO_ASSERT(ri->eutran.global_enb_id_len <=
sizeof(ri->eutran.global_enb_id));
memcpy(buf + 5, ri->eutran.global_enb_id,

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I986552aa52cf38b1c5290d2e5cd3ff2d1c36a4e5
Gerrit-Change-Number: 21949
Gerrit-PatchSet: 4
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in libosmocore[master]: gprs_bssgp: abuse gsm48_encode_ra() to encode TAC

2021-01-07 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/21949 )

Change subject: gprs_bssgp: abuse gsm48_encode_ra() to encode TAC
..


Patch Set 3: Code-Review+1


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I986552aa52cf38b1c5290d2e5cd3ff2d1c36a4e5
Gerrit-Change-Number: 21949
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Comment-Date: Thu, 07 Jan 2021 13:42:15 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: gprs_bssgp: abuse gsm48_encode_ra() to encode TAC

2021-01-07 Thread fixeria
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/libosmocore/+/21949

to look at the new patch set (#3).

Change subject: gprs_bssgp: abuse gsm48_encode_ra() to encode TAC
..

gprs_bssgp: abuse gsm48_encode_ra() to encode TAC

Both LAC and TAC take 2 octets and follow MCC/MNC fields on the wire.
We abuse gsm48_encode_ra() for encoding of MCC/MNC, but it can also
be abused to encode TAC in bssgp_create_rim_ri().  There is no need
to encode ''O and then override it with osmo_store16be().

Change-Id: I986552aa52cf38b1c5290d2e5cd3ff2d1c36a4e5
---
M src/gb/gprs_bssgp.c
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/49/21949/3
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21949
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I986552aa52cf38b1c5290d2e5cd3ff2d1c36a4e5
Gerrit-Change-Number: 21949
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-MessageType: newpatchset


Change in libosmocore[master]: gprs_bssgp: abuse gsm48_encode_ra() to encode TAC

2021-01-07 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/21949 )

Change subject: gprs_bssgp: abuse gsm48_encode_ra() to encode TAC
..


Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/c/libosmocore/+/21949/2/src/gb/gprs_bssgp.c
File src/gb/gprs_bssgp.c:

https://gerrit.osmocom.org/c/libosmocore/+/21949/2/src/gb/gprs_bssgp.c@405
PS2, Line 405:  .lac = ri->eutran.tai.tac, /* intentional */
so probably worth it adding "intentional, TAI uses same format as RAI"



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I986552aa52cf38b1c5290d2e5cd3ff2d1c36a4e5
Gerrit-Change-Number: 21949
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-CC: pespin 
Gerrit-Comment-Date: Thu, 07 Jan 2021 13:21:17 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in libosmocore[master]: gprs_bssgp: abuse gsm48_encode_ra() to encode TAC

2021-01-07 Thread fixeria
Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/libosmocore/+/21949

to look at the new patch set (#2).

Change subject: gprs_bssgp: abuse gsm48_encode_ra() to encode TAC
..

gprs_bssgp: abuse gsm48_encode_ra() to encode TAC

Both LAC and TAC take 2 octets and follow MCC/MNC fields on the wire.
We abuse gsm48_encode_ra() for encoding of MCC/MNC, but it can also
be abused to encode TAC in bssgp_create_rim_ri().  There is no need
to encode ''O and then override it with osmo_store16be().

Change-Id: I986552aa52cf38b1c5290d2e5cd3ff2d1c36a4e5
---
M src/gb/gprs_bssgp.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/49/21949/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21949
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I986552aa52cf38b1c5290d2e5cd3ff2d1c36a4e5
Gerrit-Change-Number: 21949
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-MessageType: newpatchset


Change in libosmocore[master]: gprs_bssgp: abuse gsm48_encode_ra() to encode TAC

2021-01-05 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/21949 )

Change subject: gprs_bssgp: abuse gsm48_encode_ra() to encode TAC
..


Patch Set 1:

why?


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I986552aa52cf38b1c5290d2e5cd3ff2d1c36a4e5
Gerrit-Change-Number: 21949
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge 
Gerrit-Comment-Date: Tue, 05 Jan 2021 14:16:04 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in libosmocore[master]: gprs_bssgp: abuse gsm48_encode_ra() to encode TAC

2021-01-05 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmocore/+/21949 )


Change subject: gprs_bssgp: abuse gsm48_encode_ra() to encode TAC
..

gprs_bssgp: abuse gsm48_encode_ra() to encode TAC

Change-Id: I986552aa52cf38b1c5290d2e5cd3ff2d1c36a4e5
---
M src/gb/gprs_bssgp.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/49/21949/1

diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c
index bf0e821..ba4b7c8 100644
--- a/src/gb/gprs_bssgp.c
+++ b/src/gb/gprs_bssgp.c
@@ -402,10 +402,10 @@
.mcc = ri->eutran.tai.mcc,
.mnc = ri->eutran.tai.mnc,
.mnc_3_digits = ri->eutran.tai.mnc_3_digits,
+   .lac = ri->eutran.tai.tac, /* intentional */
};

gsm48_encode_ra((struct gsm48_ra_id *)buf, &raid_temp);
-   osmo_store16be(ri->eutran.tai.tac, buf + 3);
OSMO_ASSERT(ri->eutran.global_enb_id_len <=
sizeof(ri->eutran.global_enb_id));
memcpy(buf + 5, ri->eutran.global_enb_id,

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I986552aa52cf38b1c5290d2e5cd3ff2d1c36a4e5
Gerrit-Change-Number: 21949
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange