Change in osmo-bsc[master]: osmo-bsc: Fix 'apply-config-file' CTRL command

2023-01-20 Thread arehbein
arehbein has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/31029 )


Change subject: osmo-bsc: Fix 'apply-config-file' CTRL command
..

osmo-bsc: Fix 'apply-config-file' CTRL command

Make 'apply-config-file' check the neighbor config, just as is done after 
config parsing on startup

Related: OS#5866
Change-Id: I24ae8cd7e5e0d15eab9fd04b1858072bf0bad36a
---
M src/osmo-bsc/bsc_ctrl.c
1 file changed, 10 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/29/31029/1

diff --git a/src/osmo-bsc/bsc_ctrl.c b/src/osmo-bsc/bsc_ctrl.c
index ca246e7..c1e1a3d 100644
--- a/src/osmo-bsc/bsc_ctrl.c
+++ b/src/osmo-bsc/bsc_ctrl.c
@@ -43,6 +43,7 @@
 #include 
 #include 
 #include 
+#include 

 static int verify_net_apply_config_file(struct ctrl_cmd *cmd, const char 
*value, void *_data)
 {
@@ -75,7 +76,6 @@
}

rc = vty_read_config_filep(cfile, NULL);
-   LOGP(DCTRL, LOGL_NOTICE, "Applying VTY snippet from %s returned %d\n", 
cmd->value, rc);
if (rc) {
cmd->reply = talloc_asprintf(cmd, "ParseError=%d", rc);
if (!cmd->reply)
@@ -83,6 +83,15 @@
goto close_ret;
}

+   rc = neighbors_check_cfg();
+   if (rc) {
+   cmd->reply = talloc_asprintf(cmd, "Errors in neighbor 
configuration");
+   if (!cmd->reply)
+   cmd->reply = "OOM";
+   goto close_ret;
+   }
+   LOGP(DCTRL, LOGL_NOTICE, "Applying VTY snippet from %s returned %d\n", 
cmd->value, rc);
+
cmd->reply = "OK";
cmd_ret = CTRL_CMD_REPLY;
 close_ret:

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31029
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I24ae8cd7e5e0d15eab9fd04b1858072bf0bad36a
Gerrit-Change-Number: 31029
Gerrit-PatchSet: 1
Gerrit-Owner: arehbein 
Gerrit-MessageType: newchange


Change in libosmocore[master]: Introduce netns API

2023-01-20 Thread Jenkins Builder
Attention is currently required from: osmith, laforge, pespin.
Jenkins Builder has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/31024 )

Change subject: Introduce netns API
..


Patch Set 4:

(1 comment)

File src/core/netns.c:

Robot Comment from checkpatch (run ID jenkins-gerrit-lint-2891):
https://gerrit.osmocom.org/c/libosmocore/+/31024/comment/676ed04b_41c987ab
PS4, Line 122:  rc = mkdir(NETNS_PREFIX_PATH, 
S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH);
Symbolic permissions 'S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH' are not 
preferred. Consider using octal permissions '0755'.



--
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 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Fri, 20 Jan 2023 19:37:16 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in libosmocore[master]: Introduce netns API

2023-01-20 Thread pespin
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 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


Change in libosmocore[master]: Introduce netns API

2023-01-20 Thread Jenkins Builder
Attention is currently required from: osmith, laforge.
Jenkins Builder has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/31024 )

Change subject: Introduce netns API
..


Patch Set 3:

(1 comment)

File src/core/netns.c:

Robot Comment from checkpatch (run ID jenkins-gerrit-lint-2889):
https://gerrit.osmocom.org/c/libosmocore/+/31024/comment/edca8c6f_01fa567b
PS3, Line 122:  rc = mkdir(NETNS_PREFIX_PATH, 
S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH);
Symbolic permissions 'S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH' are not 
preferred. Consider using octal permissions '0755'.



--
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 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Fri, 20 Jan 2023 19:33:36 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in libosmocore[master]: Introduce netns API

2023-01-20 Thread pespin
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 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: laforge 
Gerrit-MessageType: newpatchset


Change in libosmocore[master]: Introduce tundev API

2023-01-20 Thread pespin
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 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-MessageType: newpatchset


Change in osmo-hnbgw[master]: mark two possible asn1c leaks with FIXME

2023-01-20 Thread neels
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 
Gerrit-CC: Jenkins Builder
Gerrit-MessageType: abandon


Change in osmo-hnbgw[master]: fix SCCP conn leak on non-graceful HNB shutdown

2023-01-20 Thread neels
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 

+#include 
+
 #include 
 #include 
 #include 
@@ -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, >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

Change in osmo-hnbgw[master]: mark two possible asn1c leaks with FIXME

2023-01-20 Thread neels
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(_out, 0, sizeof(accept_out));
rc = hnbap_encode_ueregisteraccepties(_out, );
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 
Gerrit-MessageType: newchange


Change in libosmocore[master]: Add osmo_io with initial poll backend

2023-01-20 Thread laforge
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 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Attention: osmith 
Gerrit-Attention: Hoernchen 
Gerrit-Attention: neels 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Attention: daniel 
Gerrit-Comment-Date: Fri, 20 Jan 2023 16:35:51 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith 
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: daniel 
Gerrit-MessageType: comment


Change in osmo-hlr[master]: Add vty `reject-cause` to set the reject cause

2023-01-20 Thread keith
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 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: neels 
Gerrit-CC: keith 
Gerrit-CC: pespin 
Gerrit-Attention: neels 
Gerrit-Attention: pespin 
Gerrit-Attention: daniel 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Fri, 20 Jan 2023 14:02:50 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: keith 
Comment-In-Reply-To: lynxis lazus 
Gerrit-MessageType: comment


Change in osmo-hlr[master]: Add vty `reject-cause` to set the reject cause

2023-01-20 Thread keith
keith has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/16808 )

Change subject: Add vty `reject-cause` to set the reject cause
..

Add vty `reject-cause` to set the reject cause

Allow to set the LU reject cause independently for both of the
following cases; either when an IMSI is unknown to the HLR or
when the mslookup client does not a receive a timely response
to a GSUP request for the remote home HLR.

Original patchset modified by 

Change-Id: Icea39020c23fbbea9e92847df76af8986fdbf48a
---
M include/osmocom/hlr/hlr.h
M include/osmocom/hlr/hlr_vty.h
M src/hlr.c
M src/hlr_vty.c
M src/lu_fsm.c
M src/proxy.c
M tests/test_nodes.vty
7 files changed, 98 insertions(+), 6 deletions(-)

Approvals:
  laforge: Looks good to me, but someone else must approve
  fixeria: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/hlr/hlr.h b/include/osmocom/hlr/hlr.h
index 3acb3c5..b27fb3d 100644
--- a/include/osmocom/hlr/hlr.h
+++ b/include/osmocom/hlr/hlr.h
@@ -23,6 +23,7 @@
 #pragma once

 #include 
+#include 
 #include 
 #include 
 #include 
@@ -55,6 +56,8 @@

struct llist_head euse_list;
struct hlr_euse *euse_default;
+   enum gsm48_gmm_cause reject_cause;
+   enum gsm48_gmm_cause no_proxy_reject_cause;

/* NCSS (call independent) session guard timeout value */
int ncss_guard_timeout;
diff --git a/include/osmocom/hlr/hlr_vty.h b/include/osmocom/hlr/hlr_vty.h
index 10eddc3..83691b8 100644
--- a/include/osmocom/hlr/hlr_vty.h
+++ b/include/osmocom/hlr/hlr_vty.h
@@ -45,5 +45,5 @@

 int hlr_vty_is_config_node(struct vty *vty, int node);
 int hlr_vty_go_parent(struct vty *vty);
-void hlr_vty_init(void);
+void hlr_vty_init(void *hlr_ctx);
 void dgsm_vty_init(void);
diff --git a/src/hlr.c b/src/hlr.c
index c6ae4fc..8183d9b 100644
--- a/src/hlr.c
+++ b/src/hlr.c
@@ -324,7 +324,7 @@
  " Returning slightly 
inaccurate cause 'IMSI Unknown' via GSUP");
return rc;
case -ENOENT:
-   osmo_gsup_req_respond_err(req, GMM_CAUSE_IMSI_UNKNOWN, 
"IMSI unknown");
+   osmo_gsup_req_respond_err(req, g_hlr->reject_cause, 
"IMSI unknown");
return rc;
default:
osmo_gsup_req_respond_err(req, GMM_CAUSE_NET_FAIL, 
"failure to look up IMSI in db");
@@ -759,6 +759,8 @@
g_hlr->db_file_path = talloc_strdup(g_hlr, HLR_DEFAULT_DB_FILE_PATH);
g_hlr->mslookup.server.mdns.domain_suffix = talloc_strdup(g_hlr, 
OSMO_MDNS_DOMAIN_SUFFIX_DEFAULT);
g_hlr->mslookup.client.mdns.domain_suffix = talloc_strdup(g_hlr, 
OSMO_MDNS_DOMAIN_SUFFIX_DEFAULT);
+   g_hlr->reject_cause = GMM_CAUSE_IMSI_UNKNOWN;
+   g_hlr->no_proxy_reject_cause = GMM_CAUSE_IMSI_UNKNOWN;

/* Init default (call independent) SS session guard timeout value */
g_hlr->ncss_guard_timeout = NCSS_GUARD_TIMEOUT_DEFAULT;
@@ -775,7 +777,7 @@
osmo_stats_init(hlr_ctx);
vty_init(_info);
ctrl_vty_init(hlr_ctx);
-   hlr_vty_init();
+   hlr_vty_init(hlr_ctx);
dgsm_vty_init();
osmo_cpu_sched_vty_init(hlr_ctx);
handle_options(argc, argv);
diff --git a/src/hlr_vty.c b/src/hlr_vty.c
index a440c42..02e0cde 100644
--- a/src/hlr_vty.c
+++ b/src/hlr_vty.c
@@ -25,7 +25,10 @@
  *
  */

+#include 
+
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -40,6 +43,36 @@
 #include 
 #include 

+static const struct value_string gsm48_gmm_cause_vty_names[] = {
+   { GMM_CAUSE_IMSI_UNKNOWN,   "imsi-unknown" },
+   { GMM_CAUSE_ILLEGAL_MS, "illegal-ms" },
+   { GMM_CAUSE_PLMN_NOTALLOWED,"plmn-not-allowed" },
+   { GMM_CAUSE_LA_NOTALLOWED,  "la-not-allowed" },
+   { GMM_CAUSE_ROAMING_NOTALLOWED, "roaming-not-allowed" },
+   { GMM_CAUSE_NO_SUIT_CELL_IN_LA, "no-suitable-cell-in-la" },
+   { GMM_CAUSE_NET_FAIL,   "net-fail" },
+   { GMM_CAUSE_CONGESTION, "congestion" },
+   { GMM_CAUSE_GSM_AUTH_UNACCEPT,  "auth-unacceptable" },
+   { GMM_CAUSE_PROTO_ERR_UNSPEC,   "proto-error-unspec" },
+   { 0, NULL },
+};
+
+/* TS 24.008 4.4.4.7 */
+static const struct value_string gsm48_gmm_cause_vty_descs[] = {
+   { GMM_CAUSE_IMSI_UNKNOWN,   " #02: (IMSI unknown in HLR)" },
+   { GMM_CAUSE_ILLEGAL_MS, " #03  (Illegal MS)" },
+   { GMM_CAUSE_PLMN_NOTALLOWED," #11: (PLMN not allowed)" },
+   { GMM_CAUSE_LA_NOTALLOWED,  " #12: (Location Area not allowed)" },
+   { GMM_CAUSE_ROAMING_NOTALLOWED, " #13: (Roaming not allowed in this 
location area)" },
+   { GMM_CAUSE_NO_SUIT_CELL_IN_LA, " #15: (No Suitable Cells In Location 
Area [continue search in PLMN])." },
+   { GMM_CAUSE_NET_FAIL,   " #17: (Network Failure)" },
+   { GMM_CAUSE_CONGESTION, " #22: 

Change in libosmocore[master]: Add osmo_io with initial poll backend

2023-01-20 Thread Jenkins Builder
Attention is currently required from: osmith, Hoernchen, neels, laforge, 
pespin, fixeria.
Jenkins Builder 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:

(1 comment)

File src/osmo_io.c:

Robot Comment from checkpatch (run ID jenkins-gerrit-lint-2884):
https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/37b415fc_6cadbe92
PS4, Line 146:  if (!msg) {
braces {} are not necessary for single statement blocks



--
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 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Attention: osmith 
Gerrit-Attention: Hoernchen 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Fri, 20 Jan 2023 13:58:49 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in libosmocore[master]: Add osmo_io with initial poll backend

2023-01-20 Thread daniel
Attention is currently required from: osmith, Hoernchen, neels, laforge, 
pespin, fixeria.
Hello osmith, Jenkins Builder, Hoernchen, neels, pespin, fixeria,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/libosmocore/+/30934

to look at the new patch set (#4).

Change subject: Add osmo_io with initial poll backend
..

Add osmo_io with initial poll backend

* make backend configurable for later
* segmentation callback for chunked streams
* logging target for osmo_io
* support partial writes

Change-Id: I50d73cf550d6ce8154bf827bf47408131cf5b0a0
Related: SYS#5094, OS#5751
---
M TODO-RELEASE
M include/Makefile.am
M include/osmocom/core/logging.h
A include/osmocom/core/osmo_io.h
M src/Makefile.am
M src/logging.c
A src/osmo_io.c
A src/osmo_io_internal.h
A src/osmo_io_poll.c
M tests/logging/logging_vty_test.vty
10 files changed, 882 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/34/30934/4
--
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 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: neels 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-CC: laforge 
Gerrit-Attention: osmith 
Gerrit-Attention: Hoernchen 
Gerrit-Attention: neels 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-MessageType: newpatchset


Change in libosmocore[master]: Add osmo_io with initial poll backend

2023-01-20 Thread daniel
Attention is currently required from: osmith, Hoernchen, neels, laforge, 
pespin, fixeria.
daniel has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/30934 )

Change subject: Add osmo_io with initial poll backend
..


Patch Set 3:

(33 comments)

This change is ready for review.

File include/osmocom/core/osmo_io.h:

https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/a0e3d24c_0c13d2a8
PS3, Line 49: void osmo_iofd_read_enable(struct osmo_io_fd *iofd);
> duplicated declaration? one probably should be "disable"
Ack


https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/77b6da4e_53027caf
PS3, Line 55: unsigned int osmo_iofd_get_priv(struct osmo_io_fd *iofd);
> const iofd
Done


https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/2e098e12_c9327515
PS3, Line 56: int osmo_iofd_get_fd(struct osmo_io_fd *iofd);
> const iofd
Done


File src/osmo_io.c:

https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/d1fe65a8_5f61b0c1
PS3, Line 44: extern struct iofd_backend_ops iofd_poll_ops;
> we have an internal header, maybe move this there?
Ack


https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/9faaa528_cda404be
PS3, Line 47: static enum osmo_io_backend g_backend;
> g_io_backend?
Ack


https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/38b482c4_bdaa1ff1
PS3, Line 85:  *  \returns the newly allocated msghdr or NULL in case of error 
*/
> I suggest printing an error message and exit(1) here, since this may be the 
> result of an unexpected  […]
Ack


https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/d5b4285c_c62e8f3a
PS3, Line 121:   iofd->msgb_alloc.size + headroom, 
headroom, iofd->name);
> the ownserhip of msghdr->msg is not really clear here. […]
For io_uring the msghdr will also be used for read requests and then the msg 
might continue to live in the read_cb after the msghdr has already been freed.


https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/93a037c3_1ed3de9e
PS3, Line 181:
> always
Done


https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/7f3b57f6_8f6e35ca
PS3, Line 203: e
> Ack
It can be static


https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/880fcbfd_46071b9b
PS3, Line 224: superfluous
> superflous IMHO means that it's not needed. […]
Ack


https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/9c49029c_dd87789b
PS3, Line 225:  msg_pending = iofd_msgb_alloc(iofd);
> I wonder why do we need to allocate + copy to a new msgb here.
This path is chosen if we receive more than one message. The original msgb is 
passed on to the recv callback (where it will be freed) and the pending data is 
stored in a new msgb.


https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/0e19c65a_be3c04f1
PS3, Line 230:  /* Trim the original msgb to size */
> iofd->pending may already be set here? in that case may leak the previous 
> iofd->pending?
pending should always be NULL here because either iofd_msgb_pending() of 
iofd_msgb_pending_or_alloc() has been called before.

I'll see if I can restructure the code to make it clearer, like passing msgbs 
in and out here and setting iofd->pending in the functions that call this one.


https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/56f23a5c_0255cef3
PS3, Line 271: {
> coding style
Done


https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/05bd9ad5_b68c6af8
PS3, Line 273:
> coding style
Done


https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/2cc0a478_cf885f44
PS3, Line 306: {
> coding style
Done


https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/fcfdae14_dfe16f0e
PS3, Line 308:
> coding style
Done


https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/36a34157_d300dbb4
PS3, Line 360: t osmo_io_fd);
> given that there's only one known legacy user of the priv_nr (libosmo-abis), 
> maybe we remove this fr […]
Ack


https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/db9e9630_ce96f7e9
PS3, Line 360: smo_io_fd);
 :  if (!iofd
> we have three integer argiuments after each other, and lots of arguments, 
> which makes it easy to hav […]
I guess we could even have defaults for msgb size/headroom and have 
osmo_iofd_set_alloc_info() available to set it manually?


https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/87d6056c_515bbebe
PS3, Line 391:
> Ack
Done


https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/b19c7579_2ddc1353
PS3, Line 408:  i
> c++ style comment
Done


https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/804141de_c1216e69
PS3, Line 410:
> no need for this if, must probably (free function)
Ack


https://gerrit.osmocom.org/c/libosmocore/+/30934/comment/d83e1f13_af9084b0
PS3, Line 416:
> you still want to free the memory if close somehow fails, otherwise you'll 
> leak it?
The close callback return value indicates whether the free() should be deferred 
or not, it does not indicate failure. E.g. if a user calls 

Change in libosmocore[master]: Introduce netns API

2023-01-20 Thread pespin
Attention is currently required from: osmith, laforge.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/31024 )

Change subject: Introduce netns API
..


Patch Set 2:

(1 comment)

File src/core/netns.c:

https://gerrit.osmocom.org/c/libosmocore/+/31024/comment/f456e336_ab9bb481
PS2, Line 170:  if (rc < 0)
> this condition is never true, as rc now has the return code of sigprocmask
Ack



--
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: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: osmith 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Fri, 20 Jan 2023 13:36:56 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith 
Gerrit-MessageType: comment


Change in osmo-ci[master]: lint: ignore SYMBOLIC_PERMS

2023-01-20 Thread pespin
Attention is currently required from: osmith, laforge.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/31026 )

Change subject: lint: ignore SYMBOLIC_PERMS
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
I'm personally fine using any of the two types, and I'm fine with them being 
accepted.
If POSIX provides some defines I see no reason to use it tbh. It's one "man" 
page away in any case.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/31026
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I47cfeef55c6cece95fed706b67c117274097977d
Gerrit-Change-Number: 31026
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-CC: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Fri, 20 Jan 2023 13:35:17 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-ci[master]: lint: ignore SYMBOLIC_PERMS

2023-01-20 Thread pespin
Attention is currently required from: osmith, laforge.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/31026 )

Change subject: lint: ignore SYMBOLIC_PERMS
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/31026
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I47cfeef55c6cece95fed706b67c117274097977d
Gerrit-Change-Number: 31026
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Reviewer: pespin 
Gerrit-Attention: osmith 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Fri, 20 Jan 2023 13:35:21 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-hlr[master]: Add vty `reject-cause` to set the reject cause

2023-01-20 Thread pespin
Attention is currently required from: neels, keith, daniel, lynxis lazus.
pespin 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:
> @pespin: My motivation is for c3 events. The problem here lies in the spec. 
> […]
Hi,
fine go with the merge if you want, since you both seem to have been looking 
more at the problem. I only wanted to make sure this was properly considered.



--
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 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: neels 
Gerrit-CC: keith 
Gerrit-CC: pespin 
Gerrit-Attention: neels 
Gerrit-Attention: keith 
Gerrit-Attention: daniel 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Fri, 20 Jan 2023 13:32:34 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: keith 
Comment-In-Reply-To: lynxis lazus 
Gerrit-MessageType: comment


Change in libosmocore[master]: Introduce tundev API

2023-01-20 Thread osmith
Attention is currently required from: laforge, pespin.
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/31025 )

Change subject: Introduce tundev API
..


Patch Set 4: Code-Review+1

(5 comments)

File src/core/tun.c:

https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/93a049cd_ab592f3d
PS4, Line 73: *NULL
missing space


https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/42a62f49_6cf0e28b
PS4, Line 238:  LOGTUN(tundev, LOGL_ERROR, "Cannot obtain netns 
file descriptor: %s (%d)\n",
log netns_name here?


https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/9beebce0_4594246d
PS4, Line 245:  if (tundev->netns_name) {
same condition, why is this not part of the above if-block?


https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/e9fe1af4_5796b15e
PS4, Line 405: whien
when


https://gerrit.osmocom.org/c/libosmocore/+/31025/comment/c0d58412_e31bf2e3
PS4, Line 421: osmo_tundev_encaps
> probably just my personal point of view, but let's see if others agree: I 
> find it a bit odd to call  […]
agreed



--
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: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Fri, 20 Jan 2023 09:44:14 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


Change in libosmocore[master]: Introduce netns API

2023-01-20 Thread osmith
Attention is currently required from: laforge, pespin.
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/31024 )

Change subject: Introduce netns API
..


Patch Set 2:

(2 comments)

File src/core/netns.c:

https://gerrit.osmocom.org/c/libosmocore/+/31024/comment/a5eb6598_8c5858de
PS2, Line 68: whch
which


https://gerrit.osmocom.org/c/libosmocore/+/31024/comment/e150684a_2e829db1
PS2, Line 170:  if (rc < 0)
this condition is never true, as rc now has the return code of sigprocmask



--
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: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Fri, 20 Jan 2023 09:23:26 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-ci[master]: lint: ignore SYMBOLIC_PERMS

2023-01-20 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/31026 )

Change subject: lint: ignore SYMBOLIC_PERMS
..


Patch Set 1: Code-Review-1

(1 comment)

Patchset:

PS1:
Actually I'm not sure if this a good idea, I find the numbers more readable. 
What's the advantage of using the symbols?

Rationale for why this check was added to checkpatch (from back when Linus used 
to swear on LKML):
https://lore.kernel.org/all/ca+55afw5v23t-zvdzp-mmd_eyxf8wbafwwb59934fv7g21u...@mail.gmail.com/T/#u



--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/31026
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I47cfeef55c6cece95fed706b67c117274097977d
Gerrit-Change-Number: 31026
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Fri, 20 Jan 2023 09:20:59 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in libosmocore[master]: Introduce netns API

2023-01-20 Thread osmith
Attention is currently required from: laforge, pespin.
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/31024 )

Change subject: Introduce netns API
..


Patch Set 2:

(1 comment)

File src/core/netns.c:

https://gerrit.osmocom.org/c/libosmocore/+/31024/comment/080e33e6_cb099158
PS1, Line 123:  rc = mkdir(NETNS_PREFIX_PATH, 
S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH);
> Ack
-> https://gerrit.osmocom.org/c/osmo-ci/+/31026



--
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: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Attention: laforge 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Fri, 20 Jan 2023 08:28:10 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


Change in osmo-ci[master]: lint: ignore SYMBOLIC_PERMS

2023-01-20 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/31026 )


Change subject: lint: ignore SYMBOLIC_PERMS
..

lint: ignore SYMBOLIC_PERMS

As discussed here:
https://gerrit.osmocom.org/c/libosmocore/+/31024/2#message-10cca5d20f7a6455ccb3a4273f1c80bd74d1bb89

Change-Id: I47cfeef55c6cece95fed706b67c117274097977d
---
M lint/checkpatch/checkpatch_osmo.sh
1 file changed, 2 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/26/31026/1

diff --git a/lint/checkpatch/checkpatch_osmo.sh 
b/lint/checkpatch/checkpatch_osmo.sh
index 86d2fe1..9e422cf 100755
--- a/lint/checkpatch/checkpatch_osmo.sh
+++ b/lint/checkpatch/checkpatch_osmo.sh
@@ -74,6 +74,7 @@
 # * SPDX_LICENSE_TAG: we don't place it on line 1
 # * SPLIT_STRING: we do split long messages over multiple lines
 # * STRING_FRAGMENTS: sometimes used intentionally to improve readability
+# * SYMBOLIC_PERMS: recommends using octal permissions over symbolic ones, not 
followed
 # * TRACING_LOGGING: recommends to use kernel's internal ftrace instead of 
printf("%s()\n", __func__)
 # * TRAILING_STATEMENTS: not followed, e.g. 'while (osmo_select_main_ctx(1) > 
0);' is put in one line
 # * UNNECESSARY_BREAK: not followed (see 
https://gerrit.osmocom.org/c/libosmo-netif/+/26429)
@@ -113,6 +114,7 @@
--ignore SPDX_LICENSE_TAG \
--ignore SPLIT_STRING \
--ignore STRING_FRAGMENTS \
+   --ignore SYMBOLIC_PERMS \
--ignore TRACING_LOGGING \
--ignore TRAILING_STATEMENTS \
--ignore UNNECESSARY_BREAK \

--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/31026
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I47cfeef55c6cece95fed706b67c117274097977d
Gerrit-Change-Number: 31026
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange