On 6/15/22 5:56 PM, Cheng Xu wrote:
On 6/15/22 4:40 PM, Stefan Metzmacher wrote:
<...>
@@ -1279,12 +1285,26 @@ static void siw_cm_llp_state_change(struct
sock *sk)
switch (sk->sk_state) {
case TCP_ESTABLISHED:
- /*
- * handle accepting socket as special case where only
- * new connection is possible
- */
- siw_cm_queue_work(cep, SIW_CM_WORK_ACCEPT);
- break;
+ if (cep->state == SIW_EPSTATE_CONNECTING) {
+ /*
+ * handle accepting socket as special case where only
+ * new connection is possible
+ */
+ siw_cm_queue_work(cep, SIW_CM_WORK_CONNECTED);
+ break;
+
+ } else if (cep->state == SIW_EPSTATE_LISTENING) {
+ /*
+ * handle accepting socket as special case where only
+ * new connection is possible
+ */
+ siw_cm_queue_work(cep, SIW_CM_WORK_ACCEPT);
+ break;
+ }
+ siw_dbg_cep(cep,
+ "unexpected socket state %d with cep state %d\n",
+ sk->sk_state, cep->state);
+ fallthrough;
Is "faillthrough" a annotation ?
Oh, please ignore this, I just learned this.
Cheng Xu