Add protocol family constants to netfilter uapi.

Added for use in nftables to match families to their defined constants.
Should have already been defined but it was just realized that families had
their own preset constants.
The actual values are needed for nftables implementation of meta operations.

PiperOrigin-RevId: 674364348
This commit is contained in:
Jayden Nyamiaka
2024-09-13 11:19:37 -07:00
committed by gVisor bot
parent 290789bab8
commit f366a27622
+12
View File
@@ -33,6 +33,18 @@ const (
NF_INET_NUMHOOKS = 5
)
// Protocol families (address families). These correspond to values in
// include/uapi/linux/netfilter.h.
const (
NFPROTO_UNSPEC = 0
NFPROTO_INET = 1
NFPROTO_IPV4 = 2
NFPROTO_ARP = 3
NFPROTO_NETDEV = 5
NFPROTO_BRIDGE = 7
NFPROTO_IPV6 = 10
)
// Verdicts that can be returned by targets. These correspond to values in
// include/uapi/linux/netfilter.h
const (