Skip to content
Commit 086893fc authored by Michael Scott's avatar Michael Scott Committed by Jukka Rissanen
Browse files

net: app: client: set remote port after DNS lookup



In net_app_init_client(), the remote port is set after an initial
set of checks based on the remote_addr's assigned family.

However, if the peer_addr_str is a host name which needs to be
resolved via DNS, the family won't be set yet, and the port is
left as 0.

To fix this behavior let's move the port assignment after the
DNS lookup section to be sure that the remote sa_family is set.

Signed-off-by: default avatarMichael Scott <michael@opensourcefoundries.com>
parent 03c1d28e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment