Date: Wed, 28 Jul 1999 14:00:06 -0600 From: Nate Williams <nate@mt.sri.com> To: "Brian F. Feldman" <green@FreeBSD.org> Cc: Nate Williams <nate@mt.sri.com>, Joe Greco <jgreco@ns.sol.net>, hackers@FreeBSD.org, freebsd-ipfw@FreeBSD.org Subject: Re: securelevel and ipfw zero Message-ID: <199907282000.OAA02728@mt.sri.com> In-Reply-To: <Pine.BSF.4.10.9907281552420.92555-100000@janus.syracuse.net> References: <199907281937.NAA02547@mt.sri.com> <Pine.BSF.4.10.9907281552420.92555-100000@janus.syracuse.net>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907282000.OAA02728>
