Bug #2010

ipa stream support is not using buffered read

Added by laforge over 1 year ago. Updated about 1 month ago.

Target version:
Start date:
Due date:
% Done:


Spec Reference:


The IPA support in libosmo-netif seems to assume that one always receives an entire IPA packet (3-byte header + payload) during one read from a relaetd socket. This is of course known to be a wrong assumption, as we are reading from a stream without packet boundaries, and we're reading in non-blocking mode.

Other users of the (lower-lavel) IPA utility functions provided by libosmocore (such as osmo-bsc) are using ipa_msg_recv_buffered() to deal with this problem.

Would be worth implementing a test case that intenionally slowly writes heavily segmented IPA messages to test our various receivers.


#1 Updated by laforge 6 months ago

  • Assignee set to stsp

#2 Updated by laforge 3 months ago

  • Priority changed from Normal to High

#3 Updated by stsp 2 months ago

The following functions in libosmo-netif do indeed look suspicious (as in, they expect to parse an IPA message from a single msgb):


Are the any others?

From the above list, only osmo_ipa_process_msg() is actually used outside of libosmo-netif itself:

libosmo-sccp/src/osmo_ss7.c: if (osmo_ipa_process_msg(msg) < 0) {
libosmo-sccp/src/osmo_ss7.c: if (osmo_ipa_process_msg(msg) < 0) {

In both instances, ipa_msg_recv_buffered() is already used immediately before calling into libosmo-netif.

#4 Updated by stsp 2 months ago

Harald suggests we should have a TTCN3 test which "stutters" during IPA communication, i.e. sends incomplete IPA messages across a TCP connection.

#5 Updated by stsp 2 months ago

#6 Updated by stsp 2 months ago

  • Status changed from New to In Progress

#7 Updated by stsp 2 months ago

Initial version of an IPA test suite has been proposed:

#8 Updated by stsp 2 months ago

A first test has now been merged to osmo-ttcn3-hacks master.
This test performs a byte-per-byte transmission of an IPA ping and expects a pong response.
Currently only the BSC is tested, as an IPA server on OML and RSL ports.
More tests to follow.

#9 Updated by stsp 2 months ago

Another test for the BTS test suite has been proposed:

#11 Updated by stsp about 2 months ago

Another test case (chopped payload) has been proposed:

#12 Updated by stsp about 2 months ago

BSC and BTS are being tested since above patches have been merged.

Which other components should be tested?

#13 Updated by stsp about 1 month ago

  • Status changed from In Progress to Resolved

Closing this. If more tests are needed, please file a new issue or just re-open this one and add your suggestions here.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)