From owner-freebsd-net@FreeBSD.ORG Mon Jul 16 14:20:07 2007 Return-Path: X-Original-To: freebsd-net@hub.freebsd.org Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6335F16A405 for ; Mon, 16 Jul 2007 14:20:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 4CD1E13C4A8 for ; Mon, 16 Jul 2007 14:20:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l6GEK6f2041689 for ; Mon, 16 Jul 2007 14:20:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l6GEK6is041684; Mon, 16 Jul 2007 14:20:06 GMT (envelope-from gnats) Date: Mon, 16 Jul 2007 14:20:06 GMT Message-Id: <200707161420.l6GEK6is041684@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: Cristian KLEIN Cc: Subject: Re: kern/112612: [lo] Traffic via additional lo(4) interface shows up on lo0 in bpf(4) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Cristian KLEIN List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jul 2007 14:20:07 -0000 The following reply was made to PR kern/112612; it has been noted by GNATS. From: Cristian KLEIN 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--