]> git.ipfire.org Git - thirdparty/unbound.git/commit
Fix startup failure on Windows 8.1 due to unsupported IPV6_USER_MTU socket option... 730/head
authorLuis Dallos <luis.dallos@googlemail.com>
Tue, 2 Aug 2022 03:00:25 +0000 (23:00 -0400)
committerLuis Dallos <luis.dallos@googlemail.com>
Tue, 2 Aug 2022 03:03:24 +0000 (23:03 -0400)
commit7d3c6f1c43522e70b071396951f5b68724463883
tree64257afa27e6c0d6a25792ada7ff4a04c8aaba47
parentcd22fdc28d35e3a659c89f346ff5e36b64e44845
Fix startup failure on Windows 8.1 due to unsupported IPV6_USER_MTU socket option being set

Newer mingw-w64 (starting from 8.0.1) introduces support for `IPV6_USER_MTU` socket
option [1], which is not supported on Windows 8.1 and older [2]. As there is no way
to avoid this socket option from being picked at compile time when targeting older
versions of Windows, check for `setsockopt(..., IPV6_USER_MTU, ...)` failures at
runtime in order to avoid startup failure on those versions of Windows where the
`IPV6_USER_MTU` socket option is unsupported.

[1]: mirror/mingw-w64@e30bff4
[2]: `WSAGetLastError()` returns `WSAENOPROTOOPT` (`Bad protocol option`) error code
services/listen_dnsport.c