30 Commits

Author SHA1 Message Date
Nick Figgins
3b31286d86 ipv4,ipv6: remove unneeded deadlines added for flaky tests
Deadlines were added in https://go.dev/cl/21360043, but these are
unneeded as the tests will fail anyways as a result of the timeout.
This prevents these timeouts from causing further test flakes.

Fixes #58955

Change-Id: I76ebf7452bf326a09f1a7665d362fe68f345a4be
GitHub-Last-Rev: 9ca732a5ea
GitHub-Pull-Request: golang/net#172
Reviewed-on: https://go-review.googlesource.com/c/net/+/492620
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: WANG Xuerui <git@xen0n.name>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
2023-05-16 21:31:51 +00:00
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
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
Tamir Duberstein
dbdefad45b ipv4: refactor multicast tests to use subtests
- Improve error discipline
- Narrow test types from net.UDPAddr to net.IPAddr where possible

Change-Id: I6c403ae69685ac3f35e427f56027fe4a29fde540
Reviewed-on: https://go-review.googlesource.com/c/net/+/260679
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
2020-10-09 03:24:41 +00:00
Tobias Klauser
3b0461eec8 internal/socket, ipv4, ipv6: add support for GOOS=illumos
Treat it like GOOS=solaris for now.

Change-Id: I2b99427e80058f6c7308fe3752de21610457a3ba
Reviewed-on: https://go-review.googlesource.com/c/net/+/183277
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2019-06-20 20:02:07 +00:00
chigotc
c98bf442cc ipv4: add port for aix/ppc64
Change-Id: Ida9aed579c9a33883dadfef094c30a658edce88e
Reviewed-on: https://go-review.googlesource.com/c/net/+/170558
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:24 +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
7949ac6f08 ipv4: skip tests on aix, fuchsia and hurd
Also marks test helper functions.

Change-Id: I3417885fb81c8ab27cdfbe80c83270b94b878862
Reviewed-on: https://go-review.googlesource.com/c/net/+/167339
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:01:53 +00:00
Mikio Hara
4721d2d970 ipv4: don't fail test on JS
Change-Id: Ie3df352e1b59b7035bdf50a5b06feb3d1859de2a
Reviewed-on: https://go-review.googlesource.com/121556
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:19 +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
c8c327cf36 ipv4: add support for solaris
This change adds support for Solaris.

To read and write IPv4 ancillary data using ControlMessage, ipv4 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 IP_RECVTTL option for ICMP transport.

Fixes golang/go#17323.

Change-Id: Icb6dfa3c8eced28d14693ddfea4601301999d735
Reviewed-on: https://go-review.googlesource.com/30175
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:48:57 +00:00
Mikio Hara
09f95eed15 ipv4: simplify log message format
This change replaces the existing log format separated by commas and
spaces with space-separated one.

Also removes unnecessary log output in test.

Change-Id: I1bf2b8c463db9174b2ac562533cdd89b72ed39de
Reviewed-on: https://go-review.googlesource.com/16322
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-12-03 09:12:53 +00:00
Mikio Hara
200fa7c741 ipv4: remove unnecessary double quotations from test messages
Change-Id: If1243dd2d79824933d896a8c4b31db8c247d0c21
Reviewed-on: https://go-review.googlesource.com/3561
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-30 07:58:29 +00:00
Mikio Hara
99928beb6b ipv4: make use of nettest.SupportsRawIPSocket
Change-Id: I12b41d16b49415081242e06b25a7106a4a0c0442
Reviewed-on: https://go-review.googlesource.com/3402
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2015-01-29 21:56:33 +00:00
Mikio Hara
e50142f87f x/net/ipv4: use new import path for icmp
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/183030043
2014-12-03 12:33:13 +09:00
Mikio Hara
c25a4f3082 x/net/ipv4: fix full stack test cases
Readjusts ICMP test cases on older darwin kernels
Also simplifies error logs.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/178740043
2014-11-16 11:30:27 +09:00
Mikio Hara
a33e90a7ec x/net/ipv4: add support for source-specific multicast
This CL introduces methods for the manipulation of source-specifc
group into both PacketConn and RawConn as follows:

JoinSourceSpecificGroup(*net.Interface, net.Addr, net.Addr) error
LeaveSourceSpecificGroup(*net.Interface, net.Addr, net.Addr) error
ExcludeSourceSpecificGroup(*net.Interface, net.Addr, net.Addr) error
IncludeSourceSpecificGroup(*net.Interface, net.Addr, net.Addr) error

Fixes golang/go#8266.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/174030043
2014-11-13 17:23:46 +09:00
Mikio Hara
405a8afa2d x/net/ipv4: make use of nettest.ProtocolNotSupported
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/164640043
2014-11-10 09:49:06 +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
d3b1e66114 go.net/ipv4: disable full stack tests on nacl, solaris
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/165150043
2014-10-30 14:15:42 +09:00
Mikio Hara
818061097b go.net/ipv4: skip ancillary data socket option tests on non-supported kernels
It seems that old darwin kernels don't handle IP_RECVIF, IP_RECVDSTADDR correctly.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/158030043
2014-10-24 09:39:27 +09:00
Mikio Hara
68e5815bee go.net/ipv4: fix ancillary data socket option tests on old darwin
Looks like their UDP stacks don't support ancillary data socket options.

LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/153330043
2014-10-12 03:43:47 +09:00
Mikio Hara
2c60c92f6b go.net/ipv4: make use of internal/nettest package
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/155950043
2014-10-08 06:54:30 +09:00
Mikio Hara
e5dac17b9b go.net/ipv4: make use of internal/{iana,icmp} packages
LGTM=iant
R=iant
CC=golang-codereviews
https://golang.org/cl/154880043
2014-10-07 06:35:16 +09:00
Mikio Hara
8ecd624185 go.net/ipv4: fix flaky test cases
Fixes golang/go#5709.
Fixes golang/go#5811.

LGTM=dave
R=dave
CC=golang-codereviews
https://golang.org/cl/21360043
2014-04-27 19:26:58 +09:00
Mikio Hara
8108b4b39d go.net/ipv4: drop DIffServ and ECN constants, add ICMPType
This CL removes DiffServ and ECN constants assigned by IANA because
for now we don't have an appropriate package to put those constants
as part of API. There were used for the type-of-service field of IPv4
header and the traffic class field of IPv6 header.

Also adds ICMPType for convenience, makes use of internal IANA
protocol number constants instead of syscall's to prevent churning of
package syscall in the near future.

R=dave
CC=golang-dev
https://golang.org/cl/9353045
2013-06-07 14:52:58 +09:00
Mikio Hara
413497eef8 go.net/ipv4: use testing.Skip{,f}
R=bradfitz, dave
CC=bradfitz, gobot, golang-dev, rsc
https://golang.org/cl/7194047
2013-04-04 14:37:01 +09:00
Mikio Hara
6b91bf25ed go.net/ipv4: fix sprious lookahead on IPConn-based PacketConn
Also improves test coverage for both payload and datagram I/O.

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/7304091
2013-02-16 13:02:07 +09:00
Mikio Hara
d2e5a1215d go.net/ipv4: new package
Package ipv4 implements IP-level socket options for the Internet
Protocol version 4. It also provides raw IP socket access methods
including IPv4 header manipulation.

Fixes golang/go#3684.
Fixes golang/go#3820.

This CL requires CL 6426047;
net: add read, write message methods to IPConn, UDPConn

R=rsc, dave, alex.brainman
CC=gobot, golang-dev
https://golang.org/cl/6482044
2012-09-26 21:03:09 +09:00