Skip to content

Commit

Permalink
don't use pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
sukunrt committed Jul 10, 2023
1 parent a94be73 commit 264cf79
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,15 @@ func zoneless(m ma.Multiaddr) ma.Multiaddr {
}
}

var NAT64WellKnownPrefix *net.IPNet
var NAT64WellKnownPrefix net.IPNet

func init() {
var err error
_, NAT64WellKnownPrefix, err = net.ParseCIDR("64:ff9b::/96")
_, np, err := net.ParseCIDR("64:ff9b::/96")
if err != nil {
panic(err)

Check warning on line 126 in net/ip.go

View check run for this annotation

Codecov / codecov/patch

net/ip.go#L126

Added line #L126 was not covered by tests
}
NAT64WellKnownPrefix = *np
}

// IsNAT64IPv4ConvertedIPv6Addr returns whether addr is a well-known prefix "64:ff9b::/96" addr
Expand Down

0 comments on commit 264cf79

Please sign in to comment.