diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 6789e7c56..6e059d3a1 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/setup-go@v5 with: cache: false - go-version: '1.21' + go-version: '1.20' - name: golangci-lint uses: golangci/golangci-lint-action@v4 with: @@ -46,7 +46,7 @@ jobs: strategy: fail-fast: false matrix: - go-version: ["1.20", "1.21"] + go-version: ["1.20"] steps: - name: Checkout uses: actions/checkout@v4 diff --git a/go.mod b/go.mod index 63502227a..3c76dcc48 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/ansible/receptor -go 1.21 +go 1.20 require ( github.com/creack/pty v1.1.21 @@ -15,7 +15,7 @@ require ( github.com/minio/highwayhash v1.0.2 github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 github.com/prep/socketpair v0.0.0-20171228153254-c2c6a7f821c2 - github.com/quic-go/quic-go v0.40.1 + github.com/quic-go/quic-go v0.34.0 github.com/rogpeppe/go-internal v1.12.0 github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8 github.com/vishvananda/netlink v1.1.0 @@ -52,6 +52,7 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect github.com/onsi/ginkgo/v2 v2.13.2 // indirect + github.com/quic-go/qtls-go1-19 v0.3.2 // indirect github.com/quic-go/qtls-go1-20 v0.4.1 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/vishvananda/netns v0.0.4 // indirect diff --git a/go.sum b/go.sum index 681af0e60..9b59b922b 100644 --- a/go.sum +++ b/go.sum @@ -98,8 +98,12 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prep/socketpair v0.0.0-20171228153254-c2c6a7f821c2 h1:vzKDZ0uNPcOdITzZT5d4Tn2YOalCMqIhYzVNq/oRjlw= github.com/prep/socketpair v0.0.0-20171228153254-c2c6a7f821c2/go.mod h1:E/IaW35yb7xPACTLciISfz5w+jqPwmnXwDdmilSl/Nc= +github.com/quic-go/qtls-go1-19 v0.3.2 h1:tFxjCFcTQzK+oMxG6Zcvp4Dq8dx4yD3dDiIiyc86Z5U= +github.com/quic-go/qtls-go1-19 v0.3.2/go.mod h1:ySOI96ew8lnoKPtSqx2BlI5wCpUVPT05RMAlajtnyOI= github.com/quic-go/qtls-go1-20 v0.4.1 h1:D33340mCNDAIKBqXuAvexTNMUByrYmFYVfKfDN5nfFs= github.com/quic-go/qtls-go1-20 v0.4.1/go.mod h1:X9Nh97ZL80Z+bX/gUXMbipO6OxdiDi58b/fMC9mAL+k= +github.com/quic-go/quic-go v0.34.0 h1:OvOJ9LFjTySgwOTYUZmNoq0FzVicP8YujpV0kB7m2lU= +github.com/quic-go/quic-go v0.34.0/go.mod h1:+4CVgVppm0FNjpG3UcX8Joi/frKOH7/ciD5yGcwOO1g= github.com/quic-go/quic-go v0.40.1 h1:X3AGzUNFs0jVuO3esAGnTfvdgvL4fq655WaOi1snv1Q= github.com/quic-go/quic-go v0.40.1/go.mod h1:PeN7kuVJ4xZbxSv/4OX6S1USOX8MJvydwpTx31vx60c= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= diff --git a/pkg/netceptor/conn.go b/pkg/netceptor/conn.go index 4784684b7..29cc5e666 100644 --- a/pkg/netceptor/conn.go +++ b/pkg/netceptor/conn.go @@ -37,7 +37,7 @@ type acceptResult struct { type Listener struct { s *Netceptor pc PacketConner - ql *quic.Listener + ql quic.Listener acceptChan chan *acceptResult doneChan chan struct{} doneOnce *sync.Once @@ -305,7 +305,7 @@ func (s *Netceptor) DialContext(ctx context.Context, node string, service string _ = pc.Close() }) } - cctx, ccancel := context.WithTimeout(ctx, 15*time.Second) + cctx, ccancel := context.WithCancel(ctx) go func() { select { case <-okChan: @@ -319,7 +319,7 @@ func (s *Netceptor) DialContext(ctx context.Context, node string, service string doneChan := make(chan struct{}, 1) go monitorUnreachable(pc, doneChan, rAddr, ccancel) _ = os.Setenv("QUIC_GO_DISABLE_RECEIVE_BUFFER_WARNING", "1") - qc, err := quic.Dial(cctx, pc, rAddr, tlscfg, cfg) + qc, err := quic.DialContext(cctx, pc, rAddr, s.nodeID, tlscfg, cfg) if err != nil { close(okChan) pcClose()