logstash-input-snmp 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b52920a394a09244f4731933b5d79655002bd3569552ca33972dfd069d709ade
4
- data.tar.gz: ff663bdff7ca249635388c68329cfcd0ae759893c4eaf27ff226ca59c6939f7f
3
+ metadata.gz: 7c3a74f2f8ec14f17acc8f04cfcc23b6ee05fdcd24a54a29423d804744c7f5c4
4
+ data.tar.gz: b5fa48b8bff526d82887ed05c0c4495f61ce9db518e4d07bd384b4705455b550
5
5
  SHA512:
6
- metadata.gz: de641478532900bd27fa9e261b239a0d7f87c2024ee20c59e70dce40a9bb5bbd369a6ec9b4b96c69571afafda62fb49940e458b2174bcf5d852de5e893106ef9
7
- data.tar.gz: 0c63e9b7f357faba71b6120aeaf5b42adcb399307f630597e0858ef267a071487cbff47c6fe7422dcdf1441f4755182e511d9fe5902a3f4b86162b9bd5dc63c6
6
+ metadata.gz: 416b0328c5e6494f14f5412b70a4207a166cd11b9170b5b97c31b1e00144ea7f44f541d932c20a8361c6cb97c352ac16d6c0d926625b36d8b9b1406af6afd864
7
+ data.tar.gz: 6eb1ac2dcce5741a3a8e734bf8eb6e15130e0dce5d10f29d15983eb886d73d6d4621a35b392fb9ea54cb483407561bde955eca89e549a3de08d3948e13e92cbc
@@ -1,3 +1,6 @@
1
+ ## 1.2.1
2
+ - Fixed GAUGE32 integer overflow [#65] (https://github.com/logstash-plugins/logstash-input-snmp/pull/65)
3
+
1
4
  ## 1.2.0
2
5
  - Adding oid_path_length config option [#59] (https://github.com/logstash-plugins/logstash-input-snmp/pull/59)
3
6
  - Fixing bug with table support removing index value from OIDs [#60] )https://github.com/logstash-plugins/logstash-input-snmp/issues/60)
@@ -159,9 +159,9 @@ module LogStash
159
159
  case variable_syntax
160
160
  when BER::OCTETSTRING, BER::BITSTRING
161
161
  variable.toString
162
- when BER::TIMETICKS, BER::COUNTER, BER::COUNTER32, BER::COUNTER64
162
+ when BER::TIMETICKS, BER::COUNTER, BER::COUNTER32, BER::COUNTER64, BER::GAUGE, BER::GAUGE32
163
163
  variable.toLong
164
- when BER::INTEGER, BER::INTEGER32, BER::GAUGE, BER::GAUGE32
164
+ when BER::INTEGER, BER::INTEGER32
165
165
  variable.toInt
166
166
  when BER::IPADDRESS
167
167
  variable.toString
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-input-snmp'
3
- s.version = '1.2.0'
3
+ s.version = '1.2.1'
4
4
  s.licenses = ['Apache-2.0']
5
5
  s.summary = "SNMP input plugin"
6
6
  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"
@@ -4,6 +4,8 @@ require "logstash/inputs/snmp/base_client"
4
4
 
5
5
  java_import "org.snmp4j.smi.AbstractVariable"
6
6
  java_import "org.snmp4j.smi.SMIConstants"
7
+ java_import "org.snmp4j.smi.Gauge32"
8
+ java_import "org.snmp4j.smi.Integer32"
7
9
 
8
10
  module LogStash
9
11
 
@@ -33,6 +35,18 @@ module LogStash
33
35
  expect(subject).to receive(:logger).exactly(1).times.and_call_original
34
36
  expect(subject.coerce(v)).to eq("error: unknown variable syntax 130, EndOfMibView")
35
37
  end
38
+
39
+ it "should handle max unsigned 32 bits integer GAUGE32" do
40
+ MAX_UNSIGNED_INT_32 = 4294967295
41
+ v = Gauge32.new(MAX_UNSIGNED_INT_32)
42
+ expect(subject.coerce(v)).to eq(MAX_UNSIGNED_INT_32)
43
+ end
44
+
45
+ it "should handle max signed 32 bits integer INTEGER32" do
46
+ MAX_SIGNED_INT_32 = 2147483647
47
+ v = Integer32.new(MAX_SIGNED_INT_32)
48
+ expect(subject.coerce(v)).to eq(MAX_SIGNED_INT_32)
49
+ end
36
50
  end
37
51
  end
38
- end
52
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-snmp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elasticsearch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-29 00:00:00.000000000 Z
11
+ date: 2019-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement