update libsimulator submodule with IPv6 support

This commit is contained in:
arvidn
2015-10-24 15:57:22 -04:00
parent e31433d952
commit 234ac8adeb
2 changed files with 26 additions and 16 deletions

View File

@@ -418,12 +418,17 @@ namespace libtorrent
TORRENT_UNUSED(ec); TORRENT_UNUSED(ec);
ip_interface wan; std::vector<address> ips = ios.get_ips();
wan.interface_address = ios.get_ip();
wan.netmask = address_v4::from_string("255.255.255.255"); for (int i = 0; i < int(ips.size()); ++i)
strcpy(wan.name, "eth0"); {
wan.mtu = ios.sim().config().path_mtu(ios.get_ip(), ios.get_ip()); ip_interface wan;
ret.push_back(wan); wan.interface_address = ips[i];
wan.netmask = address_v4::from_string("255.255.255.255");
strcpy(wan.name, "eth0");
wan.mtu = ios.sim().config().path_mtu(ips[i], ips[i]);
ret.push_back(wan);
}
#elif TORRENT_USE_IFADDRS #elif TORRENT_USE_IFADDRS
int s = socket(AF_INET, SOCK_DGRAM, 0); int s = socket(AF_INET, SOCK_DGRAM, 0);
@@ -708,15 +713,20 @@ namespace libtorrent
TORRENT_UNUSED(ec); TORRENT_UNUSED(ec);
ip_route r; std::vector<address> ips = ios.get_ips();
r.destination = address_v4();
r.netmask = address_v4::from_string("255.255.255.0"); for (int i = 0; i < int(ips.size()); ++i)
address_v4::bytes_type b = ios.get_ip().to_v4().to_bytes(); {
b[3] = 1; ip_route r;
r.gateway = address_v4(b); r.destination = address_v4();
strcpy(r.name, "eth0"); r.netmask = address_v4::from_string("255.255.255.0");
r.mtu = ios.sim().config().path_mtu(ios.get_ip(), ios.get_ip()); address_v4::bytes_type b = ips[i].to_v4().to_bytes();
ret.push_back(r); b[3] = 1;
r.gateway = address_v4(b);
strcpy(r.name, "eth0");
r.mtu = ios.sim().config().path_mtu(ips[i], ips[i]);
ret.push_back(r);
}
#elif TORRENT_USE_SYSCTL #elif TORRENT_USE_SYSCTL
/* /*