mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-11 07:09:29 +02:00
Merge #15993: net: Drop support of the insecure miniUPnPc versions
59cb722fd0Update configure to reject unsafe miniUPnPc API ver (Hennadii Stepanov)ab2190557edoc: Add release notes for 15993 (Hennadii Stepanov)02709e9560Align formatting with clang-format (Hennadii Stepanov)91a1b85083Use PACKAGE_NAME in UPnP description (Hennadii Stepanov)9f76e45b9dDrop support of insecure miniUPnPc versions (Hennadii Stepanov) Pull request description: 1. Minimum supported miniUPnPc API version is set to 10: - https://packages.ubuntu.com/xenial/libminiupnpc-dev - https://packages.debian.org/jessie/libminiupnpc-dev Refs: - #6583 - #6789 - #10414 2. The hardcoded "Bitcoin" replaced with `PACKAGE_NAME`:  3. Also style-only commit applied. Pardon: could not reopen my previous PR #15966. ACKs for top commit: ryanofsky: utACK59cb722fd0. Changes since last review: adding a new commit which updates configure script to fall back to disabling upnp if version is too old, adding a requested comment explaining static_assert condition, and fixing a spelling (jessy/jessie) Tree-SHA512: 42ed11bc2fb2ec83d5dd58e2383da5444a24fd572707f6cf10b622cb8943e28adfcca4750d06801024c4472625b5ea9279516fbd9d2ccebc9bbaafe1d148e80d
This commit is contained in:
23
configure.ac
23
configure.ac
@@ -994,6 +994,26 @@ if test x$use_upnp != xno; then
|
||||
[AC_CHECK_LIB([miniupnpc], [upnpDiscover], [MINIUPNPC_LIBS=-lminiupnpc], [have_miniupnpc=no])],
|
||||
[have_miniupnpc=no]
|
||||
)
|
||||
dnl The minimum supported miniUPnPc API version is set to 10. This keeps compatibility
|
||||
dnl with Ubuntu 16.04 LTS and Debian 8 libminiupnpc-dev packages.
|
||||
if test x$have_miniupnpc != xno; then
|
||||
AC_MSG_CHECKING([whether miniUPnPc API version is supported])
|
||||
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
|
||||
@%:@include <miniupnpc/miniupnpc.h>
|
||||
]], [[
|
||||
#if MINIUPNPC_API_VERSION >= 10
|
||||
// Everything is okay
|
||||
#else
|
||||
# error miniUPnPc API version is too old
|
||||
#endif
|
||||
]])],[
|
||||
AC_MSG_RESULT(yes)
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_WARN([miniUPnPc API version < 10 is unsupported, disabling UPnP support.])
|
||||
have_miniupnpc=no
|
||||
])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench = xnonononononono; then
|
||||
@@ -1387,9 +1407,10 @@ dnl enable upnp support
|
||||
AC_MSG_CHECKING([whether to build with support for UPnP])
|
||||
if test x$have_miniupnpc = xno; then
|
||||
if test x$use_upnp = xyes; then
|
||||
AC_MSG_ERROR("UPnP requested but cannot be built. use --without-miniupnpc")
|
||||
AC_MSG_ERROR("UPnP requested but cannot be built. Use --without-miniupnpc.")
|
||||
fi
|
||||
AC_MSG_RESULT(no)
|
||||
use_upnp=no
|
||||
else
|
||||
if test x$use_upnp != xno; then
|
||||
AC_MSG_RESULT(yes)
|
||||
|
||||
Reference in New Issue
Block a user