| Index: net/base/net_util_posix.cc
|
| diff --git a/net/base/net_util_posix.cc b/net/base/net_util_posix.cc
|
| index 4ff3ee9f4583c89255f826c71e6356fdcf016e70..5e1042b4304c6ba9ba8d17954c259edc2193f860 100644
|
| --- a/net/base/net_util_posix.cc
|
| +++ b/net/base/net_util_posix.cc
|
| @@ -81,8 +81,12 @@ bool GetNetworkList(NetworkInterfaceList* networks) {
|
| &address,
|
| &network_prefix));
|
|
|
| + CHECK(network_tokenizer.GetNext());
|
| + uint32 index = 0;
|
| + CHECK(base::StringToUint(network_tokenizer.token(), &index));
|
| +
|
| networks->push_back(
|
| - NetworkInterface(name, address, network_prefix));
|
| + NetworkInterface(name, index, address, network_prefix));
|
| }
|
| return true;
|
| #else
|
| @@ -108,6 +112,7 @@ bool GetNetworkList(NetworkInterfaceList* networks) {
|
| struct sockaddr* addr = interface->ifa_addr;
|
| if (!addr)
|
| continue;
|
| +
|
| // Skip unspecified addresses (i.e. made of zeroes) and loopback addresses
|
| // configured on non-loopback interfaces.
|
| int addr_size = 0;
|
| @@ -144,7 +149,9 @@ bool GetNetworkList(NetworkInterfaceList* networks) {
|
| }
|
| }
|
|
|
| - networks->push_back(NetworkInterface(name, address.address(), net_mask));
|
| + networks->push_back(
|
| + NetworkInterface(name, if_nametoindex(name.c_str()),
|
| + address.address(), net_mask));
|
| }
|
| }
|
|
|
|
|