summaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/net/ipv4/batch.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/net/ipv4/batch.go')
-rw-r--r--vendor/golang.org/x/net/ipv4/batch.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/vendor/golang.org/x/net/ipv4/batch.go b/vendor/golang.org/x/net/ipv4/batch.go
index 5ce9b3583c..1a3a4fc0c1 100644
--- a/vendor/golang.org/x/net/ipv4/batch.go
+++ b/vendor/golang.org/x/net/ipv4/batch.go
@@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build go1.9
-
package ipv4
import (
@@ -91,6 +89,9 @@ func (c *payloadHandler) ReadBatch(ms []Message, flags int) (int, error) {
n = 0
err = &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
}
+ if compatFreeBSD32 && ms[0].NN > 0 {
+ adjustFreeBSD32(&ms[0])
+ }
return n, err
}
}
@@ -154,6 +155,9 @@ func (c *packetHandler) ReadBatch(ms []Message, flags int) (int, error) {
n = 0
err = &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
}
+ if compatFreeBSD32 && ms[0].NN > 0 {
+ adjustFreeBSD32(&ms[0])
+ }
return n, err
}
}