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
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
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
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