File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,8 @@ impl Ipv4Addr {
121
121
}
122
122
123
123
/// Returns true if the address appears to be globally routable.
124
+ /// See [iana-ipv4-special-registry][ipv4-sr].
125
+ /// [ipv4-sr]: http://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml
124
126
///
125
127
/// The following return false:
126
128
///
@@ -131,7 +133,8 @@ impl Ipv4Addr {
131
133
/// - test addresses used for documentation (192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24)
132
134
pub fn is_global ( & self ) -> bool {
133
135
!self . is_private ( ) && !self . is_loopback ( ) && !self . is_link_local ( ) &&
134
- !self . is_broadcast ( ) && !self . is_documentation ( ) && !self . is_unspecified ( )
136
+ !self . is_broadcast ( ) && !self . is_documentation ( ) && !self . is_unspecified ( ) &&
137
+ !self . is_this_network ( )
135
138
}
136
139
137
140
/// Returns true if this is a multicast address.
You can’t perform that action at this time.
0 commit comments