Instead, reset the value of all host object in ping_receive_all().
ping_receive_one() does not necessarily get a pointer to the host object for
which we receive a reply, since ICMP messages may be received on _any_ raw
socket.
/* Iterate over all auxiliary data in msghdr */
recv_ttl = -1;
- ph->recv_ttl = -1;
for (cmsg = CMSG_FIRSTHDR (&msghdr); /* {{{ */
cmsg != NULL;
cmsg = CMSG_NXTHDR (&msghdr, cmsg))
ret = 0;
for (ptr = ph; ptr != NULL; ptr = ptr->next)
- ptr->latency = -1.0;
+ {
+ ptr->latency = -1.0;
+ ptr->recv_ttl = -1;
+ }
if (gettimeofday (&nowtime, NULL) == -1)
{