Commit Graph

10 Commits

Author SHA1 Message Date
Neels Hofmeyr 3572241df5 tunmap: choose local GTP addr by Network Instance IEs
Add 'netinst' config section to osmo-upf.cfg, to define Network Instance
name to local IP address mappings.

For the tunmap use case (forwarding GTP tunnels), heed the Network
Instance IEs in PFCP session creation and return IP addresses in F-TEIDs
accordingly.

Related: SYS#6192
Related: I37bebc7d6ef75c3e6ae05e81b83a1b5895839a64 (osmo-ttcn3-hacks)
Change-Id: I15ee046a1c37b83b8a83527a67a6215a30106d81
2022-12-09 17:25:58 +00:00
Neels Hofmeyr 54ebc4772b VTY: show gtp: still list tunmap if no tunend device is open
When there was only tunend implemented, it made sense to show on VTY
when no GTP kernel device was open. Since we now also have tunmap via
netfilter, drop the early exit.

Change-Id: I9a43a240f2ca55cf2ca237a83aa13e68a625d6ea
2022-11-21 17:28:05 +01:00
Neels Hofmeyr 0575e9bad9 vty: revert rename of 'show gtp'
Rename 'show tunend' back to 'show gtp'.
Clarify the VTY doc.

While renaming 'gtp' to 'tunend', i also renamed the general 'show gtp'
VTY command by accident / by misunderstanding. This command shows all
GTP tunnel state, not just the tunend state.

Reverts a small portion of commit "VTY: rename 'gtp' to 'tunend'"
  95eb2c6a89
  I49ac7b1f8b5b74f586edfed1dfb29f9af55a521b

Change-Id: I8f619d4ddda3efffb62cf594878d3166cb37fe45
2022-11-21 16:47:22 +01:00
Neels Hofmeyr 701bb8addc VTY: rename 'nft' to 'tunmap'
So far the config nodes were named after the implementation:
"GTP kernel module" = "gtp" and
"netfilter" = "nft"

We found that this is confusing, since both are related to handling GTP.
Rename "nft" to "tunmap"; a previous patch already renamed "gtp" to
"tunend".

Keep a hidden "nft" VTY cmd as backwards compat alias.

Related: SYS#6192
Change-Id: Ia3c5224dd3b5f5c9437bbdec997d02176818cc97
2022-11-18 23:49:14 +01:00
Neels Hofmeyr 95eb2c6a89 VTY: rename 'gtp' to 'tunend'
So far the config nodes were named after the implementation:
"GTP kernel module" = "gtp" and
"netfilter" = "nft"

We found that this is confusing, since both are related to handling GTP.
Rename "gtp" to "tunend"; a subsequent patch will rename "nft" to
"tunmap".

Keep a hidden "gtp" VTY cmd as backwards compat alias.

In log output, also print "tunend" instead of "endecaps"
(up_gtp_action_to_str_buf()).

Related: SYS#6192
Change-Id: I49ac7b1f8b5b74f586edfed1dfb29f9af55a521b
2022-11-18 23:49:14 +01:00
Neels Hofmeyr 2d2fcd81bc vty doc: indicate default nft table name
Change-Id: I79b4d287cae47c37b45a35904f298e57120a65f0
2022-09-17 23:02:40 +02:00
Neels Hofmeyr 2442ccd673 vty doc tweaks
Clarify "Add" and "Delete" of GTP devices.
Clarify GTP device in config vs. real GTP device.
Clarify s/kernel/Linux kernel

Related: SYS#5599
Change-Id: I918e0a9a332e4dd4b71965614c19481eb41004d6
2022-08-10 02:12:06 +02:00
Neels Hofmeyr 06482c6554 implement GTP tunnel mapping via netfilter
Implement support for PFCP rulesets that ask for mapping a GTP tunnel:
forwarding GTP payload between two GTP tunnels.

For a GTP tunnel mapping, dispatch netfilter rules that detect GTP
packets with a given source address and TEID, and replace the TEID and
destination address according to the PFCP ruleset.

The netfilter implementation is chosen to effect the packet rewriting
and forwarding to take place directly in the kernel, for high throughput
of GTP packets.

Related: SYS#5599
Change-Id: Ic0d319eb4f98cd51a5999c804c4203ab0bdda650
2022-07-20 17:08:53 +02:00
Neels Hofmeyr bee02fc34f add VTY option gtp/mockup, for VTY tests
To avoid actions that require cap_net_admin permissions on build
servers, add this option to "dry run" all kernel GTP actions. Same will
be added for netfilter rules.

On startup, osmo-upf opens sockets to GTP kernel module / NFT ctx.
However, on build servers, this would require giving cap_net_admin
permissions just to run the VTY tests.

Related: SYS#5599
Change-Id: I3b9c796186307fd8562abcff3f0ccfab0e88b6c8
2022-07-20 17:07:48 +02:00
Neels Hofmeyr 2eeec08d1e add osmo-upf
Related: SYS#5599
Change-Id: I745bcbde6859004c41ddbfd2558036bf9a2d1de2
2022-06-19 14:13:28 +02:00