fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/36616?usp=email )
Change subject: vty: fix memleak in host_config_set()
......................................................................
vty: fix memleak in host_config_set()
Not only we call this function from vty_read_config_file(), but
also from config_write_file_cmd. Thus we leak memory when doing
'write file FILE' in the VTY.
Change-Id: I356818aae3addab6db39de9a625453b7435b7cc1
---
M src/vty/command.c
1 file changed, 14 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/16/36616/1
diff --git a/src/vty/command.c b/src/vty/command.c
index a3e0e36..1719690 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -4297,7 +4297,7 @@
/* Set config filename. Called from vty.c */
void host_config_set(const char *filename)
{
- host.config = talloc_strdup(tall_vty_cmd_ctx, filename);
+ osmo_talloc_replace_string(tall_vty_cmd_ctx, &host.config, filename);
}
const char *host_config_file(void)
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36616?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: I356818aae3addab6db39de9a625453b7435b7cc1
Gerrit-Change-Number: 36616
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36613?usp=email )
Change subject: fixup: sgsn: fix unused param in f_routing_area_update()
......................................................................
fixup: sgsn: fix unused param in f_routing_area_update()
In 1ee1edd2 I changed f_routing_area_update() to actually use the
given RAI as Old RAI in the Routing Area Update Request. Not only
this broke the testcase scenario (Old RAI shall remain unchanged!),
but also started triggering a use-after-free bug in osmo-sgsn.
Passing 'ran_index := 1' is enough for the second Routing Area Update
Request to show up with a different RAI (at BSSGP level), however the
Old RAI IE shall obviously indicate the *old* RAI, not the new one.
A follow-up commit will add a separate testcase to reproduce the
use-after-free problem in osmo-sgsn.
Change-Id: Ib16985cb08834a238ca4f7a747c43097f430ed6f
Fixes: 1ee1edd2 "sgsn: fix unused param in f_routing_area_update()"
Related: OS#6439
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 24 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/13/36613/1
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 67e815b..0371e29 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -2734,7 +2734,7 @@
f_bssgp_client_register(g_pars.imsi, g_pars.tlli, BSSGP_PROC[1]);
log("sending second RAU via different RA");
- f_routing_area_update(f_cellid_to_RAI(g_pars.bssgp_cell_id[1]), ran_index := 1);
+ f_routing_area_update(old_ra := g_pars.ra, ran_index := 1);
f_detach_mo(c_GMM_DTT_MO_GPRS, true, true, 1);
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36613?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: Ib16985cb08834a238ca4f7a747c43097f430ed6f
Gerrit-Change-Number: 36613
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: neels, pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/36540?usp=email )
Change subject: nft_kpi: retrieve counters in a separate thread
......................................................................
Patch Set 3:
(1 comment)
Patchset:
PS3:
> Your responses on the blocking behavior still do not have empirical substance. […]
I am surprised to hear that the VTY would use blocking writes. telnet_new_connection() uses osmo_fd_register() on the accept()ed socket, which as it first step sets the Fd non-blocking. libosmovty's buffer_flush_available() at least claims to deal with non-blocking sockets.
Likewise, every new CTRL file descriptor goes through osmo_fd_register() which sets O_NONBLOCK as described above.
Which blocking "various syscalls" are you referring to? I would generally consider those bugs and it would be good to document those as such if you know any.
The general intent was always to have no blocking syscalls, specifically no blocking I/O from osmo* programs. I know of very few exceptions (like parts of osmo-e1d) and there it is a TODO to get them fixed and there are related comments in the code.
So the point is not how long nft takes [in your testing], or whether we trust you. The point is that doing anything non-blocking is - AFAICT - a grave violation of the general architecture and paradigm of how we do things in the non-blocking, asynchronous, event-driven osmo-* world.
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/36540?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: I9dc54e6bc94c553f45adfa71ae8ad70be4afbc8f
Gerrit-Change-Number: 36540
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Sun, 21 Apr 2024 06:18:18 +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: fixeria, osmith, pespin.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36601?usp=email )
Change subject: sgsn: TC_sgsn_context_req_in: match PDP Context IE
......................................................................
Patch Set 6:
(1 comment)
File sgsn/SGSN_Tests.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36601/comment/7009ec0a_33d8…
PS6, Line 3748: f_pdp_ctx_act(apars);
> Not really. In the current implementation `apars. […]
sounds a bit we'd need multiple test cases: one where the assigned address == the requested address, one without a requested address and one where they don't match?
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36601?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: I965c0200ea380c55dc0cd8d3f8e5110883ce2646
Gerrit-Change-Number: 36601
Gerrit-PatchSet: 6
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Sun, 21 Apr 2024 06:02:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment