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

Miscellaneous bsdbpf fixes and improvements #1091

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

srgg
Copy link

@srgg srgg commented Feb 5, 2023

In order to more or less unify afpacket and bsdbpf the following new methods will be added to BPFSniffer:

  • SetBPFFilter(): to set BPF programm,
  • WritePacketData(): to write data.

The new configurable option SeeSent will be added, it allows to turn on/off returning local packets over filter.

There is also several fixes:

  • BPFSniffer creation with bpf device name provided over config options;
  • Avoid fd leak in the case of any subsequent error during BPFSniffer instance creation.

This PR also fixes #1053 and makes obsolete #1054

…ta() to write data, SeeSent configurable option to turn on/off returning local packets. Fixes BPFSniffer creation with bpf device name provided over config options and also fixes fd leak in the case of any subsequent error during BPFSniffer instance creation.
@google-cla
Copy link

google-cla bot commented Feb 5, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

bsdbpf/bsd_bpf_sniffer.go Outdated Show resolved Hide resolved
bsdbpf/bsd_bpf_sniffer.go Outdated Show resolved Hide resolved
srgg and others added 2 commits July 23, 2023 11:02
@srgg
Copy link
Author

srgg commented Jul 23, 2023

@Doridian, I applied your suggestions. Thank you for the review!

@srgg
Copy link
Author

srgg commented Jul 23, 2023

@Doridian can you please accept CLA to get a chance to get this merged at some point?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow configuration of SEESENT in bsdbpf BPF sniffer
2 participants