Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nghttp2-asio: resolve numeric IPv6 server address #768

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions patches/nghttp2-asio/0001-resolve-numeric-ipv6.patch
Original file line number Diff line number Diff line change
@@ -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);
+ auto it = resolver.resolve(query, ec);
+ }
if (ec) {
return ec;
}