I noticed that we treat “site-local” addresses in the fec0::/10
range as routable:
0> ResolveIP("fec0::").IsRoutable()
1true
According to RFC 3879 (“Deprecating Site Local Addresses”, 2004) (Edit: #19985 (comment))fec0::/10
is not meant to be routable: “[…] router implementations SHOULD be configured to prevent routing of this prefix by default”.
Tor treats fec0::/10 as an IP range reserved to localhost or local networks:
0 if (((iph6[0] & 0xfe000000) == 0xfc000000) || /* fc00/7 - RFC4193 */
1 ((iph6[0] & 0xffc00000) == 0xfe800000) || /* fe80/10 - RFC4291 */
2 ((iph6[0] & 0xffc00000) == 0xfec00000)) /* fec0/10 D- RFC3879 */
3 return 1;
Which can be compared to Bitcoin Core:
0> ResolveIP("fc00::").IsRoutable());
1false
2> ResolveIP("fe80::").IsRoutable());
3false
4> ResolveIP("fec0::").IsRoutable());
5true