mirror of
https://github.com/hanzoai/visor.git
synced 2026-09-24 17:04:14 +00:00
These messages now allow us to delete tables by name or by handle, and flush tables under certain scenarios. Also updated the nftables package to create a translation between nftables flags (NFPROTO_INET, etc) to regular address families. This "translation" in Linux is done implicitly by setting these enums to overlapping values, but here it is done explicitly because stack.AFs are of custom type AF. This gives us an extra safety check on allowing only supported family addresses. Finally, updated tests to dynamically create requests with buffers. This was needed so that the correct amount of padding is inserted between headers and payloads. PiperOrigin-RevId: 783444579
40 lines
728 B
Python
40 lines
728 B
Python
load("//tools:defs.bzl", "go_library", "go_test")
|
|
|
|
package(
|
|
default_applicable_licenses = ["//:license"],
|
|
licenses = ["notice"],
|
|
)
|
|
|
|
go_library(
|
|
name = "nlmsg",
|
|
srcs = [
|
|
"message.go",
|
|
],
|
|
visibility = [
|
|
"//pkg/sentry:internal",
|
|
"//pkg/tcpip/nftables:__subpackages__",
|
|
],
|
|
deps = [
|
|
"//pkg/abi/linux",
|
|
"//pkg/bits",
|
|
"//pkg/hostarch",
|
|
"//pkg/log",
|
|
"//pkg/marshal",
|
|
"//pkg/marshal/primitive",
|
|
],
|
|
)
|
|
|
|
go_test(
|
|
name = "nlmsg_test",
|
|
size = "small",
|
|
srcs = [
|
|
"message_test.go",
|
|
],
|
|
deps = [
|
|
":nlmsg",
|
|
"//pkg/abi/linux",
|
|
"//pkg/marshal",
|
|
"//pkg/marshal/primitive",
|
|
],
|
|
)
|