Commit Graph

10 Commits

Author SHA1 Message Date
Neels Hofmeyr 091603c4a4 deprecate cfg 'nft rule tunmap append'
Subsequent patch will refactor the tunmap nft ruleset. Instead of
adapting the 'tunmap append' feature to the new ruleset, rather drop
this feature entirely.

The 'nft rule tunmap append' was intended for enabling 'trace' in the
nft ruleset. However, the same can be achieved via the nft cmdline tool.
For example:

 sudo nft 'add chain filter trace_chain { type filter hook prerouting priority -301; }'
 sudo nft 'add rule filter trace_chain meta nftrace set 1'

Related: SYS#6327 SYS#6264
Change-Id: I1ae36f2f520217254c81fd765d27333ff0f457b2
2023-02-09 00:13:08 +01:00
Neels Hofmeyr 2a2884fbbe tunend: choose local GTP addr by Network Instance IEs
Implement handling of the Network Instance IEs from PFCP for tunend,
like already done for tunmap.

In 'tunend' cfg, allow indicating a local GTP address for both 'dev
create' and 'dev use'. Select a GTP device by the local address the
Network Instance IE in PFCP PDR indicates.

Related: SYS#6192
Change-Id: I376c09bfc1844df1e61d2efac17561fac614858b
2023-01-06 00:18:40 +01:00
Neels Hofmeyr 8525c49c5d add cfg: tunmap / nft-rule append
It can be useful to add 'meta nftrace set 1' to nftables rules to help
analysis / site debugging. Add the possibility to do this by cfg.

Instead of adding the fixed string of 'meta nftrace set 1', allow
appending arbitrary strings to the nftables rules, to accomodate any
other future tweaks that may be useful.

Related: SYS#6192
Change-Id: Ia1fac67108902a48b43d8d1dc184ccf541fd9ba8
2022-12-09 18:28:19 +01:00
Neels Hofmeyr 0e66d699ed vty: add: show nft-rule tunmap example
Add VTY command to print out an nftables ruleset that osmo-upf produces,
with arbitrary IP addrs / TEIDs inserted. This allows tracking in *.vty
tests how the nftables rulesets are changed by patches.

future:
- Adding the 'tunmap' keyword to allow adding show commands for
  different uses of nftables.
- Adding the 'example' keyword to allow adding show commands for
  actual tunmap IDs / PFCP session IDs / ...
- Matches upcoming vty commands
  'nft-rule tunmap append .NFT_RULE'
  'no nft-rule tunmap append'
  'show nft-rule tunmap append'

Add new separate nft-rule.vty -- more to come here in upcoming patch.

Change-Id: I9b57aa492c051e480c9bd819ae58f8f59a13af40
2022-12-09 18:28:19 +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 80aefa42c6 tests/upf.vty: add some missing nodes to the test
Change-Id: I93c49dce23efaf9c533619112fb7a8114e258fa0
2022-11-18 23:49:14 +01: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 2eeec08d1e add osmo-upf
Related: SYS#5599
Change-Id: I745bcbde6859004c41ddbfd2558036bf9a2d1de2
2022-06-19 14:13:28 +02:00
Neels Hofmeyr 103b69d99c initial osmocom boilerplate source tree
Related: SYS#5599
Depends: I0a46b147ec6a76d909df28136cfd2b764b2c75ea (libosmocore)
Change-Id: I4352dd8738a1a9de6ba2fc250ee8eef69c65ff1e
2022-01-21 01:45:44 +01:00