diff --git a/cni-plugin/main.go b/cni-plugin/main.go index 5cfac75b..db3f33d9 100644 --- a/cni-plugin/main.go +++ b/cni-plugin/main.go @@ -399,10 +399,7 @@ func buildAndConfigure(logEntry *logrus.Entry, options *cmd.RootOptions) error { return err } - err = iptables.ConfigureFirewall(*firewallConfiguration) - // We couldn't find a robust way of checking IPv6 support besides trying to just call ip6tables-save. - // If IPv4 rules worked but not IPv6, let's not fail the container (the actual problem will get logged). - if !options.IPv6 && err != nil { + if err := iptables.ConfigureFirewall(*firewallConfiguration); err != nil { logEntry.Errorf("linkerd-cni: could not configure firewall: %s", err) return err } diff --git a/proxy-init/cmd/root.go b/proxy-init/cmd/root.go index f8daa50b..7c22ce77 100644 --- a/proxy-init/cmd/root.go +++ b/proxy-init/cmd/root.go @@ -125,9 +125,9 @@ func NewRootCmd() *cobra.Command { return err } - // We couldn't find a robust way of checking IPv6 support besides trying to just call ip6tables-save. - // If IPv4 rules worked but not IPv6, let's not fail the container (the actual problem will get logged). - _ = iptables.ConfigureFirewall(*config) + if err = iptables.ConfigureFirewall(*config); err != nil { + return err + } return nil },