aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/net/ipv4/packet.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/net/ipv4/packet.go')
-rw-r--r--vendor/golang.org/x/net/ipv4/packet.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/vendor/golang.org/x/net/ipv4/packet.go b/vendor/golang.org/x/net/ipv4/packet.go
index f00f5b0..966bb77 100644
--- a/vendor/golang.org/x/net/ipv4/packet.go
+++ b/vendor/golang.org/x/net/ipv4/packet.go
@@ -6,7 +6,6 @@ package ipv4
import (
"net"
- "syscall"
"golang.org/x/net/internal/socket"
)
@@ -28,7 +27,7 @@ func (c *packetHandler) ok() bool { return c != nil && c.IPConn != nil && c.Conn
// header h, the payload p and the control message cm.
func (c *packetHandler) ReadFrom(b []byte) (h *Header, p []byte, cm *ControlMessage, err error) {
if !c.ok() {
- return nil, nil, nil, syscall.EINVAL
+ return nil, nil, nil, errInvalidConn
}
return c.readFrom(b)
}
@@ -63,7 +62,7 @@ func slicePacket(b []byte) (h, p []byte, err error) {
// Options = optional
func (c *packetHandler) WriteTo(h *Header, p []byte, cm *ControlMessage) error {
if !c.ok() {
- return syscall.EINVAL
+ return errInvalidConn
}
return c.writeTo(h, p, cm)
}