1
0
Fork 0
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:
Madhu Venugopal 2015-07-23 05:09:02 +05:30
commit 413224ea84

View file

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