Date: Wed, 15 Jul 2015 16:57:41 +0000 (UTC) From: Patrick Kelsey <pkelsey@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285605 - stable/10/sys/net Message-ID: <201507151657.t6FGvffV059393@svnmir.geo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pkelsey Date: Wed Jul 15 16:57:40 2015 New Revision: 285605 URL: https://svnweb.freebsd.org/changeset/base/285605 Log: MFC r285190: Fix if_loop so bpfwrite() can use it regardless of the state of bd_hdrcmplt. As if_loop does not use link-level headers, its behavior when used by bpfwrite() should be the same regardless of the state of bd_hdrcmplt. Without this change, libpcap (and other BPF users that work like it) fail when writing to loopback interfaces. Approved by: re Modified: stable/10/sys/net/if_loop.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_loop.c ============================================================================== --- stable/10/sys/net/if_loop.c Wed Jul 15 16:55:56 2015 (r285604) +++ stable/10/sys/net/if_loop.c Wed Jul 15 16:57:40 2015 (r285605) @@ -241,7 +241,7 @@ looutput(struct ifnet *ifp, struct mbuf ifp->if_obytes += m->m_pkthdr.len; /* BPF writes need to be handled specially. */ - if (dst->sa_family == AF_UNSPEC) + if (dst->sa_family == AF_UNSPEC || dst->sa_family == pseudo_AF_HDRCMPLT) bcopy(dst->sa_data, &af, sizeof(af)); else af = dst->sa_family;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507151657.t6FGvffV059393>