[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-commits] Changes to mldonkey/src/networks/donkey/donkeyClient.
From: |
mldonkey-commits |
Subject: |
[Mldonkey-commits] Changes to mldonkey/src/networks/donkey/donkeyClient.ml |
Date: |
Mon, 01 Aug 2005 16:26:07 -0400 |
Index: mldonkey/src/networks/donkey/donkeyClient.ml
diff -u mldonkey/src/networks/donkey/donkeyClient.ml:1.55
mldonkey/src/networks/donkey/donkeyClient.ml:1.56
--- mldonkey/src/networks/donkey/donkeyClient.ml:1.55 Mon Aug 1 20:15:28 2005
+++ mldonkey/src/networks/donkey/donkeyClient.ml Mon Aug 1 20:26:06 2005
@@ -21,6 +21,7 @@
open Printf2
open Md4
+open Ip_set
open CommonSources
open CommonDownloads
@@ -2200,8 +2201,15 @@
(* lprintf "[REMOTE CONN]\n"; *)
match event with
TcpServerSocket.CONNECTION (s, Unix.ADDR_INET (from_ip, from_port)) ->
-
- if can_open_indirect_connection () then
+ let from_ip = (Ip.of_inet_addr from_ip) in
+ if can_open_indirect_connection () &&
+ (match Ip_set.match_ip !Ip_set.bl from_ip with
+ None -> true
+ | Some br ->
+ if !verbose_connect then
+ lprintf "DKOV: %s:%d blocked: %s\n"
+ (Ip.to_string from_ip) from_port
br.blocking_description;
+ false) then
begin
(* lprintf "+++++++++++++++++++++++++++++++++++++++++++++++\n"; *)
(try
@@ -2214,7 +2222,7 @@
(client_handler2 c)
(*client_msg_to_string*)
in
- init_connection sock (Ip.of_inet_addr from_ip);
+ init_connection sock from_ip;
accept_connection_bandwidth sock;
(* Normal connections have 20 minutes to live (AvailableSlot, QueryBloc
- [Mldonkey-commits] Changes to mldonkey/src/networks/donkey/donkeyClient.ml,
mldonkey-commits <=
- [Mldonkey-commits] Changes to mldonkey/src/networks/donkey/donkeyClient.ml, mldonkey-commits, 2005/08/01
- [Mldonkey-commits] Changes to mldonkey/src/networks/donkey/donkeyClient.ml, mldonkey-commits, 2005/08/08
- [Mldonkey-commits] Changes to mldonkey/src/networks/donkey/donkeyClient.ml, mldonkey-commits, 2005/08/09
- [Mldonkey-commits] Changes to mldonkey/src/networks/donkey/donkeyClient.ml, mldonkey-commits, 2005/08/15
- [Mldonkey-commits] Changes to mldonkey/src/networks/donkey/donkeyClient.ml, mldonkey-commits, 2005/08/18