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
Prepare for IPv6 support by using a new struct for MS and SGSN
addresses, in which either an IPv4 or IPv6 can be stored.
Related: OS#6096
Change-Id: Ifc7e3b03a723fb544d1c7b789101102b2c27b60e
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.
0 is a valid file descriptor and it is the default value after calloc(),
so set this -1 so we don't send it through netlink as used init_netns.
Fixes: 200b2f4 ("gtp-rtnl: and netns support")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
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>
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).