From owner-freebsd-ipfw Wed Jul 28 13: 1:31 1999 Delivered-To: freebsd-ipfw@freebsd.org Received: from ns.mt.sri.com (ns.mt.sri.com [206.127.79.91]) by hub.freebsd.org (Postfix) with ESMTP id 30F7415033; Wed, 28 Jul 1999 13:01:25 -0700 (PDT) (envelope-from nate@mt.sri.com) Received: from mt.sri.com (rocky.mt.sri.com [206.127.76.100]) by ns.mt.sri.com (8.8.8/8.8.8) with SMTP id OAA04762; Wed, 28 Jul 1999 14:00:07 -0600 (MDT) (envelope-from nate@rocky.mt.sri.com) Received: by mt.sri.com (SMI-8.6/SMI-SVR4) id OAA02728; Wed, 28 Jul 1999 14:00:06 -0600 Date: Wed, 28 Jul 1999 14:00:06 -0600 Message-Id: <199907282000.OAA02728@mt.sri.com> From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: "Brian F. Feldman" Cc: Nate Williams , Joe Greco , hackers@FreeBSD.org, freebsd-ipfw@FreeBSD.org Subject: Re: securelevel and ipfw zero In-Reply-To: References: <199907281937.NAA02547@mt.sri.com> X-Mailer: VM 6.34 under 19.16 "Lille" XEmacs Lucid Sender: owner-freebsd-ipfw@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Index: src/sys/netinet/ip_fw.c > =================================================================== > RCS file: /home/ncvs/src/sys/netinet/ip_fw.c,v > retrieving revision 1.114 > diff -u -r1.114 ip_fw.c > --- ip_fw.c 1999/06/19 18:43:28 1.114 > +++ ip_fw.c 1999/07/28 06:29:07 > @@ -106,6 +106,7 @@ > static int add_entry __P((struct ip_fw_head *chainptr, struct ip_fw *frwl)); > static int del_entry __P((struct ip_fw_head *chainptr, u_short number)); > static int zero_entry __P((struct ip_fw *)); > +static int resetlog_entry __P((struct ip_fw *)); > static int check_ipfw_struct __P((struct ip_fw *m)); > static __inline int > iface_match __P((struct ifnet *ifp, union ip_fw_if *ifu, > @@ -184,8 +185,8 @@ > > /* check for matching type in the bitmap */ > if (type < IP_FW_ICMPTYPES_MAX && > - (f->fw_uar.fw_icmptypes[type / (sizeof(unsigned) * 8)] & > - (1U << (type % (8 * sizeof(unsigned)))))) > + (f->fw_uar.fw_icmptypes[type / (sizeof(unsigned) * NBBY)] & > + (1U << (type % (sizeof(unsigned) * NBBY))))) > return(1); > > return(0); /* no match */ These are good bugfixes, and should be committed seperately. > @@ -302,14 +303,15 @@ > struct ifnet *rif, struct ifnet *oif) > { > if (ip) { > + struct tcphdr *const tcp = (struct tcphdr *)((u_int32_t *)ip+ip->ip_hl); > + struct udphdr *const udp = (struct udphdr *)((u_int32_t *)ip+ip->ip_hl); > + struct icmp *const icmp = (struct icmp *)((u_int32_t *)ip+ip->ip_hl); > static u_int64_t counter; > - struct tcphdr *const tcp = (struct tcphdr *) ((u_int32_t *) ip+ ip->ip_hl); > - struct udphdr *const udp = (struct udphdr *) ((u_int32_t *) ip+ ip->ip_hl); > - struct icmp *const icmp = (struct icmp *) ((u_int32_t *) ip + ip->ip_hl); > - int count; > + u_int64_t count; These are mostly change for changes sake, and make it difficult to see the functional changes. Please limit your changes to changes, and not just to add stylistic differences. While I may agree with them, they detract from the review process. [ Rest deleted ] Can you resend them to me in private email after you remove the white-space/stylistic changes? Thanks! Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ipfw" in the body of the message