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
No functional change.
Rename forw_to_core to access_to_core.
Rename forw_from_core to core_to_access.
Rename add_gtp_action_endecaps to add_gtp_action_tunend.
Rename add_gtp_action_forw to add_gtp_action_tunmap.
Add assertions to clearly indicate expected PDR and reverse PDR
directions.
Tweak various comments and log messages.
Fix some comments that have Access / Core flipped.
Change-Id: Ia199bb6944476eff6af89b5ab015a9a2f8ce330e
The GTP action detection always has 'pdr' detecting on the Access side
and its reverse 'rpdr' on the Core side.
Access osmo-upf Core
|------> pdr|far ----->|
|<------ rfar|rpdr <-----|
Related: SYS#6192
Change-Id: I66babdfe4c1746bd3bf259342ce80dae2661de8c
Indicate whether a shown IP address is local or remote, by adding '-l'
or '-r' to the field names shown.
So far, osmo-upf is only tracking remote GTP addrs, but we are about to
implement choosing local GTP addrs by Network Instance IEs. Those should
also be shown and will need to be set apart from the remote addresses.
Related: I440466f1cc9689391869ac2579a4497ef6008adb (osmo-ttcn3-hacks)
Change-Id: Ic539ebe84a0853f665e5b8b8489dd587e6907287
Make the osmo-upf debian package consistent with the rpm package, by
adding osmo-pfcp-tool to it.
Related: OS#5817
Change-Id: Icf4bb566d9b627ead370174e92629a9fccde755e
Fix missing IP address in to-string of Outer Header Creation IE: Use
osmo_pfcp_ie_outer_header_creation_to_str_buf() from libosmo-pfcp
instead of re-inventing.
Depends: I4ad1570485c8081b82284e4e6b4de4d7eed414b0 (libosmo-pfcp)
Change-Id: I0d4d9edcfc94b61bdc74cfd4ff837f151d1c28ae
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
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
We're establishing 'tunend' as short name for
encapsulation/decapsulation, also do this in osmo-pfcp-tool.
Keep a hidden "session endecaps" VTY cmd as backwards compat alias.
Related: SYS#6192
Change-Id: I0b44429cd6762fe401a4dced22ae2a3fd9bbe93b
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
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
Heartbeat is handled in libosmo-pfcp, osmo-upf does not need to take any
action.
Related: SYS#5599
Change-Id: Id81556129b528fa3a1f11ae4d01ad8b89a9be2f9
Add section 'Configure Primary Links' with detailed explanation of the
GTP and netfilter setup.
Related: SYS#5599
Change-Id: I2378d4856b28e81dae2a85e20aaf2999768de4d9
Actually add running.adoc to osmoupf-usermanual.adoc so that the chapter
shows in the generated PDF.
Related: SYS#5599
Change-Id: I1ae668ff75882e7ac55dd5b27566a68c449bdee5
By default systemd will execute service with root directory (or home directory for user instance) which might result in
attempts to create files in unexpected place. Let's set it to 'osmocom' subdir of state directory (/var/lib for system instance) instead.
Related: OS#4821
Change-Id: I786e4a655c35617bbea523275a709e865fc86689
When placing libosmo-pfcp in a separate repository, I accidentally
duplicated the charts. Since the charts are generally valid for PFCP,
libosmo-pfcp is the proper place, not here.
Change-Id: I95f11e1525b3bc6b782e5f8aecddea672a104c99
Allow running without opening a GTP dev for encapsulation/decapsulation.
Probe and open the mnl socket for talking to the GTP kernel module only
when actual GTP devices exist in the config.
A site that is only doing tunnel proxying via netfilter hence does not
require GTP support in the kernel.
Change-Id: Ibb79b3ce1906136f77a895ff6f691d72a92c9fb9
Fix for building on opensuse 15.4 with GCC 7.5.0+r278197:
osmo_pfcp_tool_main.c:219:15: error: initializer element is not constant
.copyright = osmo_pfcp_tool_copyright,
The variable is only used once, so move its contents directly into the
struct vty_app_info, like it is done in osmo_upf_main.c.
Fixes: OS#5655
Change-Id: Iff273283a082bb6d07c4c98d421b17b54457abe1
This should hopefully fix the many daily build error mails about
failed package builds on a dozen of distributions/architectures:
[ 148s] No package 'libosmo-gtlv' found
[ 148s] configure:12570: error: Package requirements (libosmo-gtlv >= 0.1.0) were not met:
Change-Id: Iac551616a9831dfd9e3203d1f40e312c4dd286b6
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
Upon ^C, do not barf a huge amount of full talloc report for the entire
VTY config tree. Show a brief report on VTY instead.
Related: SYS#5599
Change-Id: I038951c6d62679e3cfcda51512768d1fbacaa0d1
There is no cmdline option --mockup-nft, that was an earlier stage of
the nftables mockup patch.
Related: SYS#5599
Change-Id: I2f77cfe727649bbdcebb4a656ebf97b186134ee8
Accept data on the GTPv1-U socket and respond to GTPv1-U ECHO REQUEST
messages.
We should keep a deterministic recovery counter that increases with
every restart. As a quick and dirty way just use the current time at
startup for now, until osmo-upf reaches production maturity.
Related: OS#5599
Change-Id: I135370a7723e2c667ec681f50c21107cde63ea5b
A tool for quick testing of PFCP interaction with a UPF, based on VTY
scripts / interaction.
The main motivation to create this tool was to test both the CPF and UPF
sides of the new PFCP protocol encoding and decoding, and then to test
interaction of osmo-upf with the kernel modules. It may also come in
handy as a fast way to verify basic operation in a production
environment.
Related: SYS#5599
Change-Id: I34a80d43a14c7b68952c7d337d8042d6f28ceae7
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