From 2643a90582f106a357241017c4c9c1c4272c489e Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 10 Aug 2020 23:13:42 +0200 Subject: [PATCH] Fix multierror handling --- cmds/portmaster-start/recover_linux.go | 2 +- firewall/interception/nfqueue_linux.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmds/portmaster-start/recover_linux.go b/cmds/portmaster-start/recover_linux.go index ec6e05f8..ecb6735a 100644 --- a/cmds/portmaster-start/recover_linux.go +++ b/cmds/portmaster-start/recover_linux.go @@ -48,7 +48,7 @@ var recoverIPTablesCmd = &cobra.Command{ if filteredErrors != nil { filteredErrors.ErrorFormat = formatNfqErrors - return filteredErrors + return filteredErrors.ErrorOrNil() } return nil diff --git a/firewall/interception/nfqueue_linux.go b/firewall/interception/nfqueue_linux.go index efbdf529..eb5d2008 100644 --- a/firewall/interception/nfqueue_linux.go +++ b/firewall/interception/nfqueue_linux.go @@ -153,7 +153,7 @@ func DeactivateNfqueueFirewall() error { result = multierror.Append(result, err) } - return result + return result.ErrorOrNil() } func activateIPTables(protocol iptables.Protocol, rules, once, chains []string) error { @@ -223,7 +223,7 @@ func deactivateIPTables(protocol iptables.Protocol, rules, chains []string) erro } } - return multierr + return multierr.ErrorOrNil() } // StartNfqueueInterception starts the nfqueue interception.