diff --git a/src/bosh-dns/go.mod b/src/bosh-dns/go.mod index 7ae304184..fa44337f9 100644 --- a/src/bosh-dns/go.mod +++ b/src/bosh-dns/go.mod @@ -49,7 +49,7 @@ require ( github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.60.1 // indirect github.com/prometheus/procfs v0.15.1 // indirect - github.com/quic-go/quic-go v0.48.1 // indirect + github.com/quic-go/quic-go v0.48.2 // indirect go.uber.org/mock v0.5.0 // indirect golang.org/x/crypto v0.29.0 // indirect golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect diff --git a/src/bosh-dns/go.sum b/src/bosh-dns/go.sum index 06028dd0f..3f96ce21a 100644 --- a/src/bosh-dns/go.sum +++ b/src/bosh-dns/go.sum @@ -94,8 +94,8 @@ github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPA github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= -github.com/quic-go/quic-go v0.48.1 h1:y/8xmfWI9qmGTc+lBr4jKRUWLGSlSigv847ULJ4hYXA= -github.com/quic-go/quic-go v0.48.1/go.mod h1:yBgs3rWBOADpga7F+jJsb6Ybg1LSYiQvwWlLX+/6HMs= +github.com/quic-go/quic-go v0.48.2 h1:wsKXZPeGWpMpCGSWqOcqpW2wZYic/8T3aqiOID0/KWE= +github.com/quic-go/quic-go v0.48.2/go.mod h1:yBgs3rWBOADpga7F+jJsb6Ybg1LSYiQvwWlLX+/6HMs= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= diff --git a/src/bosh-dns/vendor/github.com/quic-go/quic-go/closed_conn.go b/src/bosh-dns/vendor/github.com/quic-go/quic-go/closed_conn.go index 833385327..6486ea65e 100644 --- a/src/bosh-dns/vendor/github.com/quic-go/quic-go/closed_conn.go +++ b/src/bosh-dns/vendor/github.com/quic-go/quic-go/closed_conn.go @@ -3,6 +3,7 @@ package quic import ( "math/bits" "net" + "sync/atomic" "github.com/quic-go/quic-go/internal/utils" ) @@ -11,7 +12,7 @@ import ( // When receiving packets for such a connection, we need to retransmit the packet containing the CONNECTION_CLOSE frame, // with an exponential backoff. type closedLocalConn struct { - counter uint32 + counter atomic.Uint32 logger utils.Logger sendPacket func(net.Addr, packetInfo) @@ -28,13 +29,13 @@ func newClosedLocalConn(sendPacket func(net.Addr, packetInfo), logger utils.Logg } func (c *closedLocalConn) handlePacket(p receivedPacket) { - c.counter++ + n := c.counter.Add(1) // exponential backoff // only send a CONNECTION_CLOSE for the 1st, 2nd, 4th, 8th, 16th, ... packet arriving - if bits.OnesCount32(c.counter) != 1 { + if bits.OnesCount32(n) != 1 { return } - c.logger.Debugf("Received %d packets after sending CONNECTION_CLOSE. Retransmitting.", c.counter) + c.logger.Debugf("Received %d packets after sending CONNECTION_CLOSE. Retransmitting.", n) c.sendPacket(p.remoteAddr, p.info) } diff --git a/src/bosh-dns/vendor/github.com/quic-go/quic-go/connection.go b/src/bosh-dns/vendor/github.com/quic-go/quic-go/connection.go index 1411a77b7..4390f5ca8 100644 --- a/src/bosh-dns/vendor/github.com/quic-go/quic-go/connection.go +++ b/src/bosh-dns/vendor/github.com/quic-go/quic-go/connection.go @@ -689,7 +689,7 @@ func (s *connection) nextIdleTimeoutTime() time.Time { // Time when the next keep-alive packet should be sent. // It returns a zero time if no keep-alive should be sent. func (s *connection) nextKeepAliveTime() time.Time { - if s.config.KeepAlivePeriod == 0 || s.keepAlivePingSent || !s.firstAckElicitingPacketAfterIdleSentTime.IsZero() { + if s.config.KeepAlivePeriod == 0 || s.keepAlivePingSent { return time.Time{} } keepAliveInterval := max(s.keepAliveInterval, s.rttStats.PTO(true)*3/2) diff --git a/src/bosh-dns/vendor/github.com/quic-go/quic-go/sys_conn_df_linux.go b/src/bosh-dns/vendor/github.com/quic-go/quic-go/sys_conn_df_linux.go index f09eaa5df..b09a2394e 100644 --- a/src/bosh-dns/vendor/github.com/quic-go/quic-go/sys_conn_df_linux.go +++ b/src/bosh-dns/vendor/github.com/quic-go/quic-go/sys_conn_df_linux.go @@ -16,8 +16,8 @@ func setDF(rawConn syscall.RawConn) (bool, error) { // and the datagram will not be fragmented var errDFIPv4, errDFIPv6 error if err := rawConn.Control(func(fd uintptr) { - errDFIPv4 = unix.SetsockoptInt(int(fd), unix.IPPROTO_IP, unix.IP_MTU_DISCOVER, unix.IP_PMTUDISC_DO) - errDFIPv6 = unix.SetsockoptInt(int(fd), unix.IPPROTO_IPV6, unix.IPV6_MTU_DISCOVER, unix.IPV6_PMTUDISC_DO) + errDFIPv4 = unix.SetsockoptInt(int(fd), unix.IPPROTO_IP, unix.IP_MTU_DISCOVER, unix.IP_PMTUDISC_PROBE) + errDFIPv6 = unix.SetsockoptInt(int(fd), unix.IPPROTO_IPV6, unix.IPV6_MTU_DISCOVER, unix.IPV6_PMTUDISC_PROBE) }); err != nil { return false, err } diff --git a/src/bosh-dns/vendor/modules.txt b/src/bosh-dns/vendor/modules.txt index c4d7aaedd..2b96ebd35 100644 --- a/src/bosh-dns/vendor/modules.txt +++ b/src/bosh-dns/vendor/modules.txt @@ -205,7 +205,7 @@ github.com/prometheus/common/model github.com/prometheus/procfs github.com/prometheus/procfs/internal/fs github.com/prometheus/procfs/internal/util -# github.com/quic-go/quic-go v0.48.1 +# github.com/quic-go/quic-go v0.48.2 ## explicit; go 1.22 github.com/quic-go/quic-go github.com/quic-go/quic-go/internal/ackhandler