fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/32552 )
Change subject: osmo-bts-trx: fix trx_ctrl_read_cb(): do not send CMDs twice
......................................................................
osmo-bts-trx: fix trx_ctrl_read_cb(): do not send CMDs twice
Sometimes osmo-bts-trx may be sending the same TRXC CMD twice. This
happens when the trx_ctrl_list becomes empty in trx_ctrl_read_cb(),
and a command specific response handler enqueues more commands.
The problem is that in trx_ctrl_cmd_cb() we send() the given command
stright away, if the trx_ctrl_list is empty. This must be taken into
account in trx_ctrl_read_cb() when calling trx_ctrl_send().
Change-Id: Ibdffa4644aa3a7d219452644d3e74b411734f1df
Fixes: OS#6020
---
M src/osmo-bts-trx/trx_if.c
1 file changed, 28 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/52/32552/1
diff --git a/src/osmo-bts-trx/trx_if.c b/src/osmo-bts-trx/trx_if.c
index 59603ab..51364b5 100644
--- a/src/osmo-bts-trx/trx_if.c
+++ b/src/osmo-bts-trx/trx_if.c
@@ -673,6 +673,7 @@
struct trx_ctrl_rsp rsp;
int len, rc;
struct trx_ctrl_msg *tcm;
+ bool more_cmds;
len = recv(ofd->fd, buf, sizeof(buf) - 1, 0);
if (len <= 0)
@@ -728,6 +729,12 @@
talloc_free(l1h->last_acked);
l1h->last_acked = tcm;
+ /* Calling trx_ctrl_rx_rsp() may trigger code patch(s) queueing more CMDs.
+ * If this was the last CMD in the queue, a new CMD will be sent straight away,
+ * and calling trx_ctrl_send() below will result in sending the same CMD again.
+ * Avoid this by checking if we have more CMDs to send here. */
+ more_cmds = !llist_empty(&l1h->trx_ctrl_list);
+
/* check for response code */
rc = trx_ctrl_rx_rsp(l1h, &rsp, tcm);
if (rc == -EINVAL)
@@ -740,7 +747,9 @@
return 0;
}
- trx_ctrl_send(l1h);
+ /* the RSP handler might have called trx_ctrl_send() already */
+ if (more_cmds)
+ trx_ctrl_send(l1h);
return 0;
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32552
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ibdffa4644aa3a7d219452644d3e74b411734f1df
Gerrit-Change-Number: 32552
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-gprs/+/32550
to look at the new patch set (#3).
Change subject: gmm: Introduce SIM_AUTH primitive to resolve authentication
......................................................................
gmm: Introduce SIM_AUTH primitive to resolve authentication
New GMM-GMMREG-SIM_AUTH.ind/rsp primitives are added to allow GMM
resolving authentication request received from the network.
The user of the GMMREG SAP is responible for doing the resolution using
its SIM.
Depends: libosmocore.git Change-Id Id619459c17976b77cd2c7e4179123bb06807285c
Change-Id: I5c97642baac5ed29de63ae93fc7f0ecde5edf735
---
M include/osmocom/gprs/gmm/gmm_pdu.h
M include/osmocom/gprs/gmm/gmm_prim.h
M include/osmocom/gprs/gmm/gmm_private.h
M src/gmm/gmm.c
M src/gmm/gmm_pdu.c
M src/gmm/gmm_prim.c
M tests/gmm/gmm_prim_test.c
M tests/gmm/gmm_prim_test.err
M tests/gmm/gmm_prim_test.ok
9 files changed, 223 insertions(+), 31 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/50/32550/3
--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32550
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I5c97642baac5ed29de63ae93fc7f0ecde5edf735
Gerrit-Change-Number: 32550
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/32550 )
Change subject: gmm: Introduce SIM_AUTH primitive to resolve authentication
......................................................................
Patch Set 2:
(1 comment)
File include/osmocom/gprs/gmm/gmm_prim.h:
https://gerrit.osmocom.org/c/libosmo-gprs/+/32550/comment/9954e3d1_1dbba98a
PS2, Line 151: uint8_t sres[4]; /* result */
I think in here I also have to provide "uint8_t key[8]" (Kc?) which is calculated by the sucriber.c module in "modem app" and stored in subscr->key ?
--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32550
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I5c97642baac5ed29de63ae93fc7f0ecde5edf735
Gerrit-Change-Number: 32550
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Fri, 28 Apr 2023 16:21:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: pespin.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmo-gprs/+/32550
to look at the new patch set (#2).
Change subject: gmm: Introduce SIM_AUTH primitive to resolve authentication
......................................................................
gmm: Introduce SIM_AUTH primitive to resolve authentication
New GMM-GMMREG-SIM_AUTH.ind/rsp primitives are added to allow GMM
resolving authentication request received from the network.
The user of the GMMREG SAP is responible for doing the resolution using
its SIM.
Depends: libosmocore.git Change-Id Id619459c17976b77cd2c7e4179123bb06807285c
Change-Id: I5c97642baac5ed29de63ae93fc7f0ecde5edf735
---
M include/osmocom/gprs/gmm/gmm_pdu.h
M include/osmocom/gprs/gmm/gmm_prim.h
M include/osmocom/gprs/gmm/gmm_private.h
M src/gmm/gmm.c
M src/gmm/gmm_pdu.c
M src/gmm/gmm_prim.c
M tests/gmm/gmm_prim_test.c
M tests/gmm/gmm_prim_test.err
M tests/gmm/gmm_prim_test.ok
9 files changed, 199 insertions(+), 28 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/50/32550/2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/32550
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I5c97642baac5ed29de63ae93fc7f0ecde5edf735
Gerrit-Change-Number: 32550
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: osmith, neels, fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/32549 )
Change subject: Fix 'Fix parsing of TLV_TYPE_SINGLE_TV'
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
See https://gerrit.osmocom.org/c/libosmocore/+/32014 for initial fix by myself.
Now wile using more the tlv_parser in libosmo-gprs I encountered this issue.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32549
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id619459c17976b77cd2c7e4179123bb06807285c
Gerrit-Change-Number: 32549
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 28 Apr 2023 15:37:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/32549 )
Change subject: Fix 'Fix parsing of TLV_TYPE_SINGLE_TV'
......................................................................
Fix 'Fix parsing of TLV_TYPE_SINGLE_TV'
A commit was merged recently attempting to fix decoding of
TLV_TYPE_SINGLE_TV. It did mostly a good job, but missed updating the
o_tag pointer used to fill in the structures.
This commit fixes that specific part missing.
Fixes: 559a6ee68359dab691a483573982e6f8c6439ae2
Change-Id: Id619459c17976b77cd2c7e4179123bb06807285c
---
M src/gsm/tlv_parser.c
1 file changed, 21 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/49/32549/1
diff --git a/src/gsm/tlv_parser.c b/src/gsm/tlv_parser.c
index e47b94f..f42c483 100644
--- a/src/gsm/tlv_parser.c
+++ b/src/gsm/tlv_parser.c
@@ -241,9 +241,13 @@
*o_tag = tag;
/* single octet TV IE */
- if (def->def[tag >> 4].type == TLV_TYPE_SINGLE_TV
+ if (def->def[tag >> 4].type == TLV_TYPE_SINGLE_TV) {
+ *o_tag = tag >> 4;
+ *o_val = buf;
+ *o_len = 1;
+ return 1;
+ } else if ((tag > 0x0f) && (def->def[tag & 0xf0].type == TLV_TYPE_SINGLE_TV)) {
/* backward compat for old IEs with half-octet tag defined as 0xN0: */
- || ((tag > 0x0f) && (def->def[tag & 0xf0].type == TLV_TYPE_SINGLE_TV))) {
*o_tag = tag & 0xf0;
*o_val = buf;
*o_len = 1;
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32549
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id619459c17976b77cd2c7e4179123bb06807285c
Gerrit-Change-Number: 32549
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: matanp.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bsc/+/32519
to look at the new patch set (#3).
Change subject: ctrl: Add getting access control class
......................................................................
ctrl: Add getting access control class
Change-Id: I279249f9047f5edacc9edf3d231e3e74023fc84e
---
M src/osmo-bsc/bts_ctrl.c
1 file changed, 52 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/19/32519/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32519
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I279249f9047f5edacc9edf3d231e3e74023fc84e
Gerrit-Change-Number: 32519
Gerrit-PatchSet: 3
Gerrit-Owner: matanp <matan1008(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: matanp <matan1008(a)gmail.com>
Gerrit-MessageType: newpatchset