go-ipfs-config: Closes: #6284 Add appropriate IPv6 ranges to defaultServerFilters
Teran McKinney committed
May 1, 2019 at 17:21 UTC
c920b46f46ae71e284778762d34df2151cfcbc86
1 file changed
+8
-2
config/profile.go
+8
-2
@@ -18,8 +18,9 @@ type Profile struct {
18
Transform Transformer
19
}
20
21
-// defaultServerFilters has a list of non-routable IPv4 prefixes
22
-// according to http://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml
21
+// defaultServerFilters has is a list of IPv4 and IPv6 prefixes that are private, local only, or unrouteable.
22
+// according to https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml
23
+// and https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml
24
var defaultServerFilters = []string{
25
"/ip4/10.0.0.0/ipcidr/8",
26
"/ip4/100.64.0.0/ipcidr/10",
@@ -36,6 +37,11 @@ var defaultServerFilters = []string{
37
"/ip4/198.51.100.0/ipcidr/24",
38
"/ip4/203.0.113.0/ipcidr/24",
39
"/ip4/240.0.0.0/ipcidr/4",
40
+ "/ip6/100::/ipcidr/64",
41
+ "/ip6/2001:2::/ipcidr/48",
42
+ "/ip6/2001:db8::/ipcidr/32",
43
+ "/ip6/fc00::/ipcidr/7",
44
+ "/ip6/fe80::/ipcidr/10",
45
}
46
47
// Profiles is a map holding configuration transformers. Docs are in docs/config.md