]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ipfw: Update the pfil mbuf pointer in ipfw_check_frame()
authorMark Johnston <markj@FreeBSD.org>
Wed, 16 Jun 2021 13:46:56 +0000 (09:46 -0400)
committerMark Johnston <markj@FreeBSD.org>
Wed, 16 Jun 2021 13:46:56 +0000 (09:46 -0400)
commitbc6a2267fffeafd3946637607a74cfd639398f9d
tree195ab7253c7e123b1b49289931734f806fe39836
parenta397b5508320e757274bc652b43ccb2e1a702933
ipfw: Update the pfil mbuf pointer in ipfw_check_frame()

ipfw_chk() might call m_pullup() and thus can change the mbuf chain
head.  In this case, the new chain head has to be returned to the pfil
hook caller, otherwise the pfil hook caller is left with a dangling
pointer.

Note that this affects only the link-layer hooks installed when the
net.link.ether.ipfw sysctl is set to 1.

PR: 256439, 254015, 255069, 255104
Fixes: f355cb3e6
Reviewed by: ae
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D30764
sys/netpfil/ipfw/ip_fw_pfil.c