Skip to content

Conversation

@Shikugawa
Copy link

@Shikugawa Shikugawa commented Jun 20, 2023

This PR adds support to collect flow logs for IPv4 encapsulated packets.

@Shikugawa Shikugawa marked this pull request as ready for review June 22, 2023 13:50
@Shikugawa
Copy link
Author

@slankdev Please check it. cc @proelbtn @ninilosso

if (inner_ih->ihl < 5)
return TC_ACT_SHOT;
Copy link
Member

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?

Suggested change
if (inner_ih->ihl < 5)
return TC_ACT_SHOT;
if (inner_ih->ihl != 5)
return TC_ACT_SHOT;

Copy link
Member

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.

Copy link
Author

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.

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.

2 participants