Attention is currently required from: pespin.
andrei.gosman(a)gmail.com has posted comments on this change by andrei.gosman(a)gmail.com. ( https://gerrit.osmocom.org/c/libosmocore/+/43574?usp=email )
Change subject: core/socket: init_osa: pass family-correct len
......................................................................
Patch Set 1:
(1 comment)
Correct, AF_UNIX would fail here. Worth being precise about what this patch changes for that case: nothing.
Before the patch bind() got sizeof(struct osmo_sockaddr), 128. osmo_sockaddr_size() returns the same 128 for AF_UNIX, because the family falls through to the default branch. AF_UNIX is therefore exactly as broken after this patch as before it, and the patch is a strict fix for AF_INET and AF_INET6 only. No regression, but no improvement either.
The type does not stop it: the union has a sockaddr_storage member, 128 bytes, and sockaddr_un fits in it (106 bytes on Darwin, and well under 128 on glibc too). libosmocore relies on that in osmo_sock_get_name_buf(), which getsockname()s into an osmo_sockaddr and then reads the AF_UNIX case back through a struct sockaddr_un *.
Nor does anything in the function reject it. The AF_UNSPEC case in socket_test.c fails only because it is a BIND|CONNECT pair with mismatched families and the same-family check catches it. A BIND-only call with an unsupported family reaches bind() with namelen 128, unchecked.
In practice AF_UNIX callers use osmo_sock_unix_init(), which computes SUN_LEN() itself, and every in-tree osmo_sock_init_osa() caller passes IP. So this is latent rather than an active bug. It is an exported symbol though, so out-of-tree callers are not covered by that argument.
Two ways to close it, if you want it closed:
(a) osmo_sockaddr_size() default branch: LOGP an error and return 0 instead of sizeof(struct osmo_sockaddr). One place, and it covers bind, connect and the three osmo_io msg_namelen callers, where a bogus family currently makes sendmsg read 128 stray bytes instead of treating msg_name as unset. It does change documented behaviour: the docstring promises the size of struct osmo_sockaddr for an unsupported family.
(b) Early return -EINVAL in osmo_sock_init_osa() for anything other than AF_INET and AF_INET6. Narrower, no contract change.
I lean (a) for the wider effect, but (b) is the conservative one. Either way I would send it as a separate change on top of this one rather than fold it in, since it is a different bug from the namelen fix. Tell me which you prefer, or mark this resolved if you would rather leave it as is.
File src/core/socket.c:
https://gerrit.osmocom.org/c/libosmocore/+/43574/comment/a40f9606_a7fdb777?… :
PS1, Line 603: if (bind(sfd, &local->u.sa, osmo_sockaddr_size(local)) == -1) {
> AFAIU this will still fail for you when using a UNIX socket here?
Context: this patch is
extracted from a port of the Osmocom stack to native macOS ARM64.
On AF_UNIX: struct osmo_sockaddr's union does not include sockaddr_un
today (only sockaddr_in, sockaddr_in6, sockaddr_storage). UNIX sockets
have their own path via osmo_sock_unix_init(), which uses SUN_LEN() and
does not touch osmo_sockaddr. So AF_UNIX cannot reach this code path
even before the patch. Behaviour for hypothetical AF_UNIX input is
unchanged: previously 128 bytes (sizeof struct osmo_sockaddr), now 128
bytes (sizeof struct sockaddr_storage via the default branch in
osmo_sockaddr_size). Both wrong on Darwin, both irrelevant given the
union restriction. If we ever add sockaddr_un to the union, a separate
AF_UNIX case in osmo_sockaddr_size() returning SUN_LEN(sun) would be
needed.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/43574?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I37cb08a6e1809d51c97e666f980d4c68f8b56933
Gerrit-Change-Number: 43574
Gerrit-PatchSet: 1
Gerrit-Owner: andrei.gosman(a)gmail.com <andrei.gosman(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 21 Sep 2026 18:45:30 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
andrei.gosman(a)gmail.com has posted comments on this change by andrei.gosman(a)gmail.com. ( https://gerrit.osmocom.org/c/osmo-mgw/+/43576?usp=email )
Change subject: mgcp_client: generate mgcp_common.h with printf
......................................................................
Patch Set 4:
Patchset 4: commit message first-sentence wording aligned with the code in patchset 3 (single format string, not one argument per line). Zero code change, same tree.
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/43576?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ibc547513745104212469ccddbc2e636c985cffe5
Gerrit-Change-Number: 43576
Gerrit-PatchSet: 4
Gerrit-Owner: andrei.gosman(a)gmail.com <andrei.gosman(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 21 Sep 2026 18:31:38 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-mgw/+/43576?usp=email
to look at the new patch set (#4).
Change subject: mgcp_client: generate mgcp_common.h with printf
......................................................................
mgcp_client: generate mgcp_common.h with printf
The rule in include/osmocom/mgcp_client/Makefile.am that copies
<osmocom/mgcp/mgcp_common.h> into the mgcp_client include directory
writes its banner with "echo -e". The -e option is a bash extension.
Shells whose echo follows the XSI convention expand the backslash
escapes on their own and do not take options, so -e is passed through
as the first argument to print.
The generated header then starts with
-e /*
and every file that includes it fails to compile:
mgcp_common.h:1:2: error: unknown type name 'e'
Measured on macOS, where /bin/sh is bash invoked as sh: the escapes are
expanded as intended, but the leading "-e " is printed literally. Any
shell with an XSI-style echo, dash among them, behaves the same way.
The build only works where /bin/sh accepts -e.
Replace it with printf and a single format string. printf is POSIX, takes
no such option, and produces the same seven lines on every shell.
Change-Id: Ibc547513745104212469ccddbc2e636c985cffe5
Signed-off-by: Andrei Gosman <andrei.gosman(a)gmail.com>
---
M include/osmocom/mgcp_client/Makefile.am
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/76/43576/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/43576?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ibc547513745104212469ccddbc2e636c985cffe5
Gerrit-Change-Number: 43576
Gerrit-PatchSet: 4
Gerrit-Owner: andrei.gosman(a)gmail.com <andrei.gosman(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
andrei.gosman(a)gmail.com has posted comments on this change by andrei.gosman(a)gmail.com. ( https://gerrit.osmocom.org/c/osmo-mgw/+/43576?usp=email )
Change subject: mgcp_client: generate mgcp_common.h with printf
......................................................................
Patch Set 3:
Good point, no real reason to split. The single-string form is closer to the original minus the -e bug, smaller diff, and equally portable: POSIX printf expands \n in the format string on every shell. Split-into-args was defensive against embedded escapes in shell strings, but printf handles \n itself in the format string, so there is nothing to defend against. Reworked in patchset 3:
printf '/*\n\n DO NOT EDIT THIS FILE!\n THIS IS OVERWRITTEN DURING BUILD\n This is an automatic copy of <osmocom/mgcp/mgcp_common.h>\n\n */\n' > mgcp_common.h
Byte-identical output to patchset 2 and to what a working `echo -e` would have produced: 7 lines, 7 newlines, 132 bytes, same sha256. Verified with diff, and by running the recipe line through bash, dash, ksh and zsh.
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/43576?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ibc547513745104212469ccddbc2e636c985cffe5
Gerrit-Change-Number: 43576
Gerrit-PatchSet: 3
Gerrit-Owner: andrei.gosman(a)gmail.com <andrei.gosman(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 21 Sep 2026 18:25:32 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Attention is currently required from: andrei.gosman(a)gmail.com.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-mgw/+/43576?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: mgcp_client: generate mgcp_common.h with printf
......................................................................
mgcp_client: generate mgcp_common.h with printf
The rule in include/osmocom/mgcp_client/Makefile.am that copies
<osmocom/mgcp/mgcp_common.h> into the mgcp_client include directory
writes its banner with "echo -e". The -e option is a bash extension.
Shells whose echo follows the XSI convention expand the backslash
escapes on their own and do not take options, so -e is passed through
as the first argument to print.
The generated header then starts with
-e /*
and every file that includes it fails to compile:
mgcp_common.h:1:2: error: unknown type name 'e'
Measured on macOS, where /bin/sh is bash invoked as sh: the escapes are
expanded as intended, but the leading "-e " is printed literally. Any
shell with an XSI-style echo, dash among them, behaves the same way.
The build only works where /bin/sh accepts -e.
Replace it with printf and one argument per line. printf is POSIX, takes
no such option, and produces the same seven lines on every shell.
Change-Id: Ibc547513745104212469ccddbc2e636c985cffe5
Signed-off-by: Andrei Gosman <andrei.gosman(a)gmail.com>
---
M include/osmocom/mgcp_client/Makefile.am
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/76/43576/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/43576?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ibc547513745104212469ccddbc2e636c985cffe5
Gerrit-Change-Number: 43576
Gerrit-PatchSet: 3
Gerrit-Owner: andrei.gosman(a)gmail.com <andrei.gosman(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: andrei.gosman(a)gmail.com <andrei.gosman(a)gmail.com>
lynxis lazus has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/39562?usp=email )
Change subject: Rework SGSN code to use new libvlr code
......................................................................
Patch Set 19:
(1 comment)
File src/sgsn/gprs_gmm.c:
https://gerrit.osmocom.org/c/osmo-sgsn/+/39562/comment/92f4c0cd_5a17a2cf?us… :
PS19, Line 2564: return false;
This must be true and might get replaced by the Gn / 2G/4G patch
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/39562?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I9c5b4ec1b337c35e85c2d1a3d09b318380ae6ef8
Gerrit-Change-Number: 39562
Gerrit-PatchSet: 19
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 21 Sep 2026 18:17:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/43689?usp=email )
Change subject: Transceiver52M: fix typo in a docstring
......................................................................
Transceiver52M: fix typo in a docstring
Change-Id: I05adf74a8e8cb9efb59f9e6b53025865dee42ecc
---
M Transceiver52M/Transceiver.cpp
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
pespin: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index fb2cdd9..616ae10 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -702,7 +702,7 @@
/*
* Pull bursts from the FIFO and handle according to the slot
- * and burst correlation type. Equalzation is currently disabled.
+ * and burst correlation type. Equalization is currently disabled.
* returns 0 on success (bi filled), negative on error (bi content undefined):
* -ENOENT: timeslot is off (fn and tn in bi are filled),
* -EIO: read error
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/43689?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I05adf74a8e8cb9efb59f9e6b53025865dee42ecc
Gerrit-Change-Number: 43689
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-trx/+/43689?usp=email )
Change subject: Transceiver52M: fix typo in a docstring
......................................................................
Transceiver52M: fix typo in a docstring
Change-Id: I05adf74a8e8cb9efb59f9e6b53025865dee42ecc
---
M Transceiver52M/Transceiver.cpp
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/89/43689/1
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index fb2cdd9..616ae10 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -702,7 +702,7 @@
/*
* Pull bursts from the FIFO and handle according to the slot
- * and burst correlation type. Equalzation is currently disabled.
+ * and burst correlation type. Equalization is currently disabled.
* returns 0 on success (bi filled), negative on error (bi content undefined):
* -ENOENT: timeslot is off (fn and tn in bi are filled),
* -EIO: read error
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/43689?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I05adf74a8e8cb9efb59f9e6b53025865dee42ecc
Gerrit-Change-Number: 43689
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: jolly.
pespin has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmocore/+/43685?usp=email )
Change subject: Add new VTY node for libosmo-octoi
......................................................................
Patch Set 1:
(1 comment)
File include/osmocom/vty/command.h:
https://gerrit.osmocom.org/c/libosmocore/+/43685/comment/c126af96_0ae63fdc?… :
PS1, Line 112: RESERVED2_NODE, /*!< Reserved for later extensions */
@andreas@eversberg.eu this commit broke compilation with older versions of octoi which was using these enums. Please submit a new patch adding "#define RESERVED2_NODE L_OCTOI_SRV_NODE" and for other fields removed here to fix the problem.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/43685?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I497ee1503fed1681fae217bfe4d7be9b1580448f
Gerrit-Change-Number: 43685
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Comment-Date: Mon, 21 Sep 2026 15:29:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No