lynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/40432?usp=email )
Change subject: gtpie: make ies const for getter
......................................................................
gtpie: make ies const for getter
Getter's don't modify the ie.
Making it const is compatible with previous versions.
Change-Id: I43195314b1cf416a1f2fd4d3ddd48c4eee462b0b
---
M gtp/gtpie.c
M include/osmocom/gtp/gtpie.h
2 files changed, 22 insertions(+), 22 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/gtp/gtpie.c b/gtp/gtpie.c
index 84a3ec2..1d2d4d2 100644
--- a/gtp/gtpie.c
+++ b/gtp/gtpie.c
@@ -155,7 +155,7 @@
* \param[in] type Tag/IEI for which we're looking
* \param[in] instance Instance (number of occurence) of this IEI
* \returns index into \a ie on success; -1 if not found */
-int gtpie_getie(union gtpie_member *ie[], int type, int instance)
+int gtpie_getie(union gtpie_member * const ie[], int type, int instance)
{
int j;
for (j = 0; j < GTPIE_SIZE; j++) {
@@ -172,7 +172,7 @@
* \param[in] type Tag/IEI for which we're looking
* \param[in] instance Instance (number of occurence) of this IEI
* \returns 1 if IEI instance present in \a ie; 0 if not */
-int gtpie_exist(union gtpie_member *ie[], int type, int instance)
+int gtpie_exist(union gtpie_member * const ie[], int type, int instance)
{
int j;
for (j = 0; j < GTPIE_SIZE; j++) {
@@ -192,7 +192,7 @@
* \param[inout] dst Caller-allocated buffer where to store value
* \param[in] size Size of \a dst in bytes
* \returns 0 on sucess; EOF in case value is larger than \a size */
-int gtpie_gettlv(union gtpie_member *ie[], int type, int instance,
+int gtpie_gettlv(union gtpie_member * const ie[], int type, int instance,
unsigned int *length, void *dst, unsigned int size)
{
int ien;
@@ -214,7 +214,7 @@
* \param[inout] dst Caller-allocated buffer where to store value
* \param[in] size Size of value in bytes
* \returns 0 on sucess; EOF in case IE not found */
-int gtpie_gettv0(union gtpie_member *ie[], int type, int instance,
+int gtpie_gettv0(union gtpie_member * const ie[], int type, int instance,
void *dst, unsigned int size)
{
int ien;
@@ -232,7 +232,7 @@
* \param[in] instance Instance (number of occurence) of this IEI
* \param[inout] dst Caller-allocated buffer where to store value
* \returns 0 on sucess; EOF in case IE not found */
-int gtpie_gettv1(union gtpie_member *ie[], int type, int instance,
+int gtpie_gettv1(union gtpie_member * const ie[], int type, int instance,
uint8_t * dst)
{
int ien;
@@ -250,7 +250,7 @@
* \param[in] instance Instance (number of occurence) of this IEI
* \param[inout] dst Caller-allocated buffer where to store value
* \returns 0 on sucess; EOF in case IE not found */
-int gtpie_gettv2(union gtpie_member *ie[], int type, int instance,
+int gtpie_gettv2(union gtpie_member * const ie[], int type, int instance,
uint16_t * dst)
{
int ien;
@@ -268,7 +268,7 @@
* \param[in] instance Instance (number of occurence) of this IEI
* \param[inout] dst Caller-allocated buffer where to store value
* \returns 0 on sucess; EOF in case IE not found */
-int gtpie_gettv4(union gtpie_member *ie[], int type, int instance,
+int gtpie_gettv4(union gtpie_member * const ie[], int type, int instance,
uint32_t * dst)
{
int ien;
@@ -286,7 +286,7 @@
* \param[in] instance Instance (number of occurence) of this IEI
* \param[inout] dst Caller-allocated buffer where to store value
* \returns 0 on sucess; EOF in case IE not found */
-int gtpie_gettv8(union gtpie_member *ie[], int type, int instance,
+int gtpie_gettv8(union gtpie_member * const ie[], int type, int instance,
uint64_t * dst)
{
int ien;
@@ -599,7 +599,7 @@
* \param[out] pack Pointer to caller-allocated buffer for raw GTP packet (GTPIE_MAX length)
* \param[out] len Encoded length of \a pack in bytes
* \returns 0 on sucess; 2 for out-of-space */
-int gtpie_encaps(union gtpie_member *ie[], void *pack, unsigned *len)
+int gtpie_encaps(union gtpie_member * const ie[], void *pack, unsigned *len)
{
int i;
unsigned char *p;
@@ -774,7 +774,7 @@
* \param[out] pack Pointer to caller-allocated buffer for raw GTP packet (GTPIE_MAX length)
* \param[out] len Encoded length of \a pack in bytes
* \returns 0 on sucess; 2 for out-of-space */
-int gtpie_encaps2(union gtpie_member ie[], unsigned int size,
+int gtpie_encaps2(const union gtpie_member ie[], unsigned int size,
void *pack, unsigned *len)
{
unsigned int i, j;
@@ -953,7 +953,7 @@
* \param[out] encoded_len Encoded length of \a pack in bytes
* \returns 0 on success; 2 for out-of-space
* GTP requires a certain order, the call must follow those which are defined for every message */
-int gtpie_encaps3(union gtpie_member *ies[], unsigned int ie_len,
+int gtpie_encaps3(union gtpie_member * const ies[], unsigned int ie_len,
void *pack, unsigned pack_len, unsigned *encoded_len)
{
unsigned int i;
diff --git a/include/osmocom/gtp/gtpie.h b/include/osmocom/gtp/gtpie.h
index b3e3ddf..b412159 100644
--- a/include/osmocom/gtp/gtpie.h
+++ b/include/osmocom/gtp/gtpie.h
@@ -301,27 +301,27 @@
uint8_t t, uint32_t v);
extern int gtpie_tv8(void *p, unsigned int *length, unsigned int size,
uint8_t t, uint64_t v);
-extern int gtpie_getie(union gtpie_member *ie[], int type, int instance);
-extern int gtpie_exist(union gtpie_member *ie[], int type, int instance);
-extern int gtpie_gettlv(union gtpie_member *ie[], int type, int instance,
+extern int gtpie_getie(union gtpie_member * const ie[], int type, int instance);
+extern int gtpie_exist(union gtpie_member * const ie[], int type, int instance);
+extern int gtpie_gettlv(union gtpie_member * const ie[], int type, int instance,
unsigned int *length, void *dst, unsigned int size);
-extern int gtpie_gettv0(union gtpie_member *ie[], int type, int instance,
+extern int gtpie_gettv0(union gtpie_member * const ie[], int type, int instance,
void *dst, unsigned int size);
-extern int gtpie_gettv1(union gtpie_member *ie[], int type, int instance,
+extern int gtpie_gettv1(union gtpie_member * const ie[], int type, int instance,
uint8_t * dst);
-extern int gtpie_gettv2(union gtpie_member *ie[], int type, int instance,
+extern int gtpie_gettv2(union gtpie_member * const ie[], int type, int instance,
uint16_t * dst);
-extern int gtpie_gettv4(union gtpie_member *ie[], int type, int instance,
+extern int gtpie_gettv4(union gtpie_member * const ie[], int type, int instance,
uint32_t * dst);
-extern int gtpie_gettv8(union gtpie_member *ie[], int type, int instance,
+extern int gtpie_gettv8(union gtpie_member * const ie[], int type, int instance,
uint64_t * dst);
extern int gtpie_decaps(union gtpie_member *ie[], int version,
const void *pack, unsigned len);
-extern int gtpie_encaps(union gtpie_member *ie[], void *pack, unsigned *len);
-extern int gtpie_encaps2(union gtpie_member ie[], unsigned int size,
+extern int gtpie_encaps(union gtpie_member * const ie[], void *pack, unsigned *len);
+extern int gtpie_encaps2(const union gtpie_member ie[], unsigned int size,
void *pack, unsigned *len);
-extern int gtpie_encaps3(union gtpie_member *ie[], unsigned int ie_len,
+extern int gtpie_encaps3(union gtpie_member * const ie[], unsigned int ie_len,
void *pack, unsigned pack_len, unsigned *encoded_len);
#endif /* !_GTPIE_H */
--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/40432?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: I43195314b1cf416a1f2fd4d3ddd48c4eee462b0b
Gerrit-Change-Number: 40432
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40621?usp=email )
Change subject: xua_snm: Tx DUNA/DAVA to ASPs with single AS and no coordinated rctx
......................................................................
xua_snm: Tx DUNA/DAVA to ASPs with single AS and no coordinated rctx
ss7_asp_get_all_rctx_be() properly skips rctx=0 as per special osmocom
meaning "no rctx IE". However, in this case the count of rctx was used
to skip sending notifications to ASPs not associated to the AS/PC becoming
available/unavailable.
This fixes problems when both osmo-bsc and osmo-stp configure the
routing-key with rctx=0, meaning both agree to use no rctx.
Change-Id: Ibda223090e7d503d8501c50f4cdf0b8b8c65a724
---
M src/xua_snm.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/21/40621/1
diff --git a/src/xua_snm.c b/src/xua_snm.c
index 04568d2..e613573 100644
--- a/src/xua_snm.c
+++ b/src/xua_snm.c
@@ -232,7 +232,7 @@
num_rctx = ss7_asp_get_all_rctx_be(asp, rctx, ARRAY_SIZE(rctx), as);
/* this can happen if the given ASP is only in the AS that reports the change,
* which shall be excluded */
- if (num_rctx == 0)
+ if (num_rctx == 0 && osmo_ss7_as_has_asp(as, asp))
continue;
xua_tx_snm_available(asp, rctx, num_rctx, aff_pc, num_aff_pc, info_str, available);
}
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40621?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: Ibda223090e7d503d8501c50f4cdf0b8b8c65a724
Gerrit-Change-Number: 40621
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40620?usp=email )
Change subject: bsc: Wait for AS to become unavailable in IUT before continuing test
......................................................................
bsc: Wait for AS to become unavailable in IUT before continuing test
Otherwise race conditions can ocurr, specially since during some time
the AS can be in PENDING state until finally going into DOWN state and
notifying the peer.
Change-Id: Idc84929d89cbac4eb67cd2740f98844253dde70d
---
M bsc/BSC_Tests.ttcn
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/20/40620/1
diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn
index d246b90..e6f8546 100644
--- a/bsc/BSC_Tests.ttcn
+++ b/bsc/BSC_Tests.ttcn
@@ -9409,6 +9409,7 @@
f_logp(BSCVTY, "disconnecting msc0");
f_bssap_idx_disconnect(0);
+ f_ctrl_exp_trap(IPA_CTRL, "msc." & int2str(0) & ".connection_status", "disconnected", timeout_val := 5.0);
/* Now round-robin would wrap to the first MSC, but since the first MSC is disconnected, it wraps around to msc
* 2 again. */
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40620?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Idc84929d89cbac4eb67cd2740f98844253dde70d
Gerrit-Change-Number: 40620
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-remsim/+/40570?usp=email )
Change subject: bankd: implicit remove a client mapping when creating a new mapping
......................................................................
bankd: implicit remove a client mapping when creating a new mapping
After a desynchronisation between the server and bankd happen (e.g. restart
the server), the server might request a mapping between a client slot and a
bankd slot while the bankd still has a different mapping for the same client
slot.
Example before this commit:
* server -> bankd: New Mapping (client 1/0, bankd 1/0)
* server <- bankd: Ack
* Restart server
* server -> bankd: New Mapping (client 1/0, bankd 2/0)
* server <- bankd: Reject (commit change to Ack)
Previous the second mapping got rejected, while the server
had no chance of knowing or asking the bankd about the old mapping.
Related: SYS#7470
Change-Id: Iae3f86a6e695e2d6580151b203df1dd0e2db625b
---
M src/bankd/bankd_main.c
1 file changed, 13 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/src/bankd/bankd_main.c b/src/bankd/bankd_main.c
index c43fe97..fe11497 100644
--- a/src/bankd/bankd_main.c
+++ b/src/bankd/bankd_main.c
@@ -207,7 +207,8 @@
} else {
rspro2bank_slot(&bs, &creq->bank);
rspro2client_slot(&cs, &creq->client);
- /* check if map exists */
+
+ /* check if slot map exists */
map = slotmap_by_bank(g_bankd->slotmaps, &bs);
if (map) {
if (client_slot_equals(&map->client, &cs)) {
@@ -215,10 +216,20 @@
resp = rspro_gen_CreateMappingRes(ResultCode_ok);
goto send_resp;
} else {
- LOGPFSML(srvc->fi, LOGL_NOTICE, "implicitly removing slotmap\n");
+ LOGPFSML(srvc->fi, LOGL_NOTICE, "slot already connected to client %d:%d. Removing old mapping.\n",
+ map->client.client_id, map->client.slot_nr);
bankd_srvc_remove_mapping(map);
}
}
+
+ /* check if client map exists */
+ map = slotmap_by_client(g_bankd->slotmaps, &cs);
+ if (map) {
+ LOGPFSML(srvc->fi, LOGL_NOTICE, "client already connected to slot %d:%d. Removing old mapping.\n",
+ map->bank.bank_id, map->bank.slot_nr);
+ bankd_srvc_remove_mapping(map);
+ }
+
/* Add a new mapping */
map = slotmap_add(g_bankd->slotmaps, &bs, &cs);
if (!map) {
--
To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/40570?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: Iae3f86a6e695e2d6580151b203df1dd0e2db625b
Gerrit-Change-Number: 40570
Gerrit-PatchSet: 4
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: lynxis lazus.
daniel has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/40590?usp=email )
Change subject: tests: add a simple gtpie_getie() test
......................................................................
Patch Set 5: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/40590?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: I5cd45d752592c7133d4452f4e4986783fb17e256
Gerrit-Change-Number: 40590
Gerrit-PatchSet: 5
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Tue, 08 Jul 2025 08:31:17 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: laforge.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40614?usp=email )
Change subject: Use xua_msg_free() everywhere to free xua_msg
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> we could probably also introduce a (rarely used in osmocom) talloc destructor to solve the problem o […]
Yes I sometimes do that myself when adding some types, or when some existing having no speciific desturctor suddenly need extra logic at free time.
But since the free API already exists, the best is to use it so it can be seen quickly where xua_msg are freed. This is specially interesting since those xua_msg actually pass to a good amount of functions.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40614?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I1d43478a5c430e92f1bd5a0b3d3606a39f378e44
Gerrit-Change-Number: 40614
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Mon, 07 Jul 2025 20:31:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Attention is currently required from: laforge, osmith.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40615?usp=email )
Change subject: Submit SCRC Routing Failure indications asynchronously
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
> does it really make sense to patch those specific error messages rather than introducing some generi […]
I'm not sure I'm following you. Routing Failure is a specific error-message/primitive or however you want to call it, between SCRC and SCOC/SCLC. See "Figure 1/Q.714 −−−− SCCP overview".
Also, by looking at the flow diagrams it can clearly be seen that the messages are expected to be async. This can be seen by the fact that eg. a block to send a CO/CL message is presented, and then the machine moves to a state where it can then handle a Routing Ind coming back.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/40615?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I17ae7174f7ffee8c9a004435e522803a97d4fb7b
Gerrit-Change-Number: 40615
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Mon, 07 Jul 2025 20:29:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>