net/dup: only start tcp monitor on INET domain
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
parent
9c2c5d3919
commit
5a2510d48d
|
@ -104,7 +104,9 @@ int psock_dup2(FAR struct socket *psock1, FAR struct socket *psock2)
|
|||
|
||||
conn = (FAR struct tcp_conn_s *)psock2->s_conn;
|
||||
|
||||
if (psock2->s_type == SOCK_STREAM && conn &&
|
||||
if ((psock2->s_domain == PF_INET ||
|
||||
psock2->s_domain == PF_INET6) &&
|
||||
psock2->s_type == SOCK_STREAM && conn &&
|
||||
(conn->tcpstateflags == TCP_ESTABLISHED ||
|
||||
conn->tcpstateflags == TCP_SYN_RCVD))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue