Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/netinet Pull up 1.49: don't rate-limit ICMP we send...



details:   https://anonhg.NetBSD.org/src/rev/5295effe6d3b
branches:  netbsd-1-5
changeset: 488354:5295effe6d3b
user:      sommerfeld <sommerfeld%NetBSD.org@localhost>
date:      Sun Jul 02 14:25:59 2000 +0000

description:
Pull up 1.49: don't rate-limit ICMP we send to ourselves.

diffstat:

 sys/netinet/ip_icmp.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r de7734f0463b -r 5295effe6d3b sys/netinet/ip_icmp.c
--- a/sys/netinet/ip_icmp.c     Sun Jul 02 11:35:58 2000 +0000
+++ b/sys/netinet/ip_icmp.c     Sun Jul 02 14:25:59 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_icmp.c,v 1.47 2000/06/10 12:39:19 darrenr Exp $     */
+/*     $NetBSD: ip_icmp.c,v 1.47.2.1 2000/07/02 14:25:59 sommerfeld Exp $      */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -1001,13 +1001,21 @@
  */
 static int
 icmp_ratelimit(dst, type, code)
-       const struct in_addr *dst;      /* not used at this moment */
+       const struct in_addr *dst;
        const int type;                 /* not used at this moment */
        const int code;                 /* not used at this moment */
 {
        static struct timeval icmperrratelim_last;
+       struct in_ifaddr *ia;
 
        /*
+        * Don't rate-limit if it's for us!  
+        */
+       INADDR_TO_IA(*dst, ia);
+       if (ia != NULL)
+               return 0;
+       
+       /*
         * ratecheck() returns true if it is okay to send.  We return
         * true if it is not okay to send.
         */



Home | Main Index | Thread Index | Old Index