net/tcp: sanity check for the listen address

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an
2021-09-23 14:55:19 +08:00
committed by Xiang Xiao
parent 4ac3044cc3
commit c132e5bed4
5 changed files with 100 additions and 23 deletions
+3 -2
View File
@@ -250,9 +250,10 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
/* Find the listener for this connection. */
#if defined(CONFIG_NET_IPv4) && defined(CONFIG_NET_IPv6)
listener = tcp_findlistener(conn->lport, conn->domain);
listener = tcp_findlistener(&conn->u, conn->lport,
conn->domain);
#else
listener = tcp_findlistener(conn->lport);
listener = tcp_findlistener(&conn->u, conn->lport);
#endif
if (listener != NULL)
{