summaryrefslogtreecommitdiffstats
path: root/sbin/ipfw/ipfw2.c
diff options
context:
space:
mode:
authormelifaro <melifaro@FreeBSD.org>2012-03-25 20:37:59 +0000
committermelifaro <melifaro@FreeBSD.org>2012-03-25 20:37:59 +0000
commit97c3a90503d7ac77bc3c91a3910e5112ea4f1bb2 (patch)
treecc5736172eadfb11a89781cc57af9cf6e64f57d2 /sbin/ipfw/ipfw2.c
parent96b099d4c47ca4e52fbc294eeb3f76bbff60ef05 (diff)
downloadFreeBSD-src-97c3a90503d7ac77bc3c91a3910e5112ea4f1bb2.zip
FreeBSD-src-97c3a90503d7ac77bc3c91a3910e5112ea4f1bb2.tar.gz
- Permit number of ipfw tables to be changed in runtime.
net.inet.ip.fw.tables_max is now read-write. - Bump IPFW_TABLES_MAX to 65535 Default number of tables is still 128 - Remove IPFW_TABLES_MAX from ipfw(8) code. Sponsored by Yandex LLC Approved by: kib(mentor) MFC after: 2 weeks
Diffstat (limited to 'sbin/ipfw/ipfw2.c')
-rw-r--r--sbin/ipfw/ipfw2.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index 41f7be3..dd22ad0 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -3932,15 +3932,9 @@ ipfw_table_handler(int ac, char *av[])
len = sizeof(tables_max);
if (sysctlbyname("net.inet.ip.fw.tables_max", &tables_max, &len,
- NULL, 0) == -1) {
-#ifdef IPFW_TABLES_MAX
- warn("Warn: Failed to get the max tables number via sysctl. "
- "Using the compiled in defaults. \nThe reason was");
- tables_max = IPFW_TABLES_MAX;
-#else
- errx(1, "Failed sysctlbyname(\"net.inet.ip.fw.tables_max\")");
-#endif
- }
+ NULL, 0) == -1)
+ errx(1, "Can't determine maximum number of ipfw tables. "
+ "Perhaps you forgot to load ipfw module?");
memset(&xent, 0, sizeof(xent));
OpenPOWER on IntegriCloud