fix application bug
This commit is contained in:
5
vendor/golang.org/x/net/ipv4/payload_cmsg.go
generated
vendored
5
vendor/golang.org/x/net/ipv4/payload_cmsg.go
generated
vendored
@@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
|
||||
|
||||
package ipv4
|
||||
|
||||
@@ -49,6 +49,9 @@ func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.
|
||||
return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: errInvalidConnType}
|
||||
}
|
||||
if m.NN > 0 {
|
||||
if compatFreeBSD32 {
|
||||
adjustFreeBSD32(&m)
|
||||
}
|
||||
cm = new(ControlMessage)
|
||||
if err := cm.Parse(m.OOB[:m.NN]); err != nil {
|
||||
return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
|
||||
|
||||
Reference in New Issue
Block a user