aboutsummaryrefslogtreecommitdiffstats
path: root/src/gtp-rtnl.c
AgeCommit message (Collapse)AuthorFilesLines
2017-03-24Add support for SGSN role via IFLA_GTP_ROLEHarald Welte1-0/+2
This patch corresponds to a Linux kernel patch extending the kernel GTP to also cover the SGSN role, not just the GGSN role. In order to keep the API/behavior compatible, gtp_dev_create() will continue to create GGSN-side tunnels, while a new gtp_dev_create_sgsn() is introduced to create SGSN-side tunnels. Signed-off-by: Harald Welte <laforge@gnumonks.org>
2017-03-24Add support for SGSN role via IFLA_GTP_ROLEHarald Welte1-1/+13
This patch corresponds to a Linux kernel patch extending the kernel GTP to also cover the SGSN role, not just the GGSN role. In order to keep the API/behavior compatible, gtp_dev_create() will continue to create GGSN-side tunnels, while a new gtp_dev_create_sgsn() is introduced to create SGSN-side tunnels. Signed-off-by: Harald Welte <laforge@gnumonks.org>
2016-07-28Re-license the library as LGPLv2-or-laterHarald Welte1-5/+5
This facilitates the use from other projects such as ASL licensed software. We think there is no point in others having to re-implement the GTP specific message parsing/encoding on top of libmnl, which is LGPL anyway. Please note that the tools are still licensed under GPL, just the library has been changed.
2016-05-10include: refresh linux header copies in the treePablo Neira Ayuso1-2/+3
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2016-05-08gtp-rtnl: real_ifname is not long needed, remove itAndreas Schultz1-3/+1
Signed-off-by: Andreas Schultz <aschultz@tpip.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2016-05-08gtp-rtnl: and netns supportAndreas Schultz1-1/+3
Signed-off-by: Andreas Schultz <aschultz@tpip.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2014-04-03Add copright headers and license files, list Pablo as authorHarald Welte1-0/+22
The kernel module still only listed me as author, even though Pablo was doing most of the work on it after my initial incomplete version.
2014-03-20gtp-rtnl: add gtp_dev_config functionPablo Neira Ayuso1-2/+48
This function allows us to set the gtp0 device configuration the route to encapsulate all traffic that is addressed to the MS from the GGSN
2014-03-20gtp-rtnl: refactor common rtnetlink socket initialization codePablo Neira Ayuso1-21/+33
This allow reusing this code in follow up changes.
2014-03-20gtp-rtnl: remove debugging message that print netlink messagePablo Neira Ayuso1-3/+0
2014-02-24allow to specify the interface name for the GTP devicePablo Neira Ayuso1-5/+8
We can use this to specify 'gtp0' from openggsn, so we make sure that it always uses the same tunnel device on creation. If it already exists, it will return EEXIST. This is used to skip the problem of lacking NLM_F_ECHO in the rtnetlink link interface that allows us to know the name of the gtp device that has been dynamically allocated from the kernel. And, finally, I don't find any use case for having more than one tunnel device when integrating this with openggsn. This patch also adjusts tools/gtp-link-add.c which needs some care, since it is not yet using any of the library functions. This tools are likely to be useful for troubleshooting and debugging.
2014-02-23gtp: create socket from userspace and pass them as configurationPablo Neira Ayuso1-2/+3
openggsn already sets up the UDP sockets that we need for the control and user planes of GTP. Since we cannot bind two UDP sockets (one from userspace and another from the kernel) to the same port, change the current code to pass the socket descriptors that has been allocated by openggsn (or whatever daemon which uses the GTP kernel infrastructure). Two new attributes are added to set up the tunnel device: IFLA_GTP_FD0 (for GTP0) and IFLA_GTP_FD1 (for GTP1u), which specify the UDP socket created from userspace. Thus, the GTP kernel code only takes care of enabling the kernel UDP encapsulation routine.
2014-02-22gtp-rtnl: add gtp_dev_destroyPablo Neira Ayuso1-0/+18
This function allows you to destroy the gtpX device.
2014-02-22gtp-rtnl: refactor code to prepare the addition of gtp_dev_destroyPablo Neira Ayuso1-24/+40
Add gtp_dev_talk() and gtp_put_nlmsg().
2014-02-22gtp-rtnl: fix leak in struct mnl_socket on error in gtp_dev_create()Pablo Neira Ayuso1-5/+7
Release it in the error path.
2014-02-20add libgtpnlPablo Neira Ayuso1-0/+82
This patch adds the libgtpnl library. Harald mentioned that he wanted that the specific code that is added is well encapsulated, so let's start a small library to interact with the GTP kernel module via netlink interface. This was done a bit while in the rush, so the interfaces are not nice at all and the tools need to be ported on top of this library. This library will be used to integrate openggsn with the GTP kernel module.