comparison src/solaris/native/java/net/Inet6AddressImpl.c @ 5512:79ce384ed535

7163874: InetAddress.isReachable should support pinging 0.0.0.0 Reviewed-by: alanb, chegar
author youdwei
date Fri, 11 May 2012 16:20:46 +0800
parents a48da818ed65
children eefd9678efbd
comparison
equal deleted inserted replaced
17:c605743b36fc 18:5af571d3f2fb
537 * We did receive something, but is it what we were expecting? 537 * We did receive something, but is it what we were expecting?
538 * I.E.: An ICMP6_ECHO_REPLY packet with the proper PID and 538 * I.E.: An ICMP6_ECHO_REPLY packet with the proper PID and
539 * from the host that we are trying to determine is reachable. 539 * from the host that we are trying to determine is reachable.
540 */ 540 */
541 if (n >= 8 && icmp6->icmp6_type == ICMP6_ECHO_REPLY && 541 if (n >= 8 && icmp6->icmp6_type == ICMP6_ECHO_REPLY &&
542 (ntohs(icmp6->icmp6_id) == pid) && 542 (ntohs(icmp6->icmp6_id) == pid)) {
543 NET_IsEqual(caddr, recv_caddr)) { 543 if (NET_IsEqual(caddr, recv_caddr)) {
544 close(fd); 544 close(fd);
545 return JNI_TRUE; 545 return JNI_TRUE;
546 }
547 if (NET_IsZeroAddr(caddr)) {
548 close(fd);
549 return JNI_TRUE;
550 }
546 } 551 }
547 } 552 }
548 } while (tmout2 > 0); 553 } while (tmout2 > 0);
549 timeout -= 1000; 554 timeout -= 1000;
550 } while (timeout > 0); 555 } while (timeout > 0);