On 08/02/2016 11:16 AM, Xue, Ying wrote:
> @@ -1684,17 +1687,22 @@ static bool filter_connect(struct tipc_sock *tsk, 
> struct sk_buff *skb)
>               msg_set_dest_droppable(hdr, 1);
>               return false;
>  
> -     case SS_UNCONNECTED:
> +     case SS_DISCONNECTING:
> +             break;
> +     }
>  
> +     switch (sk->sk_state) {
> +     case TIPC_UNCONNECTED:
> +             break;
>
> If the TIPC_UNCONNECTED case condition is broken, it means that 
> filter_connect () will return false. As a result, SYN msg would be rejected 
> when socket state is in TIPC_UNCONNECTED. If so, I don't understand how a 
> client stream socket can receive SYN msg.
[partha] We process sock->state intentionally before sk->sk_state. The client
stream socket has its sock->state set to SS_CONNECTING, hence will consume the
SYN msg from server and filter_connect() would return true. The case for
TIPC_UNCONNECTED exists just to prevent an error message "Unknown sk_state..".
> Regards,
> Ying
>
>


------------------------------------------------------------------------------
_______________________________________________
tipc-discussion mailing list
tipc-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tipc-discussion

Reply via email to