remsim-client: Don't attempt to pass on illegal TPDU length
TPDUs with length < 5 or > 260 bytes are illegal in T=0. It doesn't make sense to send them to bankd, triggering bugs in either bankd, pcsc-lite or the CCID firmware down the road. Let's filter them right where they might originate.
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.
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; }
Re-organize the clean up: * rspro_client_conn_destroy() will be only called by the FSM clean up * closed_cb will inform the fi to clean up
Fixes: 8cfe1d808a57 ("Use new osmo_ipa_ka_fsm_inst APIs from libosmo-netif") Related: OS#6957 Change-Id: I1f7faf5ffdd909362c492ab434b63fa7e79ada95