mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-28 13:49:58 +00:00
TUN-4961: Update quic-go to latest
- Updates fips-go to be the latest on cfsetup.yaml - Updates sumtype's x/tools to be latest to avoid Internal: nil pkg errors with fips.
This commit is contained in:
16
vendor/github.com/lucas-clemente/quic-go/conn_windows.go
generated
vendored
16
vendor/github.com/lucas-clemente/quic-go/conn_windows.go
generated
vendored
@@ -11,7 +11,21 @@ import (
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
func newConn(c net.PacketConn) (connection, error) {
|
||||
const IP_DONTFRAGMENT = 14
|
||||
|
||||
func newConn(c OOBCapablePacketConn) (connection, error) {
|
||||
rawConn, err := c.SyscallConn()
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("couldn't get syscall.RawConn: %w", err)
|
||||
}
|
||||
if err := rawConn.Control(func(fd uintptr) {
|
||||
// This should succeed if the connection is a IPv4 or a dual-stack connection.
|
||||
// It will fail for IPv6 connections.
|
||||
// TODO: properly handle error.
|
||||
_ = windows.SetsockoptInt(windows.Handle(fd), windows.IPPROTO_IP, IP_DONTFRAGMENT, 1)
|
||||
}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &basicConn{PacketConn: c}, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user