fix: fix qos warn && qos rules redundancy when ip changed (#59)

This commit is contained in:
Teddy_Zhu
2024-04-16 19:17:15 +08:00
committed by GitHub
parent c7a27a46bf
commit 85bf6595ec
2 changed files with 37 additions and 28 deletions

View File

@@ -129,16 +129,15 @@ func (ru IPRule) Args() []string {
if ru.Output != "" {
args = append(args, "-o", ru.Output)
}
if ru.Comment != "" {
args = append(args, "-m", "comment", "--comment", ru.Comment)
}
if ru.Limit != "" {
args = append(args, "-m", "limit", "--limit", ru.Limit)
}
if ru.LimitBurst != "" {
args = append(args, "--limit-burst", ru.LimitBurst)
}
if ru.Comment != "" {
args = append(args, "-m", "comment", "--comment", ru.Comment)
}
if ru.Jump != "" {
jump := strings.ToUpper(ru.Jump)