Package: libtorrent13 Version: 0.12.7-6quickfix1 Severity: normal Tags: ipv6
In Ubuntu 11.10 Oneiric Ocelot, with libtorrent13 0.12.7-6 and rtorrent 0.8.7-7ubuntu1, rtorrent no longer seems to set the TOS flag correctly (throughput mode). This makes it difficult to set up good traffic shaping rules. The patch debian/patches/libtorrent-0.12.6-ipv6-07.patch in the package source makes, amongst others, this change (in src/net/socket_fd.cc): ------------------------------------------------------------ bool SocketFd::set_priority(priority_type p) { check_valid(); int opt = p; +#ifdef RAK_USE_INET6 + if (m_ipv6_socket) + return setsockopt(m_fd, IPPROTO_IPV6, IPV6_TCLASS, &opt, sizeof(opt)) == 0; + else +#endif return setsockopt(m_fd, IPPROTO_IP, IP_TOS, &opt, sizeof(opt)) == 0; } ------------------------------------------------------------ By simply removing these five lines again, the TOS flag will be set correctly. I only have a link-local ipv6 address, but apparently the ipv6 code is used anyway. This paragraph from ipv6 (7) probably explains that: IPv4 connections can be handled with the v6 API by using the v4-mapped-on-v6 address type; thus a program only needs to support this API type to support both protocols. This is handled transparently by the address handling functions in the C library. It seems that the problem is that setting IPV6_TCLASS for an ipv4 connection does not set the TOS flag correctly. I am, however, unsure what the proper solution is here. -- System Information: Debian Release: wheezy/sid APT prefers oneiric-updates APT policy: (500, 'oneiric-updates'), (500, 'oneiric-security'), (500, 'oneiric') Architecture: amd64 (x86_64) Kernel: Linux 3.0.0-12-generic (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages libtorrent13 depends on: ii libc6 2.13-20ubuntu5 Embedded GNU C Library: Shared lib ii libgcc1 1:4.6.1-9ubuntu3 GCC support library ii libsigc++-2.0-0c2a 2.2.10-0ubuntu1 type-safe Signal Framework for C++ ii libssl1.0.0 1.0.0e-2ubuntu4 SSL shared libraries ii libstdc++6 4.6.1-9ubuntu3 GNU Standard C++ Library v3 libtorrent13 recommends no packages. libtorrent13 suggests no packages. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org