Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Nov 2004 23:57:03 +0300
From:      Gleb Smirnoff <glebius@freebsd.org>
To:        green@freebsd.org
Cc:        net@freebsd.org
Subject:   Re: ng_ksocket as divert socket is broken
Message-ID:  <20041109205703.GB48632@cell.sick.ru>
In-Reply-To: <20041109082903.GA42446@cell.sick.ru>
References:  <20041109082903.GA42446@cell.sick.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
  Brian,

  doing a serie of tests I have found that this commit
has introduced regression described below:

http://lists.freebsd.org/pipermail/cvs-src/2004-October/032888.html

Now I'm working on this, but I'd be glad if you join.

On Tue, Nov 09, 2004 at 11:29:03AM +0300, Gleb Smirnoff wrote:
T>   I've recently noticed a regression between RELENG_5 and CURRENT.
T> In CURRENT ng_ksocket is unable to work as divert socket. Since
T> you have touched divert code recently I'm asking you. Today I'm
T> going to dig deeply there, but probably you can give some ideas
T> without investigation.
T> 
T> A test for this functionality looks like this:
T> 
T> /usr/sbin/ngctl -f- <<-SEQ
T> 	mkpeer echo dummy dummy
T> 	name .:dummy echo_div
T> 	mkpeer echo_div: ksocket echo inet/raw/divert
T> 	name echo_div:echo div_sock
T> 	rmhook dummy
T> 	msg div_sock: bind inet/0.0.0.0:8888
T> SEQ
T> 
T> ipfw add 1000 divert 8888 all from any to any via fxp0
T> 
T> And packets should flow thru fxp0 in both directions. Do not
T> try lo0, there are some problems in there.
T> 
T> You also need this patch (going to commit it soon), if you are
T> running INVARIANTS:
T> 
T> --- ip_divert.c 25 Oct 2004 20:02:34 -0000      1.106
T> +++ ip_divert.c 9 Nov 2004 08:27:24 -0000
T> @@ -277,7 +277,7 @@
T>         struct divert_tag *dt;
T>         int error = 0;
T>  
T> -       KASSERT(m->m_pkthdr.rcvif == NULL, ("rcvif not null"));
T> +       m->m_pkthdr.rcvif = NULL;
T>  
T>         if (control)
T>                 m_freem(control);               /* XXX */
T> 

-- 
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE



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