From e2f1e8a785e51a7fbdab2b4e628ea9b708898d63 Mon Sep 17 00:00:00 2001 From: Andrew Kroh Date: Fri, 8 Jan 2016 10:16:01 -0500 Subject: [PATCH] Allow PF_RING to be configured as type: pf_ring The documentation says to use pf_ring but the code accepts pfring only. --- CHANGELOG.asciidoc | 1 + packetbeat/sniffer/sniffer.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 67a248061af9..634e8cbc1d9e 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -33,6 +33,7 @@ https://github.com/elastic/beats/compare/1.0.0...master[Check the HEAD diff] *Packetbeat* - Fix setting direction to out and use its value to decide when dropping events if ignore_outgoing is enabled {pull}557[557] +- Allow PF_RING sniffer type to be configured using pf_ring or pfring {pull}671[671] *Topbeat* diff --git a/packetbeat/sniffer/sniffer.go b/packetbeat/sniffer/sniffer.go index b3588558a747..c6a266bde838 100644 --- a/packetbeat/sniffer/sniffer.go +++ b/packetbeat/sniffer/sniffer.go @@ -182,7 +182,7 @@ func (sniffer *SnifferSetup) setFromConfig(config *config.InterfacesConfig) erro } sniffer.DataSource = gopacket.PacketDataSource(sniffer.afpacketHandle) - case "pfring": + case "pfring", "pf_ring": sniffer.pfringHandle, err = NewPfringHandle( sniffer.config.Device, sniffer.config.Snaplen, @@ -371,7 +371,7 @@ func (sniffer *SnifferSetup) Close() error { sniffer.pcapHandle.Close() case "af_packet": sniffer.afpacketHandle.Close() - case "pfring": + case "pfring", "pf_ring": sniffer.pfringHandle.Close() } return nil