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

Packet direction flag #3706

Merged

Conversation

NDStrahilevitz
Copy link
Collaborator

@NDStrahilevitz NDStrahilevitz commented Nov 22, 2023

1. Explain what the PR does

d3c1b3d chore(tests): test packet direction in net e2e
13dff15 docs(network): mention new metadata argument
5345cf9 feature(network): add packet metadata argument
18b4663 refactor(network): parse payload in helper
d8c8d1b chore(go.mod): bump types

2. Explain how to test it

A test was added in the HTTP e2e test.
In addition, one can see for themselves by running any of the changed net packet events (for example net_packet_icmp and looking at the new metadata argument.

3. Other comments

Resolve #3701

Copy link
Contributor

@rafaeldtinoco rafaeldtinoco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (after you rebase on top of the types change).

Bump types to commit 9a6b89e for trace.PacketMetadata
Reduce duplication in most packet derivations by moving payload
validation and extraction to its own helper.
Add new `metadata` argument to all packet events. This metadata struct
duplicates the previous src and dst and port arguments to a single
struct, with the addition of including a new `direction` field.
This direction is an enum describing if the packet was ingress(1) or
egress(2).
In HTTP e2e test, add a packet direction test.
@NDStrahilevitz NDStrahilevitz merged commit c9e5015 into aquasecurity:main Nov 23, 2023
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add packet direction flag
2 participants