Skip to content

sockets: getaddrinfo: AF_UNSPEC handling was recently broken #16453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pfalcon opened this issue May 28, 2019 · 0 comments · Fixed by #16772
Closed

sockets: getaddrinfo: AF_UNSPEC handling was recently broken #16453

pfalcon opened this issue May 28, 2019 · 0 comments · Fixed by #16772
Assignees
Labels
area: Networking area: Sockets Networking sockets bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@pfalcon
Copy link
Collaborator

pfalcon commented May 28, 2019

From #15210 (comment) :

Hello @jukkar, you broke getaddrinfo() behavior with this patch (1897896). If it's passed AF_UNSPEC, it should resolve both IPv4 and IPv6 addresses. That's why the original code has 2 calls to dns_get_addr_info(). You replaced them with 1 call, so it can't work correctly.

@pfalcon pfalcon added bug The issue is a bug, or the PR is fixing a bug area: Networking area: Sockets Networking sockets labels May 28, 2019
@ioannisg ioannisg added the priority: medium Medium impact/importance bug label May 28, 2019
@pfalcon pfalcon changed the title sockets: getaddrinfo: AF_UNSPEC handling for recently broken sockets: getaddrinfo: AF_UNSPEC handling was recently broken Jun 3, 2019
jukkar added a commit to jukkar/zephyr that referenced this issue Jun 20, 2019
We must query both IPv4 and IPv6 addresses if the hints parameter
is NULL i.e., user does not supply hints or if family is set to
AF_UNSPEC.

Fixes zephyrproject-rtos#16453

Signed-off-by: Jukka Rissanen <[email protected]>
jukkar added a commit that referenced this issue Jun 20, 2019
We must query both IPv4 and IPv6 addresses if the hints parameter
is NULL i.e., user does not supply hints or if family is set to
AF_UNSPEC.

Fixes #16453

Signed-off-by: Jukka Rissanen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Networking area: Sockets Networking sockets bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants