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>
This commit is contained in:
Jana Radhakrishnan 2015-12-22 12:23:00 -08:00
parent e5beba7a53
commit 9b31fc50ba
1 changed files with 1 additions and 1 deletions

View File

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