diff --git a/internal/nftman/method.go b/internal/nftman/method.go index b76c85c..ea20d3b 100644 --- a/internal/nftman/method.go +++ b/internal/nftman/method.go @@ -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, @@ -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 {