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.orgHello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/2259 to look at the new patch set (#4). osmo_ss7: Add support for dynamic ASP registration if osmo_xua_server.cfg.accept_dyn_reg is set, then ASPs are permitted to connect without having a pre-configured matching ASP definition in the vty. This helps particularly in cases where RKM is used for dynamica registration of a RC (and hence AS). Change-Id: Ie48898202acbdbfe144fdd5851dfedbb554b11aa --- M include/osmocom/sigtran/osmo_ss7.h M src/osmo_ss7.c 2 files changed, 25 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/59/2259/4 diff --git a/include/osmocom/sigtran/osmo_ss7.h b/include/osmocom/sigtran/osmo_ss7.h index 4eece3e..df85012 100644 --- a/include/osmocom/sigtran/osmo_ss7.h +++ b/include/osmocom/sigtran/osmo_ss7.h @@ -373,6 +373,7 @@ struct osmo_stream_srv_link *server; struct { + bool accept_dyn_reg; struct osmo_ss7_asp_peer local; enum osmo_ss7_asp_protocol proto; } cfg; diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c index 7909bfd..4d3ced1 100644 --- a/src/osmo_ss7.c +++ b/src/osmo_ss7.c @@ -1345,15 +1345,31 @@ } asp = osmo_ss7_asp_find_by_socket_addr(fd); - if (!asp) { - LOGP(DLSS7, LOGL_NOTICE, "%s: SCTP connection without matching " - "ASP definition, terminating\n", sock_name); - osmo_stream_srv_destroy(srv); - talloc_free(sock_name); - return -1; + if (asp) { + LOGP(DLSS7, LOGL_INFO, "%s: matched connection to ASP %s\n", + sock_name, asp->cfg.name); + } else { + if (!oxs->cfg.accept_dyn_reg) { + LOGP(DLSS7, LOGL_NOTICE, "%s: SCTP connection without matching " + "ASP definition and no dynamic registration enabled, terminating\n", + sock_name); + } else { + char namebuf[32]; + static uint32_t dyn_asp_num = 0; + snprintf(namebuf, sizeof(namebuf), "asp-dyn-%u", dyn_asp_num++); + asp = osmo_ss7_asp_find_or_create(oxs->inst, NULL, 0, 0, + OSMO_SS7_ASP_PROT_M3UA); + if (asp) + LOGP(DLSS7, LOGL_INFO, "%s: created dynamicASP %s\n", + sock_name, asp->cfg.name); + } + if (!asp) { + osmo_stream_srv_destroy(srv); + talloc_free(sock_name); + return -1; + } } - LOGP(DLSS7, LOGL_INFO, "%s: matched connection to ASP %s\n", - sock_name, asp->cfg.name); + /* update the ASP reference back to the server over which the * connection came in */ asp->server = srv; -- To view, visit https://gerrit.osmocom.org/2259 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ie48898202acbdbfe144fdd5851dfedbb554b11aa Gerrit-PatchSet: 4 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