From be7df7c1a7b3e3a9d6883399836642fe469c534d Mon Sep 17 00:00:00 2001 From: Neels Janosch Hofmeyr Date: Fri, 24 Mar 2023 03:33:21 +0100 Subject: [PATCH] release UE Contexts on SCTP_RESTART When receiving SCTP_RESTART for a given HNB, directly clear the UE Contexts. (The HNB typically connects via HNBAP shortly after this causing a UE Context clearing too, but UE state should always be cleared on SCTP_RESTART, no matter what.) Change-Id: I583922193ba73e17ab85152005535188c2762b85 --- src/osmo-hnbgw/hnbgw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/osmo-hnbgw/hnbgw.c b/src/osmo-hnbgw/hnbgw.c index 5b4e9b6..0624803 100644 --- a/src/osmo-hnbgw/hnbgw.c +++ b/src/osmo-hnbgw/hnbgw.c @@ -264,6 +264,7 @@ 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; + hnb_context_release_ue_state(hnb); /* 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