Merge pull request #1669 from sanimej/lock

Lock linux namespace structure when adding neighbors
This commit is contained in:
Madhu Venugopal 2017-03-02 08:04:09 -08:00 committed by GitHub
commit 60dabf0be8

View file

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