logstash-filter-dns 3.0.10 → 3.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/logstash/filters/dns.rb +1 -0
- data/lib/logstash/filters/resolv_patch.rb +35 -0
- data/logstash-filter-dns.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e49f024b4c80ef883b2293e4360c9bc8db1fed00f341291097372d0e43fda374
|
4
|
+
data.tar.gz: 6560e0fb3de4628f6cc40250d82c0de7d2a80db8116aeb66acfb43b7c2d994ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c5f59c303e6cf2a5631c132d1d51c37cd1423f021acb79988a233652e1401a0a9bb2cbe5dfd9bb692ab7a981d3f85720552f6acecea6ad022f6c6643b953782
|
7
|
+
data.tar.gz: 95fa82bd33893694c0bd091a5e79969c4d1f1400b30cdba790fbdb33870dc081e38a34edbad0b0914dddb916b9e32299b40312cc1e92dacdbea538b2e303ad88
|
data/CHANGELOG.md
CHANGED
data/lib/logstash/filters/dns.rb
CHANGED
@@ -0,0 +1,35 @@
|
|
1
|
+
require "resolv"
|
2
|
+
|
3
|
+
# ref: https://github.com/logstash-plugins/logstash-filter-dns/issues/40
|
4
|
+
#
|
5
|
+
# JRuby 9k versions prior to 9.1.16.0 have a bug which crashes IP address
|
6
|
+
# resolution after 64k unique IP addresses resolutions.
|
7
|
+
#
|
8
|
+
# Note that the oldest JRuby version in LS 6 is 9.1.13.0 and
|
9
|
+
# JRuby 1.7.25 and 1.7.27 (the 2 versions used across LS 5) are not affected by this bug.
|
10
|
+
#
|
11
|
+
# The code below is copied from JRuby 9.1.16.0 resolv.rb:
|
12
|
+
# https://github.com/jruby/jruby/blob/9.1.16.0/lib/ruby/stdlib/resolv.rb#L775-L784
|
13
|
+
|
14
|
+
JRUBY_GEM_VERSION = Gem::Version.new(JRUBY_VERSION)
|
15
|
+
|
16
|
+
if JRUBY_GEM_VERSION >= Gem::Version.new("9.1.13.0") && JRUBY_GEM_VERSION < Gem::Version.new("9.1.16.0")
|
17
|
+
class Resolv
|
18
|
+
class DNS
|
19
|
+
class Requester
|
20
|
+
class UnconnectedUDP
|
21
|
+
def sender(msg, data, host, port=Port)
|
22
|
+
sock = @socks_hash[host.index(':') ? "::" : "0.0.0.0"]
|
23
|
+
return nil if !sock
|
24
|
+
service = [IPAddr.new(host), port]
|
25
|
+
id = DNS.allocate_request_id(service[0], service[1])
|
26
|
+
request = msg.encode
|
27
|
+
request[0,2] = [id].pack('n')
|
28
|
+
return @senders[[service, id]] =
|
29
|
+
Sender.new(request, data, sock, host, port)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/logstash-filter-dns.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-filter-dns'
|
4
|
-
s.version = '3.0.
|
4
|
+
s.version = '3.0.11'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Performs a standard or reverse DNS lookup"
|
7
7
|
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-filter-dns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -74,6 +74,7 @@ files:
|
|
74
74
|
- README.md
|
75
75
|
- docs/index.asciidoc
|
76
76
|
- lib/logstash/filters/dns.rb
|
77
|
+
- lib/logstash/filters/resolv_patch.rb
|
77
78
|
- logstash-filter-dns.gemspec
|
78
79
|
- spec/filters/dns_spec.rb
|
79
80
|
- spec/fixtures/hosts
|