mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Serialize non-atomic jump rule programming in bridge
Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
parent
afcec80137
commit
138c4b2a77
2 changed files with 6 additions and 1 deletions
|
@ -714,7 +714,9 @@ func (c *controller) NewNetwork(networkType, name string, id string, options ...
|
|||
|
||||
joinCluster(network)
|
||||
if !c.isDistributedControl() {
|
||||
c.Lock()
|
||||
arrangeIngressFilterRule()
|
||||
c.Unlock()
|
||||
}
|
||||
|
||||
return network, nil
|
||||
|
|
|
@ -114,7 +114,10 @@ func (n *bridgeNetwork) setupIPTables(config *networkConfiguration, i *bridgeInt
|
|||
n.portMapper.SetIptablesChain(natChain, n.getNetworkBridgeName())
|
||||
}
|
||||
|
||||
if err := ensureJumpRule("FORWARD", IsolationChain); err != nil {
|
||||
d.Lock()
|
||||
err = ensureJumpRule("FORWARD", IsolationChain)
|
||||
d.Unlock()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue