Projects
osmocom:master
libosmo-sigtran
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 31
View file
commit_a141e2dbf8185e6615878999a71b38779c9e04bb.txt
Added
View file
commit_ec73fbac94cabbc75ae7da64ef6e15a08599b965.txt
Deleted
View file
libosmo-sigtran_2.1.0.15.ec73.dsc
Deleted
@@ -1,25 +0,0 @@ -Format: 3.0 (native) -Source: libosmo-sigtran -Binary: libosmo-sigtran11, libosmo-sigtran-dbg, libosmo-sigtran-doc, libosmo-sigtran-dev, osmo-stp, osmo-stp-dbg, osmo-stp-doc -Architecture: any all -Version: 2.1.0.15.ec73 -Maintainer: Osmocom team <openbsc@lists.osmocom.org> -Homepage: https://projects.osmocom.org/projects/libosmo-sccp -Standards-Version: 3.9.7 -Vcs-Browser: https://gitea.osmocom.org/osmocom/libosmo-sigtran -Vcs-Git: https://gitea.osmocom.org/osmocom/libosmo-sigtran -Build-Depends: debhelper (>= 10), autotools-dev, pkg-config, libosmocore-dev (>= 1.11.0), autoconf, automake, libtool, dh-autoreconf, git, doxygen, libdpkg-perl, libosmo-netif-dev (>= 1.6.0), libsctp-dev, osmo-gsm-manuals-dev (>= 1.6.0) -Package-List: - libosmo-sigtran-dbg deb debug optional arch=any - libosmo-sigtran-dev deb libdevel optional arch=any - libosmo-sigtran-doc deb doc optional arch=all - libosmo-sigtran11 deb libs optional arch=any - osmo-stp deb net optional arch=any - osmo-stp-dbg deb debug optional arch=any - osmo-stp-doc deb doc optional arch=all -Checksums-Sha1: - dea3d091f9816cfc8b3a2e27991b58dc0f63cdd3 232596 libosmo-sigtran_2.1.0.15.ec73.tar.xz -Checksums-Sha256: - e1dcda5c98c09137512548d9ea94a84bd7d5eddc86b3622a33888c3a46a7e4f2 232596 libosmo-sigtran_2.1.0.15.ec73.tar.xz -Files: - 585ff72c6865e3f705e150fb4c14f9bd 232596 libosmo-sigtran_2.1.0.15.ec73.tar.xz
View file
libosmo-sigtran_2.1.0.21.a141.dsc
Added
@@ -0,0 +1,25 @@ +Format: 3.0 (native) +Source: libosmo-sigtran +Binary: libosmo-sigtran11, libosmo-sigtran-dbg, libosmo-sigtran-doc, libosmo-sigtran-dev, osmo-stp, osmo-stp-dbg, osmo-stp-doc +Architecture: any all +Version: 2.1.0.21.a141 +Maintainer: Osmocom team <openbsc@lists.osmocom.org> +Homepage: https://projects.osmocom.org/projects/libosmo-sccp +Standards-Version: 3.9.7 +Vcs-Browser: https://gitea.osmocom.org/osmocom/libosmo-sigtran +Vcs-Git: https://gitea.osmocom.org/osmocom/libosmo-sigtran +Build-Depends: debhelper (>= 10), autotools-dev, pkg-config, libosmocore-dev (>= 1.11.0), autoconf, automake, libtool, dh-autoreconf, git, doxygen, libdpkg-perl, libosmo-netif-dev (>= 1.6.0), libsctp-dev, osmo-gsm-manuals-dev (>= 1.6.0) +Package-List: + libosmo-sigtran-dbg deb debug optional arch=any + libosmo-sigtran-dev deb libdevel optional arch=any + libosmo-sigtran-doc deb doc optional arch=all + libosmo-sigtran11 deb libs optional arch=any + osmo-stp deb net optional arch=any + osmo-stp-dbg deb debug optional arch=any + osmo-stp-doc deb doc optional arch=all +Checksums-Sha1: + 49f482a3bbb8636e2c06620c2c6e2b2b00930aaf 233356 libosmo-sigtran_2.1.0.21.a141.tar.xz +Checksums-Sha256: + b1403b89fd160f9dd64f5f547e67bc5d5b7aac4fbd9e53940bc3a2a5c8e98ea8 233356 libosmo-sigtran_2.1.0.21.a141.tar.xz +Files: + 49dc2c3f8eff9da34d834a47b5f51afa 233356 libosmo-sigtran_2.1.0.21.a141.tar.xz
View file
libosmo-sigtran_2.1.0.15.ec73.tar.xz/.tarball-version -> libosmo-sigtran_2.1.0.21.a141.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -2.1.0.15-ec73 +2.1.0.21-a141
View file
libosmo-sigtran_2.1.0.15.ec73.tar.xz/debian/changelog -> libosmo-sigtran_2.1.0.21.a141.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -libosmo-sigtran (2.1.0.15.ec73) unstable; urgency=medium +libosmo-sigtran (2.1.0.21.a141) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom master feed - -- Osmocom OBS scripts <info@osmocom.org> Mon, 03 Mar 2025 16:17:13 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Mon, 03 Mar 2025 20:07:49 +0000 libosmo-sigtran (2.1.0) unstable; urgency=medium
View file
libosmo-sigtran_2.1.0.15.ec73.tar.xz/src/m3ua.c -> libosmo-sigtran_2.1.0.21.a141.tar.xz/src/m3ua.c
Changed
@@ -100,6 +100,19 @@ { 0, NULL } }; +const char *m3ua_ntfy_info_name(uint16_t ntfy_status_type, uint16_t ntfy_status_info) +{ + switch (ntfy_status_type) { + case M3UA_NOTIFY_T_STATCHG: + return get_value_string(m3ua_ntfy_stchg_names, ntfy_status_info); + case M3UA_NOTIFY_T_OTHER: + return get_value_string(m3ua_ntfy_other_names, ntfy_status_info); + default: + break; + } + return "NULL"; +} + static const struct value_string m3ua_iei_names = { { M3UA_IEI_INFO_STRING, "INFO String" }, { M3UA_IEI_ROUTE_CTX, "Routing Context" }, @@ -643,20 +656,7 @@ m3ua_decode_notify(&ntfy, asp, xua); type_name = get_value_string(m3ua_ntfy_type_names, ntfy.status_type); - - switch (ntfy.status_type) { - case M3UA_NOTIFY_T_STATCHG: - info_name = get_value_string(m3ua_ntfy_stchg_names, - ntfy.status_info); - break; - case M3UA_NOTIFY_T_OTHER: - info_name = get_value_string(m3ua_ntfy_other_names, - ntfy.status_info); - break; - default: - info_name = "NULL"; - break; - } + info_name = m3ua_ntfy_info_name(ntfy.status_type, ntfy.status_info); LOGPASP(asp, DLM3UA, LOGL_NOTICE, "Received NOTIFY Type %s:%s (%s)\n", type_name, info_name, ntfy.info_string ? ntfy.info_string : "");
View file
libosmo-sigtran_2.1.0.15.ec73.tar.xz/src/osmo_ss7_asp.c -> libosmo-sigtran_2.1.0.21.a141.tar.xz/src/osmo_ss7_asp.c
Changed
@@ -1172,6 +1172,7 @@ } rate_ctr_inc2(asp->ctrg, SS7_ASP_CTR_PKT_TX_TOTAL); + LOGPASP(asp, DLSS7, LOGL_DEBUG, "Tx %d bytes: %s\n", msg->len, msgb_hexdump(msg)); if (asp->cfg.is_server) { if (!asp->server) { @@ -1291,3 +1292,22 @@ } return -1; } + +/* Apply sane configs for unconfigured options and restart the ASP. */ +void ss7_asp_restart_after_reconfigure(struct osmo_ss7_asp *asp) +{ + /* Make sure proper defaults values are applied if user didn't provide + * specific default values */ + ss7_asp_set_default_peer_hosts(asp); + + /* Apply default LM FSM for client ASP */ + if (asp->cfg.proto != OSMO_SS7_ASP_PROT_IPA && + asp->cfg.role == OSMO_SS7_ASP_ROLE_ASP && + !asp->cfg.is_server) { + osmo_ss7_asp_use_default_lm(asp, LOGL_DEBUG); + } else { + osmo_ss7_asp_remove_default_lm(asp); + } + + osmo_ss7_asp_restart(asp); +}
View file
libosmo-sigtran_2.1.0.15.ec73.tar.xz/src/osmo_ss7_vty.c -> libosmo-sigtran_2.1.0.21.a141.tar.xz/src/osmo_ss7_vty.c
Changed
@@ -3001,9 +3001,7 @@ switch (vty->node) { case L_CS7_ASP_NODE: asp = vty->index; - /* Make sure proper defaults values are set */ - ss7_asp_set_default_peer_hosts(asp); - osmo_ss7_asp_restart(asp); + ss7_asp_restart_after_reconfigure(asp); vty->node = L_CS7_NODE; vty->index = asp->inst; break;
View file
libosmo-sigtran_2.1.0.15.ec73.tar.xz/src/sccp_user.c -> libosmo-sigtran_2.1.0.21.a141.tar.xz/src/sccp_user.c
Changed
@@ -628,6 +628,7 @@ asp = asp_i; LOGP(DLSCCP, LOGL_NOTICE, "%s: ASP %s for %s is not associated with any AS, using it\n", name, asp->cfg.name, osmo_ss7_asp_protocol_name(prot)); + osmo_ss7_as_add_asp(as, asp->cfg.name); break; } if (!asp) { @@ -642,6 +643,7 @@ if (!asp) goto out_rt; asp_created = true; + asp->simple_client_allocated = true; /* Ensure that the ASP we use is set to operate as a client. */ asp->cfg.is_server = false; /* Ensure that the ASP we use is set to role ASP. */ @@ -650,12 +652,10 @@ ss7_asp_peer_set_hosts(&asp->cfg.local, asp, &default_local_ip, 1); if (default_remote_ip) ss7_asp_peer_set_hosts(&asp->cfg.remote, asp, &default_remote_ip, 1); - /* Make sure proper defaults are applied if app didn't provide specific default values */ - ss7_asp_set_default_peer_hosts(asp); - asp->simple_client_allocated = true; + /* Make sure proper defaults are applied if app didn't + provide specific default values, then restart the ASP: */ + ss7_asp_restart_after_reconfigure(asp); } - - osmo_ss7_as_add_asp(as, asp->cfg.name); } /* Extra sanity checks if the ASP asp-clnt-* was pre-configured over VTY: */ @@ -696,12 +696,9 @@ goto out_asp; } } + /* ASP was already started here previously by VTY go_parent. */ } - /* Restart ASP */ - if (prot != OSMO_SS7_ASP_PROT_IPA) - osmo_ss7_asp_use_default_lm(asp, LOGL_DEBUG); - osmo_ss7_asp_restart(asp); LOGP(DLSCCP, LOGL_NOTICE, "%s: Using ASP instance %s\n", name, asp->cfg.name);
View file
libosmo-sigtran_2.1.0.15.ec73.tar.xz/src/ss7_as.h -> libosmo-sigtran_2.1.0.21.a141.tar.xz/src/ss7_as.h
Changed
@@ -70,4 +70,4 @@ unsigned int osmo_ss7_as_count_asp(const struct osmo_ss7_as *as); #define LOGPAS(as, subsys, level, fmt, args ...) \ - _LOGSS7((as)->inst, subsys, level, "as-%s: " fmt, (as)->cfg.name, ## args) + _LOGSS7((as)->inst, subsys, level, "AS(%s) " fmt, (as)->cfg.name, ## args)
View file
libosmo-sigtran_2.1.0.15.ec73.tar.xz/src/ss7_asp.h -> libosmo-sigtran_2.1.0.21.a141.tar.xz/src/ss7_asp.h
Changed
@@ -110,5 +110,8 @@ int ss7_asp_apply_new_local_address(const struct osmo_ss7_asp *asp, unsigned int loc_idx); int ss7_asp_apply_drop_local_address(const struct osmo_ss7_asp *asp, unsigned int loc_idx); +void ss7_asp_restart_after_reconfigure(struct osmo_ss7_asp *asp); +void osmo_ss7_asp_remove_default_lm(struct osmo_ss7_asp *asp); + #define LOGPASP(asp, subsys, level, fmt, args ...) \ - _LOGSS7((asp)->inst, subsys, level, "asp-%s: " fmt, (asp)->cfg.name, ## args) + _LOGSS7((asp)->inst, subsys, level, "ASP(%s) " fmt, (asp)->cfg.name, ## args)
View file
libosmo-sigtran_2.1.0.15.ec73.tar.xz/src/xua_as_fsm.c -> libosmo-sigtran_2.1.0.21.a141.tar.xz/src/xua_as_fsm.c
Changed
@@ -39,15 +39,35 @@ return msg; } +static void tx_notify(struct osmo_ss7_asp *asp, const struct osmo_xlm_prim_notify *npar) +{ + const char *type_name, *info_name, *info_str; + type_name = get_value_string(m3ua_ntfy_type_names, npar->status_type); + info_name = m3ua_ntfy_info_name(npar->status_type, npar->status_info); + info_str = npar->info_string ? npar->info_string : ""; + + LOGPASP(asp, DLSS7, LOGL_INFO, "Tx NOTIFY Type %s:%s (%s)\n", + type_name, info_name, info_str); + struct msgb *msg = encode_notify(npar); + osmo_ss7_asp_send(asp, msg); +} + static int as_notify_all_asp(struct osmo_ss7_as *as, struct osmo_xlm_prim_notify *npar) { struct msgb *msg; unsigned int i, sent = 0; + const char *type_name, *info_name, *info_str; /* we don't send notify to IPA peers! */ if (as->cfg.proto == OSMO_SS7_ASP_PROT_IPA) return 0; + type_name = get_value_string(m3ua_ntfy_type_names, npar->status_type); + info_name = m3ua_ntfy_info_name(npar->status_type, npar->status_info); + info_str = npar->info_string ? npar->info_string : ""; + LOGPFSM(as->fi, "Broadcasting NOTIFY Type %s:%s (%s) to all non-DOWN ASPs\n", + type_name, info_name, info_str); + /* iterate over all non-DOWN ASPs and send them the message */ for (i = 0; i < ARRAY_SIZE(as->cfg.asps); i++) { struct osmo_ss7_asp *asp = as->cfg.aspsi; @@ -71,6 +91,8 @@ /* TODO: Optional Routing Context */ + LOGPASP(asp, DLSS7, LOGL_INFO, "Tx NOTIFY Type %s:%s (%s)\n", + type_name, info_name, info_str); msg = encode_notify(npar); osmo_ss7_asp_send(asp, msg); sent++; @@ -175,6 +197,37 @@ bool ipa_route_created; }; +static void fill_notify_statchg_pars(const struct osmo_fsm_inst *fi, struct osmo_xlm_prim_notify *npar) +{ + struct xua_as_fsm_priv *xafp = (struct xua_as_fsm_priv *) fi->priv; + struct osmo_ss7_as *as = xafp->as; + *npar = (struct osmo_xlm_prim_notify){ + .status_type = M3UA_NOTIFY_T_STATCHG, + }; + + switch (fi->state) { + case XUA_AS_S_INACTIVE: + npar->status_info = M3UA_NOTIFY_I_AS_INACT; + break; + case XUA_AS_S_ACTIVE: + npar->status_info = M3UA_NOTIFY_I_AS_ACT; + break; + case XUA_AS_S_PENDING: + npar->status_info = M3UA_NOTIFY_I_AS_PEND; + break; + case XUA_AS_S_DOWN: + default: + /* Nothing will be sent anyway... */ + return; + } + + /* Add the routing context, if it is configured */ + if (as->cfg.routing_key.context) { + npar->presence |= NOTIFY_PAR_P_ROUTE_CTX; + npar->route_ctx = as->cfg.routing_key.context; + } +} + /* is the given AS one with a single ASP of IPA type? */ static bool is_single_ipa_asp(struct osmo_ss7_as *as) { @@ -342,21 +395,21 @@ { struct xua_as_fsm_priv *xafp = (struct xua_as_fsm_priv *) fi->priv; struct osmo_ss7_as *as = xafp->as; - struct osmo_xlm_prim_notify npar = { - .status_type = M3UA_NOTIFY_T_STATCHG, - }; + struct osmo_xlm_prim_notify npar; + + fill_notify_statchg_pars(fi, &npar); switch (fi->state) { case XUA_AS_S_INACTIVE: - npar.status_info = M3UA_NOTIFY_I_AS_INACT; + /* continue below */ break; case XUA_AS_S_ACTIVE: if (is_single_ipa_asp(as)) ipa_add_route(fi); - npar.status_info = M3UA_NOTIFY_I_AS_ACT; + /* continue below */ break; case XUA_AS_S_PENDING: - npar.status_info = M3UA_NOTIFY_I_AS_PEND; + /* continue below */ break; case XUA_AS_S_DOWN: if (is_single_ipa_asp(as)) @@ -375,11 +428,7 @@ return; } - /* Add the routing context, if it is configured */ - if (as->cfg.routing_key.context) { - npar.presence |= NOTIFY_PAR_P_ROUTE_CTX; - npar.route_ctx = as->cfg.routing_key.context; - } + fill_notify_statchg_pars(fi, &npar); /* TODO: ASP-Id of ASP triggering this state change */ @@ -400,10 +449,13 @@ static void xua_as_fsm_inactive(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct xua_as_fsm_priv *xafp = (struct xua_as_fsm_priv *) fi->priv; - struct osmo_ss7_asp *asp = data; + struct osmo_ss7_asp *asp; + struct xua_as_event_asp_inactive_ind_pars *inact_ind_pars; + struct osmo_xlm_prim_notify npar; switch (event) { case XUA_ASPAS_ASP_DOWN_IND: + asp = data; /* one ASP transitions into ASP-DOWN */ if (check_any_other_asp_not_down(xafp->as, asp)) { /* ignore, we stay AS_INACTIVE */ @@ -415,7 +467,11 @@ osmo_fsm_inst_state_chg(fi, XUA_AS_S_ACTIVE, 0, 0); break; case XUA_ASPAS_ASP_INACTIVE_IND: - /* ignore */ + inact_ind_pars = data; + if (inact_ind_pars->asp_requires_notify) { + fill_notify_statchg_pars(fi, &npar); + tx_notify(inact_ind_pars->asp, &npar); + } break; } } @@ -424,14 +480,19 @@ { struct xua_as_fsm_priv *xafp = (struct xua_as_fsm_priv *) fi->priv; struct osmo_ss7_asp *asp; + struct xua_as_event_asp_inactive_ind_pars *inact_ind_pars; struct msgb *msg; + struct osmo_xlm_prim_notify npar; switch (event) { case XUA_ASPAS_ASP_DOWN_IND: case XUA_ASPAS_ASP_INACTIVE_IND: - asp = data; - if (check_any_other_asp_in_active(xafp->as, asp)) { - /* ignore, we stay AS_ACTIVE */ + inact_ind_pars = data; + if (check_any_other_asp_in_active(xafp->as, inact_ind_pars->asp)) { + if (event == XUA_ASPAS_ASP_INACTIVE_IND && inact_ind_pars->asp_requires_notify) { + fill_notify_statchg_pars(fi, &npar); + tx_notify(inact_ind_pars->asp, &npar); + } /* ASP_DOWN_IND: ignore, nothing to be sent */ } else { uint32_t recovery_msec = xafp->as->cfg.recovery_timeout_msec; osmo_fsm_inst_state_chg(fi, XUA_AS_S_PENDING, 0, 0); @@ -458,7 +519,9 @@ static void xua_as_fsm_pending(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct xua_as_fsm_priv *xafp = (struct xua_as_fsm_priv *) fi->priv; + struct xua_as_event_asp_inactive_ind_pars *inact_ind_pars; struct msgb *msg; + struct osmo_xlm_prim_notify npar; switch (event) { case XUA_ASPAS_ASP_ACTIVE_IND: @@ -470,7 +533,11 @@ xua_as_transmit_msg(xafp->as, msg); break; case XUA_ASPAS_ASP_INACTIVE_IND: - /* ignore */ + inact_ind_pars = data; + if (inact_ind_pars->asp_requires_notify) { + fill_notify_statchg_pars(fi, &npar); + tx_notify(inact_ind_pars->asp, &npar); + } break; case XUA_ASPAS_ASP_DOWN_IND: /* ignore */
View file
libosmo-sigtran_2.1.0.15.ec73.tar.xz/src/xua_as_fsm.h -> libosmo-sigtran_2.1.0.21.a141.tar.xz/src/xua_as_fsm.h
Changed
@@ -1,6 +1,7 @@ #pragma once struct osmo_ss7_as; +struct osmo_ss7_asp; enum xua_as_state { XUA_AS_S_DOWN, @@ -9,8 +10,17 @@ XUA_AS_S_PENDING, }; +struct xua_as_event_asp_inactive_ind_pars { + struct osmo_ss7_asp *asp; + /* RFC4666 4.3.4.5: "When an ASP moves from ASP-DOWN to ASP-INACTIVE within a + * particular AS, a Notify message SHOULD be sent, by the ASP-UP receptor, + * after sending the ASP-UP-ACK, in order to inform the ASP of the current AS + * state." */ + bool asp_requires_notify; +}; + enum xua_as_event { - XUA_ASPAS_ASP_INACTIVE_IND, + XUA_ASPAS_ASP_INACTIVE_IND, /* param: struct xua_as_event_asp_inactive_ind_pars* */ XUA_ASPAS_ASP_DOWN_IND, XUA_ASPAS_ASP_ACTIVE_IND, XUA_AS_E_RECOVERY_EXPD,
View file
libosmo-sigtran_2.1.0.15.ec73.tar.xz/src/xua_asp_fsm.c -> libosmo-sigtran_2.1.0.21.a141.tar.xz/src/xua_asp_fsm.c
Changed
@@ -355,7 +355,7 @@ /* Helper function to dispatch an ASP->AS event to all AS of which this * ASP is a memmber. Ignores routing contexts for now. */ -static void dispatch_to_all_as(struct osmo_fsm_inst *fi, uint32_t event) +static void dispatch_to_all_as(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct xua_asp_fsm_priv *xafp = fi->priv; struct osmo_ss7_asp *asp = xafp->asp; @@ -365,7 +365,7 @@ llist_for_each_entry(as, &inst->as_list, list) { if (!osmo_ss7_as_has_asp(as, asp)) continue; - osmo_fsm_inst_dispatch(as->fi, event, asp); + osmo_fsm_inst_dispatch(as->fi, event, data); } } @@ -418,7 +418,9 @@ static void xua_asp_fsm_down_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) { - dispatch_to_all_as(fi, XUA_ASPAS_ASP_DOWN_IND); + struct xua_asp_fsm_priv *xafp = fi->priv; + struct osmo_ss7_asp *asp = xafp->asp; + dispatch_to_all_as(fi, XUA_ASPAS_ASP_DOWN_IND, asp); } static void xua_asp_fsm_down(struct osmo_fsm_inst *fi, uint32_t event, void *data) @@ -478,7 +480,17 @@ static void xua_asp_fsm_inactive_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) { - dispatch_to_all_as(fi, XUA_ASPAS_ASP_INACTIVE_IND); + struct xua_asp_fsm_priv *xafp = fi->priv; + /* RFC4666 4.3.4.5: "When an ASP moves from ASP-DOWN to ASP-INACTIVE within a + * particular AS, a Notify message SHOULD be sent, by the ASP-UP receptor, + * after sending the ASP-UP-ACK, in order to inform the ASP of the current AS + * state." + */ + struct xua_as_event_asp_inactive_ind_pars pars = { + .asp = xafp->asp, + .asp_requires_notify = (prev_state == XUA_ASP_S_DOWN), + }; + dispatch_to_all_as(fi, XUA_ASPAS_ASP_INACTIVE_IND, &pars); } static void xua_asp_fsm_inactive(struct osmo_fsm_inst *fi, uint32_t event, void *data) @@ -596,7 +608,9 @@ static void xua_asp_fsm_active_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) { - dispatch_to_all_as(fi, XUA_ASPAS_ASP_ACTIVE_IND); + struct xua_asp_fsm_priv *xafp = fi->priv; + struct osmo_ss7_asp *asp = xafp->asp; + dispatch_to_all_as(fi, XUA_ASPAS_ASP_ACTIVE_IND, asp); } static void xua_asp_fsm_active(struct osmo_fsm_inst *fi, uint32_t event, void *data) @@ -1047,8 +1061,14 @@ static void ipa_asp_fsm_active_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) { - dispatch_to_all_as(fi, XUA_ASPAS_ASP_INACTIVE_IND); - dispatch_to_all_as(fi, XUA_ASPAS_ASP_ACTIVE_IND); + struct ipa_asp_fsm_priv *iafp = fi->priv; + struct osmo_ss7_asp *asp = iafp->asp; + struct xua_as_event_asp_inactive_ind_pars pars = { + .asp = asp, + .asp_requires_notify = false, + }; + dispatch_to_all_as(fi, XUA_ASPAS_ASP_INACTIVE_IND, &pars); + dispatch_to_all_as(fi, XUA_ASPAS_ASP_ACTIVE_IND, asp); } /* Server + Client: We're actively transmitting user data */ @@ -1064,7 +1084,12 @@ static void ipa_asp_fsm_inactive_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) { - dispatch_to_all_as(fi, XUA_ASPAS_ASP_INACTIVE_IND); + struct ipa_asp_fsm_priv *iafp = fi->priv; + struct xua_as_event_asp_inactive_ind_pars pars = { + .asp = iafp->asp, + .asp_requires_notify = false, + }; + dispatch_to_all_as(fi, XUA_ASPAS_ASP_INACTIVE_IND, &pars); } static void ipa_asp_fsm_inactive(struct osmo_fsm_inst *fi, uint32_t event, void *data)
View file
libosmo-sigtran_2.1.0.15.ec73.tar.xz/src/xua_default_lm_fsm.c -> libosmo-sigtran_2.1.0.21.a141.tar.xz/src/xua_default_lm_fsm.c
Changed
@@ -413,6 +413,14 @@ .prim_cb = default_lm_prim_cb, }; +void osmo_ss7_asp_remove_default_lm(struct osmo_ss7_asp *asp) +{ + if (!asp->lm_priv) + return; + osmo_fsm_inst_term(asp->lm_priv, OSMO_FSM_TERM_ERROR, NULL); + asp->lm_priv = NULL; +} + int osmo_ss7_asp_use_default_lm(struct osmo_ss7_asp *asp, int log_level) { struct lm_fsm_priv *lmp;
View file
libosmo-sigtran_2.1.0.15.ec73.tar.xz/src/xua_internal.h -> libosmo-sigtran_2.1.0.21.a141.tar.xz/src/xua_internal.h
Changed
@@ -71,6 +71,7 @@ extern const struct value_string m3ua_ntfy_type_names; extern const struct value_string m3ua_ntfy_stchg_names; extern const struct value_string m3ua_ntfy_other_names; +const char *m3ua_ntfy_info_name(uint16_t ntfy_status_type, uint16_t ntfy_status_info); struct xua_msg *m3ua_encode_notify(const struct osmo_xlm_prim_notify *npar); int m3ua_decode_notify(struct osmo_xlm_prim_notify *npar, void *ctx,
View file
libosmo-sigtran_2.1.0.15.ec73.tar.xz/src/xua_rkm.c -> libosmo-sigtran_2.1.0.21.a141.tar.xz/src/xua_rkm.c
Changed
@@ -221,6 +221,14 @@ as = osmo_ss7_as_find_by_rctx(asp->inst, rctx); if (as) { LOGPASP(asp, DLSS7, LOGL_NOTICE, "RKM: Found existing AS for RCTX %u\n", rctx); + /* Early return before allocating stuff if no space left: */ + if (*nas_idx >= max_nas_idx) { + LOGPASP(asp, DLSS7, LOGL_ERROR, "RKM: not enough room for newly assigned AS (max %u AS)\n", + max_nas_idx+1); + msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_ERR_INSUFF_RESRC, 0); + return -1; + } + if (as->cfg.routing_key.pc != dpc) { LOGPASP(asp, DLSS7, LOGL_ERROR, "RKM: DPC doesn't match, rejecting AS (%u != %u)\n", as->cfg.routing_key.pc, dpc); @@ -244,6 +252,14 @@ as->cfg.mode_set_by_peer = true; } } else if (asp->inst->cfg.permit_dyn_rkm_alloc) { + /* Early return before allocating stuff if no space left: */ + if (*nas_idx >= max_nas_idx) { + LOGPASP(asp, DLSS7, LOGL_ERROR, "RKM: not enough room for newly assigned AS (max %u AS)\n", + max_nas_idx+1); + msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_ERR_INSUFF_RESRC, 0); + return -1; + } + /* Create an AS for this routing key */ snprintf(namebuf, sizeof(namebuf), "as-rkm-%u", rctx); as = osmo_ss7_as_find_or_create(asp->inst, namebuf, OSMO_SS7_ASP_PROT_M3UA); @@ -272,17 +288,6 @@ msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_ERR_CANT_SUPP_UNQ_RT, 0); return -1; } - - /* append to list of newly assigned as */ - if (*nas_idx >= max_nas_idx) { - ss7_route_destroy(rt); - osmo_ss7_as_destroy(as); - LOGPASP(asp, DLSS7, LOGL_ERROR, "RKM: not enough room for newly assigned AS (max %u AS)\n", - max_nas_idx+1); - msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_ERR_INSUFF_RESRC, 0); - return -1; - } - newly_assigned_as(*nas_idx)++ = as; } else { /* not permitted to create dynamic RKM entries */ LOGPASP(asp, DLSS7, LOGL_NOTICE, "RKM: RCTX %u not found in configuration, and " @@ -294,6 +299,8 @@ /* Success: Add just-create AS to connected ASP + report success */ osmo_ss7_as_add_asp(as, asp->cfg.name); msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_SUCCESS, rctx); + /* append to list of newly assigned as */ + newly_assigned_as(*nas_idx)++ = as; return 0; } @@ -339,7 +346,16 @@ if (!as) continue; /* Notify AS that it has an INACTIVE ASP */ - osmo_fsm_inst_dispatch(as->fi, XUA_ASPAS_ASP_INACTIVE_IND, asp); + /* RFC4666 4.3.4.5: "When an ASP moves from ASP-DOWN to ASP-INACTIVE within a + * particular AS, a Notify message SHOULD be sent, by the ASP-UP receptor, + * after sending the ASP-UP-ACK, in order to inform the ASP of the current AS + * state." + */ + struct xua_as_event_asp_inactive_ind_pars pars = { + .asp = asp, + .asp_requires_notify = true, + }; + osmo_fsm_inst_dispatch(as->fi, XUA_ASPAS_ASP_INACTIVE_IND, &pars); } return 0;
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.