mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Lock linux namespace structure when adding neighbors
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
This commit is contained in:
parent
1a8c8e9a61
commit
200410dd18
1 changed files with 2 additions and 0 deletions
|
@ -147,7 +147,9 @@ func (n *networkNamespace) AddNeighbor(dstIP net.IP, dstMac net.HardwareAddr, op
|
|||
return fmt.Errorf("could not add neighbor entry: %v", err)
|
||||
}
|
||||
|
||||
n.Lock()
|
||||
n.neighbors = append(n.neighbors, nh)
|
||||
n.Unlock()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue