From owner-freebsd-ipfw Wed Jul 28 13: 7:39 1999 Delivered-To: freebsd-ipfw@freebsd.org Received: from janus.syracuse.net (janus.syracuse.net [205.232.47.15]) by hub.freebsd.org (Postfix) with ESMTP id 8EDCD15647; Wed, 28 Jul 1999 13:07:23 -0700 (PDT) (envelope-from green@FreeBSD.org) Received: from localhost (green@localhost) by janus.syracuse.net (8.9.2/8.8.7) with ESMTP id QAA93553; Wed, 28 Jul 1999 16:05:53 -0400 (EDT) X-Authentication-Warning: janus.syracuse.net: green owned process doing -bs Date: Wed, 28 Jul 1999 16:05:53 -0400 (EDT) From: "Brian F. Feldman" X-Sender: green@janus.syracuse.net To: Nate Williams Cc: Joe Greco , hackers@FreeBSD.org, freebsd-ipfw@FreeBSD.org Subject: Re: securelevel and ipfw zero In-Reply-To: <199907282000.OAA02728@mt.sri.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-ipfw@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 28 Jul 1999, Nate Williams wrote: > > 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. Yes, this specific part shouldn't go in the same commit. > > > @@ -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. These were changes that were necessary to make ipfw readable enough that I could work with it in this area. They aren't just to clean it up, or just for change's sake. They need to stay in. > > [ Rest deleted ] > > Can you resend them to me in private email after you remove the > white-space/stylistic changes? Thanks! > > > > Nate > Brian Fundakowski Feldman _ __ ___ ____ ___ ___ ___ green@FreeBSD.org _ __ ___ | _ ) __| \ FreeBSD: The Power to Serve! _ __ | _ \._ \ |) | http://www.FreeBSD.org/ _ |___/___/___/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ipfw" in the body of the message