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

fix(ct): self-correction mechanism for existing TCP connections direction #857

Closed
wants to merge 6 commits into from

Conversation

SRodi
Copy link
Member

@SRodi SRodi commented Oct 14, 2024

Description

Implement a self-correcting mechanism for determining the packet direction by examining the tcpmetadata seq number

  1. Identify the TCP sequence numbers in the packet metadata.
  2. Compare sequence numbers to determine if the packet is in the forward or reverse direction.
  3. Update the connection tracking logic to use this comparison.

Implementation Steps

  1. Modify the packet structure to include tcpmetadata.
  2. Add a function to compare the sequence numbers and determine direction.
  3. Integrate the new function into the existing connection tracking logic.

Related Issue

If this pull request is related to any issue, please mention it here. Additionally, make sure that the issue is assigned to you before submitting this pull request.

#805

Checklist

  • I have read the contributing documentation.
  • I signed and signed-off the commits (git commit -S -s ...). See this documentation on signing commits.
  • I have correctly attributed the author(s) of the code.
  • I have tested the changes locally.
  • I have followed the project's style guidelines.
  • I have updated the documentation, if necessary.
  • I have added tests, if applicable.

Screenshots (if applicable) or Testing Completed

Please add any relevant screenshots or GIFs to showcase the changes made.

Additional Notes

Add any additional notes or context about the pull request here.


Please refer to the CONTRIBUTING.md file for more information on how to contribute to this project.

@SRodi SRodi requested a review from a team as a code owner October 14, 2024 18:16
pkg/plugin/conntrack/_cprog/conntrack.c Show resolved Hide resolved
pkg/plugin/conntrack/_cprog/conntrack.c Outdated Show resolved Hide resolved
pkg/plugin/conntrack/_cprog/conntrack.c Outdated Show resolved Hide resolved
@SRodi SRodi marked this pull request as draft October 16, 2024 14:42
@SRodi SRodi requested a review from nddq October 18, 2024 15:33
@SRodi SRodi changed the title fix(ct): self-correction mechanism for existing connections direction fix(ct): self-correction mechanism for existing TCP connections direction Oct 21, 2024
@SRodi
Copy link
Member Author

SRodi commented Oct 31, 2024

This needs more investigation.

@SRodi SRodi closed this Oct 31, 2024
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.

[conntrack] Self-correcting mechanism for existing TCP connections' direction
2 participants