Skip to content

Commit

Permalink
Cherry-pick #4378 to 5.x: Fix parsing of interface options with _ (#4334
Browse files Browse the repository at this point in the history
) (#4411)

* Fix parsing of interface options with _ (#4334) (#4378)

In commit 5547060 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 813466d)
  • Loading branch information
tsg authored and exekias committed May 30, 2017
1 parent 73f9d00 commit 3f030e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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*

Expand Down
14 changes: 7 additions & 7 deletions packetbeat/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3f030e0

Please sign in to comment.