blob: a3dfc229e286530c94bee0b8d713712eb8e20643 [file] [log] [blame]
Lorenz Brun11bf3d32025-01-07 17:49:27 +01001From 36088b000a5407fb2de907a890213b960192cd55 Mon Sep 17 00:00:00 2001
2From: Lorenz Brun <lorenz@monogon.tech>
3Date: Thu, 2 Jan 2025 15:56:59 +0100
4Subject: [PATCH] Adapt to nftables 0.2+
5
6---
7 pkg/nftables/common.go | 12 ++++++------
8 1 file changed, 6 insertions(+), 6 deletions(-)
9
10diff --git a/pkg/nftables/common.go b/pkg/nftables/common.go
11index ee046b7..3393582 100644
12--- a/pkg/nftables/common.go
13+++ b/pkg/nftables/common.go
14@@ -88,7 +88,7 @@ func setupNFProxyChains(ci nftableslib.ChainsInterface) error {
15 name: FilterInput,
16 attrs: &nftableslib.ChainAttributes{
17 Type: nftables.ChainTypeFilter,
18- Priority: 0,
19+ Priority: nftables.ChainPriorityFilter,
20 Hook: nftables.ChainHookInput,
21 Policy: &accept,
22 },
23@@ -97,7 +97,7 @@ func setupNFProxyChains(ci nftableslib.ChainsInterface) error {
24 name: FilterOutput,
25 attrs: &nftableslib.ChainAttributes{
26 Type: nftables.ChainTypeFilter,
27- Priority: 0,
28+ Priority: nftables.ChainPriorityFilter,
29 Hook: nftables.ChainHookOutput,
30 Policy: &accept,
31 },
32@@ -106,7 +106,7 @@ func setupNFProxyChains(ci nftableslib.ChainsInterface) error {
33 name: FilterForward,
34 attrs: &nftableslib.ChainAttributes{
35 Type: nftables.ChainTypeFilter,
36- Priority: 0,
37+ Priority: nftables.ChainPriorityFilter,
38 Hook: nftables.ChainHookForward,
39 Policy: &accept,
40 },
41@@ -131,7 +131,7 @@ func setupNFProxyChains(ci nftableslib.ChainsInterface) error {
42 name: NatPrerouting,
43 attrs: &nftableslib.ChainAttributes{
44 Type: nftables.ChainTypeNAT,
45- Priority: 0,
46+ Priority: nftables.ChainPriorityFilter,
47 Hook: nftables.ChainHookPrerouting,
48 Policy: &accept,
49 },
50@@ -140,7 +140,7 @@ func setupNFProxyChains(ci nftableslib.ChainsInterface) error {
51 name: NatOutput,
52 attrs: &nftableslib.ChainAttributes{
53 Type: nftables.ChainTypeNAT,
54- Priority: 0,
55+ Priority: nftables.ChainPriorityFilter,
56 Hook: nftables.ChainHookOutput,
57 Policy: &accept,
58 },
59@@ -149,7 +149,7 @@ func setupNFProxyChains(ci nftableslib.ChainsInterface) error {
60 name: NatPostrouting,
61 attrs: &nftableslib.ChainAttributes{
62 Type: nftables.ChainTypeNAT,
63- Priority: 0,
64+ Priority: nftables.ChainPriorityFilter,
65 Hook: nftables.ChainHookPostrouting,
66 Policy: &accept,
67 },
68--
692.47.0
70