aboutsummaryrefslogtreecommitdiffstats
path: root/ggsn
AgeCommit message (Collapse)AuthorFilesLines
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.
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 Ayuso7-18/+369
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 10.0.0.0/8 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>
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 Freyther2-42/+37
2014-03-23cli: Introduce a logfile command to log errors to a fileHolger Hans Peter Freyther4-1/+41
The evolution would be to introduce libosmocore and start using the logging framework. But even then we can map this option to the file target. Fixes: SYS#263
2014-03-23cli: Manually patch the generated code to fix compiler warningHolger Hans Peter Freyther1-2/+0
cmdline.c: In function ‘cmdline_parser_internal’: cmdline.c:588:7: warning: variable ‘check_required’ set but not used [-Wunused-but-set-variable] int check_required; ^
2014-03-23cli: Re-generate the cmdline.c/cmdline.h with newer gengetoptHolger Hans Peter Freyther2-1124/+1228
2012-11-06build: Remove subdir-objects as it breaks make distcleanHolger Hans Peter Freyther1-3/+1
We are not using this option in any of our projects and it is breaking make distclean. Remove the option for now. make[2]: Entering directory `/openggsn-0.91/_build/ggsn' Makefile:307: ../lib/.deps/getopt.Po: No such file or directory Makefile:308: ../lib/.deps/getopt1.Po: No such file or directory make[2]: *** No rule to make target `../lib/.deps/getopt1.Po'. Stop.
2011-11-02Convert all code to Linux coding styleHarald Welte3-1503/+1594
After so many years of silence, we don't expect the original author to return to the project. To make things a bit simpler for us, we convert the coding style to what we are used to (Linux style). The conversion was made using the 'Lindent' script which is part of the Linux kernel.
2011-05-10properly build a library for the content of the lib directoryHarald Welte1-6/+3
2010-10-20Do not exceed 80 characters per lineEmmanuel Bretelle1-3/+6
Signed-off-by: Emmanuel Bretelle <chantra@debuntu.org>
2010-10-20Move common sgsnemu/ggsn files to directory "lib"Emmanuel Bretelle13-3226/+7
Some files like in sgsnemu and ggsn directory where exactly the same. They are now moved to the same directory for easier maintenance Signed-off-by: Emmanuel Bretelle <chantra@debuntu.org>
2010-10-20Fixed compile warning,exit if cant daemonizeEmmanuel Bretelle1-4/+19
Relevant output of make: ggsn.c: In function ‘main’: ggsn.c:436: warning: ignoring return value of ‘freopen’, declared with attribute warn_unused_result ggsn.c:437: warning: ignoring return value of ‘freopen’, declared with attribute warn_unused_result ggsn.c:438: warning: ignoring return value of ‘freopen’, declared with attribute warn_unused_result ggsn.c:439: warning: ignoring return value of ‘daemon’, declared with attribute warn_unused_result Signed-off-by: Emmanuel Bretelle <chantra@debuntu.org>
2010-05-24fix 'make distcheck': add lookup.h to Makefile.amHarald Welte1-1/+1
2010-05-04Use newer gengetopt which also frees memoryHarald Welte3-467/+901
Taken from http://sourceforge.net/tracker/index.php?func=detail&aid=1811521&group_id=68956&atid=522957
2010-05-04GGSN: free the ippool memory before exitHarald Welte1-0/+1
Taken from http://sourceforge.net/tracker/index.php?func=detail&aid=1811518&group_id=68956&atid=522957
2010-05-04Fix various compiler warnings throughout the codeHarald Welte5-10/+10
Mostly signed/unsigned and typecasting issues Taken from http://sourceforge.net/tracker/index.php?func=detail&aid=1811517&group_id=68956&atid=522957
2010-05-04GGSN: Fix select() error case, we need to FD_ZERO() againHarald Welte1-0/+2
Taken from http://sourceforge.net/tracker/index.php?func=detail&aid=1811515&group_id=68956&atid=522957
2010-05-04Fix GGSN signal handlingHarald Welte1-3/+16
In order te exit gracefully (closing the tun devices), we install a SIGINT handler and note its occurrence in a global variable. This fix is from http://sourceforge.net/tracker/index.php?func=detail&aid=1811513&group_id=68956&atid=522957
2010-05-04remove autotools-generated filesHarald Welte1-466/+0
All those will be re-generated by "autoreconf -i" anyway, so there's no point in keeping them in the repository. Also, the 'bootstrap' script is no longer working with recent autotools versions anyway.
2005-03-14Added new version of autotoolsjjako2-141/+235
2004-12-300.84 releasejjako2-4/+6
2004-12-300.84jjako2-5/+8
2004-12-30Added lookup.cjjako2-0/+105
2004-12-30QA on ippooljjako5-108/+42
2004-12-30Minor fixjjako3-3/+2
2004-12-30Fixed delete route on freebsd et. al.jjako2-16/+57
2004-09-17qos length bugfix and apple support plus header cleanupjjako7-46/+30
2004-09-17QoS length bugfizjjako1-1/+1
2004-09-10Improved configure script under Solarisjjako2-7/+8
2004-09-09Hash table bugfix and improved loggingjjako2-51/+79
2004-04-28Solaris tun interfacejjako4-33/+110
2004-02-05Added IP address alias capability for FreeBSDjjako2-9/+38
2004-02-04tun.c cleanup and support for setting multiple addresses on FreeBSDjjako1-57/+134
2004-01-29Lookup in ippool made staticjjako1-1/+1
2004-01-28Added FreeBSD route capabilityjjako1-51/+49
2004-01-27FreeBSD routejjako1-0/+63
2004-01-26 FreeBSD portjjako1-4/+35
2004-01-19FreeBSD porting and IMSI bugfixjjako3-7/+12
2004-01-16Improved Solaris supportjjako1-9/+7
2004-01-16Improved solaris compatibilityjjako6-7/+1462
2004-01-14Changet inet_aton to inet_pton for Solaris compliancejjako1-5/+14
2004-01-10Updated to use solaris api for tunjjako1-9/+83
2004-01-09Changes to allow compilation under Solarisjjako4-14/+60
2003-10-13First attempt at a GTP1 implementationjjako1-11/+29
2003-08-20ippool update to allow for gateway addressjjako2-12/+13