Explorar o código

Don't treat non-nil output as error in ChainExists

ChainExists should not treat non-nil output as
error because there is always going to be some
output while dumping iptable rules.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Jana Radhakrishnan %!s(int64=9) %!d(string=hai) anos
pai
achega
9b31fc50ba
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      libnetwork/drivers/overlay/filter.go

+ 1 - 1
libnetwork/drivers/overlay/filter.go

@@ -23,7 +23,7 @@ func rawIPTables(args ...string) error {
 }
 }
 
 
 func chainExists(cname string) bool {
 func chainExists(cname string) bool {
-	if err := rawIPTables("-L", cname); err != nil {
+	if _, err := iptables.Raw("-L", cname); err != nil {
 		return false
 		return false
 	}
 	}