Skip to content
Commit fdde5bd7 authored by Armin Brauns's avatar Armin Brauns Committed by Anas Nashif
Browse files

net: tcp: populate context's local address for incoming connections



`local_addr` would only be initialized if `context->local->sin*_addr` was
non-null. However, since `context` is a fresh context object, `local_addr`
always remains at its initial value of `INADDR_ANY`, which is propagated to
the context by `net_context_bind()`.

By populating `local_addr` using the TCP endpoint, `getsockname()` now
returns the correct local address.

Signed-off-by: default avatarArmin Brauns <armin.brauns@embedded-solutions.at>
parent a1cfe983
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment