svn commit: r236673 - projects/pf/head/contrib/pf/pfctl

Gleb Smirnoff glebius at FreeBSD.org
Wed Jun 6 10:57:00 UTC 2012


Author: glebius
Date: Wed Jun  6 10:56:59 2012
New Revision: 236673
URL: http://svn.freebsd.org/changeset/base/236673

Log:
  Remove undocumented auto-guessing based on physmem,
  better I later provide a paragraph in tuning(7).

Modified:
  projects/pf/head/contrib/pf/pfctl/pfctl.c

Modified: projects/pf/head/contrib/pf/pfctl/pfctl.c
==============================================================================
--- projects/pf/head/contrib/pf/pfctl/pfctl.c	Wed Jun  6 09:44:57 2012	(r236672)
+++ projects/pf/head/contrib/pf/pfctl/pfctl.c	Wed Jun  6 10:56:59 2012	(r236673)
@@ -1552,9 +1552,6 @@ pfctl_fopen(const char *name, const char
 void
 pfctl_init_options(struct pfctl *pf)
 {
-	int64_t mem;
-	int mib[2];
-	size_t size;
 
 	pf->timeout[PFTM_TCP_FIRST_PACKET] = PFTM_TCP_FIRST_PACKET_VAL;
 	pf->timeout[PFTM_TCP_OPENING] = PFTM_TCP_OPENING_VAL;
@@ -1582,18 +1579,6 @@ pfctl_init_options(struct pfctl *pf)
 	pf->limit[PF_LIMIT_SRC_NODES] = PFSNODE_HIWAT;
 	pf->limit[PF_LIMIT_TABLE_ENTRIES] = PFR_KENTRY_HIWAT;
 
-	mib[0] = CTL_HW;
-#ifdef __FreeBSD__
-	mib[1] = HW_PHYSMEM;
-#else
-	mib[1] = HW_PHYSMEM64;
-#endif
-	size = sizeof(mem);
-	if (sysctl(mib, 2, &mem, &size, NULL, 0) == -1)
-		err(1, "sysctl");
-	if (mem <= 100*1024*1024)
-		pf->limit[PF_LIMIT_TABLE_ENTRIES] = PFR_KENTRY_HIWAT_SMALL; 
-
 	pf->debug = PF_DEBUG_URGENT;
 }
 


More information about the svn-src-projects mailing list