Instead of having one file in AC_OUTPUT, and all others in
AC_CONFIG_FILES, move all of them to AC_CONFIG_FILES. Sort the files
while at it and have one per line.
Fix this warning:
configure.ac:86: warning: AC_OUTPUT should be used without arguments.
Change-Id: Iea782b03c9ede154eedbd0c0e9f0d7359bb49967
Implement IPv6 in libgtpnl and the gtp-tunnel testing tool. Allow to
combine:
- GTPA_MS_ADDRESS and GTPA_PEER_ADDR6
- GTPA_MS_ADDR6 and GTPA_PEER_ADDRESS
to specify IPv4-in-IPv6-GTP and IPv6-in-IPv4-GTP in the tunnel
declaration from control plane.
This patch is based on multiple patches from Pablo in OS#6123. I decided
to squash them to directly implement v4-in-v6 and vice versa, instead of
implementing another variant first and then changing it again.
Co-developed-by: Pablo Neira Ayuso <pablo@netfilter.org>
Related: OS#6096
Change-Id: If864c9170f74af52a95cbc4cdb1b866e0309306b
Prepare for IPv6 support by using a new struct for MS and SGSN
addresses, in which either an IPv4 or IPv6 can be stored.
Related: OS#6096
Change-Id: Ifc7e3b03a723fb544d1c7b789101102b2c27b60e
Make the file exactly the same as include/uapi/linux/gtp.h in
linux.git. GTPA_SGSN_ADDRESS is not used, but we decided to rather add
it and not have a diff.
Related: https://gerrit.osmocom.org/c/libgtpnl/+/34735/comment/909c69a6_2fe7781a/
Change-Id: Icf7b78e6655b6573c09c2eaa71d22ef6742b2594
Apply same fix as done by Pablo in linux.git:
> Subtract one to __GTPA_MAX, otherwise GTPA_MAX is off by 2
Change-Id: I42a358fc795d0e593e2c5509dcfa6ffdbad3cbfa
Make it consistent with other Osmocom projects by removing special
naming for CFLAGS and CPPFLAGS. Otherwise the arguments we typically
add, such as --enable-sanitize which is already there, or
--enable-werror which I'll add in the next patch, do not work without
further changes.
Change-Id: I11e9657fb0c038169bd414a6455044ff4a4709b7
Otherwise, inet_ntop() might return ENOSPC because of the buffer
being too small to accomodate an IPv6 address.
Change-Id: I2283e0c3112bec8e6e7e7b5c96657facc09d0a7a
When genl_socket_talk() fails, return rc != 0.
While testing the new osmo-upf program, I noticed that I failed to get a
"Operation not permitted" error when forgetting to set cap_net_admin on
the osmo-upf binary. It looked like everything should work, but doesn't.
It is possible to catch these error cases without this patch, by
monitoring errno. That may well be the intention of the API? I'm still
submitting this patch because it seems better to return rc != 0.
Here is a code example that also catches all error cases without this
patch:
errno = 0;
rc = gtp_add_tunnel(genl_id, nl, t);
if (errno) {
rc = -errno;
} else if (rc) {
rc = -EINVAL;
} else {
tun->active = true;
}
return rc;
Related: SYS#5599
Change-Id: I22fd69709e023572c6c616a4184340a554456faf
Remove OpenSUSE bug report link, set version to @VERSION@, make it build with
CentOS 8 etc.
Related: OS#4550
Change-Id: I5376fde96c7442eb70f49a2ce38f57a817a94f81
Current LIBVERSION is 1:1:1 (current:revision:age), so major=current-age
makes it be major=0: libgtpnl0.
It can bee seen in current osmocom debian repos that libgtpnl1 package
contains libgtpnl.so.0.
Let's set package name accordingly.
Change-Id: I7d2fa50b6a17a598467f555558660ef2396c1744
The .tarball-version file should contain the *source version* uniquely
identifying the git commit, and not the Debian package name.
With https://gerrit.osmocom.org/#/c/osmo-ci/+/10343/ there is a correct
.tarball-version file in the .tar.xz of the nightly source packages.
Related: OS#3449
Change-Id: I22dac8524ce8acb033dc9c72eab107999f49f975
It was left as UNRELEASED but it was actually released (there's a tag on
it). Otherwise osmo-release.mk is fooled.
Change-Id: Iedd8311303274dd3be88a11314a61fbdd511679d
The osmo-release.mk script can be found in libosmocore and it is used in
most osmocom related projects to help create new releases.
LIBVERSION is moved to src/Makefile.am since osmo-release.mk greps for
Makefile.am to find LIBVERSIOn changes. In any case, we don't need in
the global include makefile.
Change-Id: I5d163535c34369c74ece26574c8b1601bc1697b7
This fixes the following kernel error message:
netlink: 'osmo-ggsn': attribute type 1 has an invalid length.
This is due to CTRL_ATTR_FAMILY_ID being defined as a 16bit netlink
attribute, but us encoding it as u32:
netlink/genetlink.c: [CTRL_ATTR_FAMILY_ID] = { .type = NLA_U16 },
let's properly encode it as 16bit and hence resolve the error message.
Change-Id: I41b2719ffc24d7a3420b5980f2a967264e606d91
Closes: OS#3216
They used to be in check_programs, but then this would only build them
during 'make check' which not everyone knows or is using.
Change-Id: Idd2b3a66e5968686e6bbff59dbc89b7673def8dd
Inspired-by: Thomas Boros <tomas.boros92@gmail.com>
When deleting a PDP context via "gtp-tunnel delete", we specify only
the gtp netdevice, the gtp version and the TID/TEI. However, the
gtp_build_payload() function unconditionally created the netlink
attributes for GTPA_PEER_ADDRESS and GTPA_MS_ADDRESS, having their
addresses set to zero. The kernel then tried to find a PDP context with
MS and PEER address of 0.0.0.0, and always failed with ENOENT.
The same problem also occurred with OsmoGGSN and OpenGGSN: PDP contexts
could be added but never removed.
The corresponding kernel change that requires this userland change
is the following commit introduced in 4.12-rc1:
commit d9e2dd122637034a0697bf268eed9233701b9dca
Author: Andreas Schultz <aschultz@tpip.net>
Date: Thu Mar 9 17:43:00 2017 +0100
gtp: unify genl_find_pdp and prepare for per socket lookup
Older kernels will work with libgtpnl both before and after this commit,
as they internally will simply disregard any attributes beyond TID/TEI.
Change-Id: Ie2ceb2cd6d2fb009bba01a05b5480c1ad775d619
This aligns with a kernel patch that renames the netlink parameter
to emphasize that it refers to the remote peer which may be either
a GGSN or an SGSN.
The upstream kernel include file retains the legacy name as a define
but we don't need that in our internal library since we are no longer
using it anywhere.
This patch corresponds to a Linux kernel patch extending the kernel GTP
to also cover the SGSN role, not just the GGSN role. In order to keep
the API/behavior compatible, gtp_dev_create() will continue to create
GGSN-side tunnels, while a new gtp_dev_create_sgsn() is introduced to
create SGSN-side tunnels.
Signed-off-by: Harald Welte <laforge@gnumonks.org>