Skip to content

"Site-local" addresses in the fec0::/10 range treated as routable #19978

@practicalswift

Description

@practicalswift

I noticed that we treat "site-local" addresses in the fec0::/10 range as routable:

> ResolveIP("fec0::").IsRoutable()
true

According to RFC 3879 ("Deprecating Site Local Addresses", 2004) fec0::/10 is not meant to be routable: "[…] router implementations SHOULD be configured to prevent routing of this prefix by default". (Edit: #19985 (comment))

Tor treats fec0::/10 as an IP range reserved to localhost or local networks:

    if (((iph6[0] & 0xfe000000) == 0xfc000000) || /* fc00/7  - RFC4193 */
        ((iph6[0] & 0xffc00000) == 0xfe800000) || /* fe80/10 - RFC4291 */
        ((iph6[0] & 0xffc00000) == 0xfec00000))   /* fec0/10 D- RFC3879 */
      return 1;

Which can be compared to Bitcoin Core:

> ResolveIP("fc00::").IsRoutable());
false
> ResolveIP("fe80::").IsRoutable());
false
> ResolveIP("fec0::").IsRoutable());
true

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions