HomeFreeBSD

pf: ensure mbufs are writable

Description

pf: ensure mbufs are writable

Ensure that we can modify mbufs before we start processing them. There are a
number of paths where pf will m_copyback() or otherwise modify a packet. Ensure
that this is safe to do.

For example, ip6_forward() will m_copym() the packet before handing it to the
output pfil hook. This results in a non-writable mbuf, which would trigger
assertion failures (see previous commit).

Reviewed by: glebius (previous version)
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D46628

Details

Provenance
kpAuthored on Tue, Sep 10, 8:16 PM
Reviewer
glebius
Differential Revision
D46628: pf: ensure mbufs are writable
Parents
rGf08247fd888e: Assert that mbufs are writable if we write to them
Branches
Unknown
Tags
Unknown