Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Jul 2001 11:08:34 -0700
From:      "Crist J. Clark" <cristjc@earthlink.net>
To:        Luigi Rizzo <luigi@info.iet.unipi.it>
Cc:        freebsd-ipfw@FreeBSD.ORG
Subject:   Re: BRIDGE in ip_fw.c
Message-ID:  <20010701110834.B296@blossom.cjclark.org>
In-Reply-To: <200107011419.QAA30334@info.iet.unipi.it>; from luigi@info.iet.unipi.it on Sun, Jul 01, 2001 at 04:19:50PM %2B0200
References:  <20010630232954.J348@blossom.cjclark.org> <200107011419.QAA30334@info.iet.unipi.it>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010701110834.B296>