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

Conntrack status filtering #1222

Merged
merged 2 commits into from
Dec 20, 2024
Merged

Conversation

ffourcot
Copy link
Collaborator

Hello,

A small pull request adding ability to filter conntrack by status / status_mask.

This is interesting since it allows to filter for invalid connections, for example

It allows filtering for example of conntrack entries without replies.

Proof of concept:

Conntrack().request(nfct_msg.create_from(status=0, status_mask=IPS_SEEN_REPLY)

kernel commit:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9344988d2979ce9eefe136a69efcf692615ebba8
@svinota
Copy link
Owner

svinota commented Dec 20, 2024

Thanks a lot!

The project is in the middle of migrating to the new core, and I will rebase the PR asap.

@svinota svinota merged commit b216550 into svinota:master Dec 20, 2024
18 checks passed
@svinota
Copy link
Owner

svinota commented Dec 20, 2024

@ffourcot pls notice that now we have asyncio under the hood.

The plan is to keep the sync API compatible as much as we can, but now the async API is the first class citizen.

Please let me know if there will be issues with the new core (and I'm pretty sure there will be)

@ffourcot
Copy link
Collaborator Author

@svinota thank you! We will test intensively. Our production is a little late from master/recent pyroute2 version, but async API is a very nice feature

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