On Wed, Jan 11, 2017 at 07:33:49PM +0100, Martin Pieuchot wrote:
> After discussing the issue with bluhm@ a better solution would be to
> unlink the state key before passing the mbuf to the driver.  This way
> we would respect the contract that PF data structures are only accessed
> at IPL_SOFTNET.
> 
> ok?

OK bluhm@

> 
> Index: net/if.c
> ===================================================================
> RCS file: /cvs/src/sys/net/if.c,v
> retrieving revision 1.473
> diff -u -p -r1.473 if.c
> --- net/if.c  4 Jan 2017 03:56:15 -0000       1.473
> +++ net/if.c  11 Jan 2017 18:30:41 -0000
>  */
> @@ -597,6 +599,10 @@ if_enqueue(struct ifnet *ifp, struct mbu
>  
>       length = m->m_pkthdr.len;
>       mflags = m->m_flags;
> +
> +#if NPF > 0
> +     pf_pkt_unlink_state_key(m);
> +#endif       /* NPF > 0 */
>  
>       /*
>        * Queue message on interface, and start output if interface

Reply via email to