diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-07-11 01:22:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-11 01:22:30 +0200 |
commit | e2e8477f83f717d6a92badd317ae909cf185d04e (patch) | |
tree | 266259131bc70764b737cc65579641bd8140c533 /pkg/firewall/iptables.go | |
parent | df3f5afad13c91a6f2be9e83ae328483e047c13c (diff) | |
parent | e053e0e05ecd884067125627f0006d1b6e19226e (diff) | |
download | podman-e2e8477f83f717d6a92badd317ae909cf185d04e.tar.gz podman-e2e8477f83f717d6a92badd317ae909cf185d04e.tar.bz2 podman-e2e8477f83f717d6a92badd317ae909cf185d04e.zip |
Merge pull request #3521 from baude/golangcilint1
first pass of corrections for golangci-lint
Diffstat (limited to 'pkg/firewall/iptables.go')
-rw-r--r-- | pkg/firewall/iptables.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pkg/firewall/iptables.go b/pkg/firewall/iptables.go index 59d81b287..92d249f7b 100644 --- a/pkg/firewall/iptables.go +++ b/pkg/firewall/iptables.go @@ -21,6 +21,7 @@ package firewall import ( "fmt" + "github.com/sirupsen/logrus" "net" "github.com/coreos/go-iptables/iptables" @@ -53,7 +54,9 @@ func generateFilterRule(privChainName string) []string { func cleanupRules(ipt *iptables.IPTables, privChainName string, rules [][]string) { for _, rule := range rules { - ipt.Delete("filter", privChainName, rule...) + if err := ipt.Delete("filter", privChainName, rule...); err != nil { + logrus.Errorf("failed to delete iptables rule %s", privChainName) + } } } @@ -185,7 +188,9 @@ func (ib *iptablesBackend) Add(conf *FirewallNetConf) error { func (ib *iptablesBackend) Del(conf *FirewallNetConf) error { for proto, ipt := range ib.protos { - ib.delRules(conf, ipt, proto) + if err := ib.delRules(conf, ipt, proto); err != nil { + logrus.Errorf("failed to delete iptables backend rule %s", conf.IptablesAdminChainName) + } } return nil } |