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.orgHarald Welte has submitted this change and it was merged.
Change subject: sccp: fix creating of the default route in simple client
......................................................................
sccp: fix creating of the default route in simple client
The simple client (osmo_sccp_simple_client_on_ss7_id() and
osmo_sccp_simple_client) does not create a default route if
the user has already created an AS via VTY.
Check the presence of a default route independently of the
AS. If no default route exists, create one.
Change-Id: I7516fa5509bade4ba10e9d8eaa3e46cfe3696b3a
---
M src/sccp_user.c
1 file changed, 7 insertions(+), 3 deletions(-)
Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified
diff --git a/src/sccp_user.c b/src/sccp_user.c
index 1414572..1d59d3c 100644
--- a/src/sccp_user.c
+++ b/src/sccp_user.c
@@ -368,16 +368,20 @@
 			goto out_ss7;
 		}
 		as->cfg.routing_key.pc = ss7->cfg.primary_pc;
+	}
+	LOGP(DLSCCP, LOGL_NOTICE, "%s: Using AS instance %s\n", name,
+	     as->cfg.name);
 
-		/* install default route */
+	/* Create a default route if necessary */
+	rt = osmo_ss7_route_find_dpc_mask(ss7->rtable_system, 0, 0);
+	if (!rt) {
+		LOGP(DLSCCP, LOGL_NOTICE, "%s: Creating default route\n", name);
 		rt = osmo_ss7_route_create(ss7->rtable_system, 0, 0,
 					   as->cfg.name);
 		if (!rt)
 			goto out_as;
 		rt_created = true;
 	}
-	LOGP(DLSCCP, LOGL_NOTICE, "%s: Using AS instance %s\n", name,
-	     as->cfg.name);
 
 	/* Check if we do already have an application server process
 	 * that is associated with the application server we have choosen
-- 
To view, visit https://gerrit.osmocom.org/3452
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7516fa5509bade4ba10e9d8eaa3e46cfe3696b3a
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder