Commit Graph

170 Commits

Author SHA1 Message Date
Bryan C. Mills
eba003a116 ipv6: in PacketConn tests, retry writes that fail with ENOBUFS
In golang/go#37319, TestPacketConnReadWriteMulticastUDP was observed
to occasionally fail with ENOBUFS on macOS.

This change adds a retry loop for that test function. There are some
other related test functions that may also wrap sendmsg, but I have
not observed any ENOBUFS failures for them — I suspect that some
difference in protocol or traffic class prevents this failure mode,
but we can always add more retry loops if we discover that they are
actually needed.

Fixes golang/go#37319.

Change-Id: I99fce94ff10c6f3c09d493712eba782ec8707a58
Reviewed-on: https://go-review.googlesource.com/c/net/+/369742
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>
2021-12-06 22:34:03 +00:00
Bryan C. Mills
266e24b1e4 ipv6: remove arbitrary deadlines from tests
These deadlines were added back in CL 21080043, apparently in an
attempt to increase code coverage numbers. However, nothing in the
tests actually exercises the deadline logic: the tests would pass even
if these methods were no-ops. Their only apparent effect is to make
the tests flaky on slower builders, and to destroy goroutine traces
if the test should ever happen to deadlock.

Updates golang/go#42064
For golang/go#37319

Change-Id: I530a8f3cb80d6d93d1625bc88f0ec7958d4ec35e
Reviewed-on: https://go-review.googlesource.com/c/net/+/366181
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>
2021-12-06 22:32:45 +00:00
Ian Lance Taylor
fe8b969b2d ipv6: OpenBSD does not appear to support multicast loopback
Skip the tests for it, as we already skip them on FreeBSD.

Fixes golang/go#42064

Change-Id: I058f25309020367e686625033b4f25cb614c7f99
Reviewed-on: https://go-review.googlesource.com/c/net/+/366355
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2021-11-23 20:29:08 +00:00
Tobias Klauser
798c2154c5 ipv6: use all socket option consts from x/sys/unix
Remove the remaining local definitions of various socket option
constants and use the constants defined in the golang.org/x/sys/unix
package instead.

Change-Id: I110cf984e2bac5bf48d6e6489fd6da8ab7b13b10
Reviewed-on: https://go-review.googlesource.com/c/net/+/311749
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-04-20 21:01:06 +00:00
Tobias Klauser
0fccb6fa2b ipv6: use socket option consts from x/sys/unix on netbsd, openbsd and dragonfly
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, sysIPV6_TCLASS, sysIPV6_PATHMTU, sysIPV6_PKTINFO,
sysIPV6_HOPLIMIT and sysIPV6_NEXTHOP still need to be defined because
they are used in code shared with other platforms.

Change-Id: I40896c6c191aade35e3f9f1fb1a624f772e7479a
Reviewed-on: https://go-review.googlesource.com/c/net/+/306071
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2021-03-31 21:22:08 +00:00
Tobias Klauser
cb1fcc7394 ipv6: use socket option consts from x/sys/unix on freebsd
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, sysIPV6_TCLASS, sysIPV6_PATHMTU, sysIPV6_PKTINFO,
sysIPV6_HOPLIMIT and sysIPV6_NEXTHOP still need to be defined because
they are used in code shared with other platforms.

Change-Id: I5de2fa26dea61b0de94cbe48575c1d842c973ff5
Reviewed-on: https://go-review.googlesource.com/c/net/+/306070
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
2021-03-31 06:09:03 +00:00
Tobias Klauser
22f4162a90 ipv6: use socket option consts from x/sys/unix on aix
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, sysIPV6_TCLASS, sysIPV6_PATHMTU, sysIPV6_PKTINFO,
sysIPV6_HOPLIMIT and sysIPV6_NEXTHOP still need to be defined because
they are used in code shared with other platforms.

Change-Id: Ide4f882ca57661bba0fb88de55375ee36a412deb
Reviewed-on: https://go-review.googlesource.com/c/net/+/305589
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-30 07:57:24 +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
Tobias Klauser
db2394d137 ipv6: use socket option consts from x/sys/unix on darwin
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, sysIPV6_TCLASS, sysIPV6_PATHMTU, sysIPV6_PKTINFO,
sysIPV6_HOPLIMIT and sysIPV6_NEXTHOP still need to be defined because
they are used in code shared with other platforms.

Change-Id: I03b539ef23899b395fa9bc082f28e0299e47c9c8
Reviewed-on: https://go-review.googlesource.com/c/net/+/305349
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:48 +00:00
Tobias Klauser
53308faee3 ipv6: use socket option consts from x/sys/unix on linux
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, sysIPV6_TCLASS, sysIPV6_PATHMTU, sysIPV6_PKTINFO,
sysIPV6_HOPLIMIT and sysIPV6_NEXTHOP still need to be defined because
they are used in code shared with other platforms.

Change-Id: Iba40f51959c4c0e61557322d00c4621b783cd8c0
Reviewed-on: https://go-review.googlesource.com/c/net/+/305389
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:31 +00:00
Tobias Klauser
d523dce5a7 ipv4, ipv6: use IP_* socket option constants from x/sys/windows
Use the IP_* socket option constants defined in the
golang.org/x/sys/windows package instead of defining them locally.

Change-Id: Ie6e79b7984795c409a01bd57134090bb720ea4b3
Reviewed-on: https://go-review.googlesource.com/c/net/+/301810
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-03-16 09:26:52 +00:00
Russ Cox
5f55cee0dc all: go fmt ./...
Make all our package sources use Go 1.17 gofmt format
(adding //go:build lines).

Not strictly necessary but will avoid spurious changes
as files are edited.

Part of //go:build change (#41184).
See https://golang.org/design/draft-gobuild

Change-Id: I5b2b7d93424e828a3c5f76ae3f30ab825aca388e
Reviewed-on: https://go-review.googlesource.com/c/net/+/294371
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2021-02-20 03:31:24 +00:00
Tobias Klauser
5f4716e947 ipv6: skip known-failing tests on openbsd-{arm,arm64,mips64}-jsing builders
The arm64 and mips64 builder run OpenBSD 6.8:

openbsd-arm64-jsing:
OpenBSD gopher-arm64.sing.id.au 6.8 GENERIC.MP#2 arm64

openbsd-mips64-jsing:
OS: OpenBSD er4.sing.id.au 6.8 GENERIC.MP#0 octeon

The openbsd-arm-jsing builder was offline but according to
https://github.com/golang/go/issues/25498#issuecomment-636295933
it's running at least OpenBSD 6.7. Assuming that this version is
affected as well (or the builder was upgraded to 6.8 in the meantime),
skip TestPacketConnReadWriteMulticastUDP on this builder as well.

For golang/go#11811.
Updates golang/go#42064.

Change-Id: Ia9919057bfc2a69b8884228508ae919ce9d624e9
Reviewed-on: https://go-review.googlesource.com/c/net/+/283752
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Joel Sing <joel@sing.id.au>
2021-01-19 19:43:25 +00:00
Dmitri Shuralyov
6772e930b6 ipv6: skip known-failing tests on OpenBSD 6.8 builders
These tests are known to be failing on OpenBSD 6.8 and need
investigation. The OpenBSD 6.8 builders are default TryBots
now, so skip them to prevent people working on other packages
from constantly getting a failure.

Issue 42064 remains open to do the work of determining if the
ipv6 package needs to be fixed, or if OpenBSD 6.8 has a problem
and the test can be permanently skipped as unsupported.

For golang/go#11811.
Updates golang/go#42064.
Updates golang/go#35712.

Change-Id: I59883384e4dbce679cb1a4e8e2c3f0fa7983010b
Reviewed-on: https://go-review.googlesource.com/c/net/+/280052
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
Trust: Dmitri Shuralyov <dmitshur@golang.org>
2020-12-24 01:40:10 +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
Tobias Klauser
f229aea8fa ipv4, ipv6: remove or move unused err* vars
errNoSuchInterface is only used in ipv4/sys_asmreq.go which is not built
e.g. on Linux, so move it there.

Change-Id: I18b2e2ec8f321db3df164dcc6a69b8c92e6ab68c
Reviewed-on: https://go-review.googlesource.com/c/net/+/220097
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2020-02-19 18:36:38 +00:00
Tobias Klauser
fc4aabc6c9 ipv4, ipv6: use SockFprog definitions from x/sys/unix
This fixes the mips{,64}{,le} builders failing the bpf-related
tests and also avoids duplicating these consts/types across packages.

Fixes golang/go#35669

Change-Id: I1ea96817464e3040e8cc00bff63c168fa5e75a71
Reviewed-on: https://go-review.googlesource.com/c/net/+/207286
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-11-19 07:31:36 +00:00
Dmitri Goutnik
83d349e8ac ipv4, ipv6: add support for freebsd/arm64
Updates golang/go#35183

Change-Id: I3d820a1638526197ca7b5e622f6f6f1317141f7b
Reviewed-on: https://go-review.googlesource.com/c/net/+/203518
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2019-10-27 09:30:00 +00:00
Tobias Klauser
ec77196f60 ipv6: re-enable tests on Dragonfly
Now that golang.org/x/net was re-vendored into std, these tests should
pass again.

Updates golang/go#34368

Change-Id: I6f253896836fb18d46875a9420de58ca05a49646
Reviewed-on: https://go-review.googlesource.com/c/net/+/202457
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-10-21 14:45:47 +00:00
Tobias Klauser
24d2ffbea1 all: fix tests on dragonfly after ABI changes
Detect the ABI version based on kern.osreldate.

Only use 32-bit cmsg alignment for versions before the September 2019
ABI changes:
http://lists.dragonflybsd.org/pipermail/users/2019-September/358280.html

Use RTM_VERSION 7 on Dragonfly master (5.8 release).

Determine sizeof struct ifa_msghdr at runtime based on the ABI version.

Temporarily skip some test relying on the net package which will only be
fixed once this CL is re-vendored into std.

Updates golang/go#34368

Change-Id: I732fab21d569b303f45dfb6a0bbbb11469511a07
Reviewed-on: https://go-review.googlesource.com/c/net/+/202317
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-10-21 12:47:07 +00:00
Antonio Huete Jimenez
c5a3c61f89 all: adjust defs for Dragonfly BSD
- DragonFly BSD removed RTM_OLDADD and RTM_OLDDEL
  constants on Aug 4th, 2017 and are now gone in both master
  branch and RELEASE 5.6. It also removed IPV6_IPSEC_POLICY
  constant since IPSEC was removed from base and kernel.

Change-Id: I99fbdfcb95fb276374f7b2dbd5fa30fe3f30f709
GitHub-Last-Rev: 1f27a0e26e
GitHub-Pull-Request: golang/net#54
Reviewed-on: https://go-review.googlesource.com/c/net/+/197599
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
Run-TryBot: Benny Siegert <bsiegert@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-09-30 13:41:27 +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
Tobias Klauser
d28f0bde59 all: follow convention for generated code comment
Follow the convertion (https://golang.org/s/generatedcode) for generated
code.

Change-Id: I3101fb91db42644ead179ffaeffe0211359ac886
Reviewed-on: https://go-review.googlesource.com/c/net/+/182137
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-06-13 19:41:53 +00:00
CarlosEDP
018c4d40a1 ipv4, ipv6, internal/socket: add riscv64 support
Updates golang/go#27532

Change-Id: I64285280680e5d1d3903c352454f2c67cc653c88
GitHub-Last-Rev: 3747f61487
GitHub-Pull-Request: golang/net#43
Reviewed-on: https://go-review.googlesource.com/c/net/+/177997
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
2019-05-20 21:01:07 +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
1d742bf2a5 ipv6: replace errOpNoSupport with errNotImplemented
Change-Id: I1d5c364421a6ba30c43f88ef4f333c7ea02a3bd4
Reviewed-on: https://go-review.googlesource.com/c/net/+/167338
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 21:54:59 +00:00
Mikio Hara
c10a0554ea ipv6: drop support for go1.8 or below
Change-Id: I9f4108283333eb56aad429bb6338231459bc2bbf
Reviewed-on: https://go-review.googlesource.com/c/net/+/162599
Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dave Cheney <dave@cheney.net>
2019-03-10 07:45:41 +00:00
Mikio Hara
617fbc828a ipv6: rename freebsd32o64 with compatFreeBSD32 for consistency
The variable name compatFreeBSD32 refers to the kernel configuration
directive COMPAT_FREEBSD32 and is also used in route and ipv6 packages.

Change-Id: I00e6de390c25b7df45b76e772719a83fa6b0843b
Reviewed-on: https://go-review.googlesource.com/c/149879
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-02-27 02:21:22 +00:00
Mikio Hara
d76a190299 ipv6: make not implemented errors more descriptive
Change-Id: I4710227d104330fa28a563530bd93a3ae8a6c070
Reviewed-on: https://go-review.googlesource.com/c/149877
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-02-27 02:20:43 +00:00
Tobias Klauser
be88a9aa50 ipv4, ipv6: directly initialize ctlOpts and sockOpts
After CL 156597 it's no longer necessary to initialize the ctlOpts and
sockOpts tables in the init func. Instead, just directly initialize them.

Change-Id: I62b4dd980b3cb87e3cbc71ea4874f6512b5cfefa
Reviewed-on: https://go-review.googlesource.com/c/156797
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-01-08 15:08:41 +00:00
Tobias Klauser
45ffb0cd1b ipv4, ipv6: drop support for macOS 10.7 and earlier
Drop the check for macOS 10.7 and earlier. Go 1.11 requires at least
macOS 10.10 and macOS 10.7 is no longer supported by Apple anyhow.

Change-Id: Ie7d9d27e0b9156ea478bf560734f4a85dfa163d6
Reviewed-on: https://go-review.googlesource.com/c/156597
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-01-07 21:02:23 +00:00
Mikio Hara
10aee18199 icmp, ipv4, ipv6: re-adjust build constraints
Also updates package documentation for AIX.

Change-Id: I4809a334f0a4b8f3fb5345749477394b8f3e7546
Reviewed-on: https://go-review.googlesource.com/c/147678
Run-TryBot: Mikio Hara <mikioh.public.networking@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-11-06 06:57:22 +00:00
Mikio Hara
a0f8a16cb0 ipv6: fix a typo
Change-Id: I70c1953d811234a78c88d073ff2a0001fbc9b6bf
Reviewed-on: https://go-review.googlesource.com/126640
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2018-07-30 21:41:32 +00:00
Mikio Hara
4d581e05a3 all: re-adjust build constraints for JS and NaCl
This change fixes the build breakage of h2i on JS and NaCl, and avoids
using unintentional code path on JS.

Change-Id: Ib08f0f6d1d79aecc9bf1e9ee7de52b0a57c22baf
Reviewed-on: https://go-review.googlesource.com/122539
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2018-07-09 03:26:41 +00:00
Mikio Hara
ed29d75add ipv6: drop the use of syscall package in platform-independent code
Change-Id: I001c4b5ffceb97a599da10b21b8df1b1d6740ccc
Reviewed-on: https://go-review.googlesource.com/121883
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-07-02 21:24:46 +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
Mikio Hara
92b859f39a ipv6: update icmp parameters
Updates golang/go#24440.

Change-Id: Idbe22ca853ea4771bb979782ef3bac8b03c59b87
Reviewed-on: https://go-review.googlesource.com/63998
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-03-19 15:14:25 +00:00
Kevin Burke
0ed95abb35 all: use HTTPS for iana.org links
iana.org, www.iana.org and data.iana.org all present a valid TLS
certificate, so let's use it when fetching data to avoid errors in
transit.

Change-Id: I1f295442d24a221fe2b722c4782dceee38b960ec
Reviewed-on: https://go-review.googlesource.com/89415
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-01-24 06:09:56 +00:00
Mikio Hara
9709904288 Revert "ipv6: enable {Read,Write}Batch methods of PacketConn on NetBSD"
This reverts commit a0df083635.

Change-Id: Iec23fd267fd74470dbc827aa6422c6e598b6e86c
Reviewed-on: https://go-review.googlesource.com/82695
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
2017-12-07 22:19:42 +00:00
Mikio Hara
a0df083635 ipv6: enable {Read,Write}Batch methods of PacketConn on NetBSD
Change-Id: I7c88abdd74effca1cd8dd72970f0bee914e82fc2
Reviewed-on: https://go-review.googlesource.com/82457
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-07 21:42:58 +00:00
Mikio Hara
aa7a5b9517 ipv6: update RFC number of IPv6 specification in docs
Change-Id: I38980c8463b7806c129024967713125acf663b82
Reviewed-on: https://go-review.googlesource.com/49791
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-07-19 08:39:41 +00:00
Mikio Hara
570fa1c913 ipv6: simplify tests and benchmarks
Change-Id: I248e5e5215960bceaba357d3d4a6e72191f955b1
Reviewed-on: https://go-review.googlesource.com/47372
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matt Layher <mdlayher@gmail.com>
2017-07-04 09:14:38 +00:00
Mikio Hara
057a25b062 ipv6: report a destination address on write error
Change-Id: I226484f6edb0c299487b87fc0384e478969debdc
Reviewed-on: https://go-review.googlesource.com/46233
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-06-21 08:22:44 +00:00
Mikio Hara
454122b185 ipv6: use socket.NativeEndian
Change-Id: Ia73c7bfff664f91c8a4c97656d0bd9e576145aa4
Reviewed-on: https://go-review.googlesource.com/46230
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-06-21 08:22:14 +00:00
Mikio Hara
e78b1e49ae ipv6: don't crash with corrupted control messages
Change-Id: I39f79ec43c73b2fcc90316713181940ada523150
Reviewed-on: https://go-review.googlesource.com/45114
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-06-09 22:10:46 +00:00
Mikio Hara
59a0b19b55 ipv6: deflake multicast listener tests
Fixes golang/go#20558.

Change-Id: I8813d1eadd40680bd8619bb9a6539a3c45dcd76e
Reviewed-on: https://go-review.googlesource.com/44770
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-06-05 03:37:37 +00:00
Mikio Hara
48359f4f60 ipv6: add {Read,Write}Batch methods to PacketConn
This change provides message IO functionality that may support the
construction of modern datagram transport protocols.

The modern datagram transport protocols on a multihomed node basically
need to control each packet path for traffic engineering by using
information belongs to network- or link-layer implementation. In
addtion, it's desirable to be able to do simultaneous transmission
across multiple network- or link-layer adjacencies wihtout any
additional cost.

The ReadBatch and WriteBatch methods of PacketConn can be used to read
and write an IO message that contains the information of network- or
link-layer implementation, and read and write a batch of IO messages
on Linux. The Marshal and Parse methods of ControlMessage can help to
marshal and parse information contained in IO messages.

Updates golang/go#3661.

Change-Id: I94484e2e135f4969ddf5c2548bf6be0cc16888bf
Reviewed-on: https://go-review.googlesource.com/38276
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2017-05-27 06:02:38 +00:00