From owner-cvs-all Thu Sep 20 6:53: 3 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id ADC6737B416; Thu, 20 Sep 2001 06:52:50 -0700 (PDT) Received: (from luigi@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f8KDqoC82601; Thu, 20 Sep 2001 06:52:50 -0700 (PDT) (envelope-from luigi) Message-Id: <200109201352.f8KDqoC82601@freefall.freebsd.org> From: Luigi Rizzo Date: Thu, 20 Sep 2001 06:52:50 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/netinet ip_fw.c ip_fw.h src/sbin/ipfw ipfw.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG luigi 2001/09/20 06:52:50 PDT Modified files: sys/netinet ip_fw.c ip_fw.h sbin/ipfw ipfw.c Log: A bunch of minor changes to the code (see below) for readability, code size and speed. No new functionality added (yet) apart from a bugfix. MFC will occur in due time and probably in stages. BUGFIX: fix a problem in old code which prevented reallocation of the hash table for dynamic rules (there is a PR on this). OTHER CHANGES: minor changes to the internal struct for static and dynamic rules. Requires rebuild of ipfw binary. Add comments to show how data structures are linked together. (It probably makes no sense to keep the chain pointers separate from actual rule descriptors. They will be hopefully merged soon. keep a (sysctl-readable) counter for the number of static rules, to speed up IP_FW_GET operations initial support for a "grace time" for expired connections, so we can set timeouts for closing connections to much shorter times. merge zero_entry() and resetlog_entry(), they use basically the same code. clean up and reduce replication of code for removing rules, both for readability and code size. introduce a separate lifetime for dynamic UDP rules. fix a problem in old code which prevented reallocation of the hash table for dynamic rules (PR ...) restructure dynamic rule descriptors introduce some local variables to avoid multiple dereferencing of pointer chains (reduces code size and hopefully increases speed). Revision Changes Path 1.110 +20 -9 src/sbin/ipfw/ipfw.c 1.167 +319 -305 src/sys/netinet/ip_fw.c 1.58 +22 -7 src/sys/netinet/ip_fw.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message