From 2027d85cbe2559a3f12aa2ac70af2b556788ec4c Mon Sep 17 00:00:00 2001 From: Erik Kline Date: Mon, 1 Jun 2015 18:32:39 +0900 Subject: [PATCH] Send neighbors into NUD_PROBE rather than NUD_DELAY Now that device kernels have the required kernel patch [1] forcing neighbors into NUD_PROBE guarantees that: (a) all neighbors will be probed, even currently reachable ones (b) no spurious neighbor failures will caused [1] http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=765c9c639fbb132af0cafc6e1da22fe6cea26bb8 Bug: 18581716 Change-Id: I51ba92a730ceb9a6c5193dfa6d9a0f1d10bbf16b --- core/java/android/net/IpReachabilityMonitor.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/core/java/android/net/IpReachabilityMonitor.java b/core/java/android/net/IpReachabilityMonitor.java index 3cfd8b2085064..88fb01437cd06 100644 --- a/core/java/android/net/IpReachabilityMonitor.java +++ b/core/java/android/net/IpReachabilityMonitor.java @@ -99,16 +99,10 @@ public class IpReachabilityMonitor { public static boolean probeNeighbor(int ifIndex, InetAddress ip) { final long IO_TIMEOUT = 300L; final String msgSnippet = "probing ip=" + ip.getHostAddress() + "%" + ifIndex; - // This currently does not cause neighbor probing if the target |ip| - // has been confirmed reachable within the past "delay_probe_time" - // seconds, i.e. within the past 5 seconds. - // - // TODO: replace with a transition directly to NUD_PROBE state once - // kernels are updated to do so correctly. if (DBG) { Log.d(TAG, msgSnippet); } final byte[] msg = RtNetlinkNeighborMessage.newNewNeighborMessage( - 1, ip, StructNdMsg.NUD_DELAY, ifIndex, null); + 1, ip, StructNdMsg.NUD_PROBE, ifIndex, null); boolean returnValue = false; try (NetlinkSocket nlSocket = new NetlinkSocket(OsConstants.NETLINK_ROUTE)) {