libtorrent: update to 0.13.6, disable ipv6, remove ipv6 hack

Fix libtorrent compilation by:
* Disable ipv6
* Remove the problematic patches/120-... ipv6 hack at the same time,
  as it is a 5-year old hack to fix one ipv6 problem.
* Update libtorrent to git master HEAD (0.13.6).

Libtorrent compilation has been broken due to patches/120-...
since #1181 got merged and ipv6 got enabled.
Users have seen issues like #1316 and #1804

IPv6 support in libtorrent master is not compelete.
Instead there is a separate ipv6 branch, which still needs some
cleanup before mainstream use. See discussion at
https://github.com/rakshasa/rtorrent/issues/59#issuecomment-56651538
So, it makes no sense to use ipv6 with the master branch.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
This commit is contained in:
Hannu Nyman
2015-11-06 13:44:16 +02:00
parent 11da8dcaf4
commit 8276f382a9
2 changed files with 4 additions and 30 deletions
@@ -1,26 +0,0 @@
--- a/src/net/socket_datagram.cc
+++ b/src/net/socket_datagram.cc
@@ -73,6 +73,23 @@ SocketDatagram::write_datagram(const voi
int r;
if (sa != NULL) {
+#ifdef RAK_USE_INET6
+ if (m_ipv6_socket && sa->family() == rak::socket_address::pf_inet) {
+ uint32_t addr32[4];
+ sockaddr_in6 mapped_addr;
+ memset(&mapped_addr, 0, sizeof(mapped_addr));
+ mapped_addr.sin6_family = AF_INET6;
+ addr32[0] = 0;
+ addr32[1] = 0;
+ addr32[2] = htonl(0xffff);
+ addr32[3] = sa->sa_inet()->address_n();
+ memcpy(mapped_addr.sin6_addr.s6_addr, addr32, sizeof(uint32_t) * 4);
+ mapped_addr.sin6_port = sa->sa_inet()->port_n();
+ r = ::sendto(m_fileDesc, buffer, length, 0, (sockaddr*)&mapped_addr, sizeof(mapped_addr));
+ } else if (m_ipv6_socket && sa->family() == rak::socket_address::pf_inet6) {
+ r = ::sendto(m_fileDesc, buffer, length, 0, sa->sa_inet6()->c_sockaddr(), sizeof(rak::socket_address_inet6));
+ } else
+#endif
r = ::sendto(m_fileDesc, buffer, length, 0, sa->sa_inet()->c_sockaddr(), sizeof(rak::socket_address_inet));
} else {
r = ::send(m_fileDesc, buffer, length, 0);