Commit Graph

5 Commits

Author SHA1 Message Date
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 7278fd810e pfcp_test: init logging, for PFCP errors
Initialize logging so that potential errors are shown by the test.

Normally, pfcp_test does not cause any logging. However, I encountered a
linking problem, which caused error logging from libosmo-pfcp, which was
not shown because osmo logging aborted the program first.

Change-Id: I32a99d27ff72edceacb2cf4f4cd996650bc10710
2022-11-21 00:56:40 +01:00
Harald Welte c9b46a1c34 Support building with -Werror=strict-prototypes / -Werror=old-style-definition
Unfortunately "-std=c99" is not sufficient to make gcc ignore code that
uses constructs of earlier C standards, which were abandoned in C99.

See https://lwn.net/ml/fedora-devel/Y1kvF35WozzGBpc8@redhat.com/ for
some related discussion.

Change-Id: I79c51b78d1b055361f9ef5434361847353791d0d
2022-11-03 12:42:57 +01:00
Neels Hofmeyr d6ac69d6f6 add pfcp msg test
Related: SYS#5599
Change-Id: I30bdfc66a8f96c0639513ef406e9b66525dced6d
2022-06-16 13:04:33 +02:00