Skip to content

quic: QUIC listener doesn't respect the QUIC version of the listen address #1904

@marten-seemann

Description

@marten-seemann
func TestListenOnlyOnOneVersion(t *testing.T) {
	t.Run("only one draft-29", func(t *testing.T) {
		h1, err := libp2p.New(
			libp2p.Transport(libp2pquic.NewTransport),
			libp2p.ListenAddrStrings(
				"/ip4/127.0.0.1/udp/12345/quic", // QUIC draft-29
			),
		)
		require.NoError(t, err)
		defer h1.Close()

		addrs := h1.Addrs()
		require.Len(t, addrs, 1)
		require.Equal(t, ma.P_QUIC, getQUICMultiaddrCode(addrs[0]))
	})
}

This test fails, as the listener is listening on both versions.

Metadata

Metadata

Assignees

Labels

P0Critical: Tackled by core team ASAPkind/bugA bug in existing code (including security flaws)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions