falconia has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/36908?usp=email )
Change subject: rsl: parse RSL_IE_OSMO_OSMUX_CID correctly
......................................................................
rsl: parse RSL_IE_OSMO_OSMUX_CID correctly
This IE has TLV format, even though the only valid form is a single
value octet. To guard against pathological input with L=0 in this IE,
we have to check the length explicitly with TLVP_PRES_LEN before
accepting TLVP_VAL as if it was TV.
Change-Id: I15fa75b6c30d7fa0bf50424d25fc47a088dada0a
---
M src/common/rsl.c
1 file changed, 19 insertions(+), 2 deletions(-)
Approvals:
pespin: Looks good to me, approved
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
diff --git a/src/common/rsl.c b/src/common/rsl.c
index fa5f495..40690f0 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -2978,7 +2978,8 @@
struct tlv_parsed tp;
struct gsm_lchan *lchan = msg->lchan;
struct gsm_bts *bts = lchan->ts->trx->bts;
- const uint8_t *payload_type, *speech_mode, *payload_type2, *osmux_cid, *csd_fmt;
+ const uint8_t *payload_type, *speech_mode, *payload_type2, *csd_fmt;
+ const uint8_t *osmux_cid = NULL;
uint32_t connect_ip = 0;
uint16_t connect_port = 0;
int rc, inc_ip_port = 0;
@@ -3029,7 +3030,9 @@
if (payload_type2)
LOGPC(DRSL, LOGL_DEBUG, "payload_type2=%u ", *payload_type2);
- osmux_cid = TLVP_VAL(&tp, RSL_IE_OSMO_OSMUX_CID);
+ /* this IE has TLV format when TV would have been good enough */
+ if (TLVP_PRES_LEN(&tp, RSL_IE_OSMO_OSMUX_CID, 1))
+ osmux_cid = TLVP_VAL(&tp, RSL_IE_OSMO_OSMUX_CID);
if (osmux_cid)
LOGPC(DRSL, LOGL_DEBUG, "osmux_cid=%u ", *osmux_cid);
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/36908?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I15fa75b6c30d7fa0bf50424d25fc47a088dada0a
Gerrit-Change-Number: 36908
Gerrit-PatchSet: 2
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: laforge.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/36899?usp=email )
Change subject: commands.py: Resolve possible variable use before assignment
......................................................................
Patch Set 1:
(1 comment)
File pySim/commands.py:
https://gerrit.osmocom.org/c/pysim/+/36899/comment/3115adc0_2e0acccc
PS1, Line 222: raise ValueError('Cannot determine length of TLV-length')
This looks wrong, as the code preceding this becomes dead/no-op.
I guess this `raise` should be under another `else`?
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/36899?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Id1a892c3446e472699e77f076c2414277e92c98d
Gerrit-Change-Number: 36899
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 23 May 2024 16:17:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: jolly, laforge.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36871?usp=email )
Change subject: asterisk: AMI: Implement AuthReq procedure
......................................................................
Patch Set 3:
(1 comment)
File asterisk/Asterisk_Tests.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36871/comment/43a3b338_84e2…
PS1, Line 393: auts := "9a6460bcc3c84a3eac69455a93b6");
> we should have tests covering […]
Yes, I still need to coordinate with @andreas@eversberg.eu regarding all the cases.
I think for now I'll work on the normal case, and go add also successful normal call tests, and then once everything (all the test infra) is in place start adding variants for the different "unusual" scenarios.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36871?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I77aeeb79cbddfc515e1626385f1b176da7319ba0
Gerrit-Change-Number: 36871
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 23 May 2024 16:01:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: jolly <andreas(a)eversberg.eu>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: laforge, neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/36913?usp=email )
Change subject: add jhash.h, copied from linux/jhash.h
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
> btw, I'm, not sure we really want to have all that code as a static inline like in the kernel. […]
I'm not saying we should do it one way or another, just raising the topic here.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36913?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I0c9652bbc9e2a18b1200e7d63bb6f64ded7d75fa
Gerrit-Change-Number: 36913
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 23 May 2024 15:59:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: laforge, neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/36913?usp=email )
Change subject: add jhash.h, copied from linux/jhash.h
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
btw, I'm, not sure we really want to have all that code as a static inline like in the kernel.
In the kernel it's just built statically but in here we are putting it inside a library, which makes it more difficult to manage if it ever needs improvements/fixing and recompiling.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36913?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I0c9652bbc9e2a18b1200e7d63bb6f64ded7d75fa
Gerrit-Change-Number: 36913
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 23 May 2024 15:58:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: laforge, neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/36539?usp=email )
Change subject: per-HNB GTP-U traffic counters via nft
......................................................................
Patch Set 13:
(2 comments)
Patchset:
PS6:
> regarding split files, i kind of like that everything is contained in a single .c file. […]
With thew new comments you added it's "good enough" because one can clearly see which thread executes that function, so we can merge it this way for now.
My point is that, precisely, if you put all the nft thread in a seprate file, it suddenly becomes clear that all that code belongs to that thread, and you don't need to go marking each function specifying who runs it.
Furthermore, it becomes easier to follow interaction of 2 threads by having one file open by the side of the other one.
File src/osmo-hnbgw/nft_kpi.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/36539/comment/3ecb5f62_9a8da3da
PS12, Line 694: unsigned long period_us = osmo_tdef_get(hnbgw_T_defs, -34, OSMO_TDEF_US, 1000000);
> ah yes this is exactly what i thought
yes, this is simple, usual in code, so I'm not asking something out of this world I think. Feel free to submit as a follow-up patch, but I definetly think this should be merged soon after this patch is merged.
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36539?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Ib2f0a9252715ea4b2fe9c367aa65f771357768ca
Gerrit-Change-Number: 36539
Gerrit-PatchSet: 13
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 23 May 2024 15:48:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: laforge, neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/36539?usp=email )
Change subject: per-HNB GTP-U traffic counters via nft
......................................................................
Patch Set 13:
(1 comment)
File src/osmo-hnbgw/nft_kpi.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/36539/comment/e70b0cfe_bb5550fe
PS9, Line 994: nft_kpi_get_counters_schedule();
> I agree with neels that his approach implements what we discussed (for the reasons we discussed and […]
As mentioned, I'm just asking to account for the elapsed time between triggers by writing a few more lines of code, which I already presented as an example. It's 10 min of work, nothing requiring days or weeks of work...
If it's painful doing it in this same commit, feel free to submit it as a follow-up improvement, but this should be there when merging this feature because it's super easier and will make users not wasting time asking themselves why the timers are triggering out of time.
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36539?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Ib2f0a9252715ea4b2fe9c367aa65f771357768ca
Gerrit-Change-Number: 36539
Gerrit-PatchSet: 13
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Thu, 23 May 2024 15:44:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: laforge, pespin.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/36539?usp=email )
Change subject: per-HNB GTP-U traffic counters via nft
......................................................................
Patch Set 13:
(5 comments)
Patchset:
PS6:
> Actually it is the same thread running twice. […]
regarding split files, i kind of like that everything is contained in a single .c file. I thought a bit and it might be even easier to understand if the nft_thread is in a separate .c file, but then we also need another .h file and so on...
for me it's fine in one .c file (with the new comments describing what is going on), but just say the word and i can try to split to another .c file too.
File src/osmo-hnbgw/hnbgw_hnbap.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/36539/comment/2c4c4abc_2eb93499
PS6, Line 571: hnb_persistent_connected(ctx->persistent);
> I agree pespin's wording is more clear.
Done
File src/osmo-hnbgw/hnbgw_vty.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/36539/comment/82819dea_b42b49ca
PS12, Line 885: "nft-kpi [TABLE_NAME]",
> shouldn't this be in some kind of #ifdef block to suppress offering those vty commands in case the p […]
This is a basic disagreement we encounter repeatedly.
IMHO parsing of a config file should be conceptually independent from what the binary supports.
- First read what the user intends, then error later if that is not possible.
- A command that is described in the docs should not appear as a syntax error; instead as a semantic error.
I much prefer if the VTY commands are always available also for practical reasons:
- to generate automatic xml-output of VTY commands for the manuals,
we don't have to specifically compile a binary with all possible features enabled.
We just dump the VTY with the simplest dependencies and have all the docs.
- allows simpler vty testing: a 'list' always shows the same items, etc.
- allows simpler working with cfg files: if parsing fails for a missing command,
it is hard to understand what is going on. The following instead is very clear:
"you configured nft-kpi but this binary is built without support"
- the user can pass a 'no nft-kpi' command to a binary without nft-kpi support,
which would otherwise be an error.
This patch quits the program if nft-kpi is present in the cfg but there is no support for that compiled in, with a sensible error message, at program startup.
File src/osmo-hnbgw/nft_kpi.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/36539/comment/5a7cbe46_24696b8d
PS9, Line 994: nft_kpi_get_counters_schedule();
> I agree with neels that his approach implements what we discussed (for the reasons we discussed and […]
an idea:
best of both worlds: measure the time it took from the last request, and if there is still some left over, wait only for the remaining time. If time is up, don't wait at all.
We can do that in a separate patch...
File src/osmo-hnbgw/nft_kpi.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/36539/comment/1bd57bcc_2bd5dee9
PS12, Line 694: unsigned long period_us = osmo_tdef_get(hnbgw_T_defs, -34, OSMO_TDEF_US, 1000000);
> elasped = now() - prev_start_ts; […]
ah yes this is exactly what i thought
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36539?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Ib2f0a9252715ea4b2fe9c367aa65f771357768ca
Gerrit-Change-Number: 36539
Gerrit-PatchSet: 13
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 23 May 2024 15:44:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment