-
Notifications
You must be signed in to change notification settings - Fork 10.4k
HTTP/3: QUIC connection listener fixes #35258
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
Conversation
Quic should be checking for equivalence, not constant instances. Wouldn't you get the same issue if someone passes in |
I thought of a better fix that solves this (until fixed in system.net.quic) for all binding/configuration types. |
@@ -35,8 +35,21 @@ public QuicConnectionListener(QuicTransportOptions options, IQuicTrace log, EndP | |||
_context = new QuicTransportContext(_log, options); | |||
var quicListenerOptions = new QuicListenerOptions(); | |||
|
|||
var listenEndPoint = (IPEndPoint)endpoint; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lol, you half-fixed #35200. Want to add the real exception now or wait?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much better.
@@ -49,7 +49,7 @@ public async Task BindAsync_NoServerCertificate_Error() | |||
var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => quicTransportFactory.BindAsync(new IPEndPoint(0, 0), features: features, cancellationToken: CancellationToken.None).AsTask()).DefaultTimeout(); | |||
|
|||
// Assert | |||
Assert.Equal("SslServerAuthenticationOptions.ServerCertificate must be configured with a value.", ex.Message); | |||
Assert.Equal("SslServerAuthenticationOptions must provide a server certificate using ServerCertificate, ServerCertificateContext, or ServerCertificateSelectionCallback.", ex.Message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I missed this test in my last change.
ListenAnyIP passes an
EndPoint
with an address ofIPAddress.IPv6Any
to the transports. If there are multiple transports, i.e. TCP and multiplexed QUIC, then the address value was being replaced with an address that looks like IPv6Any, but isn't theIPAddress.IPv6Any
constant.QuicConnectionListener
has logic that checks for this constant.Now the original address of a listener is always passed unchanged to each transport. The overall endpoint can be updated by the first transport when an ephemeral port (port 0) is bound. We want to share that.