Skip to content

Commit

Permalink
chore: rm nfqueueNum parameter in setupNft()
Browse files Browse the repository at this point in the history
  • Loading branch information
haruue committed Oct 27, 2024
1 parent d8d7c5b commit 5f4df7e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions io/nfqueue.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func (n *nfqueuePacketIO) Register(ctx context.Context, cb PacketCallback) error
if n.ipt4 != nil {
err = n.setupIpt(n.local, n.rst, false)
} else {
err = n.setupNft(n.local, n.rst, false, n.queueNum)
err = n.setupNft(n.local, n.rst, false)
}
if err != nil {
return err
Expand Down Expand Up @@ -287,7 +287,7 @@ func (n *nfqueuePacketIO) Close() error {
if n.ipt4 != nil {
_ = n.setupIpt(n.local, n.rst, true)
} else {
_ = n.setupNft(n.local, n.rst, true, n.queueNum)
_ = n.setupNft(n.local, n.rst, true)
}
n.rSet = false
}
Expand All @@ -299,8 +299,8 @@ func (n *nfqueuePacketIO) SetCancelFunc(cancelFunc context.CancelFunc) error {
return nil
}

func (n *nfqueuePacketIO) setupNft(local, rst, remove bool, nfqueueNum int) error {
rules, err := generateNftRules(local, rst, nfqueueNum, n.table)
func (n *nfqueuePacketIO) setupNft(local, rst, remove bool) error {
rules, err := generateNftRules(local, rst, n.queueNum, n.table)
if err != nil {
return err
}
Expand Down

0 comments on commit 5f4df7e

Please sign in to comment.