You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/09/24 02:05:19 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #4603: [SECURITY]net/tcp: sanity check for the listen address

xiaoxiang781216 commented on a change in pull request #4603:
URL: https://github.com/apache/incubator-nuttx/pull/4603#discussion_r715268741



##########
File path: net/tcp/tcp_listen.c
##########
@@ -100,9 +104,35 @@ FAR struct tcp_conn_s *tcp_findlistener(uint16_t portno)
       if (conn && conn->lport == portno)
 #endif
         {
-          /* Yes.. we found a listener on this port */
+#ifdef CONFIG_NET_IPv6
+#  ifdef CONFIG_NET_IPv4
+          if (domain == PF_INET6)
+#  endif
+            {
+              if (net_ipv6addr_cmp(conn->u.ipv6.laddr, uaddr->ipv6.laddr) ||

Review comment:
       Yes, the header file which provided net_ipv6addr_cmp macro should include string.h to make self contained.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org