LOG.trace("NextHops are {}", nextHops);
for (Adjacency nextHop : nextHops) {
- String key = nextHop.getIpAddress();
+ String key = rd + VpnConstants.SEPARATOR + nextHop.getIpAddress();
long label = getUniqueId(key);
value.add(new AdjacencyBuilder(nextHop).setLabel(label).build());
}
InstanceIdentifier<VpnInterface> interfaceId = VpnUtil.getVpnInterfaceIdentifier(intfName);
syncWrite(LogicalDatastoreType.OPERATIONAL, interfaceId, opInterface, DEFAULT_CALLBACK);
for (Adjacency nextHop : nextHops) {
- String key = nextHop.getIpAddress();
+ String key = rd + VpnConstants.SEPARATOR + nextHop.getIpAddress();
long label = getUniqueId(key);
updatePrefixToBGP(rd, nextHop, nextHopIp, label);
}
label = nextHop.getLabel();
if(label == VpnConstants.INVALID_ID) {
//Generate label using ID Manager
- label = getUniqueId(nextHop.getIpAddress());
+ String key = newRd + VpnConstants.SEPARATOR + nextHop.getIpAddress();
+ label = getUniqueId(key);
}
removePrefixFromBGP(rd, nextHop);
//updatePrefixToBGP(newRd, nextHop, nextHopIp, label);