Skip to content
Commit f684b7c6 authored by Seppo Takalo's avatar Seppo Takalo Committed by Jukka Rissanen
Browse files

net: getaddrinfo: Fix getaddrinfo() to respect socket type hints



If getaddrinfo() was called with AI_PASSIVE flag in hints,
returned address defaulted to SOCK_STREAM and IPPROTO_TCP.
Fixed so that SOCK_DGRAM leads to correct address type
that can be fed to bind() directly.

Same hard coding was visible when numerical IPv4 address string
was converted to binary. That is also fixed to respect hints now.

Also, added functionality to get IPv6 address, when hints contained
AF_INET6.

Fixes #30686

Signed-off-by: default avatarSeppo Takalo <seppo.takalo@nordicsemi.no>
parent b7ce8493
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment