diff options
author | mrg <mrg@pkgsrc.org> | 2004-12-07 04:23:59 +0000 |
---|---|---|
committer | mrg <mrg@pkgsrc.org> | 2004-12-07 04:23:59 +0000 |
commit | 0ff3921ae0497b3906e9d2135c41940e978e2a2b (patch) | |
tree | a1ad94694d5fc7c656c06d0073aa4d91ec5deec1 | |
parent | 4b716686767a3a520dddfd84792d70f00a3f92dc (diff) | |
download | pkgsrc-0ff3921ae0497b3906e9d2135c41940e978e2a2b.tar.gz |
apply the patch from
http://arctic.org/~dean/patches/bittornado-0.3.7-source-port-and-iptos.patch
that fixes the setting the TOS to IPTOS_THROUGHPUT and allows one to control
the source-port all connections come from, not just the listen port. (the
actual port is still randomized in the 10000-60000 port range by default.)
bump PKGREVISION.
approved by wiz@.
-rw-r--r-- | net/bittornado/Makefile.common | 3 | ||||
-rw-r--r-- | net/bittornado/distinfo | 3 | ||||
-rw-r--r-- | net/bittornado/patches/patch-ab | 46 |
3 files changed, 50 insertions, 2 deletions
diff --git a/net/bittornado/Makefile.common b/net/bittornado/Makefile.common index e7ad3a4671d..b493834626f 100644 --- a/net/bittornado/Makefile.common +++ b/net/bittornado/Makefile.common @@ -1,7 +1,8 @@ -# $NetBSD: Makefile.common,v 1.2 2004/11/30 12:31:29 wiz Exp $ +# $NetBSD: Makefile.common,v 1.3 2004/12/07 04:23:59 mrg Exp $ # DISTNAME= BitTornado-0.3.8 +PKGREVISION= 1 CATEGORIES= net MASTER_SITES= http://www.bittornado.com/download/ diff --git a/net/bittornado/distinfo b/net/bittornado/distinfo index aa0e8bf079c..ed2d5c74c83 100644 --- a/net/bittornado/distinfo +++ b/net/bittornado/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.2 2004/11/30 12:31:29 wiz Exp $ +$NetBSD: distinfo,v 1.3 2004/12/07 04:23:59 mrg Exp $ SHA1 (BitTornado-0.3.8.tar.gz) = efb5d51b391e8758bdebf959a485e186ad5579f8 Size (BitTornado-0.3.8.tar.gz) = 220481 bytes SHA1 (patch-aa) = a88096122a34776b72dfc18f1d95a1736c71b54b +SHA1 (patch-ab) = 0dd8a5b442047fa0c4040b808b494301dbbc942b diff --git a/net/bittornado/patches/patch-ab b/net/bittornado/patches/patch-ab new file mode 100644 index 00000000000..75d1231da9b --- /dev/null +++ b/net/bittornado/patches/patch-ab @@ -0,0 +1,46 @@ +$NetBSD: patch-ab,v 1.1 2004/12/07 04:23:59 mrg Exp $ + +--- BitTornado/SocketHandler.py.orig 2004-07-11 05:28:58.000000000 +1000 ++++ BitTornado/SocketHandler.py 2004-12-06 14:22:13.000000000 +1100 +@@ -142,7 +142,7 @@ + if k.socket is not None: + self._close_socket(k) + +- def bind(self, port, bind = '', reuse = False, ipv6_socket_style = 1, upnp = 0): ++ def bind(self, port, bind = '', reuse = True, ipv6_socket_style = 1, upnp = 0): + port = int(port) + addrinfos = [] + self.servers = {} +@@ -173,6 +173,10 @@ + if reuse: + server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + server.setblocking(0) ++ try: ++ server.setsockopt(socket.IPPROTO_IP, socket.IP_TOS, 8) ++ except: ++ pass + server.bind(addrinfo[4]) + self.servers[server.fileno()] = server + if bind: +@@ -203,7 +207,7 @@ + self.port_forwarded = port + self.port = port + +- def find_and_bind(self, minport, maxport, bind = '', reuse = False, ++ def find_and_bind(self, minport, maxport, bind = '', reuse = True, + ipv6_socket_style = 1, upnp = 0, randomizer = False): + e = 'maxport less than minport - no ports to check' + if maxport-minport < 50 or not randomizer: +@@ -236,6 +240,12 @@ + handler = self.handler + sock = socket.socket(socktype, socket.SOCK_STREAM) + sock.setblocking(0) ++ sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) ++ try: ++ server.setsockopt(socket.IPPROTO_IP, socket.IP_TOS, 8) ++ except: ++ pass ++ sock.bind(('', self.port)) + try: + sock.connect_ex(dns) + except socket.error: |