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 #30396

Merged
merged 1 commit into from
Feb 15, 2022

Conversation

efd6
Copy link
Contributor

@efd6 efd6 commented Feb 15, 2022

What does this PR do?

Previously installNpcap was run after Create, which depends on having interfaces up
to establish sniffers, and so was too late. So move the call to the front of Create
to ensure that the library is installed by the time that it is needed.

Why is it important?

This fixes a required feature.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • Run packetbeat on a windows VM with the 8.1 packetbeat.yml to confirm functionality.
  • Check that the Npcap library has been correctly installed

How to test this PR locally

  • Place the OEM installer in x-pack/packetbeat/npcap/installer/
  • mage build in x-pack/packetbeat
  • Obtain the current 8.1 snapshot for windows packetbeat and install
  • Replace the executable with the freshly built one
  • Run packetbeat -v -e -d=* to confirm function
  • Check C:\Program Files\Npcap exists and contains the correct OEM version.

Related issues

Use cases

Screenshots

Logs

@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Feb 15, 2022
@efd6 efd6 requested review from andrewkroh and a team February 15, 2022 09:02
…s are needed

Previously installNpcap was run after Create, which depends on having interfaces up
to establish sniffers, and so was too late. So move the call to the front of Create
to ensure that the library is installed by the time that it is needed.
@mergify
Copy link
Contributor

mergify bot commented Feb 15, 2022

This pull request does not have a backport label. Could you fix it @efd6? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 7./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Feb 15, 2022
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-02-15T09:05:24.178+0000

  • Duration: 84 min 20 sec

Test stats 🧪

Test Results
Failed 0
Passed 3328
Skipped 36
Total 3364

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@efd6 efd6 added the backport-v8.1.0 Automated backport with mergify label Feb 15, 2022
@mergify mergify bot removed the backport-skip Skip notification from the automated backport with mergify label Feb 15, 2022
@efd6 efd6 merged commit 0c187d5 into elastic:main Feb 15, 2022
mergify bot pushed a commit that referenced this pull request Feb 15, 2022
…s are needed (#30396)

Previously installNpcap was run after Create, which depends on having interfaces up
to establish sniffers, and so was too late. So move the call to the front of Create
to ensure that the library is installed by the time that it is needed.

(cherry picked from commit 0c187d5)
efd6 added a commit that referenced this pull request Feb 15, 2022
…s are needed (#30396) (#30410)

Previously installNpcap was run after Create, which depends on having interfaces up
to establish sniffers, and so was too late. So move the call to the front of Create
to ensure that the library is installed by the time that it is needed.

(cherry picked from commit 0c187d5)

Co-authored-by: Dan Kortschak <[email protected]>
v1v added a commit to v1v/beats that referenced this pull request Feb 21, 2022
…into feature/use-with-kind-k8s-env

* 'feature/use-with-kind-k8s-env' of github.com:v1v/beats: (52 commits)
  ci: home is declared within withBeatsEnv
  ci: use withKindEnv step
  ci: use getBranchesFromAliases and support next-patch-8 (elastic#30400)
  Update fields.yml (elastic#29609)
  Heartbeat: fix browser metrics and trace mappings (elastic#30258)
  Apply light edits to 8.0 changelog (elastic#30351)
  packetbeat/beater: make sure Npcap installation runs before interfaces are needed (elastic#30396)
  Add a ring-buffer reporter to libbeat (elastic#28750)
  Osquerybeat: Add install verification for osquerybeat (elastic#30388)
  update windows matrix support (elastic#30373)
  Refactor of metricbeat process-gathering metrics and system/process (elastic#30076)
  adjust next changelog wording (elastic#30371)
  [Metricbeat] azure: move event report into loop validDim loop (elastic#29945)
  fix: report GitHub Check before the cache (elastic#30372)
  Add support for non-unique keys in Kafka output headers (elastic#30369)
  ci: 6 major branch reached EOL (elastic#30357)
  reduce Elastic Agent shut down time by stopping processes concurrently (elastic#29650)
  [Filebeat] Add message to register encode/decode debug logs (elastic#30271)
  [libbeat] kafka message header support (elastic#29940)
  Heartbeat: set duration to zero for syntax errors (elastic#30227)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.1-candidate backport-v8.1.0 Automated backport with mergify bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants