aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-08-09ggsn: Send proper errors in create_context_ind()Harald Welte3-11/+20
When we receive PDP context requests for unknown PDP types or if we run out of dynamic addresses, we need to inform the SGSN that PDP context creation failed. Change-Id: Ibf199c1726130d27c8f80230b30ee51101c93b06
2017-08-09IPv6 support for user IPHarald Welte4-4/+74
This patch enables the use of IPv6 PDP contexts. The phone will have to request an IPv6 End-user-Address, and the GGSN will have to be configured for an IPv6 pool. The outer transport-layer IP between SGSN and GGSN must still be IPv4, it is not modified by this patch Change-Id: I22c3bf32a98e5daf99d6eaeac8c9f95cc7574774
2017-08-09ippool_new(): const-ify input argumentsHarald Welte2-2/+2
Change-Id: If3e53584e8c9c1f06bba4c183c9fd65fae913904
2017-08-09lib/tun.h: Remove non-endian-safe redefinition of IP headerHarald Welte4-20/+39
We can simply use 'struct iphdr' from netinet/ip.h to achieve the same goal (and be portable). Change-Id: Ieece22e127dc14a7ffdc3b05656628989ad00b32
2017-08-09ippool: Add IPv6 support to IP pool implementationHarald Welte9-172/+374
Extend the IP pool implementation to be able to manage both pools of 32bit addresses (IPv4) as well as pools of 128bit addresses (IPv6) Change-Id: Ib98cc4bf634d6be9a7bf8c03a24e629455fcafc8
2017-08-04Proper fix for "Force Dynamic IP" in Create PDP CTXHarald Welte1-1/+3
An EUA length of *2* octets indicates dynamic IP address, while an EUA length of 0 is invalid. Let's fix this hack (which needs to finally be removed anyway). Change-Id: Ib1b57eb0654327882044d6862d955f4b32aa6bcd
2017-06-09libgtp: improve error logging and propagationMax1-13/+13
* propagate error code from gtp_new() to caller instead of always returning -1 * on socket-related failures log explicitly which kind of socket caused error * log expected GTP version for unexpected packets Change-Id: Ie07f1e4246eb178838b7df21946a08a1f60f2084 related: SYS#3610
2017-05-16ctrl: cleanup trap creationMax1-11/+16
Move common trap create/send code into separate function. Change-Id: Iaadc921b951aeb9b3ad5ab796e13d52017139468
2017-05-09contrib: Start openggsn after networkingDaniel Willmann1-0/+1
Change-Id: Ic617c618db17e7109ee864c4e6c86f3bee081d02
2017-03-18track README.md rename in spec file and debian/docsHarald Welte2-2/+2
When README was renamed to README.md, the debian and rpm packaging information was not updated. Change-Id: I3fb3016defb74cf4e9c0a363f70eff9d6f71a5f5
2017-03-17Update README with general project information + convert to MarkdownHarald Welte2-22/+70
Change-Id: Ib4213388dffab125e75d9b1f7d72319e041059ea
2017-03-17Add MAkefile.* to EXTRA_DIST to ensure they end up in tarballsHarald Welte1-0/+2
Change-Id: Ibbae061fda3db49f8ecda263cfc3ca6873c0b1b3
2017-03-16jenkins: add value_string termination checkNeels Hofmeyr1-0/+3
Change-Id: I7c676debcdfef2471004deb9ef5a63e8f4e97e15 Depends: libosmocore change-id I2bc93ab4781487e7685cfb63091a489cd126b1a8
2017-02-27Code formatted to be in line with formatting rules.bjovan1-13/+32
Change-Id: I546dc0a8d814527b9a96943a52f2f6b700285167
2017-02-23Update AUTHORS file to reflect the last 12 yearsHarald Welte1-7/+14
Change-Id: I0a8f5a69f2a943344331d36ba225c02b0209beeb
2017-02-23remove ChangeLog, it hasn't been updated since 2004Harald Welte4-147/+4
We have a detailed log in git instead. Change-Id: I6a7fe97995b5f65080a04423fee77030dea26b84
2017-02-23update version to 0.930.93Harald Welte1-1/+1
Change-Id: If65b8281933b5833b5ce83239688e775cc267f4c
2017-02-23gtp.c: Don't print ""Unknown packet flags" error message in get_seq()Harald Welte1-1/+0
get_seq() is called also from contexts where GTP-U is used, and GTP-U doesn't have sequence numbers. Thus, it is perfectly normal if no sequence number and/or no S flag in the header is present. Change-Id: Ie19b95bbb4427e547843a019f5213a231a9f83da
2017-02-23gtp-kernel: Fix tunnel creation/removal for GTP Version 1Harald Welte1-2/+5
When Linux Kernel GTP-U support is enabled, OpenGGSN so far only worked with GTPv0,but not with GTPv1, as the TEI values were not correctly configured. This patch fixes the initialzation of the local and remote TEI before using libgtpnl to create a tunnel context in the kernel. Change-Id: I3e953ff5b4ab44c26dbbe20d18b61038fa57ff32
2017-01-26abi/debian: Bump ABI version of libgtp after struct size changeHolger Hans Peter Freyther5-5/+11
The gsn_t changed the size with the addition of the ctrl pointer. Bump the SO version to not break osmo-sgsn/ggsn on upgrade. Call the -dev package libgtp-dev to follow the rest of Osmocom and to ease making releases here. Change-Id: Iac4d6d2effde1a6b2f60b1e1b49c91513d5ca8c3
2016-12-22Integrate Debian packaging changesMax3-67/+89
debian/control: * restructure to make it easier to incorporate further changes * update package descriptions * update project URL debian/rules: * use proper hardening syntax * remove useless comment debian/copyright: update to match Debian format Change-Id: Ia7f0a3a583ad63f5c6e5cf5e5de2ff7dd9eed8a9 Related: OS#1694
2016-12-15gtp.c: Improve debug statements about GTP header flagsHarald Welte1-8/+8
* as there are muptiple flags in the field, use plural * print the flags as hex value, not decimal. Hex is customary for bitfields. Change-Id: Ib23d80fae32b4e9fa146d82d8f5a1dada1a3cb2b
2016-11-02Only send TRAP for defined PDP peerMax1-6/+8
Do not attempt to send TRAP message on PDP context deletion if peer is unknown. Change-Id: I5e02c1d42bb7aaf1ef81a9824aab7b12047cdd3e Fixes: Coverity CID 150135
2016-10-14gsn_restart file: wrap umask change tightly around file creationNeels Hofmeyr1-4/+6
An fopen("w") error used to omit the umask() call to reinstate the previous umask. Also an fopen("r") at the top will never create a file and hence does not need a umask set. Instead, wrap the umask change and change-back tightly around the single fopen("w") call. Change-Id: If7d948e2f2ba47ecebba5614f18235a53b273d14
2016-10-14fix gsn_restart file buffer overflow and missing path sepNeels Hofmeyr1-9/+7
Fix errors during gsn_restart file path composition: - possible buffer overflow because the wrong remaining length was fed to strncat(). - missing path separator: put restart file in dir/gsn_restart instead of ../dirgsn_restart. This assumes that the path separator is '/'. Use talloc_asprintf() to fix all filename length problems and shorten the code. In order to free the allocated path, add a free_filename label, and jump there instead of returning from the fopen("w") failure branch. Also don't return from "fclose failed" branch in order to free the path, remove the if {} braces. Change-Id: Idf0a64ff45720aa818f2f9de1e8ba2fe2c82631b
2016-10-12configure: check for pkg-config presenceNeels Hofmeyr1-0/+7
Change-Id: I658152eb24fd783fce9ceac35872ab918c80209a
2016-10-12build: be robust against install-sh files above the root dirNeels Hofmeyr1-0/+3
Explicitly set AC_CONFIG_AUX_DIR. To reproduce the error avoided by this patch: rm install-sh # in case it was already generated. touch ../install-sh # yes, outside this source tree autoreconf -fi This will produce an error like ... configure.ac:16: error: required file '../ltmain.sh' not found configure.ac:5: installing '../missing' src/Makefile.am: installing '../depcomp' autoreconf: automake failed with exit status: 1 See also automake (vim `which automake`) and look for 'sub locate_aux_dir'. Change-Id: I4aef311d7a475800e09f48110a499c3759c69f5d
2016-10-12Add control interfaceMax4-5/+34
Only generation of TRAP messages over Control Interface is supported so far. Note: requires corresponding version of libosmoctrl. Change-Id: Ia76f841d2c9cd14394e9316fcd39f4060e23c898 Related: OS#1646
2016-10-12Add .gitreview to simplify gerrit integrationMax1-0/+3
Change-Id: Ib141dc9ae03c2b10b8925e30a2782bf2d932e192
2016-10-11Remove unused functionMax3-13/+0
Change-Id: Iff0f1499660b12a47277b16a435efecb42fab038
2016-09-15Add 'Bearer Control Mode' IE3G_2016_09BJovke2-0/+4
This IE is known to be sent by a Cisco GGSN, and was added in ETSI TS 129 060 V7.17.0 (2011-10) / 3GPP TS 29.060 version 7.17.0 Release 7 See https://lists.osmocom.org/pipermail/osmocom-net-gprs/2016-September/000711.html Subject "sgsnemu failing to create PDP context with Cisco GGSN" Tue Sep 13 08:00:37 UTC 2016 Tweaked-by: Neels Hofmeyr <nhofmeyr@sysmocom.de>
2016-06-06gtp/queue/queue_seqdel(): fix element check which was always trueAlexander Couzens1-2/+1
Fix an apparent typo that prevented queue iteration to find the correct item to be removed. Instead, the first item was always returned. Calling code has been analyzed to find that mostly this fault is not visible, since usually, the first item is indeed the correct item to be returned. See mail thread http://lists.osmocom.org/pipermail/osmocom-net-gprs/2016-June/000618.html Date: Wed Jun 1 11:51:38 UTC 2016 Subject: "[PATCH] gtp/queue/queue_seqdel(): fix element check which always was true"
2016-05-24Description: Fix some typos in the man pages and in the binaryRuben Undheim3-6/+6
2016-05-24debian: Bump the version to ease upgrading from DebianHolger Hans Peter Freyther1-0/+6
Debian SID has version 0.92-1 and we had 0.92. Bump it to 0.93.
2016-05-12gtp: fix several compilation warningsPablo Neira Ayuso2-5/+0
CC gtpie.lo gtpie.c: In function 'gtpie_encaps': gtpie.c:437:22: warning: variable 'm' set but not used [-Wunused-but-set-variable] union gtpie_member *m; ^ gtpie.c: In function 'gtpie_encaps2': gtpie.c:537:22: warning: variable 'm' set but not used [-Wunused-but-set-variable] union gtpie_member *m; ^ lookup.c: In function ‘lookup’: lookup.c:40:24: warning: typedef ‘ub1’ locally defined but not used [-Wunused-local-typedefs] typedef unsigned char ub1; /* unsigned 1-byte quantities */ ^ Still one compilation warning left in cmdline.c, but that code is autogenerated.
2016-05-12ggsn: fix compilation error with --disable-gtp-kernelPablo Neira Ayuso1-1/+1
gtp-kernel.h: In function ‘gtp_kernel_init’: gtp-kernel.h:25:15: error: ‘struct gengetopt_args_info’ has no member named ‘gtpnl_given’ if (args_info->gtpnl_given) { ^ Makefile:422: recipe for target 'ggsn Reported-by: Holger Freyther <holger@freyther.de>
2016-05-10get rid of accidental copy of ggsn.confPablo Neira Ayuso1-92/+0
Included accidentaly in 8419e33 ("examples: ggsn.conf: document tp-linux toggle").
2016-05-10configure: rename from --enable-gtp-kernel to --enable-gtp-linuxPablo Neira Ayuso1-7/+7
This software seems to run on other *nixes, so indicate explicitly that this is the Linux kernel datapath support.
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>