diff --git a/src/base/bittorrent/session.cpp b/src/base/bittorrent/session.cpp
index 102b2f591..eb7a6a548 100644
--- a/src/base/bittorrent/session.cpp
+++ b/src/base/bittorrent/session.cpp
@@ -1418,8 +1418,8 @@ void Session::configure(libtorrent::settings_pack &settingsPack)
 void Session::configurePeerClasses()
 {
     libt::ip_filter f;
-    f.add_rule(libt::address_v4::from_string("0.0.0.0")
-               , libt::address_v4::from_string("255.255.255.255")
+    f.add_rule(libt::address_v4::any()
+               , libt::address_v4::broadcast()
                , 1 << libt::session::global_peer_class_id);
 #if TORRENT_USE_IPV6
     // IPv6 may not be available on OS and the parsing
