Advertisement
Guest User

rtorrent TOS fix

a guest
Oct 27th, 2011
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. TOS (Type Of Service) not working properly (should default to "throughput") in rtorrent in Ubuntu Oneiric?
  2. Just recompile libtorrent13 with the patch below.
  3.  
  4.  
  5. sudo apt-get build-dep libtorrent
  6. mkdir x
  7. cd x
  8. apt-get source libtorrent
  9. patch -p1 <tos.patch
  10. cd libtorrent-0.12.7
  11. dpkg-buildpackage -rfakeroot
  12. cd ..
  13. sudo dpkg --install libtorrent13_0.12.7-6_amd64.deb
  14.  
  15.  
  16. tos.patch:
  17. --------------------------------------------------------------------------------
  18. diff -rU 5 orig/libtorrent-0.12.7/src/net/socket_fd.cc fixed/libtorrent-0.12.7/src/net/socket_fd.cc
  19. --- orig/libtorrent-0.12.7/src/net/socket_fd.cc 2011-10-27 23:43:54.000000000 +0200
  20. +++ fixed/libtorrent-0.12.7/src/net/socket_fd.cc 2011-10-28 00:43:35.490528256 +0200
  21. @@ -68,15 +68,10 @@
  22. bool
  23. SocketFd::set_priority(priority_type p) {
  24. check_valid();
  25. int opt = p;
  26.  
  27. -#ifdef RAK_USE_INET6
  28. - if (m_ipv6_socket)
  29. - return setsockopt(m_fd, IPPROTO_IPV6, IPV6_TCLASS, &opt, sizeof(opt)) == 0;
  30. - else
  31. -#endif
  32. return setsockopt(m_fd, IPPROTO_IP, IP_TOS, &opt, sizeof(opt)) == 0;
  33. }
  34.  
  35. bool
  36. SocketFd::set_reuse_address(bool state) {
  37. --------------------------------------------------------------------------------
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement