summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2008-02-13 19:55:13 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2008-02-13 19:55:13 +0000
commit4a541592e81ea049118d5a1c395f5a83c787ef67 (patch)
treed3766858b133d28156aa709eb58c0d52a99bd6f0 /sbin
parent7e96caa7cea3371986e54e0c8191ba395af885d1 (diff)
Use HW_PHYSMEM64.
ok henning@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/pfctl/pfctl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c
index 8639f55dc02..3829f2cb413 100644
--- a/sbin/pfctl/pfctl.c
+++ b/sbin/pfctl/pfctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl.c,v 1.272 2007/11/27 16:22:13 martynas Exp $ */
+/* $OpenBSD: pfctl.c,v 1.273 2008/02/13 19:55:12 kettenis Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -1492,7 +1492,8 @@ pfctl_fopen(const char *name, const char *mode)
void
pfctl_init_options(struct pfctl *pf)
{
- int mib[2], mem;
+ int64_t mem;
+ int mib[2];
size_t size;
pf->timeout[PFTM_TCP_FIRST_PACKET] = PFTM_TCP_FIRST_PACKET_VAL;
@@ -1523,10 +1524,10 @@ pfctl_init_options(struct pfctl *pf)
pf->limit[PF_LIMIT_TABLE_ENTRIES] = PFR_KENTRY_HIWAT;
mib[0] = CTL_HW;
- mib[1] = HW_PHYSMEM;
+ mib[1] = HW_PHYSMEM64;
size = sizeof(mem);
(void) sysctl(mib, 2, &mem, &size, NULL, 0);
- if ((unsigned)mem <= 100*1024*1024)
+ if (mem <= 100*1024*1024)
pf->limit[PF_LIMIT_TABLE_ENTRIES] = PFR_KENTRY_HIWAT_SMALL;
pf->debug = PF_DEBUG_URGENT;