Dual-homing probing improvements
* Extend timeout from 1500 to 3000 ms (including 1000 ms initial delay)
* Use unicast instread of multicast probe for IPv6 host
Change-Id: I6aa9d9b45502e06252596417c685fda6be28fdbb
diff --git a/core/store/dist/src/main/java/org/onosproject/store/host/impl/DistributedHostStore.java b/core/store/dist/src/main/java/org/onosproject/store/host/impl/DistributedHostStore.java
index 5f59921..436ec9b 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/host/impl/DistributedHostStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/host/impl/DistributedHostStore.java
@@ -108,7 +108,7 @@
private Consumer<Status> statusChangeListener;
// TODO make this configurable
- private static final int PROBE_TIMEOUT_MS = 1500;
+ private static final int PROBE_TIMEOUT_MS = 3000;
private Cache<MacAddress, PendingHostLocation> pendingHostsCache = CacheBuilder.newBuilder()
.expireAfterWrite(PROBE_TIMEOUT_MS, TimeUnit.MILLISECONDS)
diff --git a/providers/host/src/main/java/org/onosproject/provider/host/impl/HostLocationProvider.java b/providers/host/src/main/java/org/onosproject/provider/host/impl/HostLocationProvider.java
index f9821ed..7e2feca 100644
--- a/providers/host/src/main/java/org/onosproject/provider/host/impl/HostLocationProvider.java
+++ b/providers/host/src/main/java/org/onosproject/provider/host/impl/HostLocationProvider.java
@@ -171,6 +171,8 @@
protected ExecutorService eventHandler;
+ private int probeDelayMs = 1000;
+
/**
* Creates an OpenFlow host provider.
*/
@@ -450,17 +452,17 @@
host.id().mac().toBytes(), host.id().vlanId().toShort());
} else {
probe = NeighborSolicitation.buildNdpSolicit(
- ip.getIp6Address().toOctets(),
- IPv6.getLinkLocalAddress(probeMac.toBytes()),
- IPv6.getSolicitNodeAddress(ip.getIp6Address().toOctets()),
- probeMac.toBytes(),
- IPv6.getMCastMacAddress(ip.getIp6Address().toOctets()),
+ ip.getIp6Address(),
+ Ip6Address.valueOf(IPv6.getLinkLocalAddress(probeMac.toBytes())),
+ ip.getIp6Address(),
+ probeMac,
+ host.id().mac(),
host.id().vlanId());
}
// NOTE: delay the probe a little bit to wait for the store synchronization is done
ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();
- executorService.schedule(() -> sendProbe(probe, location), 1000, TimeUnit.MILLISECONDS);
+ executorService.schedule(() -> sendProbe(probe, location), probeDelayMs, TimeUnit.MILLISECONDS);
});
});
}