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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/23889 ) Change subject: ipa_asp_fsm_del_route(): Log what happens if we bail out early ...................................................................... ipa_asp_fsm_del_route(): Log what happens if we bail out early Let's inform the user about situations in which we'd want to delete the route for an IPA client, but we run into some problem and bail out early. Change-Id: Ie3f57d22901f169afb2c844476b5839cc36752aa Related: SYS#5422 --- M src/xua_asp_fsm.c 1 file changed, 16 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/89/23889/1 diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index c8dcac6..4630f5b 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -1010,8 +1010,9 @@ } } -static void ipa_asp_fsm_del_route(struct ipa_asp_fsm_priv *iafp) +static void ipa_asp_fsm_del_route(struct osmo_fsm_inst *fi) { + struct ipa_asp_fsm_priv *iafp = fi->priv; struct osmo_ss7_asp *asp = iafp->asp; struct osmo_ss7_instance *inst = asp->inst; /* We use routing-context '0' here, as that's the only one we support in IPA */ @@ -1023,11 +1024,20 @@ /* find the route which we have created if we ever reached ipa_asp_fsm_wait_id_ack2 */ rt = osmo_ss7_route_find_dpc_mask(inst->rtable_system, as->cfg.routing_key.pc, 0xffffff); /* no route found, bail out */ - if (!rt) + if (!rt) { + LOGPFSML(fi, LOGL_NOTICE, "Attempting to delete route for this IPA ASP, but cannot " + "find route for DPC %s. Did you manually delete it?\n", + osmo_ss7_pointcode_print(inst, as->cfg.routing_key.pc)); return; + } + /* route points to different AS, bail out */ - if (rt->dest.as != as) + if (rt->dest.as != as) { + LOGPFSML(fi, LOGL_NOTICE, "Attempting to delete route for this IPA ASP, but found " + "route for DPC %s points to different AS (%s)\n", + osmo_ss7_pointcode_print(inst, as->cfg.routing_key.pc), rt->dest.as->cfg.name); return; + } osmo_ss7_route_destroy(rt); /* FIXME: Why don't we also delete this timer if we return early above? @@ -1041,7 +1051,7 @@ switch (event) { case XUA_ASP_E_M_ASP_DOWN_REQ: case XUA_ASP_E_M_ASP_INACTIVE_REQ: - ipa_asp_fsm_del_route(fi->priv); + ipa_asp_fsm_del_route(fi); osmo_fsm_inst_state_chg(fi, IPA_ASP_S_DOWN, 0, 0); break; } @@ -1051,7 +1061,7 @@ { switch (event) { case XUA_ASP_E_M_ASP_DOWN_REQ: - ipa_asp_fsm_del_route(fi->priv); + ipa_asp_fsm_del_route(fi); osmo_fsm_inst_state_chg(fi, IPA_ASP_S_DOWN, 0, 0); break; } @@ -1178,7 +1188,7 @@ static void ipa_asp_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause) { - ipa_asp_fsm_del_route(fi->priv); + ipa_asp_fsm_del_route(fi); } struct osmo_fsm ipa_asp_fsm = { -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/23889 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ie3f57d22901f169afb2c844476b5839cc36752aa Gerrit-Change-Number: 23889 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210425/4a951e10/attachment.htm>