aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2015-10-19gtpie_gettlv(): fix return value on specific error.neels/refactorNeels Hofmeyr1-7/+8
Make gtpie_gettlv() return an error if gtpie_getie() returned an error. Previously, openggsn would fail to complain about certain missing elements. Technically, a missing IE could be detectable from the *length value, but the code in gtp.c relies on the return value to detect missing elements, which did not work prior to this commit. For example: if (gtpie_gettlv(ie, GTPIE_EUA, 0, &pdp->eua.l, &pdp->eua.v, sizeof(pdp->eua.v))) { gsn->missing++; GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Missing mandatory information field\n"); return gtp_create_pdp_resp(gsn, version, pdp, GTPCAUSE_MAN_IE_MISSING); } If an EUA were missing in this code path, openggsn would fail to issue an error message. Since pdp and hence pdp->eua.l is initialized as all-zero, it would probably not do much harm besides failing to issue an error. I haven't checked all callers though.
2015-10-19gitignore: add 'compile' (from autoconf)Neels Hofmeyr1-0/+1
2015-10-19sgsnemu: improve an error messageNeels Hofmeyr1-1/+2
2015-10-19cosmetic: gtpie_gettv0(): flow readabilityNeels Hofmeyr1-3/+2
2015-10-19comments: add/replace.Neels Hofmeyr1-9/+26
Sponsored-by: On-Waves ehi
2015-10-19comments: fix spelling/punctuation.Neels Hofmeyr3-16/+16
Fix spelling/punctuation and one numbering in comments. Remove an opening brace from a comment to not mix up cindent in vim. Sponsored-by: On-Waves ehi
2015-10-19rename gtp_dublicate (static func).Neels Hofmeyr1-11/+11
Fix spelling dublicate -> duplicate in comments and in (apparently only statically used) gtp_dublicate(). Sponsored-by: On-Waves ehi
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
2014-03-24gtp: add pdp_set_imsi_nsapiPablo Neira Ayuso3-9/+12
Encapsulate code to handle the teid with GTPv0.
2014-03-23cli: Introduce a logfile command to log errors to a fileHolger Hans Peter Freyther6-5/+66
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
2014-03-21systemd: Do not restart when the application exits with 1Holger Hans Peter Freyther1-0/+1
This is the case of a wrong config or failure to create a tunnel
2014-03-21systemd: Add a simple ggsn service fileHolger Hans Peter Freyther1-0/+8
2014-03-20gtp: fix endianness in teid field of GTPv0 headerPablo Neira Ayuso1-20/+17
This field needs to be in network byte order as well.
2014-03-20gtp: fix wrong binary layout for struct gtp0_header in x86_64Pablo Neira Ayuso1-3/+3
struct gtp0_header needs __attribute__((packed)) to make sure that gcc doesn't add a hole of 4 bytes to align the 64-bits teid, resulting in 24 bytes instead of 20 bytes. This was breaking gtpv0 in my gprs testbed with my x86_64 laptop. While at it, add also attribute packed to other headers just to make sure that gcc doesn't pad the structures with holes.
2013-07-27gtp: Use struct ul16_t/struct ul66_t to avoid compiler warnings in OsmoSGSNHolger Hans Peter Freyther1-0/+3
This is fixing various compiler warnings: In file included from sgsn_libgtp.c:49:0: include/gtp.h:397:48: warning: ‘struct ul66_t’ declared inside parameter list [enabled by default] include/gtp.h:397:48: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] include/gtp.h:398:49: warning: ‘struct ul66_t’ declared inside parameter list [enabled by default] include/gtp.h:399:53: warning: ‘struct ul16_t’ declared inside parameter list [enabled by default] include/gtp.h:400:53: warning: ‘struct ul16_t’ declared inside parameter list [enabled by default] include/gtp.h:397:48: warning: ‘struct ul66_t’ declared inside parameter list [enabled by default] include/gtp.h:397:48: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] include/gtp.h:398:49: warning: ‘struct ul66_t’ declared inside parameter list [enabled by default] include/gtp.h:399:53: warning: ‘struct ul16_t’ declared inside parameter list [enabled by default] include/gtp.h:400:53: warning: ‘struct ul16_t’ declared inside parameter list [enabled by default]
2012-11-06build: Do not generate a Makefile in the empty src/ directoryHolger Hans Peter Freyther1-1/+0
2012-11-06pdp: Mark the data as static as only pdp.c should access this dataHolger Hans Peter Freyther1-2/+2
2012-11-06build: Let the system decide where libraries are searchedHolger Hans Peter Freyther1-1/+1
2012-11-06build: Remove subdir-objects as it breaks make distcleanHolger Hans Peter Freyther3-11/+3
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.
2012-11-05Remove out-of-bounds writeTobias Engel1-1/+0
This removes an out-of-bounds write. The whole statement can simply be removed since snprintf already adds the trailing 0 byte.
2012-10-27Fix dpkg-buildpackage build for OpenGGSNMax Suraev2-0/+16
Attached is a trivial patch to make "dpkg-buildpackage -rfakeroot -uc -us" work out of the box. Tested on ubuntu 12.04 x86_64 but should work on any debian-based distro.
2012-08-24Fix init script in debian package.Eric Butler2-11/+13
2012-08-14Debian package updates.Eric Butler5-5/+20
* Split out a new libgtp-dev package. * Updated dependencies.
2011-11-02GTP: don't use magic numbers for T3-REQUESTS and N3-REQUESTHarald Welte1-3/+10