net: context: Fix issues in context_sendto() function
Fixed issue when `sendmsg()` was in use and `CONFIG_NET_IPV6`
and `CONFIG_NET_IPV4_MAPPING_TO_IPV6` were in use, as `dst_addr`
argument of `context_sendto()` was passed NULL,
but also used to determine `sa_family`.
Use msghdr, if available, to determine if v4 to v6 mapping is
present.
Also set `dst_addr` to unmapped value when v4 to v6 mapping is
used.
Signed-off-by:
Cristian Bulacu <cristian.bulacu@nxp.com>
Loading
Please sign in to comment