MM-59026: Update reserved IP ranges (#27751)
https://mattermost.atlassian.net/browse/MM-59026 ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
a7210dff01
Коммит
d89ffe269f
@@ -66,17 +66,38 @@ var defaultUserAgent string
|
||||
|
||||
func init() {
|
||||
for _, cidr := range []string{
|
||||
// See https://tools.ietf.org/html/rfc6890
|
||||
"0.0.0.0/8", // This host on this network
|
||||
"10.0.0.0/8", // Private-Use
|
||||
"127.0.0.0/8", // Loopback
|
||||
"169.254.0.0/16", // Link Local
|
||||
"172.16.0.0/12", // Private-Use Networks
|
||||
"192.168.0.0/16", // Private-Use Networks
|
||||
"::/128", // Unspecified Address
|
||||
"::1/128", // Loopback Address
|
||||
"fc00::/7", // Unique-Local
|
||||
"fe80::/10", // Linked-Scoped Unicast
|
||||
// Strings taken from https://github.com/doyensec/safeurl/blob/main/ip.go
|
||||
"10.0.0.0/8", /* Private network - RFC 1918 */
|
||||
"172.16.0.0/12", /* Private network - RFC 1918 */
|
||||
"192.168.0.0/16", /* Private network - RFC 1918 */
|
||||
"127.0.0.0/8", /* Loopback - RFC 1122, Section 3.2.1.3 */
|
||||
"0.0.0.0/8", /* Current network (only valid as source address) - RFC 1122, Section 3.2.1.3 */
|
||||
"169.254.0.0/16", /* Link-local - RFC 3927 */
|
||||
"192.0.0.0/24", /* IETF Protocol Assignments - RFC 5736 */
|
||||
"192.0.2.0/24", /* TEST-NET-1, documentation and examples - RFC 5737 */
|
||||
"198.51.100.0/24", /* TEST-NET-2, documentation and examples - RFC 5737 */
|
||||
"203.0.113.0/24", /* TEST-NET-3, documentation and examples - RFC 5737 */
|
||||
"192.88.99.0/24", /* IPv6 to IPv4 relay (includes 2002::/16) - RFC 3068 */
|
||||
"198.18.0.0/15", /* Network benchmark tests - RFC 2544 */
|
||||
"224.0.0.0/4", /* IP multicast (former Class D network) - RFC 3171 */
|
||||
"240.0.0.0/4", /* Reserved (former Class E network) - RFC 1112, Section 4 */
|
||||
"255.255.255.255/32", /* Broadcast - RFC 919, Section 7 */
|
||||
"100.64.0.0/10", /* Shared Address Space - RFC 6598 */
|
||||
// ipv6 sourced from https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml
|
||||
"::/128", /* Unspecified Address - RFC 4291 */
|
||||
"::1/128", /* Loopback - RFC 4291 */
|
||||
"100::/64", /* Discard prefix - RFC 6666 */
|
||||
"2001::/23", /* IETF Protocol Assignments - RFC 2928 */
|
||||
"2001:2::/48", /* Benchmarking - RFC5180 */
|
||||
"2001:db8::/32", /* Addresses used in documentation and example source code - RFC 3849 */
|
||||
"2001::/32", /* Teredo tunneling - RFC4380 - RFC8190 */
|
||||
"fc00::/7", /* Unique local address - RFC 4193 - RFC 8190 */
|
||||
"fe80::/10", /* Link-local address - RFC 4291 */
|
||||
"ff00::/8", /* Multicast - RFC 3513 */
|
||||
"2002::/16", /* 6to4 - RFC 3056 */
|
||||
"64:ff9b::/96", /* IPv4/IPv6 translation - RFC 6052 */
|
||||
"2001:10::/28", /* Deprecated (previously ORCHID) - RFC 4843 */
|
||||
"2001:20::/28", /* ORCHIDv2 - RFC7343 */
|
||||
} {
|
||||
_, parsed, err := net.ParseCIDR(cidr)
|
||||
if err != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user