Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Dec 2009 12:01:45 +0100
From:      =?ISO-8859-1?Q?Ermal_Lu=E7i?= <eri@freebsd.org>
To:        Max Laier <max@love2party.net>
Cc:        svn-src-head@freebsd.org, Luigi Rizzo <luigi@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org
Subject:   Re: svn commit: r200183 - head/sbin/ipfw
Message-ID:  <9a542da30912070301x4ada4d0ct67ec8553a477aea2@mail.gmail.com>
In-Reply-To: <200912070531.17758.max@love2party.net>
References:  <200912061804.nB6I4R38027652@svn.freebsd.org> <200912070531.17758.max@love2party.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 7, 2009 at 5:31 AM, Max Laier <max@love2party.net> wrote:

> On Sunday 06 December 2009 19:04:27 Luigi Rizzo wrote:
> > Author: luigi
> > Date: Sun Dec  6 18:04:26 2009
> > New Revision: 200183
> > URL: http://svn.freebsd.org/changeset/base/200183
> >
> > Log:
> >   restore setting of sin_len (was removed in 1.146 last february) as
> >   it seems that now it is necessary for 'forward' to work outside lo0.
> >   The bug (and fix) was reported on 8.0. This patch probably applies
> >   to RELENG_7 as well.
> >   It seems that 'pf' has a similar bug.
> >
> >   Submitted by:       Lytochkin Boris
>
> Do you have a reference for me?
>

I followed the thread but route-to sets the sin_len see this:
http://fxr.watson.org/fxr/source/contrib/pf/net/pf.c?v=FREEBSD8#L6179


>
> >   MFC after:  3 days
> >
> > Modified:
> >   head/sbin/ipfw/ipfw2.c
> >
> > Modified: head/sbin/ipfw/ipfw2.c
> >
> ===========================================================================
> > === --- head/sbin/ipfw/ipfw2.c        Sun Dec  6 17:26:43 2009
>  (r200182)
> > +++ head/sbin/ipfw/ipfw2.c    Sun Dec  6 18:04:26 2009        (r200183)
> > @@ -2740,9 +2740,11 @@ chkarg:
> >
> >               /*
> >                * In the kernel we assume AF_INET and use only
> > -              * sin_port and sin_addr.
> > +              * sin_port and sin_addr. Remember to set sin_len as
> > +              * the routing code seems to use it too.
> >                */
> >               p->sa.sin_family = AF_INET;
> > +             p->sa.sin_len = sizeof(struct sockaddr_in);
> >               p->sa.sin_port = 0;
> >               /*
> >                * locate the address-port separator (':' or ',')
> >
> >
> > !DSPAM:4b1bf5b9894172410716004!
> >
>



-- 
Ermal



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