ipa: Use enhanced ipa_msg_recv_buffered() to cope with partioned IPA messages
The old ipa_msg_recv() implementation didn't support partial receive,
so IPA connections got disconnected when this happened.
This patch adds the handling of the temporary message buffers and uses
ipa_msg_recv_buffered().
It has been successfully tested by jerlbeck with osmo-nitb and
osmo-bsc.
Ticket: OW#768
Sponsored-by: On-Waves ehf
diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h
index fe8e521..7bd582c 100644
--- a/openbsc/include/openbsc/bsc_nat.h
+++ b/openbsc/include/openbsc/bsc_nat.h
@@ -97,6 +97,9 @@
/* the fd we use to communicate */
struct osmo_wqueue write_queue;
+ /* incoming message buffer */
+ struct msgb *pending_msg;
+
/* the BSS associated */
struct bsc_config *cfg;
@@ -343,6 +346,8 @@
struct bsc_nat *nat;
int authorized;
+ struct msgb *pending_msg;
+
struct osmo_timer_list auth_timeout;
};