mirror of https://github.com/fail2ban/fail2ban
31 lines
986 B
Plaintext
31 lines
986 B
Plaintext
|
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||
|
## 00_resolve_all_names.dpatch by Yaroslav Halchenko <debian@onerussian.com>
|
||
|
##
|
||
|
## All lines beginning with `## DP:' are a description of the patch.
|
||
|
## DP: No description.
|
||
|
|
||
|
@DPATCH@
|
||
|
diff -urNad trunk~/server/filter.py trunk/server/filter.py
|
||
|
--- trunk~/server/filter.py 2007-04-18 16:44:07.000000000 -0400
|
||
|
+++ trunk/server/filter.py 2007-08-06 14:20:11.000000000 -0400
|
||
|
@@ -538,11 +538,14 @@
|
||
|
ipList.append(plainIPStr)
|
||
|
if not ipList:
|
||
|
# Try to get IP from possible DNS
|
||
|
- dns = DNSUtils.textToDns(text)
|
||
|
- if not dns == None:
|
||
|
- ip = DNSUtils.dnsToIp(dns.group(0))
|
||
|
- for e in ip:
|
||
|
- ipList.append(e)
|
||
|
+ # yoh: this way would not work for reported
|
||
|
+ # hosts with only top part of the address
|
||
|
+ # Since we have now <HOST> it is safe and
|
||
|
+ # efficient to simply try to resolve it
|
||
|
+ # dns = DNSUtils.textToDns(text)
|
||
|
+ ip = DNSUtils.dnsToIp(text)
|
||
|
+ for e in ip:
|
||
|
+ ipList.append(e)
|
||
|
return ipList
|
||
|
|
||
|
@staticmethod
|