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/28 12:16:17 UTC
[GitHub] [incubator-nuttx] github-liyi opened a new pull request, #6731: make sure conn's domain is match with addr's family
github-liyi opened a new pull request, #6731:
URL: https://github.com/apache/incubator-nuttx/pull/6731
N/A
Signed-off-by: liyi <li...@xiaomi.com>
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: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #6731: make sure conn's domain is match with addr's family
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #6731:
URL: https://github.com/apache/incubator-nuttx/pull/6731#issuecomment-1198163221
@github-liyi please fix the warning reported here:
https://github.com/apache/incubator-nuttx/runs/7561181745?check_suite_focus=true
--
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
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #6731: make sure conn's domain is match with addr's family
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #6731:
URL: https://github.com/apache/incubator-nuttx/pull/6731#issuecomment-1198158378
LGTM.
--
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
[GitHub] [incubator-nuttx] pkarashchenko commented on pull request #6731: make sure conn's domain is match with addr's family
Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on PR #6731:
URL: https://github.com/apache/incubator-nuttx/pull/6731#issuecomment-1198180446
Changes are good, just need to fix style issues
--
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
[GitHub] [incubator-nuttx] github-liyi commented on pull request #6731: make sure conn's domain is match with addr's family
Posted by GitBox <gi...@apache.org>.
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
[GitHub] [incubator-nuttx] github-liyi closed pull request #6731: make sure conn's domain is match with addr's family
Posted by GitBox <gi...@apache.org>.
github-liyi closed pull request #6731: make sure conn's domain is match with addr's family
URL: https://github.com/apache/incubator-nuttx/pull/6731
--
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