Attention is currently required from: Andrei G.
pespin has posted comments on this change by Andrei G. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/43583?usp=email )
Change subject: lib/getopt1: declare _getopt_internal()
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/43583?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: Ia8bfe94dfd1ea1f4b270f1661305d6247dfc361b
Gerrit-Change-Number: 43583
Gerrit-PatchSet: 1
Gerrit-Owner: Andrei G <andrei.gosman(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: Andrei G <andrei.gosman(a)gmail.com>
Gerrit-Comment-Date: Thu, 10 Sep 2026 13:40:41 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/43585?usp=email )
Change subject: ggsn: use the runtime tun interface name
......................................................................
ggsn: use the runtime tun interface name
The IP pool of an APN excludes the addresses of its own tun interface.
alloc_ippool_blacklist() finds them with netdev_ip_local_get(), which
walks getifaddrs() and matches on the interface name, and it passes
apn->tun.cfg.dev_name, the name from the configuration file.
tun_ip_local_get() does the same with tun->devname when it looks up the
IPv6 link-local address.
The configured name is not always the name the interface ends up with.
libosmocore already knows this: osmo_tundev keeps dev_name current, and
tundev_dev_name_chg_cb() rewrites it on rename, logging "netdev changed
name". Once that happens, or wherever the kernel picks the name itself,
the lookup is done under a name getifaddrs() does not report, no
addresses are found, and the blacklist is empty.
An empty blacklist is not a harmless miss. The pool then hands out its
first address, which is the tun's own, so the first PDP context gets
the address of the GGSN side of the link and collides with it.
Observed on Darwin, where the kernel always names a utun itself and a
requested "tun4" comes back as "utun6": the first attached UE was given
10.45.0.1, the tun address. With the fix it gets 10.45.0.2.
Take the name from the open osmo_tundev with
osmo_tundev_get_dev_name(), which returns what the interface is called
now, in both places. Fall back to the configured name when there is no
tundev, which is the gtp kernel mode path. No change where the two
names agree, which is the normal case on Linux.
Change-Id: Ibd754ea3a5be4d5227488d0de571723b69e9d39d
Signed-off-by: Andrei Gosman <andrei.gosman(a)gmail.com>
---
M ggsn/ggsn.c
M lib/tun.c
2 files changed, 18 insertions(+), 4 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
Jenkins Builder: Verified
pespin: Looks good to me, approved
diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index 3177713..79efae3 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -174,23 +174,31 @@
static int alloc_ippool_blacklist(struct apn_ctx *apn, struct in46_prefix **blacklist, bool ipv6)
{
-
+ const char *dev_name = apn->tun.cfg.dev_name;
int flags, len, len2, i;
*blacklist = NULL;
+ /* The kernel may give the interface another name than the one that
+ * was configured (a Darwin utun: "tun4" requested, "utun6" assigned).
+ * getifaddrs() lists the addresses under the real name, so ask the
+ * open tun device for it; otherwise the blacklist stays empty and the
+ * pool hands the tun's own address to the first PDP context. */
+ if (apn->tun.tun && apn->tun.tun->tundev.tundev)
+ dev_name = osmo_tundev_get_dev_name(apn->tun.tun->tundev.tundev);
+
if (ipv6)
flags = IP_TYPE_IPv6_NONLINK;
else
flags = IP_TYPE_IPv4;
while (1) {
- len = netdev_ip_local_get(apn->tun.cfg.dev_name, NULL, 0, flags);
+ len = netdev_ip_local_get(dev_name, NULL, 0, flags);
if (len < 1)
return len;
*blacklist = talloc_zero_size(apn, len * sizeof(struct in46_prefix));
- len2 = netdev_ip_local_get(apn->tun.cfg.dev_name, *blacklist, len, flags);
+ len2 = netdev_ip_local_get(dev_name, *blacklist, len, flags);
if (len2 < 1) {
talloc_free(*blacklist);
*blacklist = NULL;
diff --git a/lib/tun.c b/lib/tun.c
index 60d9b5e..13a8b9d 100644
--- a/lib/tun.c
+++ b/lib/tun.c
@@ -279,5 +279,11 @@
*/
int tun_ip_local_get(const struct tun_t *tun, struct in46_prefix *prefix_list, size_t prefix_size, int flags)
{
- return netdev_ip_local_get(tun->devname, prefix_list, prefix_size, flags);
+ /* Ask the tun device for the name the kernel gave the interface; it can
+ * differ from the configured one (Darwin utun) and getifaddrs() only
+ * knows the real one. */
+ const char *devname = tun->devname;
+ if (tun->tundev.tundev)
+ devname = osmo_tundev_get_dev_name(tun->tundev.tundev);
+ return netdev_ip_local_get(devname, prefix_list, prefix_size, flags);
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/43585?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: Ibd754ea3a5be4d5227488d0de571723b69e9d39d
Gerrit-Change-Number: 43585
Gerrit-PatchSet: 2
Gerrit-Owner: Andrei G <andrei.gosman(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: Andrei G.
pespin has posted comments on this change by Andrei G. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/43585?usp=email )
Change subject: ggsn: use the runtime tun interface name
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/43585?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: Ibd754ea3a5be4d5227488d0de571723b69e9d39d
Gerrit-Change-Number: 43585
Gerrit-PatchSet: 1
Gerrit-Owner: Andrei G <andrei.gosman(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: Andrei G <andrei.gosman(a)gmail.com>
Gerrit-Comment-Date: Thu, 10 Sep 2026 13:40:34 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-dev/+/43616?usp=email )
Change subject: gen_makefile: remove unused "r" variable
......................................................................
gen_makefile: remove unused "r" variable
I guess the idea was to use it in the next line, but instead of the "r"
variable the function gets called directly. Remove it.
Fixes: 450dac79 ("gen_makefile: allow combining several .opts files")
Change-Id: Ia4c376c02ee721add5ed451b83edc281543cac69
---
M gen_makefile.py
1 file changed, 0 insertions(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
osmith: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
diff --git a/gen_makefile.py b/gen_makefile.py
index 4cfc313..fd0bac0 100755
--- a/gen_makefile.py
+++ b/gen_makefile.py
@@ -656,7 +656,6 @@
if configure_opts_file.endswith(".deps"):
print(f"WARNING: using {all_deps_file} instead of {configure_opts_file}")
continue
- r = read_configure_opts(configure_opts_file)
configure_opts.extend_dict(read_configure_opts(configure_opts_file))
make_dir = args.make_dir
--
To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/43616?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: Ia4c376c02ee721add5ed451b83edc281543cac69
Gerrit-Change-Number: 43616
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(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>
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/43586?usp=email )
Change subject: gtphub: add LIBCARES_CFLAGS to AM_CFLAGS
......................................................................
gtphub: add LIBCARES_CFLAGS to AM_CFLAGS
gtphub_ares.c and gtphub_vty.c reach <ares.h> through
osmocom/sgsn/sgsn.h, and src/gtphub/Makefile.am already has
$(LIBCARES_LIBS) on the link line, but AM_CFLAGS never got
$(LIBCARES_CFLAGS). The compile therefore only works where c-ares
headers sit in a default include directory.
With c-ares from Homebrew on macOS ARM64 the header is in
/opt/homebrew/include and the build stops:
fatal error: 'ares.h' file not found
Every other directory in the tree that uses c-ares already passes the
flag: src/gprs, src/sgsn, and the tests under tests/sgsn,
tests/gprs_routing_area, tests/slhc, tests/sndcp_xid, tests/v42bis and
tests/xid. src/gtphub is the only one missing it.
No change where the header was already found.
Change-Id: Ibe4ddc357fb3ccf285e9a9f91217fc130bc3973c
Signed-off-by: Andrei Gosman <andrei.gosman(a)gmail.com>
---
M src/gtphub/Makefile.am
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
diff --git a/src/gtphub/Makefile.am b/src/gtphub/Makefile.am
index a242a05..6ea5ab2 100644
--- a/src/gtphub/Makefile.am
+++ b/src/gtphub/Makefile.am
@@ -12,6 +12,7 @@
$(LIBOSMOVTY_CFLAGS) \
$(LIBOSMOGSUPCLIENT_CFLAGS) \
$(COVERAGE_CFLAGS) \
+ $(LIBCARES_CFLAGS) \
$(LIBGTP_CFLAGS) \
$(NULL)
if BUILD_IU
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/43586?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Ibe4ddc357fb3ccf285e9a9f91217fc130bc3973c
Gerrit-Change-Number: 43586
Gerrit-PatchSet: 1
Gerrit-Owner: Andrei G <andrei.gosman(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: Andrei G.
laforge has posted comments on this change by Andrei G. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/43586?usp=email )
Change subject: gtphub: add LIBCARES_CFLAGS to AM_CFLAGS
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/43586?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: Ibe4ddc357fb3ccf285e9a9f91217fc130bc3973c
Gerrit-Change-Number: 43586
Gerrit-PatchSet: 1
Gerrit-Owner: Andrei G <andrei.gosman(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: Andrei G <andrei.gosman(a)gmail.com>
Gerrit-Comment-Date: Thu, 10 Sep 2026 13:19:52 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/43579?usp=email )
Change subject: build: require C++17 for the UHD 4.x headers
......................................................................
build: require C++17 for the UHD 4.x headers
configure asks for C++11 through AX_CXX_COMPILE_STDCXX_11. The public
headers of UHD 4.10 use std::optional, std::is_same_v and
std::is_arithmetic_v, none of which exist in C++11, so UHDDevice.cpp
fails to compile against them:
uhd/utils/cast.hpp:70:15: error: no template named 'is_same_v' in
namespace 'std'
uhd/rfnoc/actions.hpp:104:15: error: no template named 'optional' in
namespace 'std'
UHD 4.10 builds its own sources as C++20, and a consumer of its public
headers needs at least C++17.
Ask for C++17 with AX_CXX_COMPILE_STDCXX, the same macro already
shipped in config/. The osmo-trx sources compile unchanged under the
newer standard.
Seen with UHD 4.10.0.0 from Homebrew on macOS ARM64. The version, not
the platform, is what decides this: any distribution carrying UHD 4.10
reaches the same headers.
Change-Id: If8d80f0708f3856f36d56e637ad8d57f3d3d1bad
Signed-off-by: Andrei Gosman <andrei.gosman(a)gmail.com>
---
M configure.ac
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
diff --git a/configure.ac b/configure.ac
index 0cd388d..50bdd64 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,7 +46,7 @@
AM_PROG_AS
AC_PROG_CC
AC_PROG_CXX
-AX_CXX_COMPILE_STDCXX_11
+AX_CXX_COMPILE_STDCXX([17], [ext], [mandatory])
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PROG_INSTALL
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/43579?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: If8d80f0708f3856f36d56e637ad8d57f3d3d1bad
Gerrit-Change-Number: 43579
Gerrit-PatchSet: 2
Gerrit-Owner: Andrei G <andrei.gosman(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: Andrei G.
laforge has posted comments on this change by Andrei G. ( https://gerrit.osmocom.org/c/osmo-trx/+/43579?usp=email )
Change subject: build: require C++17 for the UHD 4.x headers
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/43579?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: If8d80f0708f3856f36d56e637ad8d57f3d3d1bad
Gerrit-Change-Number: 43579
Gerrit-PatchSet: 1
Gerrit-Owner: Andrei G <andrei.gosman(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: Andrei G <andrei.gosman(a)gmail.com>
Gerrit-Comment-Date: Thu, 10 Sep 2026 13:19:26 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: Andrei G, daniel, lynxis lazus.
laforge has posted comments on this change by Andrei G. ( https://gerrit.osmocom.org/c/osmo-iuh/+/43593?usp=email )
Change subject: hnb-test: count N(SD) over uplink MM messages
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/43593?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: Ieceaee806be43a41e7662e8fa8d119e4e663a3d9
Gerrit-Change-Number: 43593
Gerrit-PatchSet: 1
Gerrit-Owner: Andrei G <andrei.gosman(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <daniel(a)totalueberwachung.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: Andrei G <andrei.gosman(a)gmail.com>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Attention: daniel <daniel(a)totalueberwachung.de>
Gerrit-Comment-Date: Thu, 10 Sep 2026 13:18:26 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes