getpeername, getsockname, gethostname and getifaddrs update#307
Merged
rennergade merged 17 commits intodevelopfrom Jul 24, 2024
Merged
getpeername, getsockname, gethostname and getifaddrs update#307rennergade merged 17 commits intodevelopfrom
rennergade merged 17 commits intodevelopfrom
Conversation
Anway-Agte
suggested changes
Jul 17, 2024
added 2 commits
July 17, 2024 16:31
Contributor
namanlalitnyu
left a comment
There was a problem hiding this comment.
Just one minor comment.
namanlalitnyu
approved these changes
Jul 18, 2024
JustinCappos
requested changes
Jul 18, 2024
Member
JustinCappos
left a comment
There was a problem hiding this comment.
A few suggestions throughout...
Member
|
@qianxichen233 If this is ready for my review again, please ping me so I know. (And follow up on slack in a day or so, if I don't respond.) |
JustinCappos
approved these changes
Jul 22, 2024
Member
JustinCappos
left a comment
There was a problem hiding this comment.
looks good now. Thanks for the fixes!
Anway-Agte
approved these changes
Jul 22, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds some comments and tests for getpeername_syscall, getsockname_syscall, gethostname_syscall and getifaddrs_syscall. A issue was specified in the test: when calling connect without binding to any address, an new address will be automatically assigned to the socket. But we failed to update the corresponding information in the sockhandle, causing the ip and port returned from getsockname_syscall are both 0.
Fixes # (issue)
Type of change
How Has This Been Tested?
ut_lind_net_getpeername_bad_inputut_lind_net_getpeername_inetut_lind_net_getpeername_unixut_lind_net_getpeername_udput_lind_net_getsockname_bad_inputut_lind_net_getsockname_emptyut_lind_net_getsockname_inetut_lind_net_getsockname_unixut_lind_net_gethostnameut_lind_net_getifaddrsChecklist: