Skip to content

SNI is incorrectly set when dialing an IP address #3493

Open
@MarcoPolo

Description

@MarcoPolo

Describe the bug

When dialing a Quinn server (Rust based) I get a handshake failure on the rust side because it fails to parse the SNI field. The SNI field is set to the ip address of the server, which I don't believe is a valid domain name.

I think we're always setting the RemoteServerName field https://github.com/microsoft/msquic/blob/main/src/core/connection.c#L1980. Maybe we shouldn't in the case that it is an ip address?

Affected OS

  • Windows
  • Linux
  • macOS
  • Other (specify below)

Additional OS information

No response

MsQuic version

main

Steps taken to reproduce bug

  1. Have an MsQuic client dial a Quinn server.
  2. Fail to handshake.

Expected behavior

Handshake should succeed.

Actual outcome

fails.

Additional details

Not an experienced C programmer, but happy to attempt to tackle this with some pointers.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Walkthrough in issue

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions