Skip to content

Commit

Permalink
auto-redirect: Let fw4 take precedence over prerouting
Browse files Browse the repository at this point in the history
  • Loading branch information
nekohasekai committed Oct 8, 2024
1 parent 9ba70c3 commit c034caf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions redirect_nftables.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (r *autoRedirect) setupNFTables() error {
Name: "prerouting",
Table: table,
Hooknum: nftables.ChainHookPrerouting,
Priority: nftables.ChainPriorityMangle,
Priority: nftables.ChainPriorityRef(*nftables.ChainPriorityMangle + 1),
Type: nftables.ChainTypeNAT,
})
err = r.nftablesCreateExcludeRules(nft, table, chainPreRouting)
Expand All @@ -104,7 +104,7 @@ func (r *autoRedirect) setupNFTables() error {
Name: "prerouting_udp",
Table: table,
Hooknum: nftables.ChainHookPrerouting,
Priority: nftables.ChainPriorityRef(*nftables.ChainPriorityMangle + 1),
Priority: nftables.ChainPriorityRef(*nftables.ChainPriorityMangle + 2),
Type: nftables.ChainTypeFilter,
})
if r.enableIPv4 {
Expand Down

0 comments on commit c034caf

Please sign in to comment.