From 8cf7d9479e95b4d274a2a3eb83be209bc415a7d3 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 9 Oct 2020 17:24:50 +0200 Subject: BSSMAP RESET: also accept conn cfm events during ST_DISC We don't really expect connection attempts during ST_DISC, but if the user happens to dispatch those events for whatever obscure reasons, treat them instead of erroring about an unallowed event. Change-Id: Ic7c60a40ff25ae647ee659259dfea769bc4592e4 --- src/osmo-bsc/bssmap_reset.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/osmo-bsc') diff --git a/src/osmo-bsc/bssmap_reset.c b/src/osmo-bsc/bssmap_reset.c index 9215e902a..fcf2bab30 100644 --- a/src/osmo-bsc/bssmap_reset.c +++ b/src/osmo-bsc/bssmap_reset.c @@ -118,6 +118,17 @@ static void bssmap_reset_disc_action(struct osmo_fsm_inst *fi, uint32_t event, v bssmap_reset_fsm_state_chg(fi, BSSMAP_RESET_ST_CONN); break; + case BSSMAP_RESET_EV_CONN_CFM_FAILURE: + /* ignore */ + break; + + case BSSMAP_RESET_EV_CONN_CFM_SUCCESS: + /* A connection succeeded before we managed to do a RESET handshake? + * Then the calling code is not taking care to check bssmap_reset_is_conn_ready(). + */ + LOGPFSML(fi, LOGL_ERROR, "Connection success confirmed, but we have not seen a RESET-ACK; bug?\n"); + break; + default: OSMO_ASSERT(false); } @@ -183,6 +194,8 @@ static struct osmo_fsm_state bssmap_reset_fsm_states[] = { .in_event_mask = 0 | S(BSSMAP_RESET_EV_RX_RESET) | S(BSSMAP_RESET_EV_RX_RESET_ACK) + | S(BSSMAP_RESET_EV_CONN_CFM_FAILURE) + | S(BSSMAP_RESET_EV_CONN_CFM_SUCCESS) , .out_state_mask = 0 | S(BSSMAP_RESET_ST_DISC) -- cgit v1.2.3