Skip to content

Refactoring nftables package #11787

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented Jun 4, 2025

Refactoring nftables package

Refactored tcpip/nftables/ and its contents to exist under tcpip/stack/ in
anticipation of implementing netlink netfilter sockets. These sockets need to
reference the system-wide nftables structure, which requires exposing it to all
processes.

The refactoring was necessary due to circular dependencies between the nftables
package and the stack package.

nftables/nftables.go was split up accordingly to more easily manage its types
(nftables_types.go) and the byte operations within it (see nft_{op}.go files).

NOTE: Files that previously existed under the nftables package are still not
thread safe. Future changes will add synchronization primitives to resolve this
issue.

@copybara-service copybara-service bot added the exported Issue was exported automatically label Jun 4, 2025
@copybara-service copybara-service bot changed the title Refactoring Refactoring nftables package Jun 4, 2025
Refactored tcpip/nftables/ and its contents to exist under tcpip/stack/ in
anticipation of implementing netlink netfilter sockets. These sockets need to
reference the system-wide nftables structure, which requires exposing it to all
processes.

The refactoring was necessary due to circular dependencies between the nftables
package and the stack package.

nftables/nftables.go was split up accordingly to more easily manage its types
(nftables_types.go) and the byte operations within it (see nft_{op}.go files).

NOTE: Files that previously existed under the nftables package are still not
thread safe. Future changes will add synchronization primitives to resolve this
issue.
PiperOrigin-RevId: 766391911
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exported Issue was exported automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant