Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packetbeat/beater: make sure Npcap installation runs before interfaces are needed in all cases #30438

Merged
merged 1 commit into from
Feb 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...main[Check the HEAD dif

*Packetbeat*

- Add automated OEM Npcap installation handling. {pull}29112[29112] {pull}30396[30396]
- Add automated OEM Npcap installation handling. {pull}29112[29112] {pull}30438[30438]
- Add support for capturing TLS random number and OCSP status request details. {issue}29962[29962] {pull}30102[30102]

*Functionbeat*
Expand Down
6 changes: 6 additions & 0 deletions packetbeat/beater/packetbeat.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ func New(b *beat.Beat, rawConfig *common.Config) (beat.Beater, error) {
return nil, err
}

// Install Npcap if needed.
err := installNpcap(b)
if err != nil {
return nil, err
}

return &packetbeat{
config: rawConfig,
factory: factory,
Expand Down
6 changes: 0 additions & 6 deletions packetbeat/beater/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,6 @@ func (p *processorFactory) Create(pipeline beat.PipelineConnector, cfg *common.C
return nil, err
}

// Install Npcap if needed.
err = installNpcap(p.beat)
if err != nil {
return nil, err
}

publisher, err := publish.NewTransactionPublisher(
p.beat.Info.Name,
p.beat.Publisher,
Expand Down