Date: Mon, 16 Jul 2007 14:20:06 GMT From: Cristian KLEIN <cristi@net.utcluj.ro> To: freebsd-net@FreeBSD.org Subject: Re: kern/112612: [lo] Traffic via additional lo(4) interface shows up on lo0 in bpf(4) Message-ID: <200707161420.l6GEK6is041684@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/112612; it has been noted by GNATS. From: Cristian KLEIN <cristi@net.utcluj.ro> To: bug-followup@FreeBSD.org, yar@comp.chem.msu.su Cc: Subject: Re: kern/112612: [lo] Traffic via additional lo(4) interface shows up on lo0 in bpf(4) Date: Mon, 16 Jul 2007 17:18:33 +0300 This is a multi-part message in MIME format. --------------070102080802050402090903 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit The following patch is against -CURRENT: cd /usr/src patch < if_loop.patch Recompile the kernel and it should work. --------------070102080802050402090903 Content-Type: text/x-patch; name="if_loop.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="if_loop.patch" --- sys/net/if_loop.c.orig 2007-02-09 02:09:35.000000000 +0200 +++ sys/net/if_loop.c 2007-07-16 17:02:31.438464106 +0300 @@ -274,15 +274,15 @@ bpf_mtap(ifp->if_bpf, m); } } else { - if (bpf_peers_present(loif->if_bpf)) { - if ((m->m_flags & M_MCAST) == 0 || loif == ifp) { + if (bpf_peers_present(ifp->if_bpf)) { + if ((m->m_flags & M_MCAST) == 0 || (ifp->if_flags == IFF_LOOPBACK)) { /* XXX beware sizeof(af) != 4 */ u_int32_t af1 = af; /* * We need to prepend the address family. */ - bpf_mtap2(loif->if_bpf, &af1, sizeof(af1), m); + bpf_mtap2(ifp->if_bpf, &af1, sizeof(af1), m); } } } --------------070102080802050402090903--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200707161420.l6GEK6is041684>