about summary refs log tree commit diff
path: root/src/test/ui/thinlto
diff options
context:
space:
mode:
authorCorentin Henry <corentinhenry@gmail.com>2018-11-19 09:40:21 -0800
committerCorentin Henry <corentinhenry@gmail.com>2019-04-22 16:03:39 +0200
commit9f6a747b32d55d0219a909eb29c136efbb98c473 (patch)
treeb3119fe589eddef6e32213ac99ae2bb2bf7268fa /src/test/ui/thinlto
parent67291cc9711eb4ceb717dc0860aba499bcdf55f7 (diff)
downloadrust-9f6a747b32d55d0219a909eb29c136efbb98c473.tar.gz
rust-9f6a747b32d55d0219a909eb29c136efbb98c473.zip
std::net: fix Ipv4Addr::is_global()
As per @therealbstern's comment[0]:

The implementation of Ipv4::is_global is not complete, according to the
IANA IPv4 Special-Purpose Address Registry.

        - It compares the address to 0.0.0.0, but anything in 0.0.0.0/8
          should not be considered global.
                - 0/8 is not global and is currently forbidden because
                  some systems used to treat it as the local network.
                - The implementation of Ipv4::is_unspecified is correct.
                  0.0.0.0 is the unspecified address.
        - It does not examine 100.64.0.0/10, which is "Shared Address
          Space" and not global.
        - Ditto 192.0.0.0/24 (IETF Protocol Assignments), except for
          192.0.0.9/32 and 192.0.0.10/32, which are carved out as
          globally reachable.
        - 198.18.0.0/15 is for "Benchmarking" and should not be globally
          reachable.
        - 240.0.0.0/4 is reserved and not currently reachable
Diffstat (limited to 'src/test/ui/thinlto')
0 files changed, 0 insertions, 0 deletions