AgeCommit message (Collapse)AuthorFilesLines
2016-05-10examples: ggsn.conf: document gtp-linux togglePablo Neira Ayuso2-3/+95
Enable Linux kernel GTP datapath driver.
2016-05-10ggsn: cmdline: no need to specify interface anymorePablo Neira Ayuso5-34/+35
--gtpnl is now gone, instead you have --gtpkernel that behaves as an on/off toggle. We full rely on the kernel routing base to select the real device to transmit. I have updated ggsn/cmdline.ggo and then run 'gengetopt' to refresh the automatic code generation for command line options that openggsn uses.
2016-05-10ggsn: gtp-kernel: adapt gtp_dev_create() to its new interfacePablo Neira Ayuso1-2/+1
Andreas modified this interface, so update so this compiles again.
2016-04-29queue_new(): fix NULL dereference on allocation failureNeels Hofmeyr1-4/+3
Coverity complains about a 'Dereference before null check' on *queue. So, push the NULL check further up. Though I doubt that 'return EOF' is the proper way to handle allocation failure, this patch is only about the NULL dereference. Fixes: CID#57918
2016-04-13jenkins: Add the build script from jenkins hereHolger Hans Peter Freyther1-0/+18
This can be used to replicate a build issue more easily.
2016-02-05gtp: Handle gtpv1 in gtp_update_pdp_conf() correctlyDaniel Willmann1-57/+63
libgtp cannot understand its own update pdp request (in gtp v1) Only require the conditional and mandatory fields for gtpv1 and not others. Refer to 3GPP TS 29.060 Ch. 7.3.4
2016-02-04gtp: Make gtp_update_pdp_conf() work for gtp0 and gtp1 connectionsDaniel Willmann1-11/+5
pdp_getgtp1(&pdp, get_tei(pack)) works like pdp_getgtp0 for gtp0 connections. Using get_hlen() for gtpie_decaps is used in other places to decode ies for both version 0 and 1.
2016-02-04gtp: Pass pdp along when calling gtp_req() in gtp_update_context()Daniel Willmann1-1/+1
With no pdp parameter gtp_req() will send the packet to TEID 0 which is not what we want. When trying to modify an established pdp context the correct TEID of that context must be used.
2016-01-23gtp: Do not leak the restart counter file handle in case of errorHolger Hans Peter Freyther1-1/+2
If the file exists but can not be read the file would not be closed. Jump to a label that will close f. Fixes: CID#57917
2016-01-23gtp: Fix a bunch of compiler warnings when just including gtp.hHolger Hans Peter Freyther1-0/+1
Attempt to fix a bunch of compiler warnings in OpenBSC. ‘struct pdp_t’ declared inside parameter list
2015-12-21ggsn: fix autotool pkg-config invokationAndreas Schultz1-2/+2
see https://autotools.io/pkgconfig/pkg_check_modules.html, Optional Modules for explanation Signed-off-by: Andreas Schultz <aschultz@tpip.net>
2015-12-21ggsn: update gpt-kernel logging to libosmocoreAndreas Schultz3-14/+11
Signed-off-by: Andreas Schultz <aschultz@tpip.net>
2015-12-21ggsn: add support for GTP kernel data encapsulationPablo Neira Ayuso8-18/+384
This patch adds the -g, --gtpnl=device option that allows you to enable the GTP kernel tunneling mode in openggsn. You have to specify the real downlink device that will be used to tunnel traffic, eg. -g=eth0 This means that the gtp0 device will be created and it will use eth0 as the real device to encapsulate packet coming from the Internet that are addressed to the MS (so the tunnel devuce encapsulates these IP packets in GTP packets when traveling to the SGSN). Alternatively, you can also add this to the ggsn.conf configuration file: gtpnl eth0 The device has to be the real device that can route packets to the SGSN, if you select the wrong device, the kernel routing code may not find a way to reach the SSGN, you've been warned. Therefore, if this option is set, the operational becomes the following: 1) A gtp0 device is created via rtnetlink and configure the socket encapsulation infrastructure in the kernel. 2) Whenever a PDP context is created, this adds the necessary tunnel configuration via genetlink GTP interface. 3) Whenever a PDP context is destroyed, this deletes the tunnel via genetlink GTP interface. 4) Destroy the gtp0 device if ggsn is stopped, including all of the existing tunnels. You require the osmo-ggsn.git tree, which contains the kernel module gtp.ko and the libgtpnl library that you have to compile and install. Make sure you have loaded the gtp.ko kernel module before launching the ggsn daemon using the kernel driver mode, otherwise you will get a nice "operation not supported" error message ;-). This patch also adds supports for "ipup" configuration option to invoke an external script after the gtp0 device has been brought up. Typical command to add the route to reach the MS behind the GGSN is required, eg. ip route add dev gtp0. The (horrible) ggsn parser has been manually extended to support the new configuration option. That code doesn't look nice, but it just mimics what we already have there for consistency, please don't blame me for that. If you want to run in debugging mode, I suggest you to use: sudo ggsn -c ggsn.conf -f -d Note that you do have to run openggsn as root to bring up the gtp0 device. You have to see this message that announce that the GTP kernel mode is enabled. openggsn[1106]: ggsn.c: 656: Using the GTP kernel mode (genl ID is 25) This patch also automagically sets up route to reach MS from Internet just like tun mode does. This is fundamental to get this working, better don't leave to the admin, he may forget to add this route. In this patch, I tried to encapsulate this new feature as much as possible as Harald initially suggested. To compile this feature, you have to pass --enable-gtp-kernel, ie. ./configire --enable-gtp-kernel Otherwise, the code to interact with the gtp kernel part is not compiled. Signed-off-by: Andreas Schultz <aschultz@tpip.net>
2015-11-30Release 0.92 of the GGSN needed for the gtphubHolger Hans Peter Freyther1-1/+7
2015-11-20update version to 0.920.92Harald Welte1-1/+1
2015-11-13convert literal APN name to protocol encoded version before useAndreas Schultz1-4/+14
The definition of the APN field format in GTPv1 is hidden in a chain of documents. 3GPP TS 29.060 (the GTPv1-C specification) Section 7.7.30: > The Access Point Name contains a logical name (see 3GPP TS 23.060 [4]). > It is coded as in the value part defined in 3GPP TS 24.008 3GPP TS 24.008 Section > The value part is defined in 3GPP TS 23.003. 3GPP TS 23.003 Section 9.1: > The APN consists of one or more labels. Each label is coded as a one > octet length field followed by that number of octets coded as 8 bit > ASCII characters This converts a literal APN (e.g. Label1.Label2.Label3) to a structured field (e.g. \006Label1\006Label2\006Label3) Signed-off-by: Andreas Schultz <aschultz@tpip.net>
2015-11-07Revert "Makefile.am: define ACLOCAL_AMFLAGS, include directory m4"Holger Hans Peter Freyther1-1/+0
aclocal: couldn't open directory `m4': No such file or directory This reverts commit 04cbae494da6b7175c85f5a515e1c557e5a146c0.
2015-11-07Makefile.am: define ACLOCAL_AMFLAGS, include directory m4Alexander Huemer1-0/+1
2015-11-07fix some format specifiersAlexander Huemer2-8/+10
2015-11-07configure.in -> configure.acAlexander Huemer1-0/+0
2015-11-02gitignore: add 'compile' (from autoconf)Neels Hofmeyr1-0/+1
2015-11-02sgsnemu: improve an error messageNeels Hofmeyr1-1/+2
2015-11-02Dump dead code and never look at it againHolger Hans Peter Freyther1-20/+0
This seems to be a wrong search. It seems to assume that there are no buckets. Let's just remove it before looking at it too much.
2015-11-02add todo commentsNeels Hofmeyr1-0/+6
2015-10-27make install: also install gtpie.hNeels Hofmeyr1-1/+1
2015-10-12gtp.c: fix an error log.Neels Hofmeyr1-2/+2
Fix: the code handles fd1u but prints fd1c.
2015-10-12gtp.h: rename gsn_t.dublicate to duplicate.Neels Hofmeyr1-1/+1
Fix spelling dublicate -> duplicate. This is potentially breaking API compat, but currently, no users of gsn_t.dublicate are known.
2015-10-12gtp.c: improve 3 error logs.Neels Hofmeyr1-12/+14
It would print the memory location of the address buffer. Instead, print the human readable host address and port. The current code base supports only IPv4, and thread safety is apparently not required, hence just use inet_ntoa(). (The IPv6 and thread capable version is 4 times longer and harder to read.)
2015-05-02openggsn: Check return codes and take error paths on failure.Michael McTernan1-3/+16
Return early when socket() returns -1, and check return codes where indicated by some TODOs. This removes 2 TODOs and fixes a compiler warning about assignment to a variable which then isn't used. Signed-off-by: Michael McTernan <mike.mcternan@wavemobile.com>
2015-03-14debian: Address lintian warning about -dbg packageHolger Hans Peter Freyther1-1/+1
2015-03-14debian: Require libosmocoreHolger Hans Peter Freyther1-1/+1
2015-03-14debian: Move to multi-arch supportHolger Hans Peter Freyther5-14/+13
2014-12-23lib: Speculatively add libosmocore cflags to the libHolger Hans Peter Freyther1-1/+1
2014-12-04ggsn: Move printf to DEBUGP statements in the ggsn as wellsysmocom/libosmocoreHolger Hans Peter Freyther1-25/+11
The specific log statements are not great yet but at least they will end up in the log file. In the future everything should be related to the IMSI or at least the tunnel id.
2014-12-04ggsn: Remove unused dump/logging methodHolger Hans Peter Freyther1-15/+0
2014-12-04ggsn: Be able to set the log level for the text fileHolger Hans Peter Freyther4-1/+43
Fixes: SYS#599
2014-12-04logging: Switch to using libosmocore logging for all the codeHolger Hans Peter Freyther16-932/+184
2014-12-04syserr: Remove unused error packet logging codeHolger Hans Peter Freyther2-44/+0
2014-12-04gtp: Make these regions runtime debuggableHolger Hans Peter Freyther4-62/+43
2014-12-04gtp: Kill unused and non public methodHolger Hans Peter Freyther1-33/+0
2014-12-04gtp: Move to using LOGP for logging GTP packagesHolger Hans Peter Freyther2-307/+272
Make libgtp depend on libosmocore and use the generic logging infrastructure for it.
2014-12-03Begin to require libosmocore and libosmovtyHolger Hans Peter Freyther1-0/+3
We are not too specific about the version yet
2014-09-23debian: Attenpt to fix lintian warning on weak-dependencyHolger Hans Peter Freyther1-1/+1
2014-09-23debian: Make it a proper git versionHolger Hans Peter Freyther1-1/+1
2014-09-23debian: Harden and build debug packagesHolger Hans Peter Freyther2-0/+11
2014-09-23debian: Modernize/Fix the debian control fileHolger Hans Peter Freyther3-4/+5
W: openggsn source: ancient-standards-version 3.8.4 (current is 3.9.5) W: libgtp: package-name-doesnt-match-sonames libgtp0
2014-09-23debian: Add dependency for LSB scriptHolger Hans Peter Freyther1-2/+2
E: openggsn: init.d-script-missing-dependency-on-remote_fs etc/init.d/openggsn: required-start E: openggsn: init.d-script-missing-dependency-on-remote_fs etc/init.d/openggsn: required-stop
2014-09-23debian: Create new changelog entry to please new toolsHolger Hans Peter Freyther1-1/+7
dpkg-source: error: can't build with source format '3.0 (native)': native package version may not have a revision
2014-08-21openggsn.service: Add Install section to systemd service fileDaniel Willmann1-0/+3
This way the service can be enabled through > systemctl enable openggsn
2014-04-04gtp: Speculative FreeBSD compile fix for htobe64Holger Hans Peter Freyther1-0/+4