Reset mbuf pointer to NULL in fastroute case to indicate that mbuf was

consumed by filter. This fixes several panics due to accessing to mbuf
after free.

Submitted by:	Kristof Provost
MFC after:	1 week
This commit is contained in:
ae 2015-03-12 08:57:24 +00:00
parent 8f1c95f606
commit cc29b99b5c

View File

@ -5470,6 +5470,7 @@ pf_route6(struct mbuf **m, struct pf_rule *r, int dir, struct ifnet *oifp,
PF_STATE_UNLOCK(s);
m0->m_flags |= M_SKIP_FIREWALL;
ip6_output(m0, NULL, NULL, 0, NULL, NULL, NULL);
*m = NULL;
return;
}