aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/net/ipv4/helper.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/net/ipv4/helper.go')
-rw-r--r--vendor/golang.org/x/net/ipv4/helper.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/vendor/golang.org/x/net/ipv4/helper.go b/vendor/golang.org/x/net/ipv4/helper.go
index a4457d6..b494a2c 100644
--- a/vendor/golang.org/x/net/ipv4/helper.go
+++ b/vendor/golang.org/x/net/ipv4/helper.go
@@ -24,14 +24,15 @@ var (
24 errNoSuchMulticastInterface = errors.New("no such multicast interface") 24 errNoSuchMulticastInterface = errors.New("no such multicast interface")
25 errNotImplemented = errors.New("not implemented on " + runtime.GOOS + "/" + runtime.GOARCH) 25 errNotImplemented = errors.New("not implemented on " + runtime.GOOS + "/" + runtime.GOARCH)
26 26
27 // See http://www.freebsd.org/doc/en/books/porters-handbook/freebsd-versions.html. 27 // See https://www.freebsd.org/doc/en/books/porters-handbook/versions.html.
28 freebsdVersion uint32 28 freebsdVersion uint32
29 compatFreeBSD32 bool // 386 emulation on amd64 29 compatFreeBSD32 bool // 386 emulation on amd64
30) 30)
31 31
32// See golang.org/issue/30899. 32// See golang.org/issue/30899.
33func adjustFreeBSD32(m *socket.Message) { 33func adjustFreeBSD32(m *socket.Message) {
34 if freebsdVersion >= 1103000 { 34 // FreeBSD 12.0-RELEASE is affected by https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236737
35 if 1200086 <= freebsdVersion && freebsdVersion < 1201000 {
35 l := (m.NN + 4 - 1) &^ (4 - 1) 36 l := (m.NN + 4 - 1) &^ (4 - 1)
36 if m.NN < l && l <= len(m.OOB) { 37 if m.NN < l && l <= len(m.OOB) {
37 m.NN = l 38 m.NN = l