Changes
Started by upstream project gerrit-osmo-remsim #107
Started 7 hr 42 min ago
Queued 1 min 17 sec
Took 2.7 sec
on build5-deb12build-ansible
rspro_server: fix releasing timed out clients
Fix crash on reconnects of clients if they timed out.
The duplicate check will use conn->peer of the old peer,
but conn->peer is NULL because rspro_client_conn_destroy() never destroys
the connection if conn->peer is valid when rspro_client_conn_destroy() is called.
void rspro_client_conn_destroy(conn)
{
if (conn->peer) {
peer = conn->peer;
conn->peer = NULL;
osmo_stream_srv_destroy(peer); /* calls sock_closed_cb()
}
[..]
}
int sock_closed_cb(peer)
{
[..]
if (conn->peer) {
osmo_fsm_inst_dispatch(conn->fi, CLNTC_E_TCP_DOWN, NULL); /* calls in the end rspro_client_conn_destroy() */
}
return 0;
}
Fixes: 8cfe1d808a57 ("Use new osmo_ipa_ka_fsm_inst APIs from libosmo-netif")
Related: OS#6957
Change-Id: I1f7faf5ffdd909362c492ab434b63fa7e79ada95
Fix crash on reconnects of clients if they timed out.
The duplicate check will use conn->peer of the old peer,
but conn->peer is NULL because rspro_client_conn_destroy() never destroys
the connection if conn->peer is valid when rspro_client_conn_destroy() is called.
void rspro_client_conn_destroy(conn)
{
if (conn->peer) {
peer = conn->peer;
conn->peer = NULL;
osmo_stream_srv_destroy(peer); /* calls sock_closed_cb()
}
[..]
}
int sock_closed_cb(peer)
{
[..]
if (conn->peer) {
osmo_fsm_inst_dispatch(conn->fi, CLNTC_E_TCP_DOWN, NULL); /* calls in the end rspro_client_conn_destroy() */
}
return 0;
}
Fixes: 8cfe1d808a57 ("Use new osmo_ipa_ka_fsm_inst APIs from libosmo-netif")
Related: OS#6957
Change-Id: I1f7faf5ffdd909362c492ab434b63fa7e79ada95
lynxis
at