We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f299064 commit 3365b06Copy full SHA for 3365b06
library/std/src/net/ip.rs
@@ -713,13 +713,8 @@ impl Ipv4Addr {
713
|| self.is_shared()
714
|| self.is_loopback()
715
|| 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
- ))
+ // addresses reserved for future protocols (`192.0.0.0/24`)
+ ||(self.octets()[0] == 192 && self.octets()[1] == 0 && self.octets()[2] == 0)
723
|| self.is_documentation()
724
|| self.is_benchmarking()
725
|| self.is_reserved()
0 commit comments