mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
12df37fdd0
for the bridge driver. Moves two config options, namely EnableIPTables and EnableUserlandProxy from networks to the driver. Closes #242 Signed-off-by: Mohammad Banikazemi <MBanikazemi@gmail.com>
20 lines
453 B
Go
20 lines
453 B
Go
package bridge
|
|
|
|
import "github.com/docker/libnetwork/iptables"
|
|
|
|
func (n *bridgeNetwork) setupFirewalld(config *networkConfiguration, i *bridgeInterface) error {
|
|
d := n.driver
|
|
d.Lock()
|
|
driverConfig := d.config
|
|
d.Unlock()
|
|
|
|
// Sanity check.
|
|
if driverConfig.EnableIPTables == false {
|
|
return IPTableCfgError(config.BridgeName)
|
|
}
|
|
|
|
iptables.OnReloaded(func() { n.setupIPTables(config, i) })
|
|
iptables.OnReloaded(n.portMapper.ReMapAll)
|
|
|
|
return nil
|
|
}
|