Commit Graph

11 Commits

Author SHA1 Message Date
Pablo Neira Ayuso 67e1fef97d gtp: provide interface to set family
Kernel now supports for TID/I_TEI to be used in both IPv4 and IPv6 GTP
tunnels. This improves dualstack support for MS/UE so GTP traffic can
be identified with the same tunnel identifier.

Update gtp-tunnel to specify the family, since a tunnel is now
identified by the following tuple [ version, identifier, family ].

Change-Id: I584d3997ffb89cd430dfda9615a4ce0ce517ab2a
2024-02-15 15:42:02 +01:00
Oliver Smith a295615229 Add IPv6 support
Implement IPv6 in libgtpnl and the gtp-tunnel testing tool. Allow to
combine:

- GTPA_MS_ADDRESS and GTPA_PEER_ADDR6
- GTPA_MS_ADDR6 and GTPA_PEER_ADDRESS

to specify IPv4-in-IPv6-GTP and IPv6-in-IPv4-GTP in the tunnel
declaration from control plane.

This patch is based on multiple patches from Pablo in OS#6123. I decided
to squash them to directly implement v4-in-v6 and vice versa, instead of
implementing another variant first and then changing it again.

Co-developed-by: Pablo Neira Ayuso <pablo@netfilter.org>
Related: OS#6096
Change-Id: If864c9170f74af52a95cbc4cdb1b866e0309306b
2023-10-24 13:54:09 +02:00
Harald Welte 4e3960c89f Add genl_socket_close() function
We've had genl_socket_open() but no corresponding genl_socket_close()
so far.  Let's fix that.
2017-11-08 16:15:59 +09:00
Harald Welte 3bf55c32be Add support for SGSN role via IFLA_GTP_ROLE
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-24 15:39:17 +01:00
Andreas Schultz 17c816ff84 gtp-rtnl: Split TID handling for GTPv0 and GTPv1
GTPv1 tunnel use separate 32bit Tunnel Endpoint Identifier's for each
direction while GTPv0 uses only one 64bit Tunnel IDentifier.

Signed-off-by: Andreas Schultz <aschultz@tpip.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2016-05-08 18:33:48 +02:00
Andreas Schultz 4977330369 gtp-rtnl: and netns support
Signed-off-by: Andreas Schultz <aschultz@tpip.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2016-05-08 18:33:40 +02:00
Pablo Neira Ayuso deb54083e2 gtp-rtnl: add gtp_dev_config function
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-20 16:47:00 +01:00
Pablo Neira Ayuso b976ffa42c libgtpnl: add flow id support
Add new attribute to the gtp tunnel object, this extension is required
by GTPv0 since the same flowid needs to be used for uplink and downlink
packet.
2014-03-20 13:57:22 +01:00
Pablo Neira Ayuso 41ff538fb4 gtp-rtnl: add gtp_dev_destroy
This function allows you to destroy the gtpX device.
2014-02-22 23:19:58 +01:00
Pablo Neira Ayuso 18532955e2 add struct gtp_tunnel and adapt functions to use it
This patch adds a gtp_tunnel structure to avoid having to deal with
functions with lots of parameters. This should also help to extend
the interfaces and the gtp_tunnel object without breaking the binary
interface (which will be good by when ipv6 support will be added).
2014-02-22 22:30:14 +01:00
Pablo Neira Ayuso 14506665d9 add libgtpnl
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.
2014-02-20 19:41:29 +01:00