Bug #2010
closed
ipa stream support is not using buffered read
Added by laforge about 7 years ago.
Updated over 5 years ago.
Description
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.
- Priority changed from Normal to High
The following functions in libosmo-netif do indeed look suspicious (as in, they expect to parse an IPA message from a single msgb):
osmo_ipa_process_msg()
osmo_ipa_parse_msg_id_resp()
osmo_ipa_rcvmsg_base()
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.
Harald suggests we should have a TTCN3 test which "stutters" during IPA communication, i.e. sends incomplete IPA messages across a TCP connection.
- Status changed from New to In Progress
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.
BSC and BTS are being tested since above patches have been merged.
Which other components should be tested?
- 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