From 32ce52151efaabe5abf793c23f81582003ba90fd Mon Sep 17 00:00:00 2001 From: Stefan Schlosser Date: Mon, 28 Oct 2024 10:39:01 +0100 Subject: [PATCH 1/2] nghttp2-asio: resolve numeric IPv6 server address The boost library refuses to resolve a numeric IPv6 host (::1) because its resolver flags are set to 'address_configured' by default. This patch simply runs an additional query in such a case with flags set to 'numeric_host'. See https://www.boost.org/doc/libs/1_83_0/doc/html/boost_asio/reference/ip__resolver_base.html for more info. Fixes #751 Signed-off-by: Stefan Schlosser --- .../0001-resolve-numeric-ipv6.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 patches/nghttp2-asio/0001-resolve-numeric-ipv6.patch diff --git a/patches/nghttp2-asio/0001-resolve-numeric-ipv6.patch b/patches/nghttp2-asio/0001-resolve-numeric-ipv6.patch new file mode 100644 index 000000000..64fbef5e4 --- /dev/null +++ b/patches/nghttp2-asio/0001-resolve-numeric-ipv6.patch @@ -0,0 +1,18 @@ +diff --git a/lib/asio_server.cc b/lib/asio_server.cc +index 74c9227..c3d42aa 100644 +--- a/lib/asio_server.cc ++++ b/lib/asio_server.cc +@@ -82,8 +82,13 @@ boost::system::error_code server::bind_and_listen(boost::system::error_code &ec, + // Open the acceptor with the option to reuse the address (i.e. + // SO_REUSEADDR). + tcp::resolver resolver(io_service_pool_.get_io_service()); ++ + tcp::resolver::query query(address, port); + auto it = resolver.resolve(query, ec); ++ if (ec) { ++ tcp::resolver::query query(address, port, boost::asio::ip::resolver_query_base::numeric_host); ++ it = resolver.resolve(query, ec); ++ } + if (ec) { + return ec; + } From 297354dc3584a885802bfc380f266d3d65e1b44e Mon Sep 17 00:00:00 2001 From: Stefan Schlosser Date: Mon, 28 Oct 2024 11:35:58 +0100 Subject: [PATCH 2/2] Add Fix #751 to ChangeLog --- doc/ChangeLog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/ChangeLog.md b/doc/ChangeLog.md index 93bd83179..80a3813ef 100644 --- a/doc/ChangeLog.md +++ b/doc/ChangeLog.md @@ -12,6 +12,10 @@ All notable changes to the project are documented in this file. - Updated QoS documentation with pictures and more information on VLAN interface ingress/egress priority handling. +### Fixes +- Fix #751: R2S rousette crash on boot if LAN not connected. + Fixes resolution for numeric address ::1, regardless of being set in /etc/hosts. + [v24.10.1][] - 2024-10-18 -------------------------