25 Commits

Author SHA1 Message Date
Tobias Klauser
0bfab66a03 ipv4, ipv6: drop redundant skip checks based on GOOS
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>
2023-04-28 20:20:13 +00:00
Tobias Klauser
938ff153cf ipv4, ipv6, nettest: skip unsupported tests on wasip1
Updates golang/go#58141

Change-Id: Iec7a525633dcc93c8941c9aaaef6e54e6867a8d0
Reviewed-on: https://go-review.googlesource.com/c/net/+/485675
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-04-19 19:08:58 +00:00
Cuong Manh Le
2aa82152a5 nettest: use RoutedInterface for probing network stack capability
The ipv4/ipv6 support capability is done by explicitly listening on
loopback interface. However, it can lead to false positive, especially
for ipv6 case. For example, ipv6 can be enabled, but explicitly disable
for loopback interface (for security, policy ...).

This CL changes probeStack to use another approach, by looking for any
interface that can route IP traffic and in "UP" state. If there's one,
then the platform can do ipv4/ipv6 networking functionality.

Fixes golang/go#57386

Change-Id: If911bc223b52c5a4562d3f61b4ee1032bdbec47c
Reviewed-on: https://go-review.googlesource.com/c/net/+/458096
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: David Chase <drchase@google.com>
2022-12-23 17:16:06 +00:00
Tobias Klauser
df645c7b52 ipv6: enable IPV6_PATHMTU and IPV6_TCLASS tests on darwin/ios
These options are supported on all darwin/ios versions currently
supported by Go.

Change-Id: I4cf1f435889cbbfbfb12321114e3c2e18bb613b2
Reviewed-on: https://go-review.googlesource.com/c/net/+/305350
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>
2021-03-29 18:18:59 +00:00
billofarrell
146b70c837 all: add support for zos/s390x
This adds net support for zos/s390x. These changes should not affect other platforms.

Fixes golang/go#42130

Change-Id: Ia7faa29de76b7c5713120657b296106c2e27bfd2
Reviewed-on: https://go-review.googlesource.com/c/net/+/264028
Run-TryBot: Emmanuel Odeke <emmanuel@orijtech.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Trust: Emmanuel Odeke <emmanuel@orijtech.com>
2020-10-26 09:15:29 +00:00
Cherry Zhang
328152dc79 all: add GOOS=ios
Following CL 254740, this CL does it on x/net.

Updates golang/go#38485.

Change-Id: I80831dd0faa6f216d8d3b8f1af0af811aacce43f
Reviewed-on: https://go-review.googlesource.com/c/net/+/255537
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2020-09-23 18:22:12 +00:00
chigotc
8dbb310b6f ipv6: add port for aix/ppc64
Change-Id: If8e693cc14109f928bc263f8c5744d7ba5a441ab
Reviewed-on: https://go-review.googlesource.com/c/net/+/170559
Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Mikio Hara <mikioh.public.networking@gmail.com>
2019-04-19 01:02:38 +00:00
Mikio Hara
63eda1eb06 all: use of nettest, remove internal/nettest
This change uses the nettest package where possible and removes the
internal/nettest package.

Change-Id: I5615a3ab7957183fecea6b5646df99dbb7c186e2
Reviewed-on: https://go-review.googlesource.com/c/net/+/123057
Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2019-03-27 21:43:58 +00:00
Mikio Hara
9f648a60d9 ipv6: skip tests on aix, fuchsia and hurd
Also marks test helper functions.

Change-Id: I1baf791b6d4199699db20834fa6e1a3bd0733cf0
Reviewed-on: https://go-review.googlesource.com/c/net/+/167340
Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2019-03-13 22:02:15 +00:00
Mikio Hara
4cb1c02c05 ipv6: don't fail test on JS
Change-Id: I9dd88938ddf23a80bf7ac40292dc55954f51f275
Reviewed-on: https://go-review.googlesource.com/121557
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-06-29 03:53:31 +00:00
Dmitri Shuralyov
5d997795f7 all: make copyright headers consistent with one space after period
Go policy has been single space after periods in comments for some time.

The copyright header template at:

	https://golang.org/doc/contribute.html#copyright

also uses a single space.

Make them all consistent.

This CL was generated with:

	perl -i -npe 's,^(// Copyright [0-9]+ The Go Authors\.)  (All rights reserved\.)$,$1 $2,' $(git grep -l -E '^// Copyright [0-9]+ The Go Authors\.  All rights reserved\.$')

Follows https://golang.org/cl/20111.

Change-Id: I66671dddf821f5dc027bc254e0196b3e3a2bdf3b
Reviewed-on: https://go-review.googlesource.com/32878
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-11-07 23:52:11 +00:00
Mikio Hara
a7769702ac ipv6: add support for solaris
This change adds support for Solaris.

To read and write IPv6 ancillary data using ControlMessage, ipv6 pacakge
requires https://go-review.googlesource.com/30171/

Note: Unlike other platforms, Solaris seems to have a few restrictions
on ICMP property access via raw IP sockets. At least applications are
prohibited from using IPV6_CHECKSUM option for ICMP transport.

Fixes golang/go#17324.

Change-Id: Ie014665d94ae6e4955c95d3eea88db90332e20bd
Reviewed-on: https://go-review.googlesource.com/30176
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-10-06 03:49:20 +00:00
Mikio Hara
9dd48c277b ipv6: remove unnecessary double quotations from test messages
Change-Id: I1d91ddf7fb4eebd4782f0621446ec2820d132788
Reviewed-on: https://go-review.googlesource.com/3562
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-30 07:59:18 +00:00
Mikio Hara
1439fec228 ipv6: make use of nettest.SupportsRawIPSocket
Change-Id: I3cf716c9ae02d7daa0d5a11249c3b58f6c8be2fe
Reviewed-on: https://go-review.googlesource.com/3403
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-29 21:55:09 +00:00
Mikio Hara
ed45f19369 x/net/ipv6: fix using wrong constant in test
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/174480043
2014-11-22 11:16:20 +09:00
Mikio Hara
9f8bef6b59 x/net/ipv6: replace a magic number with an iana constant
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/179930043
2014-11-20 06:39:03 +09:00
Mikio Hara
dd7a4b48bb x.net/ipv6: fix path mtu test on older darwin kernels
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/173290043
2014-11-17 06:57:00 +09:00
Mikio Hara
b56b609928 x/net/ipv6: fix full stack test cases
Readjusts Traffic Class and ICMP test cases on older darwin kernels,
per-interface link-local address multicasting and loopback interface
required test cases on BSD variants.
Also simplifies error logs.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/177790043
2014-11-16 11:31:00 +09:00
Mikio Hara
b1772d9247 x/net/ipv6: disable full stack tests on nacl
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/172900043
2014-11-10 09:47:55 +09:00
Andrew Gerrand
fbe893ddcd go.net: use golang.org/x/... import paths
LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/167030043
2014-11-10 09:04:43 +11:00
Mikio Hara
77ebfc57e4 go.net/ipv6: make use of internal/{iana,icmp,nettest} packages
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/168210043
2014-11-09 20:14:20 +09:00
Mikio Hara
9704df9680 go.net/ipv6: add support for dragonfly
Update golang/go#7174

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/91770049
2014-04-27 22:30:08 +09:00
Mikio Hara
0cda728e61 go.net/ipv6: fix build on dragonfly, plan9, solaris
R=golang-codereviews, aram, r, 0intro
CC=golang-codereviews
https://golang.org/cl/54350043
2014-01-23 06:36:22 +01:00
Mikio Hara
a46af89e38 go.net/ipv6: disable tests on non-ipv6 kernels
R=dave, capnm9
CC=golang-dev
https://golang.org/cl/10051046
2013-06-06 17:12:18 +09:00
Mikio Hara
cdfc4ce106 go.net/ipv6: new package
Package ipv6 implements IP-level socket options for the Internet
Protocol version 6. It also provides datagram based network I/O
methods specific to the IPv6 and higher layer protocols.

Fixes golang/go#5538.

R=dave
CC=golang-dev
https://golang.org/cl/9843044
2013-06-04 17:42:58 +09:00