7746573a80
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. Returning -2 is an arbitrary choice. Other places return -1, so -2 makes these cases distinguishable. Not really necessary. 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 |
||
---|---|---|
contrib | ||
debian | ||
include | ||
m4 | ||
src | ||
tools | ||
.gitignore | ||
AUTHORS | ||
COPYING | ||
Make_global.am | ||
Makefile.am | ||
README.md | ||
TODO-RELEASE | ||
configure.ac | ||
git-version-gen | ||
libgtpnl.pc.in |
README.md
libgtpnl - netlink library for Linux kernel GTP
In order to control the kernel-side GTP-U plane, a netlink based control interface between GTP-C in userspace and GTP-U in kernelspace was invented.
The encoding and decoding of these control messages is implemented in the libgtpnl (library for GTP netlink).
libgtpnl is part of the Osmocom Open Source Mobile Communications project.
Homepage
The official homepage of the project is https://osmocom.org/projects/libgtpnl/wiki/
GIT Repository
You can clone from the official libgtpnl.git repository using
git clone git://git.osmocom.org/libgtpnl.git
There is a cgit interface at http://git.osmocom.org/libgtpnl/
Mailing List
Discussions related to libgtpnl are happening on the osmocom-net-gprs@lists.osmocom.org mailing list, please see https://lists.osmocom.org/mailman/listinfo/osmocom-net-gprs for subscription options and the list archive.
Please observe the Osmocom Mailing List Rules when posting.
Contributing
Our coding standards are described at https://osmocom.org/projects/cellular-infrastructure/wiki/Coding_standards
We use a gerrit based patch submission/review process for managing contributions. Please see https://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit for more details
The current patch queue for libgtpnl can be seen at https://gerrit.osmocom.org/#/q/project:libgtpnl+status:open