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

issue practicalswift openend this issue on September 19, 2020
  1. practicalswift commented at 8:29 am on September 19, 2020: contributor

    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) 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:

    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
    
  2. practicalswift added the label Bug on Sep 19, 2020
  3. fanquake added the label P2P on Sep 19, 2020
  4. n-thumann commented at 5:06 pm on September 20, 2020: contributor
    Addressed this issue in #19985 :v:
  5. practicalswift commented at 2:51 pm on September 22, 2020: contributor
  6. practicalswift closed this on Jun 30, 2021

  7. DrahtBot locked this on Aug 18, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-05 01:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me