Skip to content

Commit 15fe088

Browse files
Merge branch 'master' into fix/GOMOD-silently-ignored
2 parents fb311d8 + 3dac914 commit 15fe088

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/net/netip/netip.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func AddrFrom4(addr [4]byte) Addr {
9090
}
9191

9292
// AddrFrom16 returns the IPv6 address given by the bytes in addr.
93-
// An IPv6-mapped IPv4 address is left as an IPv6 address.
93+
// An IPv4-mapped IPv6 address is left as an IPv6 address.
9494
// (Use Unmap to convert them if needed.)
9595
func AddrFrom16(addr [16]byte) Addr {
9696
return Addr{
@@ -675,7 +675,7 @@ const (
675675
)
676676

677677
// As16 returns the IP address in its 16-byte representation.
678-
// IPv4 addresses are returned in their v6-mapped form.
678+
// IPv4 addresses are returned in their IPv4-mapped IPv6 form.
679679
// IPv6 addresses with zones are returned without their zone (use the
680680
// Zone method to get it).
681681
// The ip zero value returns all zeroes.
@@ -1340,7 +1340,7 @@ func (p Prefix) Masked() Prefix {
13401340
// Contains reports whether the network p includes ip.
13411341
//
13421342
// An IPv4 address will not match an IPv6 prefix.
1343-
// A v6-mapped IPv6 address will not match an IPv4 prefix.
1343+
// An IPv4-mapped IPv6 address will not match an IPv4 prefix.
13441344
// A zero-value IP will not match any prefix.
13451345
// If ip has an IPv6 zone, Contains returns false,
13461346
// because Prefixes strip zones.
@@ -1372,8 +1372,8 @@ func (p Prefix) Contains(ip Addr) bool {
13721372
// Overlaps reports whether p and o contain any IP addresses in common.
13731373
//
13741374
// If p and o are of different address families or either have a zero
1375-
// IP, it reports false. Like the Contains method, a prefix with a
1376-
// v6-mapped IPv4 IP is still treated as an IPv6 mask.
1375+
// IP, it reports false. Like the Contains method, a prefix with an
1376+
// IPv4-mapped IPv6 IP is still treated as an IPv6 mask.
13771377
func (p Prefix) Overlaps(o Prefix) bool {
13781378
if !p.IsValid() || !o.IsValid() {
13791379
return false

src/net/netip/netip_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1776,7 +1776,7 @@ func TestPrefixOverlaps(t *testing.T) {
17761776
{pfx("1::1/128"), pfx("2::2/128"), false},
17771777
{pfx("0100::0/8"), pfx("::1/128"), false},
17781778

1779-
// v6-mapped v4 should not overlap with IPv4.
1779+
// IPv4-mapped IPv6 should not overlap with IPv4.
17801780
{PrefixFrom(AddrFrom16(mustIP("1.2.0.0").As16()), 16), pfx("1.2.3.0/24"), false},
17811781

17821782
// Invalid prefixes

0 commit comments

Comments
 (0)