Skip to content

Commit

Permalink
fix infinity recursion in Equal while findrules
Browse files Browse the repository at this point in the history
  • Loading branch information
singchia committed Feb 18, 2024
1 parent 9b675dd commit 1c8e6ac
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 1c8e6ac

Please sign in to comment.