Fix "IsLoopbackIp" to cover all loopback addresses; not just 127.0.0.1.

The loopback range is 127.0.0.0/8, which is everything from 127.0.0.0 to
127.255.255.255.

BUG=chromium:649118

Review-Url: https://codereview.webrtc.org/2445933003
Cr-Commit-Position: refs/heads/master@{#14807}
This commit is contained in:
deadbeef
2016-10-27 18:30:23 -07:00
committed by Commit bot
parent 6be0a657c5
commit 9922016ee4
3 changed files with 7 additions and 2 deletions

View File

@ -452,7 +452,9 @@ class TurnPortTest : public testing::Test,
ipv6 ? kTurnIPv6IntAddr : kTurnIntAddr;
std::vector<rtc::SocketAddress> redirect_addresses;
SocketAddress loopback_address(ipv6 ? "::1" : "127.0.0.1",
// Pick an unusual address in the 127.0.0.0/8 range to make sure more than
// 127.0.0.1 is covered.
SocketAddress loopback_address(ipv6 ? "::1" : "127.1.2.3",
TURN_SERVER_PORT);
redirect_addresses.push_back(loopback_address);