Skip to content

Refactoring nftables package#11787

Open
copybara-service[bot] wants to merge 1 commit intomasterfrom
test/cl766391911
Open

Refactoring nftables package#11787
copybara-service[bot] wants to merge 1 commit intomasterfrom
test/cl766391911

Conversation

@copybara-service
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
@zhimin-z
Copy link

A friendly reminder that this PR had no activity for 120 days.

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.

2 participants