Skip to content

Commit

Permalink
std::net: add warning in Ipv4addr::is_reserved() documentation
Browse files Browse the repository at this point in the history
See @the8472 comment's on Github:
#60145 (comment)

> I don't think is_reserved including ranges marked for future use is
> a good idea since those future uses may be realized at at some point
> and then old software with is_reserved filters may have false
> positives. This is not a hypothetical concern, such issues have been
> encountered before when IANA assigned previously reserved /8 address
> blocks.
  • Loading branch information
little-dude committed Apr 23, 2019
1 parent 634dcd0 commit fe718ef
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/libstd/net/ip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,13 @@ impl Ipv4Addr {
/// [IETF RFC 1112]: https://tools.ietf.org/html/rfc1112
/// [`true`]: ../../std/primitive.bool.html
///
/// # Warning
///
/// As IANA assigns new addresses, this method will be
/// updated. This may result in non-reserved addresses being
/// treated as reserved in code that relies on an outdated version
/// of this method.
///
/// # Examples
///
/// ```
Expand Down

0 comments on commit fe718ef

Please sign in to comment.