diff --git a/TODO-RELEASE b/TODO-RELEASE index d0852fc..fbce417 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,4 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line +libosmo-netif >1.2.0 new APIs osmo_stream_{cli,srv}_clear_tx_queue() \ No newline at end of file diff --git a/src/osmo-hnbgw/hnbgw.c b/src/osmo-hnbgw/hnbgw.c index 38d33eb..ce5e5e4 100644 --- a/src/osmo-hnbgw/hnbgw.c +++ b/src/osmo-hnbgw/hnbgw.c @@ -269,6 +269,12 @@ static int hnb_read_cb(struct osmo_stream_srv *conn) case SCTP_RESTART: LOGHNB(hnb, DMAIN, LOGL_NOTICE, "HNB SCTP conn RESTARTed, marking as HNBAP-unregistered\n"); hnb->hnb_registered = false; + /* The tx queue may be quite full after an SCTP RESTART: (SYS#6113) + * The link may have been flaky (a possible reason for the peer restarting the conn) and + * hence the kernel socket Tx queue may be full (no ACKs coming back) and our own userspace + * queue may contain plenty of oldish messages to be sent. Since the HNB will re-register after + * this, we simply drop all those old messages: */ + osmo_stream_srv_clear_tx_queue(conn); break; } break;