Merge pull request #12484 from rwasef1830/skip-setting-outgoing-interface-for-any-ip

Do not use 0.0.0.0 or [::] for outgoing interfaces
This commit is contained in:
Mike Tzou 2020-04-13 11:52:27 +08:00 committed by GitHub
commit 5d10724044
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1534,7 +1534,9 @@ void Session::configureNetworkInterfaces(lt::settings_pack &settingsPack)
? ('[' + Utils::Net::canonicalIPv6Addr(addr).toString() + ']')
: addr.toString());
endpoints << (ip + portString);
outgoingInterfaces << ip;
if ((ip != "0.0.0.0") && (ip != "[::]"))
outgoingInterfaces << ip;
}
else {
// ip holds an interface name