Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet If the incoming code value is 0, timer gets 0, w...



details:   https://anonhg.NetBSD.org/src/rev/eb2e3a8565f8
branches:  trunk
changeset: 472216:eb2e3a8565f8
user:      hwr <hwr%NetBSD.org@localhost>
date:      Sun Apr 25 10:26:29 1999 +0000

description:
If the incoming code value is 0, timer gets 0, which would mean
a divide by zero afterwards.
This is also, what Bill Fenner seems to have done in the FreeBSD igmp
code.
This should fix kern/6541.

diffstat:

 sys/netinet/igmp.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r 98e842fd139f -r eb2e3a8565f8 sys/netinet/igmp.c
--- a/sys/netinet/igmp.c        Sun Apr 25 10:05:00 1999 +0000
+++ b/sys/netinet/igmp.c        Sun Apr 25 10:26:29 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: igmp.c,v 1.19 1999/01/19 23:03:20 mycroft Exp $        */
+/*     $NetBSD: igmp.c,v 1.20 1999/04/25 10:26:29 hwr Exp $    */
 
 /*
  * Internet Group Management Protocol (IGMP) routines.
@@ -199,6 +199,8 @@
                        }
 
                        timer = igmp->igmp_code * PR_FASTHZ / IGMP_TIMER_SCALE;
+                       if (timer == 0)
+                               timer =1;
 
                        /*
                         * Start the timers in all of our membership records



Home | Main Index | Thread Index | Old Index