diff options
| author | Ivan Solovev <ivan.solovev@qt.io> | 2025-09-24 16:50:22 +0200 |
|---|---|---|
| committer | Ivan Solovev <ivan.solovev@qt.io> | 2025-10-09 16:43:12 +0200 |
| commit | e9778dfe6ead0c4d704570816a56aead084a0263 (patch) | |
| tree | 5413b58635f38eb0739229717354e72fc81ed62a /src/network/socket/qnativesocketengine_unix.cpp | |
| parent | e0c0b7cab2bbbec4ae6f5c9e55c949fd05ee4c64 (diff) | |
Properly set ReceivePacketInformation socket option for dual-stack
On Windows if IPV6_V6ONLY == 0, we need to set both IPV6_PKTINFO and
IP_PKTINFO options in order to correctly receive the information from
IPv4 packets.
Instead of explicitly checking the IPv6_V6ONLY option via getsockopt,
this patch simply tries to unconditionally set the IPv4 option, and
ignores the potential error if the protocol is not IPv4-only.
Unix implementation is not touched by this patch, because there
enabling packet info for IPv6 also enables it for IPv4.
Also, an attempt to set IP_PKTINFO for AF_INET6 socket fails there
even if IPV6_V6ONLY == 0.
Task-number: QTBUG-80704
Task-number: QTBUG-139697
Pick-to: 6.10 6.8
Change-Id: I662ecc7de6ea29174b00b02f1f3a774b45104dc0
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/network/socket/qnativesocketengine_unix.cpp')
0 files changed, 0 insertions, 0 deletions
