Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Nov 2001 14:43:30 +0100
From:      Guido van Rooij <guido@gvr.org>
To:        freebsd-net@freebsd.org
Subject:   patch regarding icmp bandwidth limiting
Message-ID:  <20011105144330.A29038@gvr.gvr.org>

next in thread | raw e-mail | index | archive | help
Does anyone mind the followning patch? The reason for it is that if
I ping flood localhost I get the following messages:
Limiting icmp ping response from 250 to 200 packets per second
Limiting icmp ping response from 249 to 200 packets per second
Limiting icmp ping response from 249 to 200 packets per second
Limiting icmp ping response from 249 to 200 packets per second
Limiting icmp ping response from 249 to 200 packets per second
Limiting icmp ping response from 248 to 200 packets per second

This doesn't make much sense because it seems that the limiting is
trying to be set to 200 but somehow is stuck at 250.

-Guido

  Index: ip_icmp.c
  ===================================================================
  RCS file: /scratch/cvsup/freebsd/CVS/src/sys/netinet/ip_icmp.c,v
  retrieving revision 1.62
  diff -u -r1.62 ip_icmp.c
  --- ip_icmp.c	2001/10/25 05:56:30	1.62
  +++ ip_icmp.c	2001/11/05 13:41:53
  @@ -862,9 +862,10 @@
   	 * bump packet count
   	 */
   
  -	if (++lpackets[which] > icmplim) {
  +	if (lpackets[which] >= icmplim) {
   		return(-1);
   	}
  +	lpackets[which]++;
   	return(0);
   }
   

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011105144330.A29038>