Skip to content

Commit

Permalink
fix: void add unused set
Browse files Browse the repository at this point in the history
New kernel seems to refuse unused anonymous set.

Signed-off-by: black-desk <[email protected]>
  • Loading branch information
black-desk committed Oct 20, 2023
1 parent a8788d5 commit e14cdf5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/nftman/method.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,6 @@ func (t *Table) addTproxyChainForTProxy(
RegPort: 1,
}

err = conn.AddSet(t.protoSet, t.protoSetElement)
if err != nil {
return
}

exprs := []expr.Any{
&expr.Meta{ // meta load l4proto => reg 1
Key: expr.MetaKeyL4PROTO,
Expand All @@ -342,6 +337,11 @@ func (t *Table) addTproxyChainForTProxy(
Register: 1,
Data: []byte{unix.IPPROTO_TCP},
}
} else {
err = conn.AddSet(t.protoSet, t.protoSetElement)
if err != nil {
return
}
}

if tp.NoIPv6 {
Expand Down

0 comments on commit e14cdf5

Please sign in to comment.