Skip to content

Commit 3365b06

Browse files
committed
Reincorporated changes from rust-lang#87689
1 parent f299064 commit 3365b06

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

library/std/src/net/ip.rs

+2-7
Original file line numberDiff line numberDiff line change
@@ -713,13 +713,8 @@ impl Ipv4Addr {
713713
|| self.is_shared()
714714
|| self.is_loopback()
715715
|| self.is_link_local()
716-
|| (self.is_ietf_protocol_assignment()
717-
&& !(
718-
// Port Control Protocol Anycast (`192.0.0.9`)
719-
u32::from_be_bytes(self.octets()) == 0xc0000009
720-
// Traversal Using Relays around NAT Anycast (`192.0.0.10`)
721-
|| u32::from_be_bytes(self.octets()) == 0xc000000a
722-
))
716+
// addresses reserved for future protocols (`192.0.0.0/24`)
717+
||(self.octets()[0] == 192 && self.octets()[1] == 0 && self.octets()[2] == 0)
723718
|| self.is_documentation()
724719
|| self.is_benchmarking()
725720
|| self.is_reserved()

0 commit comments

Comments
 (0)