fix a bug in ipv4_address::is_private_network()

This commit is contained in:
yaoxinliu 2020-05-29 19:31:50 +08:00 committed by Lewis Baker
parent 92892f31d0
commit 932f08586c
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ namespace cppcoro::net
constexpr bool is_private_network() const
{
return m_bytes[0] == 10 ||
(m_bytes[0] == 172 && (m_bytes[1] & 0xC0) == 0x10) ||
(m_bytes[0] == 172 && (m_bytes[1] & 0xF0) == 0x10) ||
(m_bytes[0] == 192 && m_bytes[2] == 168);
}