From 1c8e6ac7fa9744e473a3d531c9d17215fb63c368 Mon Sep 17 00:00:00 2001 From: singchia Date: Sun, 18 Feb 2024 15:57:32 +0800 Subject: [PATCH] fix infinity recursion in Equal while findrules --- iptables/match.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/iptables/match.go b/iptables/match.go index a4af63d..ef4beb7 100644 --- a/iptables/match.go +++ b/iptables/match.go @@ -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())