github-liyi opened a new pull request, #6731:
URL: https://github.com/apache/incubator-nuttx/pull/6731

   N/A
   Signed-off-by: liyi  <[email protected]>
   
   Change-Id: Ie7b4a831236e006b99d71b085ce7d0f37b39ba6d
   
   ## Summary
   add protection in the case when conn's domain isn't match with addr's 
family. 
   When you create a IPv4 socket and connect to an IPv6 address,
   the original code logic will use the input IPv6 address as a IPv4 format
   only because the socket's domain is created in AF_INET!
   This patch is to avoid this case, in which it refuse the connection and 
   return EPROTOTYPE(error protocol type)
   ## Impact
   When you use nuttx's socket in a wrong way, it will refuse this wrong 
operation
   ## Testing
   Testing cases has been done in nuttx sim program
   for example
   ping www.baidu.com(UDP packet)
   wget http://www.baidu.com(TCP packet)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to