-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add support to record IPv4 encapsulated packets #35
base: main
Are you sure you want to change the base?
Conversation
@slankdev Please check it. cc @proelbtn @ninilosso |
if (inner_ih->ihl < 5) | ||
return TC_ACT_SHOT; |
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.
If the IP header has options, inner_ih->ihl
will be greater than 5, right? If you add the IP header (20) length in process_ipv4_tcp
, you may need to implement it like the following?
if (inner_ih->ihl < 5) | |
return TC_ACT_SHOT; | |
if (inner_ih->ihl != 5) | |
return TC_ACT_SHOT; |
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.
or you need to calculate correct offset with ih->ihl
.
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.
Actually this tool supports IP option (ihl > 5) but current this PR doesn't calculate offset of inner IP with correct ihl. So let me fix it.
This PR adds support to collect flow logs for IPv4 encapsulated packets.