Bug #6106
openOsmoGGSN attempts to use the same GTP-U socket for all APNs with gtpu-mode kernel-gtp
0%
Description
Currently it is not possible to configure mutiple APNs with gtpu-mode kernel-gtp in OsmoGGSN. When attempting to do so:
tun.c:213 cannot create GTP tunnel device: Device or resource busy
laforge wrote in https://osmocom.org/issues/6096#note-9:
On Thu, Jul 20, 2023 at 01:35:30PM +0000, osmith wrote:
As I understand it, the problem is that we pass the same gsn->fd0 and gsn->fd10 to gtp_kernel_create in lib/tun.c:tun_new().
Ah. Ok, that explains. The way how the kernel GTP driver works is that for each UDP socket there can only be one gtp-net-device. After all, the kernel and all of GTP-U know nothing about APNs. All they know is packets arriving, and TEID-to-IP address mappings.
This means, indeed, for every UDP socket, there can only be one APN configured. However, multiple different
UDP sockets can serve multiple APNs. The way how GTP-C vs GTP-U works, one can actually hand out a different GTP-U endpoint/socket/port for each PDP context that is being activated. So osmo-ggsn could create one different GTP-U socket for each APN, and then hand out the respective GTP-U IP address during PDP context activate.
Related issues
Updated by osmith 5 months ago
- Related to Feature #6103: move from 1:1 relationship of UDP socket and net-device to a N:M relationship added
Updated by osmith 5 months ago
- Related to Feature #6096: add support for kernel-GTP IPv6 added