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 2022/07/29 03:31:59 UTC

[GitHub] [incubator-nuttx] github-liyi commented on pull request #6731: make sure conn's domain is match with addr's family

github-liyi commented on PR #6731:
URL: https://github.com/apache/incubator-nuttx/pull/6731#issuecomment-1198843722

   > ## 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 address only because the socket's domain is created in AF_INET! This patch is to avoid this case, in which it refuses 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 with nuttx sim program for example ping [www.baidu.com(UDP](http://www.baidu.com%EF%BC%88UDP) packet, DNS pkts) wget [http://www.baidu.com(TCP](http://www.baidu.com%EF%BC%88TCP) packet, HTTP pkts)
   
   


-- 
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