0

Обновлены завендоренные зависимости

This commit is contained in:
eleksir
2022-11-26 12:29:29 +03:00
parent eb71029cd5
commit f94136938f
5 changed files with 22 additions and 111 deletions

View File

@@ -52,6 +52,20 @@ func ParseSocketControlMessage(b []byte) ([]SocketControlMessage, error) {
return msgs, nil
}
// ParseOneSocketControlMessage parses a single socket control message from b, returning the message header,
// message data (a slice of b), and the remainder of b after that single message.
// When there are no remaining messages, len(remainder) == 0.
func ParseOneSocketControlMessage(b []byte) (hdr Cmsghdr, data []byte, remainder []byte, err error) {
h, dbuf, err := socketControlMessageHeaderAndData(b)
if err != nil {
return Cmsghdr{}, nil, nil, err
}
if i := cmsgAlignOf(int(h.Len)); i < len(b) {
remainder = b[i:]
}
return *h, dbuf, remainder, nil
}
func socketControlMessageHeaderAndData(b []byte) (*Cmsghdr, []byte, error) {
h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
if h.Len < SizeofCmsghdr || uint64(h.Len) > uint64(len(b)) {

View File

@@ -1554,6 +1554,7 @@ func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Sockle
var iova [1]Iovec
iova[0].Base = &dummy
iova[0].SetLen(1)
iov = iova[:]
}
}
msg.Control = &oob[0]

6
vendor/modules.txt vendored
View File

@@ -17,14 +17,10 @@ github.com/go-redis/redis/v8/internal/util
# github.com/hjson/hjson-go v3.3.0+incompatible
## explicit
github.com/hjson/hjson-go
# github.com/onsi/ginkgo v1.16.5
## explicit; go 1.16
# github.com/onsi/gomega v1.18.1
## explicit; go 1.16
# github.com/sirupsen/logrus v1.9.0
## explicit; go 1.13
github.com/sirupsen/logrus
# golang.org/x/sys v0.1.0
# golang.org/x/sys v0.2.0
## explicit; go 1.17
golang.org/x/sys/internal/unsafeheader
golang.org/x/sys/unix