From c71317ddf6d83383d11dce2119074cfaac52757b Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 17 May 2023 09:35:50 -0500 Subject: [PATCH] [8.8](backport #35484) [Packetbeat] Fix BPF filter setting not being applied to sniffers (#35494) - Ensure that the BPF filter setting is applied to sniffers (cherry picked from commit fb25982c80fb68745cff05a6a6a07a5c1e1ab4e7) --------- Co-authored-by: Taylor Swanson <90622908+taylor-swanson@users.noreply.github.com> Co-authored-by: Taylor Swanson --- CHANGELOG.next.asciidoc | 1 + packetbeat/sniffer/sniffer.go | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 57214c76e22..007b6fe717f 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -195,6 +195,7 @@ automatic splitting at root level, if root level element is an array. {pull}3415 *Packetbeat* - Fix documentation for `flows.period` related to flow reporting. {pull}35009[35009] +- Fix BPF filter setting not being applied to sniffers. {issue}35363[35363] {pull}35484[35484] *Winlogbeat* diff --git a/packetbeat/sniffer/sniffer.go b/packetbeat/sniffer/sniffer.go index efb12d045a0..edc6fcf5177 100644 --- a/packetbeat/sniffer/sniffer.go +++ b/packetbeat/sniffer/sniffer.go @@ -141,6 +141,7 @@ func New(testMode bool, _ string, decoders Decoders, interfaces []config.Interfa } child.config = iface + child.filter = iface.BpfFilter s.sniffers[i] = child }