From 1d87b559ec2a39a82246c834e142f021179af663 Mon Sep 17 00:00:00 2001 From: Teran McKinney Date: Wed, 1 May 2019 17:21:56 +0000 Subject: [PATCH] go-ipfs-config: Closes: #6284 Add appropriate IPv6 ranges to defaultServerFilters --- config/profile.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/config/profile.go b/config/profile.go index f293202eac5b..458f6a822149 100644 --- a/config/profile.go +++ b/config/profile.go @@ -18,8 +18,9 @@ type Profile struct { Transform Transformer } -// defaultServerFilters has a list of non-routable IPv4 prefixes -// according to http://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml +// defaultServerFilters has is a list of IPv4 and IPv6 prefixes that are private, local only, or unrouteable. +// according to https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml +// and https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml var defaultServerFilters = []string{ "/ip4/10.0.0.0/ipcidr/8", "/ip4/100.64.0.0/ipcidr/10", @@ -36,6 +37,11 @@ var defaultServerFilters = []string{ "/ip4/198.51.100.0/ipcidr/24", "/ip4/203.0.113.0/ipcidr/24", "/ip4/240.0.0.0/ipcidr/4", + "/ip6/100::/ipcidr/64", + "/ip6/2001:2::/ipcidr/48", + "/ip6/2001:db8::/ipcidr/32", + "/ip6/fc00::/ipcidr/7", + "/ip6/fe80::/ipcidr/10", } // Profiles is a map holding configuration transformers. Docs are in docs/config.md