pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/38706?usp=email )
Change subject: hnbgw: Fix wrong map object retrieved from hashtable
......................................................................
hnbgw: Fix wrong map object retrieved from hashtable
If several map objects (mapping between RUA and SCCP transports for a
given Iu connection) ended up in the same hashtable bucket, then the
first one was always returned by map_from_conn_id().
As a result, when such collisions happened (e.g. when a big number of
connections were inserted) a user could see a Iu message coming from SCCP
connection "A" end up being forwarded to an unrelated RUA connection
"B".
Related: SYS#6602
Fixes: f3caea850bc892551cd09bbaf49f798c172590c4
Change-Id: I107f461bf5bcb92262422c893b23d190659f6f72
(cherry picked from commit 1150705a90330c096ff860dcf1c464684bdb33d3)
---
M src/osmo-hnbgw/hnbgw_cn.c
1 file changed, 4 insertions(+), 2 deletions(-)
Approvals:
pespin: Verified
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/src/osmo-hnbgw/hnbgw_cn.c b/src/osmo-hnbgw/hnbgw_cn.c
index 6618fb9..7bfe526 100644
--- a/src/osmo-hnbgw/hnbgw_cn.c
+++ b/src/osmo-hnbgw/hnbgw_cn.c
@@ -446,8 +446,10 @@
const struct osmo_prim_hdr *oph)
{
struct hnbgw_context_map *map;
- hash_for_each_possible(hsu->hnbgw_context_map_by_conn_id, map, hnbgw_sccp_user_entry, conn_id)
- return map;
+ hash_for_each_possible(hsu->hnbgw_context_map_by_conn_id, map, hnbgw_sccp_user_entry, conn_id) {
+ if (map->scu_conn_id == conn_id)
+ return map;
+ }
LOGP(DRANAP, LOGL_ERROR, "Rx for unknown SCCP connection ID: %u: %s\n",
conn_id, osmo_scu_prim_hdr_name_c(OTC_SELECT, oph));
return NULL;
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/38706?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: pespin/rel-1.6.0
Gerrit-Change-Id: I107f461bf5bcb92262422c893b23d190659f6f72
Gerrit-Change-Number: 38706
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/38700?usp=email )
Change subject: drop config.vty tests from make check
......................................................................
drop config.vty tests from make check
The intention of those tests was to test various osmo-hnbgw startup
scenarios. It seemed the fastest/simplest way to do it at the time, but
the output depends on another library, regularly causing test fallout.
Keep the tests around for reference. They can still be invoked manually
with 'make config-tests'.
Related: OS#6380
Change-Id: I9c1540904b13d25db1c7933a88f6cc4b028fdd2b
(cherry picked from commit 4468d8728e07d9e74a8b08d8bf2d903cc4c5bbfc)
---
M tests/Makefile.am
1 file changed, 5 insertions(+), 1 deletion(-)
Approvals:
pespin: Verified
laforge: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
diff --git a/tests/Makefile.am b/tests/Makefile.am
index a4dcf4c..257c0bf 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -43,7 +43,6 @@
if ENABLE_EXT_TESTS
python-tests:
$(MAKE) vty-test
- $(MAKE) config-tests
osmotestvty.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v
osmotestconfig.py -p $(abs_top_srcdir) -w $(abs_top_builddir) -v
else
@@ -69,6 +68,11 @@
$(U) $(srcdir)/$(VTY_TEST)
# Test each config/*.cfg file with the corresponding config/*.vty transcript test.
+#
+# To be invoked manually only: This is not part of 'make check' because the
+# output may change when libosmo-sccp changes its VTY appearance, which can
+# cause annoying test fallout.
+#
# Each config test runs an osmo-hnbgw process to talk to, so they must not run concurrently.
# To prevent 'make -j N' from running these tests in parallel, call a script with a linear for-loop.
.PHONY: config-tests
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/38700?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: pespin/rel-1.6.0
Gerrit-Change-Id: I9c1540904b13d25db1c7933a88f6cc4b028fdd2b
Gerrit-Change-Number: 38700
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>