Source-Changes-HG archive

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

[src/netbsd-1-6]: src/sys/netinet Backout changes from #1568 as too many peop...



details:   https://anonhg.NetBSD.org/src/rev/db6bf99ecfa4
branches:  netbsd-1-6
changeset: 531056:db6bf99ecfa4
user:      jmc <jmc%NetBSD.org@localhost>
date:      Tue Dec 30 21:21:18 2003 +0000

description:
Backout changes from #1568 as too many people are reporting problems
with "out of the box" configurations.

diffstat:

 sys/netinet/ip_nat.c |  10 ++--------
 sys/netinet/ip_nat.h |  22 ++--------------------
 2 files changed, 4 insertions(+), 28 deletions(-)

diffs (82 lines):

diff -r bf8a13693c4f -r db6bf99ecfa4 sys/netinet/ip_nat.c
--- a/sys/netinet/ip_nat.c      Wed Dec 24 05:05:23 2003 +0000
+++ b/sys/netinet/ip_nat.c      Tue Dec 30 21:21:18 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_nat.c,v 1.48.4.5 2003/11/26 09:41:12 cyber Exp $    */
+/*     $NetBSD: ip_nat.c,v 1.48.4.6 2003/12/30 21:21:18 jmc Exp $      */
 
 /*
  * Copyright (C) 1995-2001 by Darren Reed.
@@ -112,7 +112,7 @@
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_nat.c,v 1.48.4.5 2003/11/26 09:41:12 cyber Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_nat.c,v 1.48.4.6 2003/12/30 21:21:18 jmc Exp $");
 #else
 static const char sccsid[] = "@(#)ip_nat.c     1.11 6/5/96 (C) 1995 Darren Reed";
 static const char rcsid[] = "@(#)Id: ip_nat.c,v 2.37.2.70 2002/08/28 12:45:48 darrenr Exp";
@@ -122,7 +122,6 @@
 nat_t  **nat_table[2] = { NULL, NULL },
        *nat_instances = NULL;
 ipnat_t        *nat_list = NULL;
-u_int  ipf_nattable_max = NAT_TABLE_MAX;
 u_int  ipf_nattable_sz = NAT_TABLE_SZ;
 u_int  ipf_natrules_sz = NAT_SIZE;
 u_int  ipf_rdrrules_sz = RDR_SIZE;
@@ -1227,11 +1226,6 @@
        qif_t *qf = fin->fin_qif;
 #endif
 
-       if (nat_stats.ns_inuse >= ipf_nattable_max) {
-               nat_stats.ns_memfail++;
-               return NULL;
-       }
-
        nflags = flags & np->in_flags;
        if (flags & IPN_TCPUDP) {
                tcp = (tcphdr_t *)fin->fin_dp;
diff -r bf8a13693c4f -r db6bf99ecfa4 sys/netinet/ip_nat.h
--- a/sys/netinet/ip_nat.h      Wed Dec 24 05:05:23 2003 +0000
+++ b/sys/netinet/ip_nat.h      Tue Dec 30 21:21:18 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_nat.h,v 1.26.4.2 2003/11/26 09:41:35 cyber Exp $    */
+/*     $NetBSD: ip_nat.h,v 1.26.4.3 2003/12/30 21:21:18 jmc Exp $      */
 
 /*
  * Copyright (C) 1995-2001 by Darren Reed.
@@ -47,33 +47,15 @@
 #ifndef        NAT_TABLE_SZ
 # define       NAT_TABLE_SZ    127
 #endif
-#ifndef NAT_TABLE_MAX
-/*
- * This is newly introduced and for the sake of "least surprise", the numbers
- * present aren't what we'd normally use for creating a proper hash table.
- *
- * As an example, NAT_TABLE_MAX should not be > 127 when LARGE_NAT is undefined
- * but this is the default situation and introducing a limit as low as 100 for
- * people may cause a lot of pain.  Similarly, other derived numbers are
- * larger than the hash table size when in fact they should be smaller.
- */
-# ifdef        NAT_TABLE_SZ
-#  define      NAT_TABLE_MAX   (NAT_TABLE_SZ * 2)
-# else
-#  define      NAT_TABLE_MAX   1027
-# endif
-#endif
 #ifdef LARGE_NAT
 #undef NAT_SIZE
 #undef RDR_SIZE
 #undef NAT_TABLE_SZ
-#undef HOSTMAP_SIZE
-#undef NAT_TABLE_MAX
+#undef HOSTMAP_SIZE    127
 #define        NAT_SIZE        2047
 #define        RDR_SIZE        2047
 #define        NAT_TABLE_SZ    16383
 #define        HOSTMAP_SIZE    8191
-#define        NAT_TABLE_MAX   31000
 #endif
 #ifndef        APR_LABELLEN
 #define        APR_LABELLEN    16



Home | Main Index | Thread Index | Old Index