[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[altq 1208] Re: local packets vs. forwarding in enqueue operation
> > Is there a simple way to detect from within an 'xxx_enqueue' operation that
> > a packet has originated from the local machine, other than matching its
> > source address with all interface addresses? In 'ip_output', this is
> > expressed by the IP_FORWARDING flag, but no such indication seems to be
> > available during 'enqueue'.
> I think you can use
> if (m->m_pkthdr.rcvif == NULL)
> /* packet originated from the local machine */
> (minor point: are packets forwarded but fragmented on the local
> machine classified as "originated from the local machine"?)
In my case: no. How can I expect m->m_pkthdr.rcvif to be set in this case?
Thanks a lot,