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

add support for ingress hook #71

Merged
merged 1 commit into from
Jan 23, 2025
Merged

add support for ingress hook #71

merged 1 commit into from
Jan 23, 2025

Conversation

Anh-Kagi
Copy link
Contributor

@Anh-Kagi Anh-Kagi commented Jan 17, 2025

It adds support for the ingress hook added in netfilter 0.9.7. This needed to update the libc dependency in nftnl-sys to 0.2.166 at least.

As ingress hooks need to be bound to a device, i also added a set_device method in Chain.

And I've added an example file for this hook, since it works a little differently from the others.


This change is Reviewable

Copy link
Member

@faern faern left a comment

Choose a reason for hiding this comment

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

This looks good overall! Thanks for contributing this feature.

Two blockers for merging remain:

@Anh-Kagi Anh-Kagi force-pushed the main branch 2 times, most recently from e5d7f61 to e9227b5 Compare January 17, 2025 17:32
@Anh-Kagi
Copy link
Contributor Author

Ok! I updated the msrv .github/workflows/build-and-test.yml, nftnl-sys/Cargo.toml and nftnl/Cargo.toml.

@faern
Copy link
Member

faern commented Jan 21, 2025

Awesome! I just merged my PR fixing the clippy complaints about '_ lifetimes. So please rebase this PR on top of latest main, then we can probably have it merged.

- added Ingress in enum Hook
- added set_device() method in struct Chain
- updated libc dependency in nftnl-sys
- added an example file for ingress hook
- update MSRV to 1.63.0
@Anh-Kagi
Copy link
Contributor Author

And here it is !

@faern faern merged commit 7fc5e9b into mullvad:main Jan 23, 2025
7 checks passed
@faern
Copy link
Member

faern commented Jan 23, 2025

Thank you for the contribution!

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