mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix bug in DeleteNeighbor
- stop iterating after changing the list reference Signed-off-by: Alessandro Boch <aboch@docker.com>
This commit is contained in:
parent
6ab880f3b7
commit
6afe20096d
1 changed files with 1 additions and 0 deletions
|
@ -80,6 +80,7 @@ func (n *networkNamespace) DeleteNeighbor(dstIP net.IP, dstMac net.HardwareAddr,
|
|||
for i, nh := range n.neighbors {
|
||||
if nh.dstIP.Equal(dstIP) && bytes.Equal(nh.dstMac, dstMac) {
|
||||
n.neighbors = append(n.neighbors[:i], n.neighbors[i+1:]...)
|
||||
break
|
||||
}
|
||||
}
|
||||
n.Unlock()
|
||||
|
|
Loading…
Add table
Reference in a new issue