mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #403 from mrjana/overlay
Sometimes fdb points to wrong vtep
This commit is contained in:
commit
413224ea84
1 changed files with 6 additions and 2 deletions
|
@ -190,9 +190,13 @@ func (d *driver) peerDbUpdateSandbox(nid types.UUID) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Go captures variables by reference. The pEntry could be
|
||||||
|
// pointing to the same memory location for every iteration. Make
|
||||||
|
// a copy of pEntry before capturing it in the following closure.
|
||||||
|
entry := pEntry
|
||||||
op := func() {
|
op := func() {
|
||||||
if err := d.peerAdd(nid, pEntry.eid, pKey.peerIP,
|
if err := d.peerAdd(nid, entry.eid, pKey.peerIP,
|
||||||
pKey.peerMac, pEntry.vtep,
|
pKey.peerMac, entry.vtep,
|
||||||
false); err != nil {
|
false); err != nil {
|
||||||
fmt.Printf("peerdbupdate in sandbox failed for ip %s and mac %s: %v",
|
fmt.Printf("peerdbupdate in sandbox failed for ip %s and mac %s: %v",
|
||||||
pKey.peerIP, pKey.peerMac, err)
|
pKey.peerIP, pKey.peerMac, err)
|
||||||
|
|
Loading…
Reference in a new issue