[CORD-783] Greedy learning of IPv6 hosts
- Opportunistic learning of IPv6 link local addresses
Change-Id: Ic94a8239c1ae81fc83453d1a29dfc8bd9803b531
diff --git a/core/net/src/main/java/org/onosproject/net/host/impl/HostMonitor.java b/core/net/src/main/java/org/onosproject/net/host/impl/HostMonitor.java
index 7375105..2e4a435 100644
--- a/core/net/src/main/java/org/onosproject/net/host/impl/HostMonitor.java
+++ b/core/net/src/main/java/org/onosproject/net/host/impl/HostMonitor.java
@@ -206,21 +206,20 @@
}
}
- private void sendProbe(ConnectPoint connectPoint,
- IpAddress targetIp,
- IpAddress sourceIp, MacAddress sourceMac,
- VlanId vlan) {
+ public void sendProbe(ConnectPoint connectPoint,
+ IpAddress targetIp,
+ IpAddress sourceIp,
+ MacAddress sourceMac,
+ VlanId vlan) {
Ethernet probePacket;
if (targetIp.isIp4()) {
// IPv4: Use ARP
probePacket = buildArpRequest(targetIp, sourceIp, sourceMac, vlan);
} else {
- /*
- * IPv6: Use Neighbor Discovery. According to the NDP protocol,
- * we should use the solicitation node address as IPv6 destination
- * and the multicast mac address as Ethernet destination.
- */
+ // IPv6: Use Neighbor Discovery. According to the NDP protocol,
+ // we should use the solicitation node address as IPv6 destination
+ // and the multicast mac address as Ethernet destination.
byte[] destIp = IPv6.getSolicitNodeAddress(targetIp.toOctets());
probePacket = NeighborSolicitation.buildNdpSolicit(
targetIp.toOctets(),