Commit Graph

11 Commits

Author SHA1 Message Date
Oliver Smith 9bd2711f39 Revert "kernel-gtp: support IPv6 on outer layer"
This reverts commit 0917ce4e22,
as it breaks building osmo-sgsn. This needs to be reworked to be
backwards compatible.

Related: OS#6373
Change-Id: I2c2b2ff0875217e041d94c8e2cef030d2a86c2d8
2024-02-22 16:06:33 +01:00
Oliver Smith 0917ce4e22 kernel-gtp: support IPv6 on outer layer
Related: OS#1953, OS#6096
Change-Id: I257fff1dcd9d030a7f9ea936b2693a3f13208230
2024-02-21 16:22:21 +01:00
Oliver Smith 4963d1c2ea lib/in46_addr: add in46a_from_gsna
Prepare to use it in gtp-kernel.c in a future patch.

Related: OS#6096
Change-Id: I3e76eb7ee89ba338f085c617662d15cffa2a62d5
2023-07-24 15:06:03 +02:00
Pau Espin 60ee0dbfa4 Introduce in46a_is_v{4,6}() helpers
It's clearer having size-related checks in one place for a data structure
in46_addr, instead of spread around the code.

Change-Id: Idc94bf0c8c01bb5a30e36d3c284b99f66b972abb
2019-08-28 11:13:32 +02:00
Pau Espin 2d6a69e69a Add support for IPv4v6 End User Addresses
Before this commit, when an MS requested an ipv4v6 context osmo-ggsn
returned an error stating the type was unknown, and this text was
printed in the log:
Processing create PDP context request for APN 'ims'
Cannot decode EUA from MS/SGSN: f1 8d

This patch has been tested with an MS running the 3 types of addresses:
- IPv4 and IPv6: no regressions observed, the context is activated and
packets are sent to the ggsn.
- IPv4v6: Wireshark correctly parses request and reponse, and then
ICMPv6 traffic from both sides. Finally I see the MS using the IPv4 and
IPv6 DNS addresses advertised and TCP traffic over IPv4 (because
probably my IPv6 network setup is not correct). I also checked I can
disable/enable data (pdp ctx delete and activate) several times without
any issue.

Change-Id: Ic820759167fd3bdf329cb11d4b942e903fe50af5
2017-12-11 11:39:18 +01:00
Pau Espin 2e7b9ff891 lib/in46a: Introduce in46a_netmasklen API
Change-Id: I06e3e038afd8f7afaec2a3fa67b1616500c8db80
2017-10-16 17:45:40 +02:00
Harald Welte 7fc8694b97 lib/in46_addr: Add 'struct in46_prefix' to represent addr + prefix
Change-Id: I797d105117e81951732bcfc2cc26a8d00fd69443
2017-09-05 22:42:17 +02:00
Harald Welte b62983d3c3 lib/in46_addr: Add in46a_ntoa() function, similar to inet_ntoa()
Change-Id: I752b7033a106a74dc219047da5c3a7ad3cd3602e
2017-09-05 22:42:17 +02:00
Harald Welte 365f8fa462 in46_addr: Add new function in46a_prefix_equal()
This function is used to compare an IPv6 address against another,
using the smaller of the two prefix lengths.

Change-Id: Ic993d8abdc90897cb55276f01ae3b8a5eadf5a0d
2017-08-09 22:09:34 +02:00
Harald Welte a0d281db1c IPv6 support for user IP
This patch enables the use of IPv6 PDP contexts.  The phone will
have to request an IPv6 End-user-Address, and the GGSN will have
to be configured for an IPv6 pool.

The outer transport-layer IP between SGSN and GGSN must still be
IPv4, it is not modified by this patch

Change-Id: I22c3bf32a98e5daf99d6eaeac8c9f95cc7574774
2017-08-09 22:09:34 +02:00
Harald Welte d12eab9c4e ippool: Add IPv6 support to IP pool implementation
Extend the IP pool implementation to be able to manage both pools
of 32bit addresses (IPv4) as well as pools of 128bit addresses (IPv6)

Change-Id: Ib98cc4bf634d6be9a7bf8c03a24e629455fcafc8
2017-08-09 22:08:57 +02:00