aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
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
2011-11-02queue: fix copy+paste mistake in debug statementsHarald Welte1-2/+2
2011-11-02queue: Add some more comments throughout the code (doxygen style)Harald Welte1-3/+27
2011-11-02queue: mark non-public functions as staticHarald Welte1-5/+5
This makes it a bit more explicit about what is the 'user API' of the code and what is just used internally.
2011-11-02queue: use %p format string when printing a pointerHarald Welte1-1/+1
2011-11-02configure: use AM_SILENT_RULES when availableHarald Welte1-0/+3
this makes the compile process a bit easier to read/follow
2011-11-02GTP: use socklen_t where appropriateHarald Welte1-3/+3
this fixes some compiler warnings
2011-11-02Convert all code to Linux coding styleHarald Welte27-10906/+11558
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-10-18build: Add a proper pkgconfig libgtp.pc for the GTP librarySylvain Munaut3-0/+15
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-10-07optionally do not send recovery with sgsnemuHarald Welte5-1/+36
According to 3GPP TS 29.060 recovery is optional, add command line option --norecovery to remove this field in sgsnemu Signed-off-by: Yann BONNAMY <yann_bonnamy@yahoo.fr> Signed-off-by: Harald Welte <laforge@gnumonks.org>
2011-10-07Add optional RAI FieldHarald Welte5-0/+112
Routing Area Information is an optional Field described in 3GPP TS 29.060 7.7.3 it can be added with command line option rai, in the dot separated format MCC.MNC.LAC.RAC example : --rai 208.10.65535.255 Signed-off-by: Yann BONNAMY <yann_bonnamy@yahoo.fr> Signed-off-by: Harald Welte <laforge@gnumonks.org>
2011-10-07sgsnemu support for QoS as defined in 3GPP TS 24.008Yann BONNAMY3-17/+160
this patch allows to tweak any bit of the QoS field of the Create PDP context generated by sgsnemu , aligned with 10.5.6.5 of 3GPP TS 24.008 V10.0.0 (2010-09) QoS field can be extended to "lenght 12" with option --qose1, as seen in real life on UMTS networks. extension to lenght 13, 15 and 17 can be done with option --qose2, --qose3, --qose4, never seen IRL but allows to test 3GPP compliance of GGSN. Signed-off-by: Yann BONNAMY <yann_bonnamy@yahoo.fr>
2011-10-07RAI fixYann BONNAMY1-3/+11
fix ggsn handling of create pdp context when RAI is included and Recovery field is absent Signed-off-by: Yann BONNAMY <yann_bonnamy@yahoo.fr>
2011-07-29GTP: Fix bug in update PDP context procedureIsabelle Kraemer1-1/+1
I use OpenGGSN to create/update/delete PDP context and I found a bug in the implementation: when the sgsnemu sends an "update PDP context" request, it receives back a "create PDP context" response. Below is the correction I made, I hope it helps.
2011-05-13debian: add openggsn example config filesHarald Welte1-0/+2
2011-05-13debian packaging: add missing openggsn.install fileHarald Welte1-0/+3
2011-05-10remove autotools-generated INSTALL fileHarald Welte1-182/+0
2011-05-10properly build a library for the content of the lib directoryHarald Welte5-13/+15
2011-05-10debian: update to source format gitHarald Welte3-2/+9
2010-12-24libgtp: introduce cb_recovery() callbackHarald Welte2-4/+16
The cb_recovery() callback enables the user application to detect a change in the restart counter and thus start the appropriate recovery procedures.
2010-10-29Add support for GTP IE's from 3GPP R7Yann BONNAMY7-0/+327
This adds support for the followng new GTP Information Elements: RAT_TYPE, USER_LOC, MS_TZ, IMEI_SV Furthermore, it allows to specify those fields as sgsnemu command line arguments.
2010-10-20IFNAMSIZ includes terminating 0Emmanuel Bretelle2-2/+2
http://www.delorie.com/gnu/docs/glibc/libc_308.html thus reverting devname to IFNAMSIZ and making sure (*tun)->devname[IFNAMSIZ-1] = 0; Signed-off-by: Emmanuel Bretelle <chantra@debuntu.org>
2010-10-20fixed compilation warning against gcc-4.4Emmanuel Bretelle1-10/+19
* Change arguments of tun_gifindex from: int tun_gifindex(struct tun_t *this, int *index) to int tun_gifindex(struct tun_t *this, __u32 *index) solves: ../lib/tun.c: In function ‘tun_addaddr’: ../lib/tun.c:265: warning: pointer targets in passing argument 2 of ‘tun_gifindex’ differ in signedness ../lib/tun.c:88: note: expected ‘int *’ but argument is of type ‘__u32 *’ * handle system return code and returns -1 if system failed solves: ../lib/tun.c: In function ‘tun_runscript’: ../lib/tun.c:895: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result * do not dereference a pointer cast and use it as an lvalue see http://www.mail-archive.com/svn-commits@lists.digium.com/msg50931.html solves: ../lib/tun.c: In function ‘tun_route’: ../lib/tun.c:533: warning: dereferencing pointer ‘({anonymous})’ does break strict-aliasing rules ../lib/tun.c:533: note: initialized from here ../lib/tun.c:534: warning: dereferencing pointer ‘({anonymous})’ does break strict-aliasing rules ../lib/tun.c:534: note: initialized from here ../lib/tun.c:535: warning: dereferencing pointer ‘({anonymous})’ does break strict-aliasing rules ../lib/tun.c:535: note: initialized from here ../lib/tun.c: In function ‘tun_setaddr’: ../lib/tun.c:435: warning: dereferencing pointer ‘({anonymous})’ does break strict-aliasing rules ../lib/tun.c:435: note: initialized from here ../lib/tun.c:452: warning: dereferencing pointer ‘({anonymous})’ does break strict-aliasing rules ../lib/tun.c:452: note: initialized from here ../lib/tun.c:465: warning: dereferencing pointer ‘({anonymous})’ does break strict-aliasing rules ../lib/tun.c:465: note: initialized from here Signed-off-by: Emmanuel Bretelle <chantra@debuntu.org>
2010-10-20Do not exceed 80 characters per lineEmmanuel Bretelle1-3/+6
Signed-off-by: Emmanuel Bretelle <chantra@debuntu.org>
2010-10-20Set tun devname to IFNAMESIZ+1 to avoid warningEmmanuel Bretelle1-1/+1
Relevant output from make: ../lib/tun.c: In function ‘tun_new’: ../lib/tun.c:688: warning: array subscript is above array bounds Caused by assignement: (*tun)->devname[IFNAMSIZ] = 0; while devname defined as: char devname[IFNAMSIZ]; Signed-off-by: Emmanuel Bretelle <chantra@debuntu.org>
2010-10-20Move common sgsnemu/ggsn files to directory "lib"Emmanuel Bretelle28-3232/+18
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-20Fixe compilation warningEmmanuel Bretelle1-1/+1
Relevant output of make: sgsnemu.c: In function ‘process_options’: sgsnemu.c:443: warning: pointer targets in passing argument 1 of ‘strncpy’ differ in signedness /usr/include/bits/string3.h:120: note: expected ‘char * __restrict__’ but argument is of type ‘unsigned char *’ 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-10-20Fix warning on unused fscanf return codeEmmanuel Bretelle1-2/+6
Relevant output of make: gtp.c: In function ‘log_restart’: gtp.c:697: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result Signed-off-by: Emmanuel Bretelle <chantra@debuntu.org>
2010-08-26debian: add init script for OpenGGSNHarald Welte1-0/+167
2010-08-25debian: libgtp has architecture 'any' not 'all'Harald Welte1-2/+2
2010-08-24import debian packaging infoHarald Welte8-0/+98
2010-08-24bump version number to 0.910.91Harald Welte1-1/+1
2010-06-03Extend 'struct pdp_t' with a void *priv pointer for application useHarald Welte1-1/+2
2010-05-24Bump version number to 0.900.90Harald Welte1-1/+1
2010-05-24fix 'make distcheck': add lookup.h to Makefile.amHarald Welte2-2/+2
2010-05-16[libgtp] Fix GTPIE parsing segfault on 64bit architecturesHarald Welte1-1/+1
Pointers are not always 4 bytes in size...
2010-05-15[libgtp] add comments with references to the GTP specification sectionsHarald Welte1-2/+19
2010-05-04sgsnemu: delete pdp context - teardown must be before NSAPIHarald Welte1-3/+3
in front of Cisco and Alcatel GGSN's, we meet the following error : 5 packets transmitted Disconnecting PDP context #0 openggsn[24940]: gtp.c: 2417: Unexpected cause value received: 193. Packet from 172.29.5.130:2123, length: 14, content: 32 15 00 06 00 00 00 01 04 02 00 00 01 c1 it is because in the sgsnemu requests packet, the teardown field is after the NSAPI field : No. Time Source Destination Protocol Info 24 10.940094 172.21.5.1 172.29.5.130 GTP Delete PDP context request Frame 24 (58 bytes on wire, 58 bytes captured) Ethernet II, Src: HewlettP_55:23:8d (00:11:0a:55:23:8d), Dst: Alcatel-_f6:8e:32 (00:d0:95:f6:8e:32) Internet Protocol, Src: 172.21.5.1 (172.21.5.1), Dst: 172.29.5.130 (172.29.5.130) User Datagram Protocol, Src Port: gtp-control (2123), Dst Port: gtp-control (2123) GPRS Tunneling Protocol Flags: 0x32 Message Type: Delete PDP context request (0x14) Length: 8 TEID: 0x00000739 Sequence number: 0xbc02 N-PDU Number: 0x00 Next extension header type: No more extension headers (0x00) [--- end of GTP header, beginning of extension headers ---] NSAPI: 0 Teardown Indicator: True [Response In: 25] Taken from http://sourceforge.net/tracker/index.php?func=detail&aid=2865662&group_id=68956&atid=522957