vendor: github.com/ishidawataru/sctp v0.0.0-20230406120618-7ff4192f6ff2
- Prevent from descriptor leak - Fixes optlen in getsockopt() for s390x full diff:9a39160e90...7ff4192f6f
Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit893d28469f
) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
cdb6200887
commit
9277e64444
4 changed files with 9 additions and 5 deletions
|
@ -46,7 +46,7 @@ require (
|
|||
github.com/hashicorp/memberlist v0.4.0
|
||||
github.com/hashicorp/serf v0.8.5
|
||||
github.com/imdario/mergo v0.3.12
|
||||
github.com/ishidawataru/sctp v0.0.0-20210707070123-9a39160e9062
|
||||
github.com/ishidawataru/sctp v0.0.0-20230406120618-7ff4192f6ff2
|
||||
github.com/klauspost/compress v1.15.12
|
||||
github.com/miekg/dns v1.1.43
|
||||
github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible
|
||||
|
|
|
@ -644,8 +644,8 @@ github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH
|
|||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc=
|
||||
github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
|
||||
github.com/ishidawataru/sctp v0.0.0-20210707070123-9a39160e9062 h1:G1+wBT0dwjIrBdLy0MIG0i+E4CQxEnedHXdauJEIH6g=
|
||||
github.com/ishidawataru/sctp v0.0.0-20210707070123-9a39160e9062/go.mod h1:co9pwDoBCm1kGxawmb4sPq0cSIOOWNPT4KnHotMP1Zg=
|
||||
github.com/ishidawataru/sctp v0.0.0-20230406120618-7ff4192f6ff2 h1:i2fYnDurfLlJH8AyyMOnkLHnHeP8Ff/DDpuZA/D3bPo=
|
||||
github.com/ishidawataru/sctp v0.0.0-20230406120618-7ff4192f6ff2/go.mod h1:co9pwDoBCm1kGxawmb4sPq0cSIOOWNPT4KnHotMP1Zg=
|
||||
github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA=
|
||||
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||
github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
|
||||
|
|
6
vendor/github.com/ishidawataru/sctp/sctp_linux.go
generated
vendored
6
vendor/github.com/ishidawataru/sctp/sctp_linux.go
generated
vendored
|
@ -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
|
||||
}
|
||||
|
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
|
@ -459,7 +459,7 @@ github.com/imdario/mergo
|
|||
# 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/jmespath/go-jmespath v0.4.0
|
||||
|
|
Loading…
Reference in a new issue