Page MenuHomeFreeBSD

ipfw: Update the pfil mbuf pointer in ipfw_check_frame()
ClosedPublic

Authored by markj on Jun 14 2021, 9:42 PM.
Tags
None
Referenced Files
F102764133: D30764.diff
Sat, Nov 16, 8:44 PM
Unknown Object (File)
Fri, Nov 15, 3:59 AM
Unknown Object (File)
Wed, Nov 6, 4:41 AM
Unknown Object (File)
Oct 16 2024, 9:30 AM
Unknown Object (File)
Oct 6 2024, 12:39 AM
Unknown Object (File)
Oct 6 2024, 12:32 AM
Unknown Object (File)
Oct 3 2024, 2:27 AM
Unknown Object (File)
Oct 2 2024, 7:11 PM

Details

Summary

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.

PR: 256439
Fixes: f355cb3e6
MFC after: 3 days

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 39909
Build 36798: arc lint + arc unit

Event Timeline

markj requested review of this revision.Jun 14 2021, 9:42 PM

I think we can set *p.m unconditionally, like we do in ipfw_check_packet().

This revision is now accepted and ready to land.Jun 15 2021, 11:21 AM
In D30764#691796, @ae wrote:

I think we can set *p.m unconditionally, like we do in ipfw_check_packet().

p is a union of struct mbuf ** and void *. So wouldn't setting *p.m do the wrong thing if the packet is passed with PFIL_MEMPTR?

p is a union of struct mbuf ** and void *. So wouldn't setting *p.m do the wrong thing if the packet is passed with PFIL_MEMPTR?

You are right.