From bac910628b4ab7264eacd4044a586777783e2ba0 Mon Sep 17 00:00:00 2001 From: Taylor Swanson <90622908+taylor-swanson@users.noreply.github.com> Date: Wed, 17 May 2023 07:50:34 -0500 Subject: [PATCH] [Packetbeat] Fix BPF filter setting not being applied to sniffers (#35484) - Ensure that the BPF filter setting is applied to sniffers (cherry picked from commit fb25982c80fb68745cff05a6a6a07a5c1e1ab4e7) --- 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 d0ae454a5ee3..08534c4abde8 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -81,6 +81,7 @@ https://github.com/elastic/beats/compare/v8.7.1\...main[Check the HEAD diff] *Packetbeat* - Fix double channel close panic when reloading. {pull}35324[35324] +- 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 efb12d045a0e..edc6fcf5177f 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 }