Renamed driver config variable to EnableIP6Tables

Signed-off-by: Benjamin Böhmke <benjamin@boehmke.net>
This commit is contained in:
Benjamin Böhmke
2020-07-18 19:48:03 +02:00
parent 8dbb5b5a7d
commit dfd1925ed1
3 changed files with 6 additions and 6 deletions

View File

@@ -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)

View File

@@ -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)
}

View File

@@ -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
}