[PATCH] libosmo-sccp[master]: osmo_ss7: Fix segfault when routing MTP-TRANSFER.req to ASP ...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Apr 9 19:31:09 UTC 2017


Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/2245

to look at the new patch set (#3).

osmo_ss7: Fix segfault when routing MTP-TRANSFER.req to ASP without sctp connection

Change-Id: I142a11b09672864b54b927b8334b1975c8cd6022
---
M src/osmo_ss7.c
1 file changed, 13 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/45/2245/3

diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index 8ec099a..f7f2519 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -1376,10 +1376,21 @@
 		OSMO_ASSERT(0);
 	}
 
-	if (asp->cfg.is_server)
+	if (asp->cfg.is_server) {
+		if (!asp->server) {
+			LOGPASP(asp, DLSS7, LOGL_ERROR, "Cannot transmit, no asp->server\n");
+			/* FIXME: what to do here? delete the route? send DUNA? */
+			return -EIO;
+		}
 		osmo_stream_srv_send(asp->server, msg);
-	else
+	} else {
+		if (!asp->client) {
+			LOGPASP(asp, DLSS7, LOGL_ERROR, "Cannot transmit, no asp->client\n");
+			/* FIXME: what to do here? delete the route? send DUNA? */
+			return -EIO;
+		}
 		osmo_stream_cli_send(asp->client, msg);
+	}
 
 	return 0;
 }

-- 
To view, visit https://gerrit.osmocom.org/2245
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I142a11b09672864b54b927b8334b1975c8cd6022
Gerrit-PatchSet: 3
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list