Page MenuHomeFreeBSD

Fix IP forwarding when the FIB number is changed in a PFIL hook.
ClosedPublic

Authored by hrs on Sep 21 2014, 4:31 AM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 9 2026, 8:27 AM
Unknown Object (File)
Dec 15 2025, 6:28 AM
Unknown Object (File)
Nov 21 2025, 8:04 AM
Unknown Object (File)
Nov 21 2025, 7:36 AM
Unknown Object (File)
Nov 21 2025, 7:31 AM
Unknown Object (File)
Nov 21 2025, 7:27 AM
Unknown Object (File)
Nov 21 2025, 7:23 AM
Unknown Object (File)
Nov 18 2025, 1:33 AM
Subscribers

Details

Reviewers
gnn
Group Reviewers
network
Summary

The current version of ip{,6}_output() do not do an FIB lookup after a PFIL hook changes m->m_pkthdr.fibnum while they do when the destination address is changed. IPFW supports setfib rule to change fibnum, for example. This patch makes them do a fibnum check after pfil_run_hooks() for output packets and look up FIB again when necessary.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

hrs retitled this revision from to Fix IP forwarding when the FIB number is changed in a PFIL hook..
hrs updated this object.
hrs edited the test plan for this revision. (Show Details)
hrs added a reviewer: network.
hrs set the repository for this revision to rS FreeBSD src repository - subversion.
hrs added a subscriber: ume.

Did you generate this patch with arc? There's no context available.

Regenerate a diff by using arc.

In D805#6, @rpaulo wrote:

Did you generate this patch with arc? There's no context available.

No, I didn't. Updated a diff just now.

gnn added a reviewer: gnn.
This revision is now accepted and ready to land.Sep 26 2014, 9:44 AM

I think I am indifferent as I haven't thought much about why this is needed yet.

Can we maybe name the variable "needfiblookup" or something to make it clear what we want to lookup?

hrs edited edge metadata.

s/needlookup/needfiblookup/

In D805#14, @bz wrote:

I think I am indifferent as I haven't thought much about why this is needed yet.

Can we maybe name the variable "needfiblookup" or something to make it clear what we want to lookup?

Yes, we can. Changed.