Attention is currently required from: osmith, laforge, pespin.
Hello osmith, Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/31024
to look at the new patch set (#4).
Change subject: Introduce netns API
......................................................................
Introduce netns API
Write a new API and implementation to manage network namespace related
operations.
This will be used by the upcoming tundev module.
Change-Id: I0f2fba2fa42250a07211a7b7f479498f27c529da
---
M TODO-RELEASE
M include/osmocom/core/Makefile.am
A include/osmocom/core/netns.h
M src/core/Makefile.am
A src/core/netns.c
5 files changed, 235 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/24/31024/4
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31024
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I0f2fba2fa42250a07211a7b7f479498f27c529da
Gerrit-Change-Number: 31024
Gerrit-PatchSet: 4
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-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: osmith, laforge.
Hello osmith, Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/31024
to look at the new patch set (#3).
Change subject: Introduce netns API
......................................................................
Introduce netns API
Write a new API and implementation to manage network namespace related
operations.
This will be used by the upcoming tundev module.
Change-Id: I0f2fba2fa42250a07211a7b7f479498f27c529da
---
M TODO-RELEASE
M include/osmocom/core/Makefile.am
A include/osmocom/core/netns.h
M src/core/Makefile.am
A src/core/netns.c
5 files changed, 235 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/24/31024/3
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31024
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I0f2fba2fa42250a07211a7b7f479498f27c529da
Gerrit-Change-Number: 31024
Gerrit-PatchSet: 3
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-MessageType: newpatchset
Attention is currently required from: laforge, pespin.
Hello osmith, Jenkins Builder, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/31025
to look at the new patch set (#5).
Change subject: Introduce tundev API
......................................................................
Introduce tundev API
The data structre is held private so that it can be easily extended in
the future.
Change-Id: I3463271666df1e85746fb7b06ec45a17024b8c53
---
M TODO-RELEASE
M include/osmocom/core/Makefile.am
A include/osmocom/core/tun.h
M src/core/Makefile.am
A src/core/tun.c
5 files changed, 861 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/25/31025/5
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31025
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3463271666df1e85746fb7b06ec45a17024b8c53
Gerrit-Change-Number: 31025
Gerrit-PatchSet: 5
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-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
neels has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/31027 )
Change subject: mark two possible asn1c leaks with FIXME
......................................................................
Abandoned
accidental push
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/31027
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Ic13ca13bf3c95eb7ab20fad508d03bc899f34f15
Gerrit-Change-Number: 31027
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-MessageType: abandon
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/31027 )
Change subject: mark two possible asn1c leaks with FIXME
......................................................................
mark two possible asn1c leaks with FIXME
Change-Id: Ic13ca13bf3c95eb7ab20fad508d03bc899f34f15
---
M src/osmo-hnbgw/hnbgw_hnbap.c
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/27/31027/1
diff --git a/src/osmo-hnbgw/hnbgw_hnbap.c b/src/osmo-hnbgw/hnbgw_hnbap.c
index 4aefe2b..07612c7 100644
--- a/src/osmo-hnbgw/hnbgw_hnbap.c
+++ b/src/osmo-hnbgw/hnbgw_hnbap.c
@@ -147,6 +147,7 @@
memset(&accept_out, 0, sizeof(accept_out));
rc = hnbap_encode_ueregisteraccepties(&accept_out, &accept);
if (rc < 0) {
+ // FIXME: leaking 'accept'
return rc;
}
@@ -343,6 +344,8 @@
* never be a UE DE-REGISTER for this UE from the HNB, and the ue_context would linger forever. */
if (ue_allocated)
ue_context_free(ue_allocated);
+
+ // FIXME: leaking 'accept'
return rc;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/31027
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Ic13ca13bf3c95eb7ab20fad508d03bc899f34f15
Gerrit-Change-Number: 31027
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/31028 )
Change subject: fix SCCP conn leak on non-graceful HNB shutdown
......................................................................
fix SCCP conn leak on non-graceful HNB shutdown
Clean up SCCP connections when a HNB disconnects.
When a HNB disconnects, we clean up all RUA <-> SCCP connection state
for that HNB. In that cleanup, discarding the SCCP connection is so far
missing.
Add a flag indicating true between SCCP CC and DISCONNECT. Hence we can
tell during context_map_deactivate() whether the cleanup is graceful
(DISCONNECT already sent) or non-graceful (need to DISCONNECT).
Change-Id: Icc2db9f6c0b2d0a814ff1110ffbe5e8f7f629222
---
M include/osmocom/hnbgw/context_map.h
M src/osmo-hnbgw/context_map.c
M src/osmo-hnbgw/hnbgw_cn.c
M src/osmo-hnbgw/hnbgw_rua.c
4 files changed, 26 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/28/31028/1
diff --git a/include/osmocom/hnbgw/context_map.h b/include/osmocom/hnbgw/context_map.h
index 99efe8a..fe09da0 100644
--- a/include/osmocom/hnbgw/context_map.h
+++ b/include/osmocom/hnbgw/context_map.h
@@ -43,6 +43,10 @@
bool is_ps;
/* SCCP User SAP connection ID */
uint32_t scu_conn_id;
+ /* Set to true on SCCP Conn Conf, set to false when an OSMO_SCU_PRIM_N_DISCONNECT has been sent for the SCCP
+ * User SAP conn. Useful to avoid leaking SCCP connections: guarantee that an OSMO_SCU_PRIM_N_DISCONNECT gets
+ * sent, even when RUA fails to gracefully disconnect. */
+ bool scu_conn_active;
/* Pending data to be sent: when we send an "empty" SCCP CR first, the initial RANAP message will be sent in a
* separate DT once the CR is confirmed. This caches the initial RANAP message. */
struct msgb *cached_msg;
diff --git a/src/osmo-hnbgw/context_map.c b/src/osmo-hnbgw/context_map.c
index 98dffad..31ba032 100644
--- a/src/osmo-hnbgw/context_map.c
+++ b/src/osmo-hnbgw/context_map.c
@@ -26,6 +26,8 @@
#include <osmocom/core/timer.h>
+#include <osmocom/sigtran/sccp_helpers.h>
+
#include <osmocom/hnbgw/hnbgw.h>
#include <osmocom/hnbgw/hnbgw_rua.h>
#include <osmocom/hnbgw/context_map.h>
@@ -174,6 +176,12 @@
if (map->state != MAP_S_RESERVED2)
map->state = MAP_S_RESERVED1;
+ /* Is SCCP still active and needs to be disconnected ungracefully? */
+ if (map->scu_conn_active) {
+ osmo_sccp_tx_disconn(map->hnb_ctx->gw->sccp.cnlink->sccp_user, map->scu_conn_id, NULL, 0);
+ map->scu_conn_active = false;
+ }
+
/* a possibly still existing MGW FSM must be terminated when the context
* map is deactivated. (this is a cornercase) */
if (map->mgw_fi) {
diff --git a/src/osmo-hnbgw/hnbgw_cn.c b/src/osmo-hnbgw/hnbgw_cn.c
index 7cbfcec..c4189e8 100644
--- a/src/osmo-hnbgw/hnbgw_cn.c
+++ b/src/osmo-hnbgw/hnbgw_cn.c
@@ -337,6 +337,8 @@
struct osmo_prim_hdr *oph)
{
struct osmo_ss7_instance *ss7 = osmo_sccp_get_ss7(cnlink->gw->sccp.client);
+ struct hnbgw_context_map *map;
+
LOGP(DMAIN, LOGL_DEBUG, "handle_cn_conn_conf() conn_id=%d, addrs: called=%s calling=%s responding=%s\n",
param->conn_id,
osmo_sccp_addr_to_str_c(OTC_SELECT, ss7, ¶m->called_addr),
@@ -346,9 +348,17 @@
/* Nothing needs to happen for RUA, RUA towards the HNB doesn't seem to know any confirmations to its CONNECT
* operation. */
+ map = context_map_by_cn(cnlink, param->conn_id);
+ if (!map)
+ return 0;
+
+ /* SCCP connection is confirmed. Mark conn as active, i.e. requires a DISCONNECT to clean up the SCCP
+ * connection. */
+ map->scu_conn_active = true;
+
/* If our initial SCCP CR was sent without data payload, then the initial RANAP message is cached and waiting to
* be sent as soon as the SCCP connection is confirmed. See if that is the case, send cached data. */
- context_map_send_cached_msg(context_map_by_cn(cnlink, param->conn_id));
+ context_map_send_cached_msg(map);
return 0;
}
diff --git a/src/osmo-hnbgw/hnbgw_rua.c b/src/osmo-hnbgw/hnbgw_rua.c
index f4e24d7..215379a 100644
--- a/src/osmo-hnbgw/hnbgw_rua.c
+++ b/src/osmo-hnbgw/hnbgw_rua.c
@@ -252,6 +252,9 @@
prim->u.disconnect.conn_id = map->scu_conn_id;
prim->u.disconnect.cause = cause;
release_context_map = true;
+ /* Mark SCCP conn as gracefully disconnected */
+ if (map)
+ map->scu_conn_active = false;
break;
case OSMO_SCU_PRIM_N_UNITDATA:
prim->u.unitdata.called_addr = *remote_addr;
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/31028
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Icc2db9f6c0b2d0a814ff1110ffbe5e8f7f629222
Gerrit-Change-Number: 31028
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: osmith, Hoernchen, neels, pespin, fixeria, daniel.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30934 )
Change subject: Add osmo_io with initial poll backend
......................................................................
Patch Set 4:
(6 comments)
File src/osmo_io.c:
https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/6d24eba8_18c9e1a3
PS3, Line 356: unsigned int size, unsigned int headroom,
: int fd
> I guess we could even have defaults for msgb size/headroom and have osmo_iofd_set_alloc_info() avail […]
yes, we could go for that.
https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/c2d9f460_4318f3f3
PS3, Line 414: talloc_free(iofd);
> The close callback return value indicates whether the free() should be deferred or not, it does not […]
I think Pau's comment was related to the ops.close == NULL case, where you don't free the iofd at all. So I guess talloc_free should be called if (close == NULL || (close && close(iofd))
File src/osmo_io_internal.h:
https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/ea5723dc_ec22fb88
PS3, Line 87: // TODO: SCTP_*
> I wanted to keep this patch as-is and add sctp support in a separate one. […]
Ack
File src/osmo_io_poll.c:
https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/3c922bdc_5f9c8cd9
PS3, Line 40: what
> In socket.c it's called what in the callback, when in the ofd and flags in the internal code. […]
Ack
https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/06a0b455_8e16eca4
PS3, Line 71: rc = write(ofd->fd, msgb_data(msg), msgb_length(msg));
> There is no iofd->flags, did you mean msghdr->flags? […]
the normal "read/write" case might be worth a dedicated function as we don't need a serialized msgheader heap allocation for those, right?
https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/0f9dbbd6_88b2d852
PS3, Line 104: socklen_t addrlen = sizeof(struct sockaddr);
> I'd use sizeof(saddr) since that most accurately describes the size recvfrom is allowed to write to.
Ack
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30934
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I50d73cf550d6ce8154bf827bf47408131cf5b0a0
Gerrit-Change-Number: 30934
Gerrit-PatchSet: 4
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 20 Jan 2023 16:35:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: daniel <dwillmann(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: neels, pespin, daniel, lynxis lazus.
keith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/16808 )
Change subject: Add vty `reject-cause` to set the reject cause
......................................................................
Patch Set 11:
(1 comment)
Patchset:
PS11:
> Hi, […]
I created a feature request https://osmocom.org/issues/5865
It's not that I don't think this issue could be refined, but I don't think this patch does anything badly, per se, and can be built upon if anyway wants further functionality. So merging.
--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/16808
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Icea39020c23fbbea9e92847df76af8986fdbf48a
Gerrit-Change-Number: 16808
Gerrit-PatchSet: 11
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-CC: keith <keith(a)rhizomatica.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Fri, 20 Jan 2023 14:02:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: keith <keith(a)rhizomatica.org>
Comment-In-Reply-To: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-MessageType: comment