From 848edc95d77b01542a9252c5af128595b5862121 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 5 Apr 2006 02:37:07 +0000 Subject: Fix problem with short overflows not working properly. --- module/bsnmp-ping.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 +#include #include #include #include @@ -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)); -- cgit v1.2.3