mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 04:07:35 +03:00
fix: error after sync
This commit is contained in:
parent
7c77243b04
commit
77691ccce8
16 changed files with 39 additions and 87 deletions
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
export CXX="${CXX} -lresolv" # required by Go 1.20
|
export CXX="${CXX} -lresolv" # required by Go 1.20
|
||||||
|
|
||||||
compile_go_fuzzer github.com/quic-go/quic-go/fuzzing/frames Fuzz frame_fuzzer
|
compile_go_fuzzer github.com/refraction-networking/uquic/fuzzing/frames Fuzz frame_fuzzer
|
||||||
compile_go_fuzzer github.com/quic-go/quic-go/fuzzing/header Fuzz header_fuzzer
|
compile_go_fuzzer github.com/refraction-networking/uquic/fuzzing/header Fuzz header_fuzzer
|
||||||
compile_go_fuzzer github.com/quic-go/quic-go/fuzzing/transportparameters Fuzz transportparameter_fuzzer
|
compile_go_fuzzer github.com/refraction-networking/uquic/fuzzing/transportparameters Fuzz transportparameter_fuzzer
|
||||||
compile_go_fuzzer github.com/quic-go/quic-go/fuzzing/tokens Fuzz token_fuzzer
|
compile_go_fuzzer github.com/refraction-networking/uquic/fuzzing/tokens Fuzz token_fuzzer
|
||||||
compile_go_fuzzer github.com/quic-go/quic-go/fuzzing/handshake Fuzz handshake_fuzzer
|
compile_go_fuzzer github.com/refraction-networking/uquic/fuzzing/handshake Fuzz handshake_fuzzer
|
||||||
|
|
48
.github/workflows/clusterfuzz-lite-pr.yml
vendored
48
.github/workflows/clusterfuzz-lite-pr.yml
vendored
|
@ -1,48 +0,0 @@
|
||||||
name: ClusterFuzzLite PR fuzzing
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- '**'
|
|
||||||
|
|
||||||
permissions: read-all
|
|
||||||
jobs:
|
|
||||||
PR:
|
|
||||||
runs-on: ${{ fromJSON(vars['CLUSTERFUZZ_LITE_RUNNER_UBUNTU'] || '"ubuntu-latest"') }}
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ matrix.sanitizer }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
sanitizer:
|
|
||||||
- address
|
|
||||||
steps:
|
|
||||||
- name: Build Fuzzers (${{ matrix.sanitizer }})
|
|
||||||
id: build
|
|
||||||
uses: google/clusterfuzzlite/actions/build_fuzzers@v1
|
|
||||||
with:
|
|
||||||
language: go
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
sanitizer: ${{ matrix.sanitizer }}
|
|
||||||
# Optional but recommended: used to only run fuzzers that are affected
|
|
||||||
# by the PR.
|
|
||||||
# See later section on "Git repo for storage".
|
|
||||||
# storage-repo: https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/OWNER/STORAGE-REPO-NAME.git
|
|
||||||
# storage-repo-branch: main # Optional. Defaults to "main"
|
|
||||||
# storage-repo-branch-coverage: gh-pages # Optional. Defaults to "gh-pages".
|
|
||||||
- name: Run Fuzzers (${{ matrix.sanitizer }})
|
|
||||||
id: run
|
|
||||||
uses: google/clusterfuzzlite/actions/run_fuzzers@v1
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
fuzz-seconds: 480
|
|
||||||
mode: 'code-change'
|
|
||||||
sanitizer: ${{ matrix.sanitizer }}
|
|
||||||
output-sarif: true
|
|
||||||
parallel-fuzzing: true
|
|
||||||
# Optional but recommended: used to download the corpus produced by
|
|
||||||
# batch fuzzing.
|
|
||||||
# See later section on "Git repo for storage".
|
|
||||||
# storage-repo: https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/OWNER/STORAGE-REPO-NAME.git
|
|
||||||
# storage-repo-branch: main # Optional. Defaults to "main"
|
|
||||||
# storage-repo-branch-coverage: gh-pages # Optional. Defaults to "gh-pages".
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/quic-go/quic-go"
|
quic "github.com/refraction-networking/uquic"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Error is returned from the round tripper (for HTTP clients)
|
// Error is returned from the round tripper (for HTTP clients)
|
||||||
|
|
|
@ -3,10 +3,9 @@ package http3
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"github.com/quic-go/quic-go"
|
|
||||||
|
|
||||||
. "github.com/onsi/ginkgo/v2"
|
. "github.com/onsi/ginkgo/v2"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
quic "github.com/refraction-networking/uquic"
|
||||||
)
|
)
|
||||||
|
|
||||||
var _ = Describe("HTTP/3 errors", func() {
|
var _ = Describe("HTTP/3 errors", func() {
|
||||||
|
|
|
@ -3,9 +3,9 @@ package ackhandler
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/quic-go/quic-go/internal/protocol"
|
"github.com/refraction-networking/uquic/internal/protocol"
|
||||||
"github.com/quic-go/quic-go/internal/utils"
|
"github.com/refraction-networking/uquic/internal/utils"
|
||||||
"github.com/quic-go/quic-go/logging"
|
"github.com/refraction-networking/uquic/logging"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ecnState uint8
|
type ecnState uint8
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package ackhandler
|
package ackhandler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
mocklogging "github.com/quic-go/quic-go/internal/mocks/logging"
|
mocklogging "github.com/refraction-networking/uquic/internal/mocks/logging"
|
||||||
"github.com/quic-go/quic-go/internal/protocol"
|
"github.com/refraction-networking/uquic/internal/protocol"
|
||||||
"github.com/quic-go/quic-go/internal/utils"
|
"github.com/refraction-networking/uquic/internal/utils"
|
||||||
"github.com/quic-go/quic-go/logging"
|
"github.com/refraction-networking/uquic/logging"
|
||||||
|
|
||||||
. "github.com/onsi/ginkgo/v2"
|
. "github.com/onsi/ginkgo/v2"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: github.com/quic-go/quic-go/internal/ackhandler (interfaces: ECNHandler)
|
// Source: github.com/refraction-networking/uquic/internal/ackhandler (interfaces: ECNHandler)
|
||||||
//
|
//
|
||||||
// Generated by this command:
|
// Generated by this command:
|
||||||
//
|
//
|
||||||
// mockgen -build_flags=-tags=gomock -package ackhandler -destination mock_ecn_handler_test.go github.com/quic-go/quic-go/internal/ackhandler ECNHandler
|
// mockgen -build_flags=-tags=gomock -package ackhandler -destination mock_ecn_handler_test.go github.com/refraction-networking/uquic/internal/ackhandler ECNHandler
|
||||||
//
|
//
|
||||||
// Package ackhandler is a generated GoMock package.
|
// Package ackhandler is a generated GoMock package.
|
||||||
package ackhandler
|
package ackhandler
|
||||||
|
@ -11,7 +11,7 @@ package ackhandler
|
||||||
import (
|
import (
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
|
|
||||||
protocol "github.com/quic-go/quic-go/internal/protocol"
|
protocol "github.com/refraction-networking/uquic/internal/protocol"
|
||||||
gomock "go.uber.org/mock/gomock"
|
gomock "go.uber.org/mock/gomock"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -5,5 +5,5 @@ package ackhandler
|
||||||
//go:generate sh -c "go run go.uber.org/mock/mockgen -build_flags=\"-tags=gomock\" -package ackhandler -destination mock_sent_packet_tracker_test.go github.com/refraction-networking/uquic/internal/ackhandler SentPacketTracker"
|
//go:generate sh -c "go run go.uber.org/mock/mockgen -build_flags=\"-tags=gomock\" -package ackhandler -destination mock_sent_packet_tracker_test.go github.com/refraction-networking/uquic/internal/ackhandler SentPacketTracker"
|
||||||
type SentPacketTracker = sentPacketTracker
|
type SentPacketTracker = sentPacketTracker
|
||||||
|
|
||||||
//go:generate sh -c "go run go.uber.org/mock/mockgen -build_flags=\"-tags=gomock\" -package ackhandler -destination mock_ecn_handler_test.go github.com/quic-go/quic-go/internal/ackhandler ECNHandler"
|
//go:generate sh -c "go run go.uber.org/mock/mockgen -build_flags=\"-tags=gomock\" -package ackhandler -destination mock_ecn_handler_test.go github.com/refraction-networking/uquic/internal/ackhandler ECNHandler"
|
||||||
type ECNHandler = ecnHandler
|
type ECNHandler = ecnHandler
|
||||||
|
|
|
@ -12,11 +12,12 @@ func NewUAckHandler(
|
||||||
initialMaxDatagramSize protocol.ByteCount,
|
initialMaxDatagramSize protocol.ByteCount,
|
||||||
rttStats *utils.RTTStats,
|
rttStats *utils.RTTStats,
|
||||||
clientAddressValidated bool,
|
clientAddressValidated bool,
|
||||||
|
enableECN bool,
|
||||||
pers protocol.Perspective,
|
pers protocol.Perspective,
|
||||||
tracer logging.ConnectionTracer,
|
tracer *logging.ConnectionTracer,
|
||||||
logger utils.Logger,
|
logger utils.Logger,
|
||||||
) (SentPacketHandler, ReceivedPacketHandler) {
|
) (SentPacketHandler, ReceivedPacketHandler) {
|
||||||
sph := newSentPacketHandler(initialPacketNumber, initialMaxDatagramSize, rttStats, clientAddressValidated, pers, tracer, logger)
|
sph := newSentPacketHandler(initialPacketNumber, initialMaxDatagramSize, rttStats, clientAddressValidated, enableECN, pers, tracer, logger)
|
||||||
return &uSentPacketHandler{
|
return &uSentPacketHandler{
|
||||||
sentPacketHandler: sph,
|
sentPacketHandler: sph,
|
||||||
}, newReceivedPacketHandler(sph, rttStats, logger)
|
}, newReceivedPacketHandler(sph, rttStats, logger)
|
||||||
|
|
|
@ -34,7 +34,7 @@ type uCryptoSetup struct {
|
||||||
|
|
||||||
rttStats *utils.RTTStats
|
rttStats *utils.RTTStats
|
||||||
|
|
||||||
tracer logging.ConnectionTracer
|
tracer *logging.ConnectionTracer
|
||||||
logger utils.Logger
|
logger utils.Logger
|
||||||
|
|
||||||
perspective protocol.Perspective
|
perspective protocol.Perspective
|
||||||
|
@ -69,7 +69,7 @@ func NewUCryptoSetupClient(
|
||||||
tlsConf *tls.Config,
|
tlsConf *tls.Config,
|
||||||
enable0RTT bool,
|
enable0RTT bool,
|
||||||
rttStats *utils.RTTStats,
|
rttStats *utils.RTTStats,
|
||||||
tracer logging.ConnectionTracer,
|
tracer *logging.ConnectionTracer,
|
||||||
logger utils.Logger,
|
logger utils.Logger,
|
||||||
version protocol.VersionNumber,
|
version protocol.VersionNumber,
|
||||||
chs *tls.ClientHelloSpec,
|
chs *tls.ClientHelloSpec,
|
||||||
|
@ -100,7 +100,7 @@ func newUCryptoSetup(
|
||||||
connID protocol.ConnectionID,
|
connID protocol.ConnectionID,
|
||||||
tp *wire.TransportParameters,
|
tp *wire.TransportParameters,
|
||||||
rttStats *utils.RTTStats,
|
rttStats *utils.RTTStats,
|
||||||
tracer logging.ConnectionTracer,
|
tracer *logging.ConnectionTracer,
|
||||||
logger utils.Logger,
|
logger utils.Logger,
|
||||||
perspective protocol.Perspective,
|
perspective protocol.Perspective,
|
||||||
version protocol.VersionNumber,
|
version protocol.VersionNumber,
|
||||||
|
|
|
@ -6,17 +6,17 @@ import (
|
||||||
"net"
|
"net"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/quic-go/quic-go/logging"
|
"github.com/refraction-networking/uquic/logging"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:generate sh -c "go run go.uber.org/mock/mockgen -build_flags=\"-tags=gomock\" -package internal -destination internal/tracer.go github.com/quic-go/quic-go/internal/mocks/logging Tracer"
|
//go:generate sh -c "go run go.uber.org/mock/mockgen -build_flags=\"-tags=gomock\" -package internal -destination internal/tracer.go github.com/refraction-networking/uquic/internal/mocks/logging Tracer"
|
||||||
type Tracer interface {
|
type Tracer interface {
|
||||||
SentPacket(net.Addr, *logging.Header, logging.ByteCount, []logging.Frame)
|
SentPacket(net.Addr, *logging.Header, logging.ByteCount, []logging.Frame)
|
||||||
SentVersionNegotiationPacket(_ net.Addr, dest, src logging.ArbitraryLenConnectionID, _ []logging.VersionNumber)
|
SentVersionNegotiationPacket(_ net.Addr, dest, src logging.ArbitraryLenConnectionID, _ []logging.VersionNumber)
|
||||||
DroppedPacket(net.Addr, logging.PacketType, logging.ByteCount, logging.PacketDropReason)
|
DroppedPacket(net.Addr, logging.PacketType, logging.ByteCount, logging.PacketDropReason)
|
||||||
}
|
}
|
||||||
|
|
||||||
//go:generate sh -c "go run go.uber.org/mock/mockgen -build_flags=\"-tags=gomock\" -package internal -destination internal/connection_tracer.go github.com/quic-go/quic-go/internal/mocks/logging ConnectionTracer"
|
//go:generate sh -c "go run go.uber.org/mock/mockgen -build_flags=\"-tags=gomock\" -package internal -destination internal/connection_tracer.go github.com/refraction-networking/uquic/internal/mocks/logging ConnectionTracer"
|
||||||
type ConnectionTracer interface {
|
type ConnectionTracer interface {
|
||||||
StartedConnection(local, remote net.Addr, srcConnID, destConnID logging.ConnectionID)
|
StartedConnection(local, remote net.Addr, srcConnID, destConnID logging.ConnectionID)
|
||||||
NegotiatedVersion(chosen logging.VersionNumber, clientVersions, serverVersions []logging.VersionNumber)
|
NegotiatedVersion(chosen logging.VersionNumber, clientVersions, serverVersions []logging.VersionNumber)
|
||||||
|
|
|
@ -82,7 +82,7 @@ var _ = Describe("Log", func() {
|
||||||
DefaultLogger.Infof("info")
|
DefaultLogger.Infof("info")
|
||||||
t, err := time.Parse(format, b.String()[:b.Len()-6])
|
t, err := time.Parse(format, b.String()[:b.Len()-6])
|
||||||
Expect(err).ToNot(HaveOccurred())
|
Expect(err).ToNot(HaveOccurred())
|
||||||
Expect(t).To(BeTemporally("~", time.Now(), 25*time.Hour))
|
Expect(t).To(BeTemporally("~", time.Now(), 48*time.Hour))
|
||||||
})
|
})
|
||||||
|
|
||||||
It("says whether debug is enabled", func() {
|
It("says whether debug is enabled", func() {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
//
|
//
|
||||||
// Generated by this command:
|
// Generated by this command:
|
||||||
//
|
//
|
||||||
// mockgen -package quic -self_package github.com/quic-go/quic-go -source sys_conn_oob.go -destination mock_batch_conn_test.go -mock_names batchConn=MockBatchConn
|
// mockgen -package quic -self_package github.com/refraction-networking/uquic -source sys_conn_oob.go -destination mock_batch_conn_test.go -mock_names batchConn=MockBatchConn
|
||||||
//
|
//
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
//
|
//
|
||||||
// Generated by this command:
|
// Generated by this command:
|
||||||
//
|
//
|
||||||
// mockgen -package quic -self_package github.com/quic-go/quic-go -self_package github.com/quic-go/quic-go -destination mock_packetconn_test.go net PacketConn
|
// mockgen -package quic -self_package github.com/refraction-networking/uquic -self_package github.com/refraction-networking/uquic -destination mock_packetconn_test.go net PacketConn
|
||||||
//
|
//
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
// Code generated by MockGen. DO NOT EDIT.
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
// Source: github.com/quic-go/quic-go (interfaces: RawConn)
|
// Source: github.com/refraction-networking/uquic (interfaces: RawConn)
|
||||||
//
|
//
|
||||||
// Generated by this command:
|
// Generated by this command:
|
||||||
//
|
//
|
||||||
// mockgen -build_flags=-tags=gomock -package quic -self_package github.com/quic-go/quic-go -destination mock_raw_conn_test.go github.com/quic-go/quic-go RawConn
|
// mockgen -build_flags=-tags=gomock -package quic -self_package github.com/refraction-networking/uquic -destination mock_raw_conn_test.go github.com/refraction-networking/uquic RawConn
|
||||||
//
|
//
|
||||||
// Package quic is a generated GoMock package.
|
// Package quic is a generated GoMock package.
|
||||||
package quic
|
package quic
|
||||||
|
@ -13,7 +13,7 @@ import (
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
time "time"
|
time "time"
|
||||||
|
|
||||||
protocol "github.com/quic-go/quic-go/internal/protocol"
|
protocol "github.com/refraction-networking/uquic/internal/protocol"
|
||||||
gomock "go.uber.org/mock/gomock"
|
gomock "go.uber.org/mock/gomock"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ var newUClientConnection = func(
|
||||||
initialPacketNumber protocol.PacketNumber,
|
initialPacketNumber protocol.PacketNumber,
|
||||||
enable0RTT bool,
|
enable0RTT bool,
|
||||||
hasNegotiatedVersion bool,
|
hasNegotiatedVersion bool,
|
||||||
tracer logging.ConnectionTracer,
|
tracer *logging.ConnectionTracer,
|
||||||
tracingID uint64,
|
tracingID uint64,
|
||||||
logger utils.Logger,
|
logger utils.Logger,
|
||||||
v protocol.VersionNumber,
|
v protocol.VersionNumber,
|
||||||
|
@ -67,11 +67,12 @@ var newUClientConnection = func(
|
||||||
)
|
)
|
||||||
s.preSetup()
|
s.preSetup()
|
||||||
s.ctx, s.ctxCancel = context.WithCancelCause(context.WithValue(context.Background(), ConnectionTracingKey, tracingID))
|
s.ctx, s.ctxCancel = context.WithCancelCause(context.WithValue(context.Background(), ConnectionTracingKey, tracingID))
|
||||||
s.sentPacketHandler, s.receivedPacketHandler = ackhandler.NewUAckHandler( // [UQUIC]
|
s.sentPacketHandler, s.receivedPacketHandler = ackhandler.NewUAckHandler(
|
||||||
initialPacketNumber,
|
initialPacketNumber,
|
||||||
getMaxPacketSize(s.conn.RemoteAddr()),
|
getMaxPacketSize(s.conn.RemoteAddr()),
|
||||||
s.rttStats,
|
s.rttStats,
|
||||||
false, /* has no effect */
|
false, // has no effect
|
||||||
|
s.conn.capabilities().ECN,
|
||||||
s.perspective,
|
s.perspective,
|
||||||
s.tracer,
|
s.tracer,
|
||||||
s.logger,
|
s.logger,
|
||||||
|
@ -82,7 +83,7 @@ var newUClientConnection = func(
|
||||||
}
|
}
|
||||||
|
|
||||||
s.mtuDiscoverer = newMTUDiscoverer(s.rttStats, getMaxPacketSize(s.conn.RemoteAddr()), s.sentPacketHandler.SetMaxDatagramSize)
|
s.mtuDiscoverer = newMTUDiscoverer(s.rttStats, getMaxPacketSize(s.conn.RemoteAddr()), s.sentPacketHandler.SetMaxDatagramSize)
|
||||||
oneRTTStream := newCryptoStream(true)
|
oneRTTStream := newCryptoStream()
|
||||||
|
|
||||||
var params *wire.TransportParameters
|
var params *wire.TransportParameters
|
||||||
|
|
||||||
|
@ -134,8 +135,7 @@ var newUClientConnection = func(
|
||||||
params.MaxDatagramFrameSize = protocol.InvalidByteCount
|
params.MaxDatagramFrameSize = protocol.InvalidByteCount
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if s.tracer != nil && s.tracer.SentTransportParameters != nil {
|
||||||
if s.tracer != nil {
|
|
||||||
s.tracer.SentTransportParameters(params)
|
s.tracer.SentTransportParameters(params)
|
||||||
}
|
}
|
||||||
cs := handshake.NewUCryptoSetupClient(
|
cs := handshake.NewUCryptoSetupClient(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue