grpc 1.85.0 → 1.86.0.pre1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Makefile +13 -9
- data/etc/roots.pem +0 -583
- data/include/grpc/channel_factory.h +78 -0
- data/include/grpc/credentials.h +21 -0
- data/include/grpc/grpc.h +7 -0
- data/include/grpc/grpc_security_constants.h +2 -0
- data/include/grpc/module.modulemap +1 -0
- data/src/core/call/call_filters.cc +4 -1
- data/src/core/call/call_filters.h +3 -1
- data/src/core/call/call_spine.h +12 -6
- data/src/core/call/call_state.h +3 -3
- data/src/core/call/client_call.cc +4 -1
- data/src/core/call/client_call.h +1 -0
- data/src/core/call/evaluate_args.cc +15 -14
- data/src/core/call/filter_fusion.h +2 -15
- data/src/core/call/interception_chain.h +2 -7
- data/src/core/call/metadata_batch.cc +5 -0
- data/src/core/call/metadata_batch.h +34 -3
- data/src/core/call/request_buffer.cc +1 -1
- data/src/core/call/server_call.cc +3 -3
- data/src/core/call/server_call.h +15 -0
- data/src/core/channelz/channelz_registry.cc +4 -4
- data/src/core/channelz/ztrace_collector.h +11 -2
- data/src/core/client_channel/backup_poller.cc +1 -2
- data/src/core/client_channel/channel_factory.cc +110 -0
- data/src/core/client_channel/channel_factory.h +45 -0
- data/src/core/client_channel/global_subchannel_pool.cc +2 -2
- data/src/core/client_channel/lame_channel.cc +59 -0
- data/src/core/client_channel/lame_channel.h +86 -0
- data/src/core/credentials/call/external/aws_request_signer.cc +2 -1
- data/src/core/credentials/call/external/url_external_account_credentials.cc +6 -17
- data/src/core/credentials/call/external/url_external_account_credentials.h +0 -1
- data/src/core/credentials/call/jwt/jwt_verifier.cc +25 -13
- data/src/core/credentials/call/oauth2/oauth2_credentials.cc +6 -4
- data/src/core/credentials/call/regional_access_boundary_fetcher.cc +16 -0
- data/src/core/credentials/call/regional_access_boundary_fetcher.h +6 -2
- data/src/core/credentials/transport/tls/grpc_tls_credentials_options.cc +14 -0
- data/src/core/credentials/transport/tls/grpc_tls_credentials_options.h +12 -2
- data/src/core/credentials/transport/tls/ssl_utils.cc +20 -0
- data/src/core/credentials/transport/tls/ssl_utils.h +4 -0
- data/src/core/credentials/transport/tls/tls_security_connector.cc +6 -2
- data/src/core/ext/filters/http/server/http_server_filter.cc +6 -1
- data/src/core/ext/filters/rbac/rbac_filter.cc +3 -41
- data/src/core/ext/filters/rbac/rbac_filter.h +2 -11
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +2 -2
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +31 -24
- data/src/core/ext/transport/chttp2/server/chttp2_server.h +1 -2
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +69 -102
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +1 -1
- data/src/core/ext/transport/chttp2/transport/flow_control.h +2 -2
- data/src/core/ext/transport/chttp2/transport/flow_control_manager.h +1 -1
- data/src/core/ext/transport/chttp2/transport/frame.cc +15 -19
- data/src/core/ext/transport/chttp2/transport/frame.h +1 -1
- data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +18 -61
- data/src/core/ext/transport/chttp2/transport/frame_goaway.h +0 -4
- data/src/core/ext/transport/chttp2/transport/frame_security.cc +1 -2
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +9 -0
- data/src/core/ext/transport/chttp2/transport/goaway.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/goaway.h +0 -5
- data/src/core/ext/transport/chttp2/transport/header_assembler.h +1 -5
- data/src/core/ext/transport/chttp2/transport/hpack_parse_result.cc +3 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parse_result.h +8 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +33 -0
- data/src/core/ext/transport/chttp2/transport/http2_client_transport.cc +34 -19
- data/src/core/ext/transport/chttp2/transport/http2_client_transport.h +5 -2
- data/src/core/ext/transport/chttp2/transport/http2_server_transport.cc +134 -82
- data/src/core/ext/transport/chttp2/transport/http2_server_transport.h +30 -15
- data/src/core/ext/transport/chttp2/transport/http2_settings_promises.h +4 -3
- data/src/core/ext/transport/chttp2/transport/http2_transport.cc +9 -33
- data/src/core/ext/transport/chttp2/transport/http2_transport.h +1 -6
- data/src/core/ext/transport/chttp2/transport/http2_transport_stats.h +60 -0
- data/src/core/ext/transport/chttp2/transport/internal.h +6 -1
- data/src/core/ext/transport/chttp2/transport/keepalive.h +1 -4
- data/src/core/ext/transport/chttp2/transport/parsing.cc +4 -8
- data/src/core/ext/transport/chttp2/transport/ping_promise.cc +35 -11
- data/src/core/ext/transport/chttp2/transport/ping_promise.h +52 -47
- data/src/core/ext/transport/chttp2/transport/read_context.h +19 -5
- data/src/core/ext/transport/chttp2/transport/security_frame.h +7 -6
- data/src/core/ext/transport/chttp2/transport/stream_data_queue.h +7 -5
- data/src/core/ext/transport/chttp2/transport/transport_common.cc +47 -0
- data/src/core/ext/transport/chttp2/transport/transport_common.h +29 -0
- data/src/core/ext/transport/chttp2/transport/writable_streams.h +1 -1
- data/src/core/ext/transport/inproc/legacy_inproc_transport.cc +1 -7
- data/src/core/ext/upb-gen/envoy/admin/v3/clusters.upb.h +16 -0
- data/src/core/ext/upb-gen/envoy/admin/v3/clusters.upb_minitable.c +4 -3
- data/src/core/ext/upb-gen/envoy/admin/v3/server_info.upb.h +129 -81
- data/src/core/ext/upb-gen/envoy/admin/v3/server_info.upb_minitable.c +50 -39
- data/src/core/ext/upb-gen/envoy/config/bootstrap/v3/bootstrap.upb.h +411 -163
- data/src/core/ext/upb-gen/envoy/config/bootstrap/v3/bootstrap.upb_minitable.c +95 -44
- data/src/core/ext/upb-gen/envoy/config/bootstrap/v3/bootstrap.upb_minitable.h +3 -0
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/circuit_breaker.upb.h +41 -8
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/circuit_breaker.upb_minitable.c +8 -5
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/cluster.upb.h +427 -222
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/cluster.upb_minitable.c +97 -66
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/cluster.upb_minitable.h +1 -0
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/outlier_detection.upb.h +130 -99
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/outlier_detection.upb_minitable.c +29 -27
- data/src/core/ext/upb-gen/envoy/config/core/v3/address.upb.h +49 -33
- data/src/core/ext/upb-gen/envoy/config/core/v3/address.upb_minitable.c +19 -8
- data/src/core/ext/upb-gen/envoy/config/core/v3/base.upb.h +95 -3
- data/src/core/ext/upb-gen/envoy/config/core/v3/base.upb_minitable.c +33 -6
- data/src/core/ext/upb-gen/envoy/config/core/v3/base.upb_minitable.h +1 -0
- data/src/core/ext/upb-gen/envoy/config/core/v3/http_service.upb.h +93 -11
- data/src/core/ext/upb-gen/envoy/config/core/v3/http_service.upb_minitable.c +8 -5
- data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb.h +656 -134
- data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb_minitable.c +117 -51
- data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb_minitable.h +2 -0
- data/src/core/ext/upb-gen/envoy/config/core/v3/socket_option.upb.h +45 -23
- data/src/core/ext/upb-gen/envoy/config/core/v3/socket_option.upb_minitable.c +19 -10
- data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint_components.upb.h +99 -34
- data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint_components.upb_minitable.c +12 -7
- data/src/core/ext/upb-gen/envoy/config/listener/v3/listener.upb.h +344 -273
- data/src/core/ext/upb-gen/envoy/config/listener/v3/listener.upb_minitable.c +62 -69
- data/src/core/ext/upb-gen/envoy/config/listener/v3/listener.upb_minitable.h +1 -3
- data/src/core/ext/upb-gen/envoy/config/metrics/v3/stats.upb.h +53 -22
- data/src/core/ext/upb-gen/envoy/config/metrics/v3/stats.upb_minitable.c +9 -7
- data/src/core/ext/upb-gen/envoy/config/overload/v3/overload.upb.h +108 -0
- data/src/core/ext/upb-gen/envoy/config/overload/v3/overload.upb_minitable.c +26 -2
- data/src/core/ext/upb-gen/envoy/config/overload/v3/overload.upb_minitable.h +1 -0
- data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb.h +809 -231
- data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb_minitable.c +183 -77
- data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb_minitable.h +3 -0
- data/src/core/ext/upb-gen/envoy/config/trace/v3/opentelemetry.upb.h +151 -26
- data/src/core/ext/upb-gen/envoy/config/trace/v3/opentelemetry.upb_minitable.c +17 -9
- data/src/core/ext/upb-gen/envoy/config/trace/v3/zipkin.upb.h +24 -8
- data/src/core/ext/upb-gen/envoy/config/trace/v3/zipkin.upb_minitable.c +6 -5
- data/src/core/ext/upb-gen/envoy/data/accesslog/v3/accesslog.upb.h +2 -1
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/composite/v3/composite.upb.h +224 -16
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/composite/v3/composite.upb_minitable.c +83 -10
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/composite/v3/composite.upb_minitable.h +2 -0
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upb.h +95 -79
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upb_minitable.c +23 -22
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/fault/v3/fault.upb.h +34 -18
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/fault/v3/fault.upb_minitable.c +10 -9
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upb.h +243 -2
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upb_minitable.c +53 -5
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upb_minitable.h +3 -0
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/router/v3/router.upb.h +53 -22
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/router/v3/router.upb_minitable.c +9 -7
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upb.h +23 -7
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upb_minitable.c +9 -4
- data/src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +516 -215
- data/src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb_minitable.c +99 -60
- data/src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb_minitable.h +1 -0
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.upb.h +60 -28
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.upb_minitable.c +12 -10
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/common/v3/common.upb.h +109 -0
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/common/v3/common.upb_minitable.c +32 -2
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/common/v3/common.upb_minitable.h +1 -0
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.upb.h +37 -4
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.upb_minitable.c +7 -4
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/common.upb.h +65 -47
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/common.upb_minitable.c +29 -12
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb.h +20 -4
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb_minitable.c +6 -3
- data/src/core/ext/upb-gen/envoy/service/ext_proc/v3/external_processor.upb.h +776 -88
- data/src/core/ext/upb-gen/envoy/service/ext_proc/v3/external_processor.upb_minitable.c +195 -35
- data/src/core/ext/upb-gen/envoy/service/ext_proc/v3/external_processor.upb_minitable.h +5 -0
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb.h +23 -7
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb_minitable.c +10 -3
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/status_code_input.upb.h +44 -0
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/status_code_input.upb_minitable.c +11 -2
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/status_code_input.upb_minitable.h +1 -0
- data/src/core/ext/upb-gen/envoy/type/v3/scope.upb.h +218 -0
- data/src/core/ext/upb-gen/envoy/type/v3/scope.upb_minitable.c +70 -0
- data/src/core/ext/upb-gen/envoy/type/v3/scope.upb_minitable.h +31 -0
- data/src/core/ext/upbdefs-gen/envoy/admin/v3/clusters.upbdefs.c +30 -24
- data/src/core/ext/upbdefs-gen/envoy/admin/v3/server_info.upbdefs.c +166 -152
- data/src/core/ext/upbdefs-gen/envoy/config/bootstrap/v3/bootstrap.upbdefs.c +467 -422
- data/src/core/ext/upbdefs-gen/envoy/config/bootstrap/v3/bootstrap.upbdefs.h +15 -0
- data/src/core/ext/upbdefs-gen/envoy/config/cluster/v3/circuit_breaker.upbdefs.c +120 -110
- data/src/core/ext/upbdefs-gen/envoy/config/cluster/v3/cluster.upbdefs.c +912 -857
- data/src/core/ext/upbdefs-gen/envoy/config/cluster/v3/cluster.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-gen/envoy/config/cluster/v3/outlier_detection.upbdefs.c +26 -19
- data/src/core/ext/upbdefs-gen/envoy/config/core/v3/address.upbdefs.c +59 -54
- data/src/core/ext/upbdefs-gen/envoy/config/core/v3/base.upbdefs.c +356 -346
- data/src/core/ext/upbdefs-gen/envoy/config/core/v3/base.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-gen/envoy/config/core/v3/http_service.upbdefs.c +49 -37
- data/src/core/ext/upbdefs-gen/envoy/config/core/v3/protocol.upbdefs.c +599 -483
- data/src/core/ext/upbdefs-gen/envoy/config/core/v3/protocol.upbdefs.h +10 -0
- data/src/core/ext/upbdefs-gen/envoy/config/core/v3/socket_option.upbdefs.c +65 -49
- data/src/core/ext/upbdefs-gen/envoy/config/endpoint/v3/endpoint_components.upbdefs.c +165 -161
- data/src/core/ext/upbdefs-gen/envoy/config/listener/v3/listener.upbdefs.c +369 -327
- data/src/core/ext/upbdefs-gen/envoy/config/listener/v3/listener.upbdefs.h +5 -15
- data/src/core/ext/upbdefs-gen/envoy/config/metrics/v3/stats.upbdefs.c +129 -121
- data/src/core/ext/upbdefs-gen/envoy/config/overload/v3/overload.upbdefs.c +224 -204
- data/src/core/ext/upbdefs-gen/envoy/config/overload/v3/overload.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-gen/envoy/config/route/v3/route_components.upbdefs.c +2046 -1932
- data/src/core/ext/upbdefs-gen/envoy/config/route/v3/route_components.upbdefs.h +15 -0
- data/src/core/ext/upbdefs-gen/envoy/config/trace/v3/opentelemetry.upbdefs.c +70 -37
- data/src/core/ext/upbdefs-gen/envoy/config/trace/v3/zipkin.upbdefs.c +7 -3
- data/src/core/ext/upbdefs-gen/envoy/data/accesslog/v3/accesslog.upbdefs.c +5 -3
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/composite/v3/composite.upbdefs.c +121 -78
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/composite/v3/composite.upbdefs.h +10 -0
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upbdefs.c +165 -160
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/fault/v3/fault.upbdefs.c +121 -118
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upbdefs.c +68 -37
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upbdefs.h +15 -0
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/router/v3/router.upbdefs.c +48 -40
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upbdefs.c +44 -37
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c +919 -870
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.upbdefs.c +26 -14
- data/src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c +44 -36
- data/src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c +372 -371
- data/src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upbdefs.c +32 -28
- data/src/core/ext/upbdefs-gen/envoy/type/matcher/v3/address.upbdefs.c +17 -15
- data/src/core/ext/upbdefs-gen/envoy/type/matcher/v3/status_code_input.upbdefs.c +4 -1
- data/src/core/ext/upbdefs-gen/envoy/type/matcher/v3/status_code_input.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-gen/envoy/type/v3/scope.upbdefs.c +76 -0
- data/src/core/ext/upbdefs-gen/envoy/type/v3/scope.upbdefs.h +37 -0
- data/src/core/ext/upbdefs-gen/envoy/type/v3/token_bucket.upbdefs.c +1 -1
- data/src/core/filter/ext_proc/ext_proc_filter.cc +537 -259
- data/src/core/filter/ext_proc/ext_proc_filter.h +47 -14
- data/src/core/filter/ext_proc/ext_proc_messages.cc +38 -17
- data/src/core/filter/ext_proc/ext_proc_messages.h +19 -7
- data/src/core/filter/filter_args.h +5 -60
- data/src/core/handshaker/http_connect/http_connect_client_handshaker.cc +1 -1
- data/src/core/handshaker/security/pipelined_secure_endpoint.cc +23 -22
- data/src/core/handshaker/security/secure_endpoint.cc +16 -16
- data/src/core/lib/channel/channel_stack.cc +0 -12
- data/src/core/lib/channel/channel_stack.h +0 -8
- data/src/core/lib/channel/promise_based_filter.cc +57 -44
- data/src/core/lib/channel/promise_based_filter.h +29 -41
- data/src/core/lib/event_engine/ares_resolver.cc +10 -4
- data/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc +1 -1
- data/src/core/lib/event_engine/cf_engine/dns_service_resolver.cc +3 -3
- data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc +1 -5
- data/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc +10 -12
- data/src/core/lib/event_engine/posix_engine/file_descriptor_collection.cc +3 -17
- data/src/core/lib/event_engine/posix_engine/grpc_polled_fd_posix.h +21 -1
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.cc +5 -5
- data/src/core/lib/event_engine/posix_engine/posix_engine.cc +10 -12
- data/src/core/lib/event_engine/posix_engine/posix_interface.h +1 -1
- data/src/core/lib/event_engine/posix_engine/timer.cc +2 -2
- data/src/core/lib/event_engine/shim.cc +1 -6
- data/src/core/lib/event_engine/shim.h +0 -5
- data/src/core/lib/event_engine/windows/windows_engine.cc +4 -4
- data/src/core/lib/event_engine/windows/windows_listener.cc +1 -1
- data/src/core/lib/experiments/experiments.cc +144 -261
- data/src/core/lib/experiments/experiments.h +48 -120
- data/src/core/lib/iomgr/iomgr_windows.cc +1 -6
- data/src/core/lib/iomgr/tcp_posix.cc +21 -21
- data/src/core/lib/iomgr/tcp_server_posix.cc +64 -242
- data/src/core/lib/iomgr/tcp_server_windows.cc +0 -469
- data/src/core/lib/promise/activity.cc +8 -8
- data/src/core/lib/promise/activity.h +5 -5
- data/src/core/lib/promise/inter_activity_pipe.h +3 -3
- data/src/core/lib/promise/party.cc +5 -5
- data/src/core/lib/promise/status_flag.h +7 -2
- data/src/core/lib/resource_quota/memory_quota.cc +2 -2
- data/src/core/lib/security/authorization/rbac_policy.h +2 -2
- data/src/core/lib/surface/call.cc +13 -3
- data/src/core/lib/surface/call.h +23 -6
- data/src/core/lib/surface/channel_create.cc +7 -1
- data/src/core/lib/surface/channel_init.h +1 -8
- data/src/core/lib/surface/filter_stack_call.cc +16 -0
- data/src/core/lib/surface/filter_stack_call.h +1 -0
- data/src/core/lib/surface/init.cc +3 -3
- data/src/core/lib/surface/legacy_channel.cc +4 -1
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/transport.cc +15 -8
- data/src/core/lib/transport/transport_framing_endpoint_extension.h +8 -2
- data/src/core/load_balancing/outlier_detection/outlier_detection.cc +99 -8
- data/src/core/load_balancing/outlier_detection/outlier_detection_metrics.cc +38 -0
- data/src/core/load_balancing/outlier_detection/outlier_detection_metrics.h +55 -0
- data/src/core/load_balancing/ring_hash/ring_hash.cc +2 -1
- data/src/core/load_balancing/rls/rls.cc +21 -1
- data/src/core/load_balancing/xds/cds.cc +4 -51
- data/src/core/plugin_registry/grpc_plugin_registry.cc +10 -13
- data/src/core/plugin_registry/grpc_plugin_registry_extra.cc +0 -7
- data/src/core/resolver/xds/xds_resolver.cc +1 -1
- data/src/core/server/server.cc +60 -4
- data/src/core/server/server_config_selector.h +4 -18
- data/src/core/server/server_config_selector_filter.cc +20 -146
- data/src/core/server/server_config_selector_filter.h +2 -2
- data/src/core/server/xds_server_config_fetcher.cc +5 -20
- data/src/core/transport/auth_context.cc +15 -5
- data/src/core/transport/auth_context.h +5 -0
- data/src/core/tsi/ssl_telemetry_utils.cc +9 -1
- data/src/core/tsi/ssl_transport_security.cc +158 -52
- data/src/core/tsi/ssl_transport_security.h +18 -2
- data/src/core/tsi/ssl_transport_security_utils.cc +123 -12
- data/src/core/tsi/ssl_transport_security_utils.h +19 -0
- data/src/core/util/latent_see.cc +65 -3
- data/src/core/util/latent_see.h +57 -12
- data/src/core/util/linux/cpu.cc +12 -6
- data/src/core/util/mpscq.cc +2 -2
- data/src/core/util/sync_abseil.cc +3 -3
- data/src/core/util/trie_lookup.h +5 -1
- data/src/core/util/windows/env.cc +1 -0
- data/src/core/util/work_serializer.cc +1 -1
- data/src/core/xds/grpc/file_watcher_certificate_provider_factory.cc +10 -9
- data/src/core/xds/grpc/file_watcher_certificate_provider_factory.h +3 -3
- data/src/core/xds/grpc/streaming_call_promise_wrapper.cc +5 -2
- data/src/core/xds/grpc/streaming_call_promise_wrapper.h +2 -5
- data/src/core/xds/grpc/xds_audit_logger_registry.cc +0 -54
- data/src/core/xds/grpc/xds_audit_logger_registry.h +0 -8
- data/src/core/xds/grpc/xds_bootstrap_grpc_builder.cc +2 -28
- data/src/core/xds/grpc/xds_bootstrap_grpc_builder.h +0 -20
- data/src/core/xds/grpc/xds_client_grpc.cc +4 -4
- data/src/core/xds/grpc/xds_client_grpc.h +1 -1
- data/src/core/xds/grpc/xds_cluster_parser.cc +5 -1
- data/src/core/xds/grpc/xds_common_types_parser.cc +12 -0
- data/src/core/xds/grpc/xds_endpoint_parser.cc +3 -3
- data/src/core/xds/grpc/xds_http_composite_filter.cc +0 -5
- data/src/core/xds/grpc/xds_http_composite_filter.h +1 -27
- data/src/core/xds/grpc/xds_http_ext_proc_filter.cc +1 -5
- data/src/core/xds/grpc/xds_http_ext_proc_filter.h +3 -29
- data/src/core/xds/grpc/xds_http_fault_filter.cc +0 -4
- data/src/core/xds/grpc/xds_http_fault_filter.h +0 -26
- data/src/core/xds/grpc/xds_http_filter.h +1 -63
- data/src/core/xds/grpc/xds_http_gcp_authn_filter.cc +0 -5
- data/src/core/xds/grpc/xds_http_gcp_authn_filter.h +1 -27
- data/src/core/xds/grpc/xds_http_rbac_filter.cc +0 -527
- data/src/core/xds/grpc/xds_http_rbac_filter.h +0 -15
- data/src/core/xds/grpc/xds_http_stateful_session_filter.cc +0 -5
- data/src/core/xds/grpc/xds_http_stateful_session_filter.h +0 -26
- data/src/core/xds/grpc/xds_listener.cc +0 -2
- data/src/core/xds/grpc/xds_listener.h +0 -2
- data/src/core/xds/grpc/xds_listener_parser.cc +0 -7
- data/src/core/xds/grpc/xds_matcher.cc +17 -11
- data/src/core/xds/grpc/xds_matcher.h +2 -1
- data/src/core/xds/grpc/xds_matcher_context.cc +11 -0
- data/src/core/xds/grpc/xds_matcher_context.h +3 -2
- data/src/core/xds/grpc/xds_matcher_input.cc +19 -1
- data/src/core/xds/grpc/xds_matcher_parse.cc +3 -2
- data/src/core/xds/grpc/xds_route_config.cc +0 -2
- data/src/core/xds/grpc/xds_route_config.h +0 -2
- data/src/core/xds/grpc/xds_route_config_parser.cc +0 -5
- data/src/core/xds/grpc/xds_routing.cc +22 -112
- data/src/core/xds/grpc/xds_routing.h +2 -27
- data/src/core/xds/grpc/xds_transport_factory_grpc.cc +236 -0
- data/src/core/xds/grpc/xds_transport_factory_grpc.h +95 -0
- data/src/core/xds/grpc/xds_transport_grpc.cc +78 -241
- data/src/core/xds/grpc/xds_transport_grpc.h +41 -51
- data/src/core/xds/xds_client/lrs_client.cc +3 -5
- data/src/core/xds/xds_client/lrs_client.h +2 -1
- data/src/core/xds/xds_client/xds_client.cc +36 -23
- data/src/core/xds/xds_client/xds_client.h +6 -5
- data/src/core/xds/xds_client/xds_transport.h +110 -108
- data/src/core/xds/xds_client/xds_transport_factory.h +43 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +4 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +6 -0
- data/src/ruby/lib/grpc/generic/rpc_server.rb +2 -2
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/third_party/boringssl-with-bazel/crypto/asn1/a_type.cc +54 -19
- data/third_party/boringssl-with-bazel/crypto/asn1/asn1_lib.cc +1 -1
- data/third_party/boringssl-with-bazel/crypto/asn1/internal.h +58 -12
- data/third_party/boringssl-with-bazel/crypto/asn1/tasn_dec.cc +13 -13
- data/third_party/boringssl-with-bazel/crypto/asn1/tasn_enc.cc +13 -11
- data/third_party/boringssl-with-bazel/crypto/asn1/tasn_fre.cc +14 -18
- data/third_party/boringssl-with-bazel/crypto/asn1/tasn_new.cc +31 -35
- data/third_party/boringssl-with-bazel/crypto/asn1/tasn_typ.cc +0 -2
- data/third_party/boringssl-with-bazel/crypto/asn1/tasn_utl.cc +17 -24
- data/third_party/boringssl-with-bazel/crypto/bio/bio.cc +0 -1
- data/third_party/boringssl-with-bazel/crypto/bio/bio_mem.cc +9 -3
- data/third_party/boringssl-with-bazel/crypto/bio/connect.cc +3 -3
- data/third_party/boringssl-with-bazel/crypto/bio/fd.cc +0 -1
- data/third_party/boringssl-with-bazel/crypto/bio/file.cc +0 -1
- data/third_party/boringssl-with-bazel/crypto/bio/internal.h +2 -3
- data/third_party/boringssl-with-bazel/crypto/bio/pair.cc +0 -1
- data/third_party/boringssl-with-bazel/crypto/bio/socket.cc +1 -1
- data/third_party/boringssl-with-bazel/crypto/bytestring/cbb.cc +70 -45
- data/third_party/boringssl-with-bazel/crypto/bytestring/cbs.cc +15 -34
- data/third_party/boringssl-with-bazel/crypto/bytestring/internal.h +5 -0
- data/third_party/boringssl-with-bazel/crypto/cipher/e_aesgcmsiv.cc +20 -165
- data/third_party/boringssl-with-bazel/crypto/cipher/e_tls.cc +7 -4
- data/third_party/boringssl-with-bazel/crypto/cipher/internal.h +159 -0
- data/third_party/boringssl-with-bazel/crypto/curve25519/curve25519.cc +295 -16
- data/third_party/boringssl-with-bazel/crypto/curve25519/internal.h +25 -14
- data/third_party/boringssl-with-bazel/crypto/dh/params.cc +1 -1
- data/third_party/boringssl-with-bazel/crypto/ec/hash_to_curve.cc +208 -36
- data/third_party/boringssl-with-bazel/crypto/err/err.cc +3 -2
- data/third_party/boringssl-with-bazel/crypto/evp/evp.cc +3 -0
- data/third_party/boringssl-with-bazel/crypto/evp/evp_kem.cc +25 -6
- data/third_party/boringssl-with-bazel/crypto/evp/internal.h +15 -11
- data/third_party/boringssl-with-bazel/crypto/evp/p_ec.cc +121 -0
- data/third_party/boringssl-with-bazel/crypto/evp/p_mlkem.cc +34 -9
- data/third_party/boringssl-with-bazel/crypto/evp/p_rsa.cc +76 -8
- data/third_party/boringssl-with-bazel/crypto/evp/p_xwing.cc +47 -20
- data/third_party/boringssl-with-bazel/crypto/ex_data.cc +1 -1
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/aes/aes_nohw.cc.inc +1 -1
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/aes/gcm.cc.inc +2 -2
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bcm.cc +1 -0
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/add.cc.inc +9 -4
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/asm/x86_64-gcc.cc.inc +4 -4
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/exponentiation.cc.inc +2 -2
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/internal.h +12 -6
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/jacobi.cc.inc +1 -1
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/montgomery_inv.cc.inc +4 -4
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/prime.cc.inc +3 -3
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/rsaz_exp.cc.inc +6 -6
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/sqrt.cc.inc +21 -21
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/cipher/aead.cc.inc +4 -2
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/cipher/cipher.cc.inc +97 -132
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/cipher/internal.h +7 -6
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/dh/dh.cc.inc +3 -3
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/dh/internal.h +1 -1
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/ec.cc.inc +77 -17
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/ec_montgomery.cc.inc +13 -13
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/felem.cc.inc +117 -34
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/internal.h +67 -18
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/oct.cc.inc +29 -151
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/p256-nistz.cc.inc +740 -0
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/p256-nistz.h +207 -0
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/p256.cc.inc +407 -519
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/simple.cc.inc +27 -28
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ecdsa/ecdsa.cc.inc +1 -1
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/entropy/jitter.cc.inc +1 -1
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/fips_shared_support.cc +4 -4
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/keccak/internal.h +70 -1
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/keccak/keccak.cc.inc +292 -52
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/mldsa/mldsa.cc.inc +226 -69
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/mlkem/mlkem.cc.inc +238 -83
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/rsa/rsa_impl.cc.inc +6 -6
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/sha/sha1.cc.inc +2 -2
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/slhdsa/fors.cc.inc +1 -1
- data/third_party/boringssl-with-bazel/crypto/hpke/hpke.cc +327 -272
- data/third_party/boringssl-with-bazel/crypto/hrss/hrss.cc +14 -14
- data/third_party/boringssl-with-bazel/crypto/internal.h +63 -0
- data/third_party/boringssl-with-bazel/crypto/mem_internal.h +38 -3
- data/third_party/boringssl-with-bazel/crypto/obj/obj_dat.h +97 -1
- data/third_party/boringssl-with-bazel/crypto/pem/internal.h +86 -0
- data/third_party/boringssl-with-bazel/crypto/pem/pem_all.cc +8 -5
- data/third_party/boringssl-with-bazel/crypto/pem/pem_lib.cc +41 -73
- data/third_party/boringssl-with-bazel/crypto/pem/pem_pk8.cc +3 -0
- data/third_party/boringssl-with-bazel/crypto/pem/pem_pkey.cc +10 -4
- data/third_party/boringssl-with-bazel/crypto/pem/pem_x509.cc +3 -0
- data/third_party/boringssl-with-bazel/crypto/pem/pem_xaux.cc +3 -0
- data/third_party/boringssl-with-bazel/crypto/pkcs7/pkcs7.cc +1 -1
- data/third_party/boringssl-with-bazel/crypto/pkcs7/pkcs7_x509.cc +2 -2
- data/third_party/boringssl-with-bazel/crypto/pkcs8/pkcs8_x509.cc +1 -1
- data/third_party/boringssl-with-bazel/crypto/poly1305/internal.h +17 -0
- data/third_party/boringssl-with-bazel/crypto/poly1305/poly1305_arm.cc +1 -13
- data/third_party/boringssl-with-bazel/crypto/poly1305/poly1305_vec.cc +3 -3
- data/third_party/boringssl-with-bazel/crypto/slhdsa/slhdsa.cc +23 -6
- data/third_party/boringssl-with-bazel/crypto/stack/stack.cc +7 -0
- data/third_party/boringssl-with-bazel/crypto/trust_token/internal.h +1 -1
- data/third_party/boringssl-with-bazel/crypto/x509/a_verify.cc +14 -7
- data/third_party/boringssl-with-bazel/crypto/x509/internal.h +110 -76
- data/third_party/boringssl-with-bazel/crypto/x509/name_print.cc +1 -1
- data/third_party/boringssl-with-bazel/crypto/x509/rsa_pss.cc +1 -1
- data/third_party/boringssl-with-bazel/crypto/x509/t_req.cc +1 -1
- data/third_party/boringssl-with-bazel/crypto/x509/t_x509.cc +6 -5
- data/third_party/boringssl-with-bazel/crypto/x509/v3_crld.cc +11 -53
- data/third_party/boringssl-with-bazel/crypto/x509/v3_ncons.cc +5 -5
- data/third_party/boringssl-with-bazel/crypto/x509/v3_purp.cc +16 -39
- data/third_party/boringssl-with-bazel/crypto/x509/v3_skey.cc +1 -1
- data/third_party/boringssl-with-bazel/crypto/x509/v3_utl.cc +12 -16
- data/third_party/boringssl-with-bazel/crypto/x509/x509_cmp.cc +9 -11
- data/third_party/boringssl-with-bazel/crypto/x509/x509_mtc.cc +598 -0
- data/third_party/boringssl-with-bazel/crypto/x509/x509_obj.cc +9 -8
- data/third_party/boringssl-with-bazel/crypto/x509/x509_set.cc +14 -18
- data/third_party/boringssl-with-bazel/crypto/x509/x509_vfy.cc +315 -390
- data/third_party/boringssl-with-bazel/crypto/x509/x509_vpm.cc +1 -1
- data/third_party/boringssl-with-bazel/crypto/x509/x509name.cc +31 -29
- data/third_party/boringssl-with-bazel/crypto/x509/x_all.cc +10 -9
- data/third_party/boringssl-with-bazel/crypto/x509/x_crl.cc +3 -53
- data/third_party/boringssl-with-bazel/crypto/x509/x_name.cc +37 -59
- data/third_party/boringssl-with-bazel/crypto/x509/x_pubkey.cc +29 -47
- data/third_party/boringssl-with-bazel/crypto/x509/x_req.cc +2 -1
- data/third_party/boringssl-with-bazel/crypto/x509/x_x509.cc +53 -53
- data/third_party/boringssl-with-bazel/gen/boringssl_prefix_symbols_internal_x86_64_win_asm.inc +24 -0
- data/third_party/boringssl-with-bazel/gen/boringssl_prefix_symbols_internal_x86_win_asm.inc +24 -0
- data/third_party/boringssl-with-bazel/gen/crypto/err_data.cc +509 -497
- data/third_party/boringssl-with-bazel/include/openssl/aead.h +7 -19
- data/third_party/boringssl-with-bazel/include/openssl/asm_base.h +1 -1
- data/third_party/boringssl-with-bazel/include/openssl/asn1.h +6 -10
- data/third_party/boringssl-with-bazel/include/openssl/base.h +43 -16
- data/third_party/boringssl-with-bazel/include/openssl/bio.h +25 -10
- data/third_party/boringssl-with-bazel/include/openssl/bytestring.h +33 -1
- data/third_party/boringssl-with-bazel/include/openssl/cipher.h +11 -9
- data/third_party/boringssl-with-bazel/include/openssl/configuration.h +18 -0
- data/third_party/boringssl-with-bazel/include/openssl/curve25519.h +36 -0
- data/third_party/boringssl-with-bazel/include/openssl/digest.h +4 -4
- data/third_party/boringssl-with-bazel/include/openssl/ec.h +35 -1
- data/third_party/boringssl-with-bazel/include/openssl/ec_key.h +2 -2
- data/third_party/boringssl-with-bazel/include/openssl/evp.h +120 -3
- data/third_party/boringssl-with-bazel/include/openssl/evp_errors.h +1 -0
- data/third_party/boringssl-with-bazel/include/openssl/hmac.h +2 -2
- data/third_party/boringssl-with-bazel/include/openssl/hpke.h +38 -7
- data/third_party/boringssl-with-bazel/include/openssl/mem.h +5 -5
- data/third_party/boringssl-with-bazel/include/openssl/nid.h +42 -0
- data/third_party/boringssl-with-bazel/include/openssl/pem.h +650 -351
- data/third_party/boringssl-with-bazel/include/openssl/posix_time.h +4 -4
- data/third_party/boringssl-with-bazel/include/openssl/prefix_symbols.h +130 -4
- data/third_party/boringssl-with-bazel/include/openssl/prefix_symbols_internal_S.h +48 -0
- data/third_party/boringssl-with-bazel/include/openssl/prefix_symbols_internal_c.h +24 -0
- data/third_party/boringssl-with-bazel/include/openssl/rsa.h +1 -1
- data/third_party/boringssl-with-bazel/include/openssl/slhdsa.h +25 -1
- data/third_party/boringssl-with-bazel/include/openssl/ssl.h +256 -87
- data/third_party/boringssl-with-bazel/include/openssl/stack.h +9 -0
- data/third_party/boringssl-with-bazel/include/openssl/types.h +18 -0
- data/third_party/boringssl-with-bazel/include/openssl/x509.h +40 -21
- data/third_party/boringssl-with-bazel/ssl/bio_ssl.cc +3 -5
- data/third_party/boringssl-with-bazel/ssl/d1_both.cc +146 -81
- data/third_party/boringssl-with-bazel/ssl/d1_lib.cc +39 -34
- data/third_party/boringssl-with-bazel/ssl/d1_pkt.cc +6 -6
- data/third_party/boringssl-with-bazel/ssl/d1_srtp.cc +10 -8
- data/third_party/boringssl-with-bazel/ssl/dtls_method.cc +4 -4
- data/third_party/boringssl-with-bazel/ssl/dtls_record.cc +15 -14
- data/third_party/boringssl-with-bazel/ssl/encrypted_client_hello.cc +41 -25
- data/third_party/boringssl-with-bazel/ssl/extensions.cc +153 -171
- data/third_party/boringssl-with-bazel/ssl/handoff.cc +79 -64
- data/third_party/boringssl-with-bazel/ssl/handshake.cc +15 -16
- data/third_party/boringssl-with-bazel/ssl/handshake_client.cc +35 -78
- data/third_party/boringssl-with-bazel/ssl/handshake_server.cc +75 -155
- data/third_party/boringssl-with-bazel/ssl/internal.h +419 -308
- data/third_party/boringssl-with-bazel/ssl/s3_both.cc +17 -150
- data/third_party/boringssl-with-bazel/ssl/s3_lib.cc +2 -3
- data/third_party/boringssl-with-bazel/ssl/s3_pkt.cc +10 -9
- data/third_party/boringssl-with-bazel/ssl/ssl_asn1.cc +13 -13
- data/third_party/boringssl-with-bazel/ssl/ssl_buffer.cc +8 -8
- data/third_party/boringssl-with-bazel/ssl/ssl_cert.cc +58 -24
- data/third_party/boringssl-with-bazel/ssl/ssl_cipher.cc +198 -26
- data/third_party/boringssl-with-bazel/ssl/ssl_credential.cc +164 -37
- data/third_party/boringssl-with-bazel/ssl/ssl_file.cc +10 -8
- data/third_party/boringssl-with-bazel/ssl/ssl_key_share.cc +2 -95
- data/third_party/boringssl-with-bazel/ssl/ssl_lib.cc +785 -472
- data/third_party/boringssl-with-bazel/ssl/ssl_privkey.cc +78 -67
- data/third_party/boringssl-with-bazel/ssl/ssl_session.cc +187 -150
- data/third_party/boringssl-with-bazel/ssl/ssl_stat.cc +6 -3
- data/third_party/boringssl-with-bazel/ssl/ssl_transcript.cc +1 -1
- data/third_party/boringssl-with-bazel/ssl/ssl_versions.cc +25 -19
- data/third_party/boringssl-with-bazel/ssl/ssl_x509.cc +148 -114
- data/third_party/boringssl-with-bazel/ssl/t1_enc.cc +28 -19
- data/third_party/boringssl-with-bazel/ssl/tls13_both.cc +24 -22
- data/third_party/boringssl-with-bazel/ssl/tls13_client.cc +30 -30
- data/third_party/boringssl-with-bazel/ssl/tls13_enc.cc +17 -16
- data/third_party/boringssl-with-bazel/ssl/tls13_server.cc +55 -63
- data/third_party/boringssl-with-bazel/ssl/tls_method.cc +12 -12
- data/third_party/boringssl-with-bazel/ssl/tls_record.cc +23 -20
- data/third_party/boringssl-with-bazel/third_party/fiat/p256_64.h +38 -0
- data/third_party/boringssl-with-bazel/third_party/fiat/p256_64_msvc.h +2 -0
- data/third_party/boringssl-with-bazel/third_party/fiat/p256_field.c.inc +26 -0
- data/third_party/boringssl-with-bazel/third_party/fiat/p256_point.br.c.inc +0 -54
- data/third_party/cares/cares/include/ares.h +8 -0
- data/third_party/cares/cares/include/ares_dns_record.h +3 -2
- data/third_party/cares/cares/include/ares_version.h +3 -3
- data/third_party/cares/cares/src/lib/ares_addrinfo_localhost.c +20 -20
- data/third_party/cares/cares/src/lib/ares_cancel.c +17 -8
- data/third_party/cares/cares/src/lib/ares_close_sockets.c +81 -16
- data/third_party/cares/cares/src/lib/ares_conn.c +256 -10
- data/third_party/cares/cares/src/lib/ares_conn.h +40 -3
- data/third_party/cares/cares/src/lib/ares_cookie.c +2 -2
- data/third_party/cares/cares/src/lib/ares_destroy.c +75 -10
- data/third_party/cares/cares/src/lib/ares_getaddrinfo.c +85 -10
- data/third_party/cares/cares/src/lib/ares_gethostbyaddr.c +5 -0
- data/third_party/cares/cares/src/lib/ares_gethostbyname.c +4 -0
- data/third_party/cares/cares/src/lib/ares_getnameinfo.c +10 -2
- data/third_party/cares/cares/src/lib/ares_hosts_file.c +8 -0
- data/third_party/cares/cares/src/lib/ares_inet_net_pton.h +28 -0
- data/third_party/cares/cares/src/lib/ares_init.c +55 -10
- data/third_party/cares/cares/src/lib/ares_library_init.c +25 -7
- data/third_party/cares/cares/src/lib/ares_options.c +38 -10
- data/third_party/cares/cares/src/lib/ares_parse_into_addrinfo.c +1 -1
- data/third_party/cares/cares/src/lib/ares_private.h +186 -27
- data/third_party/cares/cares/src/lib/ares_process.c +604 -112
- data/third_party/cares/cares/src/lib/ares_qcache.c +200 -36
- data/third_party/cares/cares/src/lib/ares_query.c +5 -0
- data/third_party/cares/cares/src/lib/ares_search.c +10 -0
- data/third_party/cares/cares/src/lib/ares_send.c +81 -10
- data/third_party/cares/cares/src/lib/ares_set_socket_functions.c +3 -1
- data/third_party/cares/cares/src/lib/ares_socket.c +28 -0
- data/third_party/cares/cares/src/lib/ares_socket.h +23 -0
- data/third_party/cares/cares/src/lib/ares_sysconfig.c +6 -3
- data/third_party/cares/cares/src/lib/ares_sysconfig_files.c +33 -11
- data/third_party/cares/cares/src/lib/ares_sysconfig_win.c +132 -80
- data/third_party/cares/cares/src/lib/ares_timeout.c +11 -0
- data/third_party/cares/cares/src/lib/ares_update_servers.c +55 -11
- data/third_party/cares/cares/src/lib/dsa/ares_array.c +20 -5
- data/third_party/cares/cares/src/lib/dsa/ares_htable.c +8 -4
- data/third_party/cares/cares/src/lib/dsa/ares_htable_dict.c +2 -0
- data/third_party/cares/cares/src/lib/dsa/ares_llist.c +4 -1
- data/third_party/cares/cares/src/lib/event/ares_event_configchg.c +5 -2
- data/third_party/cares/cares/src/lib/event/ares_event_select.c +14 -1
- data/third_party/cares/cares/src/lib/event/ares_event_thread.c +8 -0
- data/third_party/cares/cares/src/lib/event/ares_event_wake_pipe.c +7 -1
- data/third_party/cares/cares/src/lib/event/ares_event_win32.c +3 -0
- data/third_party/cares/cares/src/lib/include/ares_mem.h +3 -0
- data/third_party/cares/cares/src/lib/include/ares_str.h +17 -0
- data/third_party/cares/cares/src/lib/inet_net_pton.c +37 -28
- data/third_party/cares/cares/src/lib/legacy/ares_expand_name.c +1 -1
- data/third_party/cares/cares/src/lib/legacy/ares_parse_a_reply.c +5 -2
- data/third_party/cares/cares/src/lib/legacy/ares_parse_aaaa_reply.c +5 -2
- data/third_party/cares/cares/src/lib/legacy/ares_parse_ns_reply.c +2 -2
- data/third_party/cares/cares/src/lib/legacy/ares_parse_ptr_reply.c +2 -2
- data/third_party/cares/cares/src/lib/legacy/ares_parse_uri_reply.c +1 -1
- data/third_party/cares/cares/src/lib/record/ares_dns_mapping.c +19 -4
- data/third_party/cares/cares/src/lib/record/ares_dns_multistring.c +3 -1
- data/third_party/cares/cares/src/lib/record/ares_dns_name.c +67 -4
- data/third_party/cares/cares/src/lib/record/ares_dns_parse.c +62 -34
- data/third_party/cares/cares/src/lib/record/ares_dns_private.h +4 -0
- data/third_party/cares/cares/src/lib/record/ares_dns_record.c +47 -7
- data/third_party/cares/cares/src/lib/record/ares_dns_write.c +13 -5
- data/third_party/cares/cares/src/lib/str/ares_buf.c +33 -16
- data/third_party/cares/cares/src/lib/str/ares_str.c +54 -0
- data/third_party/cares/cares/src/lib/util/ares_iface_ips.c +22 -10
- data/third_party/cares/cares/src/lib/util/ares_iface_ips.h +1 -0
- data/third_party/cares/cares/src/lib/util/ares_math.c +17 -2
- data/third_party/cares/cares/src/lib/util/ares_math.h +32 -7
- data/third_party/cares/cares/src/lib/util/ares_rand.c +4 -4
- data/third_party/cares/cares/src/lib/util/ares_threads.c +1 -2
- data/third_party/cares/cares/src/lib/util/ares_time.h +1 -0
- data/third_party/cares/cares/src/lib/util/ares_uri.c +9 -3
- data/third_party/zlib/compress.c +34 -10
- data/third_party/zlib/crc32.c +49 -115
- data/third_party/zlib/deflate.c +107 -61
- data/third_party/zlib/deflate.h +7 -1
- data/third_party/zlib/gzguts.h +33 -31
- data/third_party/zlib/infback.c +20 -67
- data/third_party/zlib/inffast.c +7 -6
- data/third_party/zlib/inffixed.h +91 -91
- data/third_party/zlib/inflate.c +38 -151
- data/third_party/zlib/inflate.h +1 -1
- data/third_party/zlib/inftrees.c +134 -9
- data/third_party/zlib/inftrees.h +3 -1
- data/third_party/zlib/trees.c +14 -12
- data/third_party/zlib/uncompr.c +39 -23
- data/third_party/zlib/zconf.h +27 -19
- data/third_party/zlib/zlib.h +215 -96
- data/third_party/zlib/zutil.c +49 -35
- data/third_party/zlib/zutil.h +87 -10
- metadata +4095 -4049
- data/src/core/ext/filters/rbac/rbac_service_config_parser.cc +0 -916
- data/src/core/ext/filters/rbac/rbac_service_config_parser.h +0 -84
- data/src/core/server/xds_channel_stack_modifier.cc +0 -108
- data/src/core/server/xds_channel_stack_modifier.h +0 -62
- data/src/core/server/xds_server_config_fetcher_legacy.cc +0 -1340
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/p256_internal.h +0 -193
- data/third_party/boringssl-with-bazel/crypto/kyber/internal.h +0 -165
- data/third_party/boringssl-with-bazel/crypto/kyber/kyber.cc +0 -870
|
@@ -434,6 +434,14 @@ struct ares_addr {
|
|
|
434
434
|
/* DNS record parser, writer, and helpers */
|
|
435
435
|
#include "ares_dns_record.h"
|
|
436
436
|
|
|
437
|
+
/* IMPORTANT: the pointer parameters below (abuf, hostent, node, service) are
|
|
438
|
+
* intentionally NOT const. Marking them const changes the function-pointer
|
|
439
|
+
* type and breaks API/ABI compatibility for existing C and (especially) C++
|
|
440
|
+
* applications that declare their callbacks with the historical non-const
|
|
441
|
+
* signature. This was tried in PR #1060 and reverted for that reason. These
|
|
442
|
+
* buffers are owned by c-ares and MUST be treated as read-only by the callback
|
|
443
|
+
* (do not modify or free them); that contract is documented in the man pages,
|
|
444
|
+
* not enforced via const, to preserve compatibility. Do not re-add const. */
|
|
437
445
|
typedef void (*ares_callback)(void *arg, int status, int timeouts,
|
|
438
446
|
unsigned char *abuf, int alen);
|
|
439
447
|
|
|
@@ -76,7 +76,8 @@ typedef enum {
|
|
|
76
76
|
typedef enum {
|
|
77
77
|
ARES_CLASS_IN = 1, /*!< Internet */
|
|
78
78
|
ARES_CLASS_CHAOS = 3, /*!< CHAOS */
|
|
79
|
-
|
|
79
|
+
ARES_CLASS_HESIOD = 4, /*!< Hesiod [Dyer 87] */
|
|
80
|
+
ARES_CLASS_HESOID = 4, /*!< typo from older c-ares version for Hesiod */
|
|
80
81
|
ARES_CLASS_NONE = 254, /*!< RFC 2136 */
|
|
81
82
|
ARES_CLASS_ANY = 255 /*!< Any class (requests only) */
|
|
82
83
|
} ares_dns_class_t;
|
|
@@ -1092,7 +1093,7 @@ CARES_EXTERN ares_status_t ares_dns_parse(const unsigned char *buf,
|
|
|
1092
1093
|
*
|
|
1093
1094
|
* \param[in] dnsrec Pointer to initialized and filled DNS record object.
|
|
1094
1095
|
* \param[out] buf Pointer passed by reference to be filled in with with
|
|
1095
|
-
* DNS message. Must be
|
|
1096
|
+
* DNS message. Must be ares_free_string()'d by caller.
|
|
1096
1097
|
* \param[out] buf_len Length of returned buffer containing DNS message.
|
|
1097
1098
|
* \return ARES_SUCCESS on success
|
|
1098
1099
|
*/
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
#define ARES__VERSION_H
|
|
29
29
|
|
|
30
30
|
/* This is the global package copyright */
|
|
31
|
-
#define ARES_COPYRIGHT "2004 -
|
|
31
|
+
#define ARES_COPYRIGHT "2004 - 2025 Daniel Stenberg, <daniel@haxx.se>."
|
|
32
32
|
|
|
33
33
|
#define ARES_VERSION_MAJOR 1
|
|
34
34
|
#define ARES_VERSION_MINOR 34
|
|
35
|
-
#define ARES_VERSION_PATCH
|
|
36
|
-
#define ARES_VERSION_STR
|
|
35
|
+
#define ARES_VERSION_PATCH 9
|
|
36
|
+
#define ARES_VERSION_STR "1.34.9"
|
|
37
37
|
|
|
38
38
|
/* NOTE: We cannot make the version string a C preprocessor stringify operation
|
|
39
39
|
* due to assumptions made by integrators that aren't properly using
|
|
@@ -67,13 +67,8 @@ ares_status_t ares_append_ai_node(int aftype, unsigned short port,
|
|
|
67
67
|
struct ares_addrinfo_node **nodes)
|
|
68
68
|
{
|
|
69
69
|
struct ares_addrinfo_node *node;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
if (!node) {
|
|
73
|
-
return ARES_ENOMEM; /* LCOV_EXCL_LINE: OutOfMemory */
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
memset(node, 0, sizeof(*node));
|
|
70
|
+
struct sockaddr *sa;
|
|
71
|
+
socklen_t salen;
|
|
77
72
|
|
|
78
73
|
if (aftype == AF_INET) {
|
|
79
74
|
struct sockaddr_in *sin = ares_malloc(sizeof(*sin));
|
|
@@ -86,14 +81,9 @@ ares_status_t ares_append_ai_node(int aftype, unsigned short port,
|
|
|
86
81
|
sin->sin_family = AF_INET;
|
|
87
82
|
sin->sin_port = htons(port);
|
|
88
83
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
node->ai_addr = (struct sockaddr *)sin;
|
|
93
|
-
node->ai_ttl = (int)ttl;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
if (aftype == AF_INET6) {
|
|
84
|
+
sa = (struct sockaddr *)sin;
|
|
85
|
+
salen = sizeof(*sin);
|
|
86
|
+
} else if (aftype == AF_INET6) {
|
|
97
87
|
struct sockaddr_in6 *sin6 = ares_malloc(sizeof(*sin6));
|
|
98
88
|
if (!sin6) {
|
|
99
89
|
return ARES_ENOMEM; /* LCOV_EXCL_LINE: OutOfMemory */
|
|
@@ -104,13 +94,23 @@ ares_status_t ares_append_ai_node(int aftype, unsigned short port,
|
|
|
104
94
|
sin6->sin6_family = AF_INET6;
|
|
105
95
|
sin6->sin6_port = htons(port);
|
|
106
96
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
97
|
+
sa = (struct sockaddr *)sin6;
|
|
98
|
+
salen = sizeof(*sin6);
|
|
99
|
+
} else {
|
|
100
|
+
return ARES_EFORMERR;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
node = ares_append_addrinfo_node(nodes);
|
|
104
|
+
if (!node) {
|
|
105
|
+
ares_free(sa); /* LCOV_EXCL_LINE: OutOfMemory */
|
|
106
|
+
return ARES_ENOMEM; /* LCOV_EXCL_LINE: OutOfMemory */
|
|
112
107
|
}
|
|
113
108
|
|
|
109
|
+
node->ai_addr = sa;
|
|
110
|
+
node->ai_family = aftype;
|
|
111
|
+
node->ai_addrlen = salen;
|
|
112
|
+
node->ai_ttl = ares_dns_ttl_as_int(ttl);
|
|
113
|
+
|
|
114
114
|
return ARES_SUCCESS;
|
|
115
115
|
}
|
|
116
116
|
|
|
@@ -38,10 +38,10 @@ void ares_cancel(ares_channel_t *channel)
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
ares_channel_lock(channel);
|
|
41
|
+
ares_deferred_cb_enter(channel);
|
|
41
42
|
|
|
42
43
|
if (ares_llist_len(channel->all_queries) > 0) {
|
|
43
44
|
ares_llist_node_t *node = NULL;
|
|
44
|
-
ares_llist_node_t *next = NULL;
|
|
45
45
|
|
|
46
46
|
/* Swap list heads, so that only those queries which were present on entry
|
|
47
47
|
* into this function are cancelled. New queries added by callbacks of
|
|
@@ -57,21 +57,29 @@ void ares_cancel(ares_channel_t *channel)
|
|
|
57
57
|
goto done; /* LCOV_EXCL_LINE: OutOfMemory */
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
node
|
|
61
|
-
|
|
60
|
+
/* Re-read the head each iteration rather than caching the next node: a
|
|
61
|
+
* callback below may cause other queries in this same list to be ended
|
|
62
|
+
* and their nodes destroyed. */
|
|
63
|
+
while ((node = ares_llist_node_first(list_copy)) != NULL) {
|
|
62
64
|
ares_query_t *query;
|
|
63
65
|
|
|
64
|
-
|
|
65
|
-
next = ares_llist_node_next(node);
|
|
66
|
+
query = ares_llist_node_claim(node);
|
|
66
67
|
|
|
67
|
-
|
|
68
|
+
/* Must come first: node_claim() already destroyed this node, so
|
|
69
|
+
* ares_detach_query() would otherwise destroy it a second time. */
|
|
68
70
|
query->node_all_queries = NULL;
|
|
69
71
|
|
|
72
|
+
/* Detach from queries_by_qid, the connection and the timeout list
|
|
73
|
+
* before running user code. Otherwise a reentrant teardown from
|
|
74
|
+
* within the callback -- ares_set_servers_csv(), or a new query
|
|
75
|
+
* hitting a connection error -- still finds this query, ends it a
|
|
76
|
+
* second time and frees it, and the ares_free_query() below then
|
|
77
|
+
* double-frees. */
|
|
78
|
+
ares_detach_query(query);
|
|
79
|
+
|
|
70
80
|
/* NOTE: its possible this may enqueue new queries */
|
|
71
81
|
query->callback(query->arg, ARES_ECANCELLED, 0, NULL);
|
|
72
82
|
ares_free_query(query);
|
|
73
|
-
|
|
74
|
-
node = next;
|
|
75
83
|
}
|
|
76
84
|
|
|
77
85
|
ares_llist_destroy(list_copy);
|
|
@@ -83,5 +91,6 @@ void ares_cancel(ares_channel_t *channel)
|
|
|
83
91
|
ares_queue_notify_empty(channel);
|
|
84
92
|
|
|
85
93
|
done:
|
|
94
|
+
ares_deferred_cb_leave(channel);
|
|
86
95
|
ares_channel_unlock(channel);
|
|
87
96
|
}
|
|
@@ -41,12 +41,47 @@ static void ares_requeue_queries(ares_conn_t *conn,
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
/*! Release a connection's memory. Split from the unlink below so that the
|
|
45
|
+
* two can happen at different times: a caller further up the stack may still
|
|
46
|
+
* hold this pointer, and reading a detached connection is safe where reading
|
|
47
|
+
* a freed one is not. */
|
|
48
|
+
void ares_conn_reap(ares_conn_t *conn)
|
|
49
|
+
{
|
|
50
|
+
if (conn == NULL) {
|
|
51
|
+
return; /* LCOV_EXCL_LINE: DefensiveCoding */
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
ares_buf_destroy(conn->in_buf);
|
|
55
|
+
ares_buf_destroy(conn->out_buf);
|
|
56
|
+
ares_llist_destroy(conn->queries_to_conn);
|
|
57
|
+
ares_free(conn);
|
|
58
|
+
}
|
|
59
|
+
|
|
44
60
|
void ares_close_connection(ares_conn_t *conn, ares_status_t requeue_status)
|
|
45
61
|
{
|
|
46
|
-
ares_server_t *server
|
|
47
|
-
ares_channel_t *channel
|
|
62
|
+
ares_server_t *server;
|
|
63
|
+
ares_channel_t *channel;
|
|
64
|
+
|
|
65
|
+
if (conn == NULL) {
|
|
66
|
+
return; /* LCOV_EXCL_LINE: DefensiveCoding */
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Already torn down and awaiting reclamation. Reaching here twice is
|
|
70
|
+
* ordinary once a connection can outlive its teardown: a caller holding it
|
|
71
|
+
* from before -- handle_conn_error() after a failed write, say -- closes it
|
|
72
|
+
* again without knowing. Doing the work twice would requeue queries that
|
|
73
|
+
* have already moved and would put this connection on the pending list a
|
|
74
|
+
* second time, which is a double free. */
|
|
75
|
+
if (conn->flags & ARES_CONN_FLAG_DEAD) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
48
78
|
|
|
49
|
-
|
|
79
|
+
server = conn->server;
|
|
80
|
+
channel = server->channel;
|
|
81
|
+
|
|
82
|
+
/* Unlink from everything that can find this connection. After this it is
|
|
83
|
+
* unreachable by lookup, which is what stops anything new from picking it
|
|
84
|
+
* up; anything that already holds it is handled by the deferral below. */
|
|
50
85
|
ares_llist_node_claim(
|
|
51
86
|
ares_htable_asvp_get_direct(channel->connnode_by_socket, conn->fd));
|
|
52
87
|
ares_htable_asvp_remove(channel->connnode_by_socket, conn->fd);
|
|
@@ -55,19 +90,40 @@ void ares_close_connection(ares_conn_t *conn, ares_status_t requeue_status)
|
|
|
55
90
|
server->tcp_conn = NULL;
|
|
56
91
|
}
|
|
57
92
|
|
|
58
|
-
|
|
59
|
-
|
|
93
|
+
/* Marked dead as soon as it is unlinked, before anything below can run
|
|
94
|
+
* application code. ares_requeue_queries() ends queries terminally once
|
|
95
|
+
* their retries are exhausted, which invokes the application's callback; if
|
|
96
|
+
* the flag were set after that, a second ares_close_connection() reaching
|
|
97
|
+
* this connection in the meantime would run the body again -- closing the
|
|
98
|
+
* descriptor twice and listing the connection for reclamation twice, which
|
|
99
|
+
* is a double free. It also gives ares_close_sockets() its termination
|
|
100
|
+
* condition: dead implies unlinked, so its re-read-the-head loop cannot see
|
|
101
|
+
* a dead connection and spin. */
|
|
102
|
+
conn->flags |= ARES_CONN_FLAG_DEAD;
|
|
60
103
|
|
|
61
104
|
/* Requeue queries to other connections */
|
|
62
105
|
ares_requeue_queries(conn, requeue_status);
|
|
63
106
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
107
|
+
/* Hands the descriptor to the queued notification when one is due, so the
|
|
108
|
+
* application is told to stop watching it before it is closed. Otherwise
|
|
109
|
+
* nothing will carry it and we close it here. */
|
|
110
|
+
if (!ares_conn_sock_state_cb_close(conn)) {
|
|
111
|
+
ares_socket_close(channel, conn->fd);
|
|
112
|
+
}
|
|
113
|
+
conn->fd = ARES_SOCKET_BAD;
|
|
114
|
+
|
|
115
|
+
/* If a library call is in progress it may be holding this connection --
|
|
116
|
+
* read_answers() and ares_send_query_int() both do, across code that can
|
|
117
|
+
* reach here. Keep it readable until that call unwinds. The buffers and
|
|
118
|
+
* the query list are freed by ares_conn_reap(), so a stale holder sees an
|
|
119
|
+
* emptied connection rather than freed memory. */
|
|
120
|
+
if (channel->deferred_cb_depth > 0) {
|
|
121
|
+
conn->next_pending = channel->pending_conns;
|
|
122
|
+
channel->pending_conns = conn;
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
69
125
|
|
|
70
|
-
|
|
126
|
+
ares_conn_reap(conn);
|
|
71
127
|
}
|
|
72
128
|
|
|
73
129
|
void ares_close_sockets(ares_server_t *server)
|
|
@@ -76,6 +132,10 @@ void ares_close_sockets(ares_server_t *server)
|
|
|
76
132
|
|
|
77
133
|
while ((node = ares_llist_node_first(server->connections)) != NULL) {
|
|
78
134
|
ares_conn_t *conn = ares_llist_node_val(node);
|
|
135
|
+
/* This loop re-reads the head each time and relies on the close below
|
|
136
|
+
* unlinking it. A dead connection returns early without unlinking, so
|
|
137
|
+
* one on this list would spin forever holding the channel lock. */
|
|
138
|
+
assert(!(conn->flags & ARES_CONN_FLAG_DEAD));
|
|
79
139
|
ares_close_connection(conn, ARES_SUCCESS);
|
|
80
140
|
}
|
|
81
141
|
}
|
|
@@ -88,6 +148,7 @@ void ares_check_cleanup_conns(const ares_channel_t *channel)
|
|
|
88
148
|
return; /* LCOV_EXCL_LINE: DefensiveCoding */
|
|
89
149
|
}
|
|
90
150
|
|
|
151
|
+
restart:
|
|
91
152
|
/* Iterate across each server */
|
|
92
153
|
for (snode = ares_slist_node_first(channel->servers); snode != NULL;
|
|
93
154
|
snode = ares_slist_node_next(snode)) {
|
|
@@ -112,11 +173,11 @@ void ares_check_cleanup_conns(const ares_channel_t *channel)
|
|
|
112
173
|
do_cleanup = ARES_TRUE;
|
|
113
174
|
}
|
|
114
175
|
|
|
115
|
-
/* If the
|
|
116
|
-
* connection (and specifically the source port
|
|
117
|
-
* situations where packets are being dropped.
|
|
176
|
+
/* If the connection has been retired for new queries, close it out once
|
|
177
|
+
* idle. Resetting the connection (and specifically the source port
|
|
178
|
+
* number) can help resolve situations where packets are being dropped.
|
|
118
179
|
*/
|
|
119
|
-
if (conn->
|
|
180
|
+
if (conn->flags & ARES_CONN_FLAG_NONEW) {
|
|
120
181
|
do_cleanup = ARES_TRUE;
|
|
121
182
|
}
|
|
122
183
|
|
|
@@ -130,8 +191,12 @@ void ares_check_cleanup_conns(const ares_channel_t *channel)
|
|
|
130
191
|
continue;
|
|
131
192
|
}
|
|
132
193
|
|
|
133
|
-
/* Clean it up
|
|
194
|
+
/* Clean it up. The close function is application code and may have
|
|
195
|
+
* reconfigured the servers, freeing the list nodes this walk holds --
|
|
196
|
+
* the server's, and the next connection's. Start over; connections
|
|
197
|
+
* already closed are no longer listed, so this ends. */
|
|
134
198
|
ares_close_connection(conn, ARES_SUCCESS);
|
|
199
|
+
goto restart;
|
|
135
200
|
}
|
|
136
201
|
}
|
|
137
202
|
}
|
|
@@ -26,19 +26,212 @@
|
|
|
26
26
|
*/
|
|
27
27
|
#include "ares_private.h"
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
/*! A queued socket-state notification. Holds the descriptor and the state,
|
|
30
|
+
* never the connection, so a queued entry cannot outlive what it refers to.
|
|
31
|
+
*
|
|
32
|
+
* When \c owns_fd is set, this message carries the only remaining reference to
|
|
33
|
+
* the descriptor: the connection is gone and the descriptor is deliberately
|
|
34
|
+
* left open until after the application has been told to stop watching it.
|
|
35
|
+
* Closing first would let the number be reused -- by application code running
|
|
36
|
+
* from a deferred query callback, for instance -- before the notification
|
|
37
|
+
* naming it is delivered. */
|
|
38
|
+
typedef struct {
|
|
39
|
+
ares_socket_t fd;
|
|
40
|
+
ares_bool_t readable;
|
|
41
|
+
ares_bool_t writable;
|
|
42
|
+
ares_bool_t owns_fd;
|
|
43
|
+
} ares_sock_state_msg_t;
|
|
44
|
+
|
|
45
|
+
static ares_bool_t ares_sock_state_queue(ares_channel_t *channel,
|
|
46
|
+
const ares_sock_state_msg_t *msg)
|
|
31
47
|
{
|
|
32
|
-
|
|
48
|
+
if (channel->sock_state_queue == NULL) {
|
|
49
|
+
channel->sock_state_queue = ares_array_create(sizeof(*msg), NULL);
|
|
50
|
+
if (channel->sock_state_queue == NULL) {
|
|
51
|
+
return ARES_FALSE; /* LCOV_EXCL_LINE: OutOfMemory */
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (ares_array_insertdata_last(channel->sock_state_queue, msg) !=
|
|
56
|
+
ARES_SUCCESS) {
|
|
57
|
+
return ARES_FALSE; /* LCOV_EXCL_LINE: OutOfMemory */
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return ARES_TRUE;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/*! Deliver every socket-state notification the channel has queued. Loops
|
|
64
|
+
* rather than snapshotting: a callback is allowed to re-enter the library and
|
|
65
|
+
* queue more, and those belong to this same delivery point. */
|
|
66
|
+
static void ares_sock_state_dispatch(ares_channel_t *channel)
|
|
67
|
+
{
|
|
68
|
+
while (ares_array_len(channel->sock_state_queue) > 0) {
|
|
69
|
+
ares_sock_state_msg_t msg;
|
|
70
|
+
|
|
71
|
+
if (ares_array_claim_at(&msg, sizeof(msg), channel->sock_state_queue, 0) !=
|
|
72
|
+
ARES_SUCCESS) {
|
|
73
|
+
break; /* LCOV_EXCL_LINE: DefensiveCoding */
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (channel->sock_state_cb != NULL) {
|
|
77
|
+
/* The public callback takes ints. */
|
|
78
|
+
channel->sock_state_cb(channel->sock_state_cb_data, msg.fd,
|
|
79
|
+
msg.readable ? 1 : 0, msg.writable ? 1 : 0);
|
|
80
|
+
}
|
|
33
81
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
82
|
+
/* Told first, closed second -- the ordering the application depends on to
|
|
83
|
+
* keep its descriptor set honest. */
|
|
84
|
+
if (msg.owns_fd) {
|
|
85
|
+
ares_socket_close(channel, msg.fd);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
ares_array_destroy(channel->sock_state_queue);
|
|
90
|
+
channel->sock_state_queue = NULL;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
static void ares_deferred_cb_flush(ares_channel_t *channel)
|
|
94
|
+
{
|
|
95
|
+
/* Only the outermost frame delivers: anything above us on the stack may
|
|
96
|
+
* still be holding the connection a reentrant call from one of these
|
|
97
|
+
* callbacks could free, or lookup state of its own that a callback could
|
|
98
|
+
* end. That is why the outermost frame belongs to the public entry point
|
|
99
|
+
* and never to an internal helper; see ares_deferred_cb_enter().
|
|
100
|
+
*
|
|
101
|
+
* The dispatch below counts as a nesting level of its own. Without that, a
|
|
102
|
+
* callback that calls back into the library re-enters here through the
|
|
103
|
+
* enter/leave pair on that call, drains the rest of the queue and destroys
|
|
104
|
+
* it underneath the loop -- and hands the next notification to the
|
|
105
|
+
* application from inside the current one. With the counter held, the
|
|
106
|
+
* nested leave returns immediately and whatever it queued is picked up by
|
|
107
|
+
* the loop that is already running. */
|
|
108
|
+
if (channel->deferred_cb_depth > 0) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
channel->deferred_cb_depth++;
|
|
112
|
+
|
|
113
|
+
/* Both kinds of deferred notification share this one delivery point. Loop
|
|
114
|
+
* rather than calling each once: a socket-state callback may put the library
|
|
115
|
+
* on a path that queues a server-state notification, and the reverse, and
|
|
116
|
+
* both belong to this delivery point rather than the next one. */
|
|
117
|
+
while (ares_array_len(channel->sock_state_queue) > 0 ||
|
|
118
|
+
ares_array_len(channel->server_state_queue) > 0) {
|
|
119
|
+
ares_sock_state_dispatch(channel);
|
|
120
|
+
ares_server_state_dispatch(channel);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/* The outermost call is unwinding and the callbacks above have run, so
|
|
124
|
+
* nothing can still be holding a server or connection that was unlinked
|
|
125
|
+
* during it. Now they can be freed. */
|
|
126
|
+
ares_deferred_reclaim(channel);
|
|
127
|
+
|
|
128
|
+
channel->deferred_cb_depth--;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
void ares_deferred_reclaim(ares_channel_t *channel)
|
|
132
|
+
{
|
|
133
|
+
/* Connections first: a pending server's connection list is already empty,
|
|
134
|
+
* but this keeps the ordering obvious rather than incidental. */
|
|
135
|
+
while (channel->pending_conns != NULL) {
|
|
136
|
+
ares_conn_t *conn = channel->pending_conns;
|
|
137
|
+
channel->pending_conns = conn->next_pending;
|
|
138
|
+
conn->next_pending = NULL;
|
|
139
|
+
ares_conn_reap(conn);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
while (channel->pending_servers != NULL) {
|
|
143
|
+
ares_server_t *server = channel->pending_servers;
|
|
144
|
+
channel->pending_servers = server->next_pending;
|
|
145
|
+
server->next_pending = NULL;
|
|
146
|
+
ares_server_reap(server);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
void ares_deferred_cb_enter(ares_channel_t *channel)
|
|
151
|
+
{
|
|
152
|
+
channel->deferred_cb_depth++;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
void ares_deferred_cb_leave(ares_channel_t *channel)
|
|
156
|
+
{
|
|
157
|
+
if (channel->deferred_cb_depth > 0) {
|
|
158
|
+
channel->deferred_cb_depth--;
|
|
159
|
+
}
|
|
160
|
+
ares_deferred_cb_flush(channel);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
ares_bool_t ares_conn_sock_state_cb_close(ares_conn_t *conn)
|
|
164
|
+
{
|
|
165
|
+
ares_channel_t *channel = conn->server->channel;
|
|
166
|
+
ares_sock_state_msg_t msg;
|
|
167
|
+
|
|
168
|
+
/* No callback to run, so nothing will ever carry this descriptor: the
|
|
169
|
+
* caller closes it itself, exactly as before. */
|
|
170
|
+
if (channel->sock_state_cb == NULL) {
|
|
171
|
+
return ARES_FALSE;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/* Already reported as unwatched, so no notification is due and no message
|
|
175
|
+
* will be queued to hold the descriptor. */
|
|
176
|
+
if ((conn->state_flags & ARES_CONN_STATE_CBFLAGS) == ARES_CONN_STATE_NONE) {
|
|
177
|
+
return ARES_FALSE;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
msg.fd = conn->fd;
|
|
181
|
+
msg.readable = ARES_FALSE;
|
|
182
|
+
msg.writable = ARES_FALSE;
|
|
183
|
+
msg.owns_fd = ARES_TRUE;
|
|
184
|
+
|
|
185
|
+
if (!ares_sock_state_queue(channel, &msg)) {
|
|
186
|
+
return ARES_FALSE; /* LCOV_EXCL_LINE: OutOfMemory */
|
|
39
187
|
}
|
|
40
188
|
|
|
41
189
|
conn->state_flags &= ~((unsigned int)ARES_CONN_STATE_CBFLAGS);
|
|
190
|
+
|
|
191
|
+
return ARES_TRUE;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
void ares_conn_sock_state_cb_update(ares_conn_t *conn,
|
|
195
|
+
ares_conn_state_flags_t flags)
|
|
196
|
+
{
|
|
197
|
+
ares_channel_t *channel = conn->server->channel;
|
|
198
|
+
ares_sock_state_msg_t msg;
|
|
199
|
+
ares_bool_t changed = ARES_FALSE;
|
|
200
|
+
|
|
201
|
+
if ((conn->state_flags & ARES_CONN_STATE_CBFLAGS) != flags) {
|
|
202
|
+
changed = ARES_TRUE;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
msg.fd = conn->fd;
|
|
206
|
+
msg.readable = flags & ARES_CONN_STATE_READ ? ARES_TRUE : ARES_FALSE;
|
|
207
|
+
msg.writable = flags & ARES_CONN_STATE_WRITE ? ARES_TRUE : ARES_FALSE;
|
|
208
|
+
msg.owns_fd = ARES_FALSE; /* the connection still owns it */
|
|
209
|
+
|
|
210
|
+
if (!changed || channel->sock_state_cb == NULL) {
|
|
211
|
+
conn->state_flags &= ~((unsigned int)ARES_CONN_STATE_CBFLAGS);
|
|
212
|
+
conn->state_flags |= flags;
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* Queue rather than dispatch. This runs in the middle of opening, writing
|
|
217
|
+
* to or closing a connection, and every caller keeps using that connection
|
|
218
|
+
* afterwards. The callback is application code that may reentrantly call
|
|
219
|
+
* ares_cancel() or ares_set_servers_csv(), either of which frees the
|
|
220
|
+
* connection -- the first through the idle-connection sweep, the second by
|
|
221
|
+
* destroying the server that owns it. Deliver once no frame still holds
|
|
222
|
+
* it.
|
|
223
|
+
*
|
|
224
|
+
* Only the descriptor and the state are captured, never the connection, and
|
|
225
|
+
* insertion order is preserved so the application observes the same
|
|
226
|
+
* sequence it would have seen inline. */
|
|
227
|
+
if (!ares_sock_state_queue(channel, &msg)) {
|
|
228
|
+
return; /* LCOV_EXCL_LINE: OutOfMemory */
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/* Recorded as reported only now: on either failure above the connection
|
|
232
|
+
* stays eligible to notify again, rather than remembering a state the
|
|
233
|
+
* application was never told about. */
|
|
234
|
+
conn->state_flags &= ~((unsigned int)ARES_CONN_STATE_CBFLAGS);
|
|
42
235
|
conn->state_flags |= flags;
|
|
43
236
|
}
|
|
44
237
|
|
|
@@ -59,9 +252,23 @@ ares_conn_err_t ares_conn_read(ares_conn_t *conn, void *data, size_t len,
|
|
|
59
252
|
(struct sockaddr *)&sa_storage, &salen, read_bytes);
|
|
60
253
|
|
|
61
254
|
#ifdef HAVE_RECVFROM
|
|
255
|
+
/* The socket is connect()ed, so the kernel normally drops datagrams from
|
|
256
|
+
* any other address or port already. Application-provided socket
|
|
257
|
+
* functions might not filter on connect, so also check here that the
|
|
258
|
+
* datagram came from the server's address and UDP port. RFC 5452
|
|
259
|
+
* section 9.1 only requires the address to match; matching the port too
|
|
260
|
+
* keeps one server from answering for another on the same address.
|
|
261
|
+
* Socket functions that fill in the source address but leave the port 0
|
|
262
|
+
* predate the port check, so for those only the address is checked. A
|
|
263
|
+
* sender cannot use this to skip the port check: the default socket
|
|
264
|
+
* functions connect() the socket, so the kernel drops a datagram from
|
|
265
|
+
* port 0, and an unprivileged process on the server's host cannot send
|
|
266
|
+
* from port 0, while an off-path attacker able to forge port 0 can forge
|
|
267
|
+
* the server's real port just as easily. */
|
|
62
268
|
if (err == ARES_CONN_ERR_SUCCESS &&
|
|
63
|
-
!
|
|
64
|
-
|
|
269
|
+
!ares_sockaddr_addr_port_eq((struct sockaddr *)&sa_storage,
|
|
270
|
+
&conn->server->addr,
|
|
271
|
+
conn->server->udp_port)) {
|
|
65
272
|
err = ARES_CONN_ERR_WOULDBLOCK;
|
|
66
273
|
}
|
|
67
274
|
#endif
|
|
@@ -69,6 +276,15 @@ ares_conn_err_t ares_conn_read(ares_conn_t *conn, void *data, size_t len,
|
|
|
69
276
|
err = ares_socket_recv(channel, conn->fd, ARES_TRUE, data, len, read_bytes);
|
|
70
277
|
}
|
|
71
278
|
|
|
279
|
+
/* The receive function is application code and may have reconfigured the
|
|
280
|
+
* servers, tearing this connection down. Nothing read from it can be
|
|
281
|
+
* matched any more -- its queries have moved to the new configuration --
|
|
282
|
+
* and its descriptor is gone, so it must not be read again. */
|
|
283
|
+
if (conn->flags & ARES_CONN_FLAG_DEAD) {
|
|
284
|
+
*read_bytes = 0;
|
|
285
|
+
return ARES_CONN_ERR_CONNCLOSED;
|
|
286
|
+
}
|
|
287
|
+
|
|
72
288
|
/* Toggle connected state if needed */
|
|
73
289
|
if (err == ARES_CONN_ERR_SUCCESS) {
|
|
74
290
|
conn->state_flags |= ARES_CONN_STATE_CONNECTED;
|
|
@@ -215,6 +431,19 @@ ares_conn_err_t ares_conn_write(ares_conn_t *conn, const void *data, size_t len,
|
|
|
215
431
|
}
|
|
216
432
|
|
|
217
433
|
done:
|
|
434
|
+
/* The send function -- from ares_set_socket_functions_ex() or the legacy
|
|
435
|
+
* ares_set_socket_functions() -- and on the first TCP Fast Open write the
|
|
436
|
+
* getsockname function, are application code and may have reconfigured the
|
|
437
|
+
* servers, tearing this connection down. Whatever the write returned,
|
|
438
|
+
* nothing written here can be answered any more, and the descriptor has
|
|
439
|
+
* already been closed or handed to the close notification, so there is no
|
|
440
|
+
* socket state left to report. Say so, so every caller treats it as the
|
|
441
|
+
* connection failure it is. */
|
|
442
|
+
if (conn->flags & ARES_CONN_FLAG_DEAD) {
|
|
443
|
+
*written = 0;
|
|
444
|
+
return ARES_CONN_ERR_CONNCLOSED;
|
|
445
|
+
}
|
|
446
|
+
|
|
218
447
|
if (err == ARES_CONN_ERR_SUCCESS && len == *written) {
|
|
219
448
|
/* Wrote all data, make sure we're not listening for write events unless
|
|
220
449
|
* using TFO, in which case we'll need a write event to know when
|
|
@@ -435,12 +664,29 @@ ares_status_t ares_open_connection(ares_conn_t **conn_out,
|
|
|
435
664
|
conn->flags |= ARES_CONN_FLAG_TFO_INITIAL;
|
|
436
665
|
}
|
|
437
666
|
|
|
667
|
+
/* The socket-configure and socket-create callbacks above are application
|
|
668
|
+
* code, and either may reconfigure the servers -- which destroys the ones
|
|
669
|
+
* the new configuration omits, including possibly this one. Everything
|
|
670
|
+
* below dereferences it, starting with conn->server in
|
|
671
|
+
* ares_conn_set_self_ip(). */
|
|
672
|
+
if (!ares_server_in_channel(channel, server)) {
|
|
673
|
+
status = ARES_ECONNREFUSED;
|
|
674
|
+
goto done;
|
|
675
|
+
}
|
|
676
|
+
|
|
438
677
|
/* Need to store our own ip for DNS cookie support */
|
|
439
678
|
status = ares_conn_set_self_ip(conn, ARES_TRUE);
|
|
440
679
|
if (status != ARES_SUCCESS) {
|
|
441
680
|
goto done; /* LCOV_EXCL_LINE: UntestablePath */
|
|
442
681
|
}
|
|
443
682
|
|
|
683
|
+
/* The getsockname function is application code as well, and may have
|
|
684
|
+
* reconfigured the servers the same way. */
|
|
685
|
+
if (!ares_server_in_channel(channel, server)) {
|
|
686
|
+
status = ARES_ECONNREFUSED;
|
|
687
|
+
goto done;
|
|
688
|
+
}
|
|
689
|
+
|
|
444
690
|
/* TCP connections are thrown to the end as we don't spawn multiple TCP
|
|
445
691
|
* connections. UDP connections are put on front where the newest connection
|
|
446
692
|
* can be quickly pulled */
|