diff options
author | Sebastiaan van Stijn <github@gone.nl> | 2023-04-08 22:34:51 +0200 |
---|---|---|
committer | Sebastiaan van Stijn <github@gone.nl> | 2023-04-08 22:34:51 +0200 |
commit | 893d28469f873a8b44d428b67046bcea2b600fd9 (patch) | |
tree | aa9b05e88884d74daeef8ef5aa609ecf6c003b48 /vendor | |
parent | dd3b71d17c614f837c4bba18baed9fa2cb31f1a4 (diff) | |
download | docker-893d28469f873a8b44d428b67046bcea2b600fd9.tar.gz |
vendor: github.com/ishidawataru/sctp v0.0.0-20230406120618-7ff4192f6ff2
- Prevent from descriptor leak
- Fixes optlen in getsockopt() for s390x
full diff: https://github.com/ishidawataru/sctp/compare/9a39160e9062...7ff4192f6ff2b4b181ec7dce269bdf4076ff90a0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'vendor')
-rw-r--r-- | vendor/github.com/ishidawataru/sctp/sctp_linux.go | 6 | ||||
-rw-r--r-- | vendor/modules.txt | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/vendor/github.com/ishidawataru/sctp/sctp_linux.go b/vendor/github.com/ishidawataru/sctp/sctp_linux.go index d96d09e5ca..e11d012cff 100644 --- a/vendor/github.com/ishidawataru/sctp/sctp_linux.go +++ b/vendor/github.com/ishidawataru/sctp/sctp_linux.go @@ -22,6 +22,7 @@ import ( "sync/atomic" "syscall" "unsafe" + "runtime" ) func setsockopt(fd int, optname, optval, optlen uintptr) (uintptr, uintptr, error) { @@ -40,6 +41,9 @@ func setsockopt(fd int, optname, optval, optlen uintptr) (uintptr, uintptr, erro } func getsockopt(fd int, optname, optval, optlen uintptr) (uintptr, uintptr, error) { + if runtime.GOARCH == "s390x" { + optlen = uintptr(unsafe.Pointer(&optlen)) + } // FIXME: syscall.SYS_GETSOCKOPT is undefined on 386 r0, r1, errno := syscall.Syscall6(syscall.SYS_GETSOCKOPT, uintptr(fd), @@ -292,7 +296,7 @@ func dialSCTPExtConfig(network string, laddr, raddr *SCTPAddr, options InitMsg, laddr.IPAddrs = append(laddr.IPAddrs, net.IPAddr{IP: net.IPv6zero}) } } - err := SCTPBind(sock, laddr, SCTP_BINDX_ADD_ADDR) + err = SCTPBind(sock, laddr, SCTP_BINDX_ADD_ADDR) if err != nil { return nil, err } diff --git a/vendor/modules.txt b/vendor/modules.txt index 7adca5fd11..5801b3cfd7 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -552,7 +552,7 @@ github.com/in-toto/in-toto-golang/in_toto/slsa_provenance/v0.2 # github.com/inconshreveable/mousetrap v1.0.1 ## explicit; go 1.18 github.com/inconshreveable/mousetrap -# github.com/ishidawataru/sctp v0.0.0-20210707070123-9a39160e9062 +# github.com/ishidawataru/sctp v0.0.0-20230406120618-7ff4192f6ff2 ## explicit; go 1.12 github.com/ishidawataru/sctp # github.com/klauspost/compress v1.16.3 |