Assert that the mbuf is not shared to ensure problems like the last commit are
not reintroduced.
This commit is contained in:
parent
0f5650dbf9
commit
64cb85059e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=157155
@ -2589,6 +2589,9 @@ bridge_pfil(struct mbuf **mp, struct ifnet *bifp, struct ifnet *ifp, int dir)
|
||||
snap = 0;
|
||||
error = -1; /* Default error if not error == 0 */
|
||||
|
||||
/* we may return with the IP fields swapped, ensure its not shared */
|
||||
KASSERT(M_WRITABLE(*mp), ("%s: modifying a shared mbuf", __func__));
|
||||
|
||||
if (pfil_bridge == 0 && pfil_member == 0 && pfil_ipfw == 0)
|
||||
return 0; /* filtering is disabled */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user