Skip to content

Commit

Permalink
Merge pull request #41 from singchia/fix/infinity-recursion
Browse files Browse the repository at this point in the history
fix infinity recursion in Equal while findrules
  • Loading branch information
singchia authored Feb 18, 2024
2 parents 59e9228 + 1c8e6ac commit aef48ed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions iptables/match.go
Original file line number Diff line number Diff line change
Expand Up @@ -1554,6 +1554,10 @@ type MatchComment struct {
Comment string
}

func (mComment *MatchComment) Short() string {
return strings.Join(mComment.ShortArgs(), " ")
}

func (mComment *MatchComment) ShortArgs() []string {
args := make([]string, 0, 4)
args = append(args, "-m", mComment.matchType.String())
Expand Down

0 comments on commit aef48ed

Please sign in to comment.