]> granicus.if.org Git - transmission/commitdiff
(trunk libT) make sure we don't block IPv6 peers, which aren't included in bluetack...
authorErick Turnquist <jhujhiti@adjectivism.org>
Sat, 20 Dec 2008 02:56:44 +0000 (02:56 +0000)
committerErick Turnquist <jhujhiti@adjectivism.org>
Sat, 20 Dec 2008 02:56:44 +0000 (02:56 +0000)
libtransmission/blocklist.c

index 4cd98e5b91e620aa8bb50d23ef37b351a21f7e64..b8177270170b09ca7991bd3bc0127b26a43d6b07 100644 (file)
@@ -25,6 +25,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
+#include <assert.h>
 
 #include "ggets.h"
 
@@ -206,7 +207,9 @@ _tr_blocklistHasAddress( tr_blocklist     * b,
     uint32_t                   needle;
     const struct tr_ip_range * range;
 
-    if( !b->isEnabled )
+    assert( tr_isAddress( addr ) );
+
+    if( !b->isEnabled || addr->type == TR_AF_INET6 )
         return 0;
 
     blocklistEnsureLoaded( b );