mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 01:33:07 -07:00
Fix crash on some systems when creating address object for 255.255.255.255
Closes #7735.
This commit is contained in:
parent
a7da714b13
commit
48c46dc79a
1 changed files with 5 additions and 2 deletions
|
@ -1418,8 +1418,11 @@ void Session::configure(libtorrent::settings_pack &settingsPack)
|
||||||
void Session::configurePeerClasses()
|
void Session::configurePeerClasses()
|
||||||
{
|
{
|
||||||
libt::ip_filter f;
|
libt::ip_filter f;
|
||||||
f.add_rule(libt::address_v4::from_string("0.0.0.0")
|
// address_v4::from_string("255.255.255.255") crashes on some people's systems
|
||||||
, libt::address_v4::from_string("255.255.255.255")
|
// so instead we use address_v4::broadcast()
|
||||||
|
// Proactively do the same for 0.0.0.0 and address_v4::any()
|
||||||
|
f.add_rule(libt::address_v4::any()
|
||||||
|
, libt::address_v4::broadcast()
|
||||||
, 1 << libt::session::global_peer_class_id);
|
, 1 << libt::session::global_peer_class_id);
|
||||||
#if TORRENT_USE_IPV6
|
#if TORRENT_USE_IPV6
|
||||||
// IPv6 may not be available on OS and the parsing
|
// IPv6 may not be available on OS and the parsing
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue