Commit Graph

6 Commits

Author SHA1 Message Date
Neels Hofmeyr 43dd5ddf97 bitmask to string: shorten
Remove braces and spaces from PFCP bits to string conversion.

Instead of "( FOO BAR BAZ )", print "FOO+BAR+BAZ".
Instead of "( FORW )", print "FORW".
Instead of "( )", print "-".

The spaces tend to break up readability of strings logged by osmo-upf.

In particular, this affects UP and CP capability bits, Apply Action,
Outer Header Creation.

Change-Id: I38426d6381e96d4a683e46eba1bdd29c73d3f027
2022-12-08 04:23:09 +01:00
Neels Hofmeyr 4f6c95cc77 fix coding of Node ID: FQDN type
Decode FQDN type Node IDs into "human" dotted notation instead of
storing the DNS type data in the FQDN string.

Related: OS#5806
Change-Id: I25d0f9b095287aa30e24498d8361c0a326ded447
2022-12-08 04:23:09 +01:00
Neels Hofmeyr 8368e7d5d5 fix coding of Network Instance IE
Network instance names should be coded like in DNS, where each label is
preceded by a length byte.

Related: SYS#6192
Change-Id: I9d67464ef0f92b0512cfd6e48d203f8828a82a19
2022-12-08 04:23:09 +01:00
Neels Hofmeyr 25c4c9b355 PFCP: add Network Instance IE in PDI IE
So far the optional Network Instance IE in PDI IEs was not coded by
libosmo-pfcp. Add it.

Test it by adding Network Instance IEs in pfcp_test.c.

osmo-upf needs this, because we are about to add support for Network
Instance in PDI IEs, to determine which local interface to use for GTP
tunnel mapping and encapsulation/decapsulation.

Related: SYS#6192
Change-Id: I162299e70b4fb0c3fef8039d693ac7d3fe4df16a
2022-11-23 23:40:28 +00:00
Neels Hofmeyr 7b3927c77d pfcp_test: add missing 'pdi_present = true'
test_enc_dec[8] includes a PDI IE in Update PDR. The PDI is optional
here, so it requires setting a presence flag to true. This was missing,
hence the PDI part was not being tested at all. Add this presence flag.

This was probably a copy-paste error from testing the Create PDR IE,
where the PDI is mandatory and has no presence flag.

Change-Id: Idc70ae23f15d3af65f98557cc51a111f2e6d75c9
2022-11-21 00:56:40 +01:00
Neels Hofmeyr d6ac69d6f6 add pfcp msg test
Related: SYS#5599
Change-Id: I30bdfc66a8f96c0639513ef406e9b66525dced6d
2022-06-16 13:04:33 +02:00