mirror of
https://github.com/luscis/openlan.git
synced 2025-10-05 16:47:11 +08:00
fix: firewall: add comments for iptable rules
Signed-off-by: zhihui.ding <danieldin186@gmail.com>
This commit is contained in:
@@ -92,6 +92,9 @@ 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.Jump != "" {
|
||||
jump := strings.ToUpper(ru.Jump)
|
||||
if jump == "DROP" || jump == "ACCEPT" {
|
||||
|
Reference in New Issue
Block a user