svn commit: r327559 - in head: . sys/net
Eugene Grosbein
eugen at grosbein.net
Fri Jan 5 20:08:10 UTC 2018
06.01.2018 2:20, Navdeep Parhar пишет:
> On Fri, Jan 5, 2018 at 10:23 AM, Eugene Grosbein <eugen at 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.
More information about the svn-src-all
mailing list