From owner-freebsd-ipfw Sun Jul 1 11: 8:39 2001 Delivered-To: freebsd-ipfw@freebsd.org Received: from snipe.mail.pas.earthlink.net (snipe.mail.pas.earthlink.net [207.217.120.62]) by hub.freebsd.org (Postfix) with ESMTP id 47DEB37B401 for ; Sun, 1 Jul 2001 11:08:37 -0700 (PDT) (envelope-from cjc@earthlink.net) Received: from blossom.cjclark.org (dialup-209.247.143.73.Dial1.SanJose1.Level3.net [209.247.143.73]) by snipe.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id LAA26031; Sun, 1 Jul 2001 11:08:35 -0700 (PDT) Received: (from cjc@localhost) by blossom.cjclark.org (8.11.4/8.11.3) id f61I8YP00641; Sun, 1 Jul 2001 11:08:34 -0700 (PDT) (envelope-from cjc) Date: Sun, 1 Jul 2001 11:08:34 -0700 From: "Crist J. Clark" To: Luigi Rizzo Cc: freebsd-ipfw@FreeBSD.ORG Subject: Re: BRIDGE in ip_fw.c Message-ID: <20010701110834.B296@blossom.cjclark.org> Reply-To: cjclark@alum.mit.edu References: <20010630232954.J348@blossom.cjclark.org> <200107011419.QAA30334@info.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200107011419.QAA30334@info.iet.unipi.it>; from luigi@info.iet.unipi.it on Sun, Jul 01, 2001 at 04:19:50PM +0200 Sender: owner-freebsd-ipfw@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, Jul 01, 2001 at 04:19:50PM +0200, Luigi Rizzo wrote: > > The reason I ask is that I need the flag bits of ip->ip_off. The test > > to see if a packet is a fragment is, > > > > (ip->ip_off & (IP_OFFMASK | IP_MF)) > > > > And not just if the offset is non-zero. Obviously, whether ip->ip_off > > is in host or network order will make a difference on how to do the > > same order for bridged and "regular" packets. I suppose it > is host order from the previous snippet of code I was assuming host order above since that is always the case now. But according to this code, if (0 && BRIDGED) { /* not yet... */ offset = (ntohs(ip->ip_off) & IP_OFFMASK); ip_len = ntohs(ip->ip_len); } else { offset = (ip->ip_off & IP_OFFMASK); ip_len = ip->ip_len; } At some point in the future, ip->ip_off might not be in host order by the time it gets firewall code? -- Crist J. Clark cjclark@alum.mit.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ipfw" in the body of the message