AFAIU, netlink has a message size limit of ~32KB. This means that a single transaction would be limited to a few operations. Going over the limit would result in the following error after flushing: netlink receive: recvmsg: no buffer space available If I am not mistaken, the only alternative is to then divide big transactions into smaller chunks. The only issue is that it's hard to tell when the limit has been exceeded. That's why I suggest exposing a function that would produce the accumulated message size since the messages slice is private. - https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/netlink/af_netlink.c?id=1e26c5e28ca5821a824e90dd359556f5e9e7b89f#n1930 - https://web.git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=d35c99ff77ecb2eb239731b799386f3b3637a31e |
||
---|---|---|
.github/workflows | ||
alignedbuff | ||
binaryutil | ||
expr | ||
integration | ||
internal | ||
userdata | ||
xt | ||
CONTRIBUTING.md | ||
LICENSE | ||
README.md | ||
chain.go | ||
compat_policy.go | ||
compat_policy_test.go | ||
conn.go | ||
counter.go | ||
doc.go | ||
flowtable.go | ||
gen.go | ||
go.mod | ||
go.sum | ||
monitor.go | ||
monitor_test.go | ||
nftables_test.go | ||
obj.go | ||
quota.go | ||
rule.go | ||
set.go | ||
set_test.go | ||
table.go | ||
util.go | ||
util_test.go |
README.md
This is not the correct repository for issues with the Linux nftables project! This repository contains a third-party Go package to programmatically interact with nftables. Find the official nftables website at https://wiki.nftables.org/
This package manipulates Linux nftables (the iptables successor). It is implemented in pure Go, i.e. does not wrap libnftnl.
This is not an official Google product.
Breaking changes
This package is in very early stages, and only contains enough data types and functions to install very basic nftables rules. It is likely that mistakes with the data types/API will be identified as more functionality is added.
Contributions
Contributions are very welcome!