From a2d723b4aaf8e410431290f345a76cf6ce2209ea Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Mon, 29 May 2017 16:56:06 +0800 Subject: [PATCH 1/2] Fix parsing of interface options with _ (#4334) (#4378) In commit 55470602d1459ae6312fdec26b85c1c4d8da8d6c linting issues were addresses and variables containing _ were renamed. This broke the config parsing. In packetbeat this seems to effect the with_vlans, bpf_filter and the buffer_size_mb options. Correct it by adding tags for all documented variables. (cherry picked from commit 813466ddc8ad7be916180d37544f04918d26bf61) --- packetbeat/config/config.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packetbeat/config/config.go b/packetbeat/config/config.go index 977e4e1a621..8f4b16760bc 100644 --- a/packetbeat/config/config.go +++ b/packetbeat/config/config.go @@ -18,13 +18,13 @@ type Config struct { } type InterfacesConfig struct { - Device string - Type string - File string - WithVlans bool - BpfFilter string - Snaplen int - BufferSizeMb int + Device string `config:"device"` + Type string `config:"type"` + File string `config:"file"` + WithVlans bool `config:"with_vlans"` + BpfFilter string `config:"bpf_filter"` + Snaplen int `config:"snaplen"` + BufferSizeMb int `config:"buffer_size_mb"` TopSpeed bool Dumpfile string OneAtATime bool From d9724630389d8fa92c1b253cc0d48e82ec6a1f84 Mon Sep 17 00:00:00 2001 From: Tudor Golubenco Date: Mon, 29 May 2017 10:58:56 +0200 Subject: [PATCH 2/2] changelog --- CHANGELOG.asciidoc | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 7ab6da89c2d..5dae24cc98f 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -49,6 +49,7 @@ https://github.com/elastic/beats/compare/v5.3.0...master[Check the HEAD diff] *Packetbeat* - Clean configured geoip.paths before attempting to open the database. {pull}4306[4306] +- Fix `packetbeat.interface` options that contain underscores (e.g. `with_vlans` or `bpf_filter`). {pull}4378[4378] *Winlogbeat*