diff options
| author | Christopher Hotchkiss <christopher.hotchkiss@gmail.com> | 2022-07-30 11:37:16 -0400 |
|---|---|---|
| committer | Christopher Hotchkiss <christopher.hotchkiss@gmail.com> | 2022-07-30 11:37:16 -0400 |
| commit | 3365b0631dad649ad9155c69cf9b6428e7b5228f (patch) | |
| tree | 2be15151e4a40ea814c546484a9088d7d2d1b50a | |
| parent | f2990648db66b969b89872d42771f83bbc5c7c7e (diff) | |
| download | rust-3365b0631dad649ad9155c69cf9b6428e7b5228f.tar.gz rust-3365b0631dad649ad9155c69cf9b6428e7b5228f.zip | |
Reincorporated changes from #87689
| -rw-r--r-- | library/std/src/net/ip.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/library/std/src/net/ip.rs b/library/std/src/net/ip.rs index 7bc1ad4b05b..ebbb69e7065 100644 --- a/library/std/src/net/ip.rs +++ b/library/std/src/net/ip.rs @@ -713,13 +713,8 @@ impl Ipv4Addr { || self.is_shared() || self.is_loopback() || self.is_link_local() - || (self.is_ietf_protocol_assignment() - && !( - // Port Control Protocol Anycast (`192.0.0.9`) - u32::from_be_bytes(self.octets()) == 0xc0000009 - // Traversal Using Relays around NAT Anycast (`192.0.0.10`) - || u32::from_be_bytes(self.octets()) == 0xc000000a - )) + // addresses reserved for future protocols (`192.0.0.0/24`) + ||(self.octets()[0] == 192 && self.octets()[1] == 0 && self.octets()[2] == 0) || self.is_documentation() || self.is_benchmarking() || self.is_reserved() |
