Date: Sat, 6 Jan 2018 03:07:53 +0700 From: Eugene Grosbein <eugen@grosbein.net> To: Navdeep Parhar <nparhar@gmail.com> Cc: Steven Hartland <steven@multiplay.co.uk>, hiren panchasara <hiren@strugglingcoder.info>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r327559 - in head: . sys/net Message-ID: <5A4FDB19.6020402@grosbein.net> In-Reply-To: <CAPFoGT9Mdn5RzTkgYhkq4A8xcLrQWxFhX2Y44oVdi7yGp%2B4xNQ@mail.gmail.com> References: <201801042005.w04K5liB049411@repo.freebsd.org> <5A4E9397.9000308@grosbein.net> <f133b587-1f7e-4594-31d1-974775ad55be@freebsd.org> <20180104224214.GD18879@strugglingcoder.info> <63c3c450-aeaf-bdd5-5e16-414146c9bb3a@multiplay.co.uk> <20180105094126.GE18879@strugglingcoder.info> <1854b421-3c09-c040-ba86-738b9c621eae@multiplay.co.uk> <5A4FB0B2.5070108@grosbein.net> <4a3927f8-1ea8-36be-2fbd-e0ddc31563df@multiplay.co.uk> <5A4FC2BE.6010506@grosbein.net> <CAPFoGT9Mdn5RzTkgYhkq4A8xcLrQWxFhX2Y44oVdi7yGp%2B4xNQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
06.01.2018 2:20, Navdeep Parhar пишет: > On Fri, Jan 5, 2018 at 10:23 AM, Eugene Grosbein <eugen@grosbein.net> wrote: >> 06.01.2018 1:03, Steven Hartland wrote: >> >>> Is there a way to determine if the mbuf is a forwarded mbuf of not? >> >> Yes: m->m_pkthdr.rcvif is defined in case of forwarding. >> It is NULL for locally originated packets. >> > > Can't rely on this any more: > > 150 union { > 151 struct m_snd_tag *snd_tag; /* send tag, if any */ > 152 struct ifnet *rcvif; /* rcv interface */ > 153 }; Really? That's very bad as some parts of kernel do rely in this. For example, ipfw's iface_match() function is called with m->m_pkthdr.rcvif as first argument and check it for NULL to match "via/recv/xmit ifname" rule options.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5A4FDB19.6020402>