Date: Tue, 9 Nov 2004 11:29:03 +0300 From: Gleb Smirnoff <glebius@freebsd.org> To: andre@freebsd.org Cc: net@freebsd.org Subject: ng_ksocket as divert socket is broken Message-ID: <20041109082903.GA42446@cell.sick.ru>
next in thread | raw e-mail | index | archive | help
Andre, I've recently noticed a regression between RELENG_5 and CURRENT. In CURRENT ng_ksocket is unable to work as divert socket. Since you have touched divert code recently I'm asking you. Today I'm going to dig deeply there, but probably you can give some ideas without investigation. A test for this functionality looks like this: /usr/sbin/ngctl -f- <<-SEQ mkpeer echo dummy dummy name .:dummy echo_div mkpeer echo_div: ksocket echo inet/raw/divert name echo_div:echo div_sock rmhook dummy msg div_sock: bind inet/0.0.0.0:8888 SEQ ipfw add 1000 divert 8888 all from any to any via fxp0 And packets should flow thru fxp0 in both directions. Do not try lo0, there are some problems in there. You also need this patch (going to commit it soon), if you are running INVARIANTS: --- ip_divert.c 25 Oct 2004 20:02:34 -0000 1.106 +++ ip_divert.c 9 Nov 2004 08:27:24 -0000 @@ -277,7 +277,7 @@ struct divert_tag *dt; int error = 0; - KASSERT(m->m_pkthdr.rcvif == NULL, ("rcvif not null")); + m->m_pkthdr.rcvif = NULL; if (control) m_freem(control); /* XXX */ -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041109082903.GA42446>