Commit b4865947 authored by Joseph Noir's avatar Joseph Noir

Fix multicast prefix check

parent 0ee05b90
...@@ -64,8 +64,8 @@ bool ipv4_address::is_loopback() const noexcept { ...@@ -64,8 +64,8 @@ bool ipv4_address::is_loopback() const noexcept {
} }
bool ipv4_address::is_multicast() const noexcept { bool ipv4_address::is_multicast() const noexcept {
// All addresses in 224.0.0.0/8 are considered loopback addresses. // All addresses in 224.0.0.0/4 are considered multicast addresses.
return (bits_ & net_order(0xFF000000)) == net_order(0xE0000000); return (bits_ & net_order(0xF0000000)) == net_order(0xE0000000);
} }
// -- related free functions --------------------------------------------------- // -- related free functions ---------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment