Browse Source

modify submitted changes

move else check to inside else statement
pull/1/head
Fred Posner 4 years ago
committed by GitHub
parent
commit
55a9439c1e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      go/iptables-api.go

+ 6
- 6
go/iptables-api.go View File

@ -226,14 +226,14 @@ func iptableHandle(proto string, task string, ipvar string) (string, error) {
return "ip already exists", err
} else {
err = ipt.Insert("filter", "APIBANLOCAL", 1, "-s", ipvar, "-d", "0/0", "-j", targetChain)
if err != nil {
log.Println("iptableHandler: error pushing address", err)
return "", err
} else {
return "pushed", nil
}
}
}
if err != nil {
log.Println("iptableHandler: error pushing address", err)
return "", err
} else {
return "pushed", nil
}
default:
log.Println("iptableHandler: unknown task")
return "", errors.New("unknown task")


Loading…
Cancel
Save