All the dropped platforms either don't support raw sockets or the tests
pass sucessfully (e.g. ipv4.TestPacketConnReadWriteMulticastICMP on
solaris), so the tests can rely on being skipped due to
!nettest.SupportsRawSocket().
Also check for errNotImplemented to cover cases where functionality is
not available on windows.
Change-Id: Ic9107a7ca16e9d9faed4991e1148b493c646ea7d
Reviewed-on: https://go-review.googlesource.com/c/net/+/489155
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
This ports CL 402059 to the non-concurrent UDP and ICMP variants of
the test.
(It isn't obvious to me whether the ENOBUFS retry loop is strictly
needed for the ICMP variants, but I'm getting kind of tired of porting
this CL to different tests and would rather minimize the number of
times it has to be done again. 😩)
Fixesgolang/go#53402.
Change-Id: I8dc385fbce121c364efafd988ccf08eebe3fef28
Reviewed-on: https://go-review.googlesource.com/c/net/+/416556
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
This change is sheer speculation based on the failures observed in
golang/go#37319.
(A deadlock in the test prevented us from seeing the actual failure
mode of golang/go#51342 up until CL 387915, and it isn't obvious to me
that we should wait for another failure before trying a likely — and
otherwise harmless — fix.)
This is a port of CL 376095 to the "ipv4" package.
Fixesgolang/go#51342.
(Maybe.)
Change-Id: Idd6d2d785dbb0c98404f99bd98a3c4ddc11cb2cf
Reviewed-on: https://go-review.googlesource.com/c/net/+/387916
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Use the socket option constants defined in the golang.org/x/sys/unix
package instead of duplicating them in this package.
Note that for now, sysIP_RECVDSTADDR, sysIP_RECVIF and sysIP_RECVTTL
still need to be defined because they are used in code shared with other
platforms.
Change-Id: Icd77a4ab16019fec259030b26a8c7ee9ac8d3e6f
Reviewed-on: https://go-review.googlesource.com/c/net/+/304369
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Use the socket option constants defined in the golang.org/x/sys/unix
package instead of duplicating them in this package.
Note that for now, sysIP_RECVDSTADDR, sysIP_RECVIF and sysIP_RECVTTL
still need to be defined because they are used in code shared with other
platforms.
Change-Id: I2b3b8621108c9399f1d36bab97c65fd349fa0839
Reviewed-on: https://go-review.googlesource.com/c/net/+/304712
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Use the socket option constants defined in the golang.org/x/sys/unix
package instead of duplicating them in this package.
Note that for now, sysIP_RECVDSTADDR, sysIP_RECVIF, sysIP_RECVTTL and
sysIP_PKTINFO still need to be defined because they are used in code
shared with other platforms.
Change-Id: I900ac4460d350d5d8959d34db339831657b7e03f
Reviewed-on: https://go-review.googlesource.com/c/net/+/304711
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Use the socket option constants defined in the golang.org/x/sys/unix
package instead of duplicating them in this package.
Note that for now, sysIP_RECVDSTADDR, sysIP_RECVIF and sysIP_RECVTTL
still need to be defined because they are used in code shared with other
platforms.
Change-Id: I6a6b39e94ec123889c08b55bc469ad51107399cb
Reviewed-on: https://go-review.googlesource.com/c/net/+/304710
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Use the socket option constants defined in the golang.org/x/sys/unix
package instead of duplicating them in this package.
Note that for now, sysIP_RECVDSTADDR, sysIP_RECVIF and sysIP_RECVTTL
still need to be defined because they are used in code shared with other
platforms.
Change-Id: Ic937ccbc0a554c8dd6e0b9f36b1601ba86f62f5f
Reviewed-on: https://go-review.googlesource.com/c/net/+/304709
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Use the socket option constants defined in the golang.org/x/sys/unix
package instead of duplicating them in this package.
Note that for now, sysIP_PKTINFO and sysIP_RECVTTL are still needed
because they are used in code shared with other platforms.
Change-Id: Iae627111837a3707fc9079d490d11e34ee3365cf
Reviewed-on: https://go-review.googlesource.com/c/net/+/304330
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Use the socket option constants defined in the golang.org/x/sys/unix
package instead of duplicating them in this package.
Note that for now, sysIP_RECVDSTADDR, sysIP_RECVIF, sysIP_RECVTTL and
sysIP_PKTINFO still need to be defined because they are used in code
shared with other platforms.
Change-Id: I9bb953dc72dea19e9e9d84dc641346fe95bad070
Reviewed-on: https://go-review.googlesource.com/c/net/+/303909
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This fixes the mips{,64}{,le} builders failing the bpf-related
tests and also avoids duplicating these consts/types across packages.
Fixesgolang/go#35669
Change-Id: I1ea96817464e3040e8cc00bff63c168fa5e75a71
Reviewed-on: https://go-review.googlesource.com/c/net/+/207286
Reviewed-by: Ian Lance Taylor <iant@golang.org>
On FreeBSD 11.3 or 12 kernel running COMPAT_FREEBSD32, it looks like the
system call recvmsg always returns an incorrect length for the
out-of-band data. This change adjusts the length when it looks incorrect
and the running kernel is FreeBSD 11.3 or above.
Fixesgolang/go#30899.
Change-Id: Ia58d8b4bd4caf3783d2e38161ee4afd1a64ca522
Reviewed-on: https://go-review.googlesource.com/c/net/+/168297
Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
On FreeBSD 12 kernel running COMPAT_FREEBSD32, it looks like the system
call recvmsg always returns an incorrect length for the out-of-band
data. This change adjusts the length when it looks incorrect.
Fixesgolang/go#30899.
Change-Id: Ibb0cbcf9b1f5f959279c20395916d47bd75d289c
Reviewed-on: https://go-review.googlesource.com/c/net/+/168077
Reviewed-by: Ian Lance Taylor <iant@golang.org>