forked from OISF/suricata
-
Notifications
You must be signed in to change notification settings - Fork 0
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
[SSC-395] XDP filter for bypassed traffic #10
Open
scott-kiester
wants to merge
6
commits into
suricata-6.0.18-awn
Choose a base branch
from
SSC-395_XDP-filter-bypassed-traffic
base: suricata-6.0.18-awn
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[SSC-395] XDP filter for bypassed traffic #10
scott-kiester
wants to merge
6
commits into
suricata-6.0.18-awn
from
SSC-395_XDP-filter-bypassed-traffic
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rahim-rani
reviewed
Dec 12, 2024
|
||
# A simple script to speed up build/test/debug iterations for XDP stuff. | ||
|
||
if [ "$#" -lt 1 ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not equal to 1 so it breaks if too many args are supplied
ebpf/build-xdp.sh
Outdated
if [ -z ${RTK_SENSOR_HOSTNAME} ]; then | ||
echo "RTK_SENSOR_HOSTNAME is not set. Skipping scp." | ||
exit 0 | ||
else |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else can be removed
rahim-rani
approved these changes
Dec 19, 2024
Also added a "--debug" flag to build-xdp.sh which will generate a BPF with debug symbols. llvm-objdump can then be used to generate an annotated assembly listing, which can be used in conjunction with syslog messages to determine what happened when the kernel refuses to load a given BPF program.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR includes the initial implementation of the XDP stream filter, which will drop traffic that has been bypassed by Suricata.
Once a flow hits a bypass rule in Suricata, it's added to "flow_table_v4", which is an ebpf table that allows flows to be looked up by tuple. The XDP stream filter checks the table when it gets new traffic; if the flow matches, then the traffic is dropped, which saves CPU cycles.
The XDP stream filter currently only works with mirroring deployments. Support for internal tap will be added later. An HLD is needed for that work.
Related PRs:
Add the stream filter to the build (awn)
Testing has been performed on both virtual and physical sensors.
There are no plans to merge these changes back to the OSIF Suricata repo.
Make sure these boxes are signed before submitting your Pull Request -- thank you.
https://docs.suricata.io/en/latest/devguide/contributing/contribution-process.html
https://suricata.io/about/contribution-agreement/ (note: this is only required once)
Link to redmine ticket:
Describe changes:
Provide values to any of the below to override the defaults.
To use a pull request use a branch name like
pr/N
whereN
is thepull request number.
Alternatively,
SV_BRANCH
may also be a link to anOISF/suricata-verify pull-request.