From dfd1925ed17f904344ae1ec82e13a95e1f7c678b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=B6hmke?= Date: Sat, 18 Jul 2020 19:48:03 +0200 Subject: [PATCH] Renamed driver config variable to EnableIP6Tables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Benjamin Böhmke --- libnetwork/drivers/bridge/bridge.go | 8 ++++---- libnetwork/drivers/bridge/setup_firewalld.go | 2 +- libnetwork/drivers/bridge/setup_ip_tables.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libnetwork/drivers/bridge/bridge.go b/libnetwork/drivers/bridge/bridge.go index 17189cf8e8..8562b3dd08 100644 --- a/libnetwork/drivers/bridge/bridge.go +++ b/libnetwork/drivers/bridge/bridge.go @@ -57,8 +57,8 @@ type iptablesCleanFuncs []iptableCleanFunc type configuration struct { EnableIPForwarding bool EnableIPTables bool + EnableIP6Tables bool EnableUserlandProxy bool - EnableIPv6 bool UserlandProxyPath string } @@ -376,7 +376,7 @@ func (d *driver) configure(option map[string]interface{}) error { } removeIPChains(iptables.IPv4) - if config.EnableIPv6 { + if config.EnableIP6Tables { removeIPChains(iptables.IPv6) } @@ -384,7 +384,7 @@ func (d *driver) configure(option map[string]interface{}) error { if err != nil { return err } - if config.EnableIPv6 { + if config.EnableIP6Tables { natChainV6, filterChainV6, isolationChain1V6, isolationChain2V6, err = setupIPChains(config, iptables.IPv6) if err != nil { return err @@ -408,7 +408,7 @@ func (d *driver) configure(option map[string]interface{}) error { logrus.Warn(err) return err } - if config.EnableIPv6 { + if config.EnableIP6Tables { iptable := iptables.GetIptable(iptables.IPv6) if err := iptable.SetDefaultPolicy(iptables.Filter, "FORWARD", iptables.Drop); err != nil { logrus.Warnf("Setting the default DROP policy on firewall reload failed, %v", err) diff --git a/libnetwork/drivers/bridge/setup_firewalld.go b/libnetwork/drivers/bridge/setup_firewalld.go index 1712bf8c97..16b2c87496 100644 --- a/libnetwork/drivers/bridge/setup_firewalld.go +++ b/libnetwork/drivers/bridge/setup_firewalld.go @@ -16,7 +16,7 @@ func (n *bridgeNetwork) setupFirewalld(config *networkConfiguration, i *bridgeIn iptables.OnReloaded(func() { n.setupIPTables(config, i) }) iptables.OnReloaded(n.portMapper.ReMapAll) - if driverConfig.EnableIPv6 == true { + if driverConfig.EnableIP6Tables == true { iptables.OnReloaded(n.portMapperV6.ReMapAll) } diff --git a/libnetwork/drivers/bridge/setup_ip_tables.go b/libnetwork/drivers/bridge/setup_ip_tables.go index 8ae37b72f5..59f6def9d5 100644 --- a/libnetwork/drivers/bridge/setup_ip_tables.go +++ b/libnetwork/drivers/bridge/setup_ip_tables.go @@ -162,7 +162,7 @@ func (n *bridgeNetwork) setupIPTables(config *networkConfiguration, i *bridgeInt return err } - if !driverConfig.EnableIPv6 || i.bridgeIPv6 == nil { + if !driverConfig.EnableIP6Tables || i.bridgeIPv6 == nil { return nil }