Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into serverless-idx-mgmt
Browse files Browse the repository at this point in the history
  • Loading branch information
fearful-symmetry committed Sep 21, 2023
2 parents 42e32d5 + 4ad4a7d commit 81e436a
Show file tree
Hide file tree
Showing 10 changed files with 63 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .ci/bump-elastic-stack-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ actions:
- backport-skip
- build-monitoring
- Team:Beats-On-Call
description: |
Generated automatically with {{ requiredEnv "JOB_URL" }}
scmid: default

scms:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/bump-elastic-stack-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
permissions:
contents: read

env:
JOB_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"

jobs:
filter:
runs-on: ubuntu-latest
Expand All @@ -34,5 +37,7 @@ jobs:
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
pipeline: ./.ci/bump-elastic-stack-snapshot.yml
notifySlackChannel: "#ingest-notifications"
messageIfFailure: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@update-me-with-the-slack-team-to-be-poked` please look what's going on <${{ env.JOB_URL }}|here>"
env:
BRANCH: ${{ matrix.branch }}
4 changes: 4 additions & 0 deletions .github/workflows/bump-golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@ jobs:
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
pipeline: ./.ci/bump-golang.yml
notifySlackChannel: "#ingest-notifications"
messageIfFailure: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@update-me-with-the-slack-team-to-be-poked` please look what's going on <${{ env.JOB_URL }}|here>"

- uses: elastic/apm-pipeline-library/.github/actions/updatecli@current
with:
vaultUrl: ${{ secrets.VAULT_ADDR }}
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
pipeline: ./.ci/bump-golang-7.17.yml
notifySlackChannel: "#ingest-notifications"
messageIfFailure: ":traffic_cone: updatecli failed for `${{ github.repository }}@${{ github.ref_name }}`, `@update-me-with-the-slack-team-to-be-poked` please look what's going on <${{ env.JOB_URL }}|here>"
17 changes: 17 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@
:issue: https://github.com/elastic/beats/issues/
:pull: https://github.com/elastic/beats/pull/

[[release-notes-8.10.2]]
=== Beats version 8.10.2
https://github.com/elastic/beats/compare/v8.10.1\...v8.10.2[View commits]

==== Bugfixes

*Packetbeat*

- Prevent panic when more than one interface is configured in Fleet. {issue}36574[36574] {pull}36575[36575]

==== Added

*Affecting all Beats*

- Upgrade Go to 1.20.8 {pull}36597[36597]


[[release-notes-8.10.1]]
=== Beats version 8.10.1
https://github.com/elastic/beats/compare/v8.10.0\...v8.10.1[View commits]
Expand Down
6 changes: 4 additions & 2 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]

*Packetbeat*

- Prevent panic when more than one interface is configured in fleet. {issue}36574[36574] {pull}36575[36575]

*Winlogbeat*

Expand All @@ -146,7 +145,6 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]

*Affecting all Beats*

- Upgrade Go to 1.20.8 {pull}36597[36597]
- Added append Processor which will append concrete values or values from a field to target. {issue}29934[29934] {pull}33364[33364]
- When running under Elastic-Agent the status is now reported per Unit instead of the whole Beat {issue}35874[35874] {pull}36183[36183]
- Add warning message to SysV init scripts for RPM-based systems that lack `/etc/rc.d/init.d/functions`. {issue}35708[35708] {pull}36188[36188]
Expand Down Expand Up @@ -243,6 +241,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]

*Packetbeat*

- Improve efficiency of sniffers by deduplicating interface configurations. {issue}36574[36574] {pull}36576[36576]

*Winlogbeat*

Expand Down Expand Up @@ -304,3 +303,6 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]






8 changes: 4 additions & 4 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12479,11 +12479,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-a

--------------------------------------------------------------------------------
Dependency : github.com/elastic/elastic-agent-client/v7
Version: v7.3.0
Version: v7.4.0
Licence type (autodetected): Elastic
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-client/v7@v7.3.0/LICENSE.txt:
Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-client/v7@v7.4.0/LICENSE.txt:

ELASTIC LICENSE AGREEMENT

Expand Down Expand Up @@ -13448,11 +13448,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected]

--------------------------------------------------------------------------------
Dependency : github.com/elastic/go-elasticsearch/v8
Version: v8.9.0
Version: v8.10.0
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/elastic/go-elasticsearch/v8@v8.9.0/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/elastic/go-elasticsearch/v8@v8.10.0/LICENSE:

Apache License
Version 2.0, January 2004
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ require (
github.com/dustin/go-humanize v1.0.1
github.com/eapache/go-resiliency v1.2.0
github.com/eclipse/paho.mqtt.golang v1.3.5
github.com/elastic/elastic-agent-client/v7 v7.3.0
github.com/elastic/elastic-agent-client/v7 v7.4.0
github.com/elastic/go-concert v0.2.0
github.com/elastic/go-libaudit/v2 v2.3.3
github.com/elastic/go-licenser v0.4.1
Expand Down Expand Up @@ -205,7 +205,7 @@ require (
github.com/elastic/elastic-agent-libs v0.3.15-0.20230913212237-dbdaf18c898b
github.com/elastic/elastic-agent-shipper-client v0.5.1-0.20230228231646-f04347b666f3
github.com/elastic/elastic-agent-system-metrics v0.6.1
github.com/elastic/go-elasticsearch/v8 v8.9.0
github.com/elastic/go-elasticsearch/v8 v8.10.0
github.com/elastic/mito v1.5.0
github.com/elastic/toutoumomoma v0.0.0-20221026030040-594ef30cb640
github.com/foxcpp/go-mockdns v0.0.0-20201212160233-ede2f9158d15
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,8 @@ github.com/elastic/dhcp v0.0.0-20200227161230-57ec251c7eb3 h1:lnDkqiRFKm0rxdljqr
github.com/elastic/dhcp v0.0.0-20200227161230-57ec251c7eb3/go.mod h1:aPqzac6AYkipvp4hufTyMj5PDIphF3+At8zr7r51xjY=
github.com/elastic/elastic-agent-autodiscover v0.6.2 h1:7P3cbMBWXjbzA80rxitQjc+PiWyZ4I4F4LqrCYgYlNc=
github.com/elastic/elastic-agent-autodiscover v0.6.2/go.mod h1:yXYKFAG+Py+TcE4CCR8EAbJiYb+6Dz9sCDoWgOveqtU=
github.com/elastic/elastic-agent-client/v7 v7.3.0 h1:LugKtBXK7bp4SFL/uQqGU/f4Ppx12Jk5a36voGabLa0=
github.com/elastic/elastic-agent-client/v7 v7.3.0/go.mod h1:9/amG2K2y2oqx39zURcc+hnqcX+nyJ1cZrLgzsgo5c0=
github.com/elastic/elastic-agent-client/v7 v7.4.0 h1:h75oTkkvIjgiKVm61NpvTZP4cy6QbQ3zrIpXKGigyjo=
github.com/elastic/elastic-agent-client/v7 v7.4.0/go.mod h1:9/amG2K2y2oqx39zURcc+hnqcX+nyJ1cZrLgzsgo5c0=
github.com/elastic/elastic-agent-libs v0.3.15-0.20230913212237-dbdaf18c898b h1:a2iuOokwld+D7VhyFymVtsPoqxZ8fkkOCOOjeYU9CDM=
github.com/elastic/elastic-agent-libs v0.3.15-0.20230913212237-dbdaf18c898b/go.mod h1:mpSfrigixx8x+uMxWKl4LtdlrKIhZbA4yT2eIeIazUQ=
github.com/elastic/elastic-agent-shipper-client v0.5.1-0.20230228231646-f04347b666f3 h1:sb+25XJn/JcC9/VL8HX4r4QXSUq4uTNzGS2kxOE7u1U=
Expand All @@ -667,8 +667,8 @@ github.com/elastic/fsevents v0.0.0-20181029231046-e1d381a4d270/go.mod h1:Msl1pdb
github.com/elastic/glog v1.0.1-0.20210831205241-7d8b5c89dfc4/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4=
github.com/elastic/go-concert v0.2.0 h1:GAQrhRVXprnNjtvTP9pWJ1d4ToEA4cU5ci7TwTa20xg=
github.com/elastic/go-concert v0.2.0/go.mod h1:HWjpO3IAEJUxOeaJOWXWEp7imKd27foxz9V5vegC/38=
github.com/elastic/go-elasticsearch/v8 v8.9.0 h1:8xtmYjUkqtahl50E0Bg/wjKI7K63krJrrLipbNj/fCU=
github.com/elastic/go-elasticsearch/v8 v8.9.0/go.mod h1:NGmpvohKiRHXI0Sw4fuUGn6hYOmAXlyCphKpzVBiqDE=
github.com/elastic/go-elasticsearch/v8 v8.10.0 h1:ALg3DMxSrx07YmeMNcfPf7cFh1Ep2+Qa19EOXTbwr2k=
github.com/elastic/go-elasticsearch/v8 v8.10.0/go.mod h1:NGmpvohKiRHXI0Sw4fuUGn6hYOmAXlyCphKpzVBiqDE=
github.com/elastic/go-libaudit/v2 v2.3.3 h1:PO+9/HDSn65UAyydkkoTf81QET14fWmocHFiGEX/E6M=
github.com/elastic/go-libaudit/v2 v2.3.3/go.mod h1:+ZE0czqmbqtnRkl0fNgpI+HvVVRo/ZMJdcXv/PaKcOo=
github.com/elastic/go-licenser v0.4.1 h1:1xDURsc8pL5zYT9R29425J3vkHdt4RT5TNEMeRN48x4=
Expand Down
1 change: 1 addition & 0 deletions libbeat/docs/release.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ This section summarizes the changes in each release. Also read
<<breaking-changes>> for more detail about changes that affect
upgrade.

* <<release-notes-8.10.2>>
* <<release-notes-8.10.1>>
* <<release-notes-8.10.0>>
* <<release-notes-8.9.2>>
Expand Down
23 changes: 20 additions & 3 deletions packetbeat/beater/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,31 @@ func setupSniffer(id string, cfg config.Config, protocols *protos.ProtocolsStruc
return nil, err
}

for i, iface := range cfg.Interfaces {
// Ensure interfaces are uniquely represented so we don't listen on the
// same interface with multiple sniffers.
interfaces := make([]config.InterfaceConfig, 0, len(cfg.Interfaces))
seen := make(map[uint64]bool)
for _, iface := range cfg.Interfaces {
// Currently we hash on all fields in the config. We can revise this in future.
h, err := hashstructure.Hash(iface, nil)
if err != nil {
return nil, fmt.Errorf("could not deduplicate interface configurations: %w", err)
}
if seen[h] {
continue
}
seen[h] = true
interfaces = append(interfaces, iface)
}

for i, iface := range interfaces {
if iface.BpfFilter != "" || cfg.Flows.IsEnabled() {
continue
}
cfg.Interfaces[i].BpfFilter = protocols.BpfFilter(iface.WithVlans, icmp.Enabled())
interfaces[i].BpfFilter = protocols.BpfFilter(iface.WithVlans, icmp.Enabled())
}

return sniffer.New(id, false, "", decoders, cfg.Interfaces)
return sniffer.New(id, false, "", decoders, interfaces)
}

// CheckConfig performs a dry-run creation of a Packetbeat pipeline based
Expand Down

0 comments on commit 81e436a

Please sign in to comment.