Skip to content
Commit a15cc704 authored by Marcin Niestroj's avatar Marcin Niestroj Committed by Carles Cufí
Browse files

samples: net: echo_server: set IPV6_V6ONLY



This sample assumes that two separate sockets can be bound on IPv4 and
IPv6. On Linux (via Native Simulator Offloaded Sockets) this is possible
when there is no IPv4 to IPv6 mapping. Same can be true to other offloaded
sockets.

CONFIG_NET_IPV4_MAPPING_TO_IPV6 is disabled for this sample, so IPv4 to
IPv6 mapping is disabled for Zephyr native IPv6 layer. For offloaded
sockets this option does not define whether mapping is enabled or not, so
try to unconditionally (and without error checking) disable it.

This patch fixes compatibility with NSOS, since two separate sockets can be
bound on the same address and port, one for IPv4 and second for IPv6.

Signed-off-by: default avatarMarcin Niestroj <m.niestroj@emb.dev>
parent 3a9ae187
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment