daniel has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42686?usp=email )
Change subject: tcap_as_loadshare: Route msg based on TCAP route if cache lookup fails ......................................................................
tcap_as_loadshare: Route msg based on TCAP route if cache lookup fails
Related: SYS#5423 Change-Id: I2fd9068be8a0a512b17c8bd2365aa87c266e5669 --- M src/tcap_as_loadshare.c 1 file changed, 10 insertions(+), 0 deletions(-)
Approvals: Jenkins Builder: Verified lynxis lazus: Looks good to me, approved pespin: Looks good to me, but someone else must approve
diff --git a/src/tcap_as_loadshare.c b/src/tcap_as_loadshare.c index c549610..c414c70 100644 --- a/src/tcap_as_loadshare.c +++ b/src/tcap_as_loadshare.c @@ -548,6 +548,12 @@ }
asp = tcap_trans_track_continue(as, &called_addr, &parsed.dtid, &calling_addr, &parsed.otid); + if (!asp) { + LOGPAS(as, DLTCAP, LOGL_INFO, "Couldn't find cached ASP for dtid %u/otid %u, using tcap route", parsed.dtid, parsed.otid); + asp = tcap_as_asp_find_by_tcap_id(as, &calling_addr, &called_addr, parsed.dtid); + if (asp) + tcap_trans_track_entry_create(as, asp, &called_addr, &parsed.dtid, &calling_addr, &parsed.otid); + } rc = asp ? 0 : -ENOKEY; break; case TCAP_TCMessage_PR_abort: @@ -559,6 +565,10 @@ }
asp = tcap_trans_track_end(as, &called_addr, &parsed.dtid, &calling_addr, NULL); + if (!asp) { + LOGPAS(as, DLTCAP, LOGL_INFO, "Couldn't find cached ASP for dtid %u/otid %u, using tcap route", parsed.dtid, parsed.otid); + asp = tcap_as_asp_find_by_tcap_id(as, &calling_addr, &called_addr, parsed.dtid); + } rc = asp ? 0 : -ENOKEY; break; case TCAP_TCMessage_PR_unidirectional: