From 5e69e8a7b486e99bda6d27985644c5b44b13d717 Mon Sep 17 00:00:00 2001 From: Murali Reddy Date: Mon, 13 May 2019 20:02:36 +0530 Subject: [PATCH] check for allocations in the range that got transffered when its split --- ipam/ring/ring.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipam/ring/ring.go b/ipam/ring/ring.go index bb293a99..b77bc37c 100644 --- a/ipam/ring/ring.go +++ b/ipam/ring/ring.go @@ -302,7 +302,7 @@ func (es entries) merge(other entries, ourPeer mesh.PeerName, r *Ring) (result e // insert, checking that a range owned by us hasn't been split if previousOwner != nil && *previousOwner == ourPeer && theirs.Peer != ourPeer { // check we have no allocations in the range that got split - if checkEntryHasAllocations(es.entry(i-1), mine) { + if checkEntryHasAllocations(theirs, mine) { err = errEntryInMyRange(theirs) return }