You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2023/09/05 00:23:06 UTC
[arrow] branch main updated: GH-37539: [C++][FlightRPC] Fix binding to IPv6 addresses (#37552)
This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new a6d90608e6 GH-37539: [C++][FlightRPC] Fix binding to IPv6 addresses (#37552)
a6d90608e6 is described below
commit a6d90608e6a081714f3ceb7bab9978f7d3526b79
Author: David Li <li...@gmail.com>
AuthorDate: Mon Sep 4 20:22:59 2023 -0400
GH-37539: [C++][FlightRPC] Fix binding to IPv6 addresses (#37552)
### Rationale for this change
Binding to an IPv6 address got broken along the way
### What changes are included in this PR?
Fix the binding and see if we can enable IPv6 testing in CI
### Are these changes tested?
If CI permits
### Are there any user-facing changes?
No
* Closes: #37539
Authored-by: David Li <li...@gmail.com>
Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
cpp/src/arrow/flight/transport/grpc/grpc_server.cc | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/cpp/src/arrow/flight/transport/grpc/grpc_server.cc b/cpp/src/arrow/flight/transport/grpc/grpc_server.cc
index 28c2090c95..bbd01155fe 100644
--- a/cpp/src/arrow/flight/transport/grpc/grpc_server.cc
+++ b/cpp/src/arrow/flight/transport/grpc/grpc_server.cc
@@ -620,9 +620,13 @@ class GrpcServerTransport : public internal::ServerTransport {
}
if (scheme == kSchemeGrpcTls) {
- ARROW_ASSIGN_OR_RAISE(location_, Location::ForGrpcTls(uri.host(), port));
+ ARROW_ASSIGN_OR_RAISE(
+ location_,
+ Location::ForGrpcTls(arrow::internal::UriEncodeHost(uri.host()), port));
} else if (scheme == kSchemeGrpc || scheme == kSchemeGrpcTcp) {
- ARROW_ASSIGN_OR_RAISE(location_, Location::ForGrpcTcp(uri.host(), port));
+ ARROW_ASSIGN_OR_RAISE(
+ location_,
+ Location::ForGrpcTcp(arrow::internal::UriEncodeHost(uri.host()), port));
}
return Status::OK();
}