diff options
-rw-r--r-- | module/bsnmp-ping.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/module/bsnmp-ping.c b/module/bsnmp-ping.c index 029acdb..d63e0a9 100644 --- a/module/bsnmp-ping.c +++ b/module/bsnmp-ping.c @@ -38,6 +38,7 @@ #include "usuals.h" #include <sys/types.h> +#include <sys/limits.h> #include <sys/socket.h> #include <sys/queue.h> #include <sys/select.h> @@ -307,7 +308,7 @@ ping_fire (void *user_data) memset (icmp_packet, 0, sizeof (icmp_packet)); ping->at = (ping->at + ((ping->transmitted > 1) ? 1 : 0)) % ping->history; - seq = ping->transmitted; + seq = ping->transmitted % USHRT_MAX; ASSERT (ping->transmitted == 0 || (ping->transmitted % ping->history) == ((ping->at + 1) % ping->history)); |