summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-09-04 17:12:00 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-09-04 17:12:07 +0200
commit912e058212d35c863616a6cbb3a04b1f889bc3b2 (patch)
tree84c5c17ac4deef6bce068fbd0d51bcc8cc49400c
parent3884eb68d9322967340d4f04e7382b2147ec7a2e (diff)
ss7: Do not queue messages if stream is not connected
Consider them as lost by the lower layer, otherwise lots of old messages and retransmissions can end up queued in there until stream becomes connected, and then will flood the peer with all those messages. Depends: libosmo-netif.git 962bf9a48eed418354685dc733b8271d2dd62c27 Related: OS#4188 Change-Id: Ic7d3571848faf28221dcfa8eb8b33b42964d988e
-rw-r--r--src/osmo_ss7.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index e8a6918..053feca 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -1810,6 +1810,11 @@ int osmo_ss7_asp_send(struct osmo_ss7_asp *asp, struct msgb *msg)
msgb_free(msg);
return -EIO;
}
+ if (!osmo_stream_cli_is_connected(asp->client)) {
+ LOGPASP(asp, DLSS7, LOGL_ERROR, "Cannot transmit, asp->client not connected\n");
+ msgb_free(msg);
+ return -EIO;
+ }
osmo_stream_cli_send(asp->client, msg);
}