am b12c9704: Merge "Send neighbors into NUD_PROBE rather than NUD_DELAY" into mnc-dev
* commit 'b12c97040bff6b42a513b50cdf75a98d41cdb249': Send neighbors into NUD_PROBE rather than NUD_DELAY
This commit is contained in:
@@ -99,16 +99,10 @@ public class IpReachabilityMonitor {
|
|||||||
public static boolean probeNeighbor(int ifIndex, InetAddress ip) {
|
public static boolean probeNeighbor(int ifIndex, InetAddress ip) {
|
||||||
final long IO_TIMEOUT = 300L;
|
final long IO_TIMEOUT = 300L;
|
||||||
final String msgSnippet = "probing ip=" + ip.getHostAddress() + "%" + ifIndex;
|
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); }
|
if (DBG) { Log.d(TAG, msgSnippet); }
|
||||||
|
|
||||||
final byte[] msg = RtNetlinkNeighborMessage.newNewNeighborMessage(
|
final byte[] msg = RtNetlinkNeighborMessage.newNewNeighborMessage(
|
||||||
1, ip, StructNdMsg.NUD_DELAY, ifIndex, null);
|
1, ip, StructNdMsg.NUD_PROBE, ifIndex, null);
|
||||||
boolean returnValue = false;
|
boolean returnValue = false;
|
||||||
|
|
||||||
try (NetlinkSocket nlSocket = new NetlinkSocket(OsConstants.NETLINK_ROUTE)) {
|
try (NetlinkSocket nlSocket = new NetlinkSocket(OsConstants.NETLINK_ROUTE)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user