summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f5ac766)
raw | patch | inline | side by side (parent: f5ac766)
author | octo <octo> | |
Tue, 9 May 2006 09:14:10 +0000 (09:14 +0000) | ||
committer | octo <octo> | |
Tue, 9 May 2006 09:14:10 +0000 (09:14 +0000) |
src/liboping/liboping.c | patch | blob | history |
index a85de2e3b618c323805966aeb349a0e6533ba384..afd44868133230842b69bf07fe0676d5ce81180d 100644 (file)
--- a/src/liboping/liboping.c
+++ b/src/liboping/liboping.c
@@ -213,7 +213,7 @@ static pinghost_t *ping_receive_ipv4 (pinghost_t *ph, char *buffer, size_t buffe
for (ptr = ph; ptr != NULL; ptr = ptr->next)
{
dprintf ("hostname = %s, ident = 0x%04x, seq = %i\n",
- ptr->hostname, ptr->ident, ptr->sequence - 1);
+ ptr->hostname, ptr->ident, ((ptr->sequence - 1) & 0xFFFF));
if (ptr->addrfamily != AF_INET)
continue;
@@ -224,7 +224,7 @@ static pinghost_t *ping_receive_ipv4 (pinghost_t *ph, char *buffer, size_t buffe
if (ptr->ident != ident)
continue;
- if ((ptr->sequence - 1) != seq)
+ if (((ptr->sequence - 1) & 0xFFFF) != seq)
continue;
dprintf ("Match found: hostname = %s, ident = 0x%04x, seq = %i\n",
@@ -276,7 +276,7 @@ static pinghost_t *ping_receive_ipv6 (pinghost_t *ph, char *buffer, size_t buffe
for (ptr = ph; ptr != NULL; ptr = ptr->next)
{
dprintf ("hostname = %s, ident = 0x%04x, seq = %i\n",
- ptr->hostname, ptr->ident, ptr->sequence - 1);
+ ptr->hostname, ptr->ident, ((ptr->sequence - 1) & 0xFFFF));
if (ptr->addrfamily != AF_INET6)
continue;
@@ -287,7 +287,7 @@ static pinghost_t *ping_receive_ipv6 (pinghost_t *ph, char *buffer, size_t buffe
if (ptr->ident != ident)
continue;
- if ((ptr->sequence - 1) != seq)
+ if (((ptr->sequence - 1) & 0xFFFF) != seq)
continue;
dprintf ("Match found: hostname = %s, ident = 0x%04x, seq = %i\n",