[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mldonkey-commits] Changes to mldonkey/src/utils/net/ip.ml
From: |
mldonkey-commits |
Subject: |
[Mldonkey-commits] Changes to mldonkey/src/utils/net/ip.ml |
Date: |
Sat, 06 Aug 2005 15:46:35 -0400 |
Index: mldonkey/src/utils/net/ip.ml
diff -u mldonkey/src/utils/net/ip.ml:1.12 mldonkey/src/utils/net/ip.ml:1.13
--- mldonkey/src/utils/net/ip.ml:1.12 Fri Jul 22 10:58:55 2005
+++ mldonkey/src/utils/net/ip.ml Sat Aug 6 19:46:34 2005
@@ -86,14 +86,15 @@
l >= 0 && l <= 255 &&
i >= 0 && i <= 255
-let reachable ip =
- !allow_local_network ||
+let local_ip ip =
match ip with
- 192, 168,_,_ -> false
- | 10, _, _, _ | 127, _,_,_ -> false
- | 172, v, _, _ when v > 15 && v < 32 -> false
- | _ -> true
+ 192, 168,_,_ -> true
+ | 10, _, _, _ | 127, _,_,_ -> true
+ | 172, v, _, _ when v > 15 && v < 32 -> true
+ | _ -> false
+let reachable ip =
+ !allow_local_network || not (local_ip ip)
let rec matches ((a4,a3,a2,a1) as a) ips =
match ips with
- [Mldonkey-commits] Changes to mldonkey/src/utils/net/ip.ml,
mldonkey-commits <=