Page MenuHomeFreeBSD

pf: fix dummynet + NAT
ClosedPublic

Authored by kp on Oct 26 2021, 9:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Mar 27, 4:19 PM
Unknown Object (File)
Mar 7 2024, 6:37 PM
Unknown Object (File)
Feb 22 2024, 11:04 AM
Unknown Object (File)
Jan 15 2024, 1:05 AM
Unknown Object (File)
Dec 23 2023, 3:44 AM
Unknown Object (File)
Nov 28 2023, 2:26 AM
Unknown Object (File)
Nov 10 2023, 12:43 PM
Unknown Object (File)
Nov 2 2023, 1:06 AM

Details

Reviewers
None
Group Reviewers
network
pfsense
Commits
rGe5c4987e3fc1: pf: fix dummynet + NAT
Summary

Dummynet differs from ALTQ in that ALTQ schedules packets after they
leave pf. Dummynet schedules them after they leave pf, but then
re-injects them.
We currently deal with this by ensuring we don't re-schedule a packet we
get from dummynet, but this produces unexpected results when combined
with NAT, as dummynet processing is done after the NAT transformation.
In other words, the second time the packet is handed to pf it may have a
different source and destination address.

Simplify this by moving dummynet processing to after all other pf
processing, and not re-processing (but always passing) packets from
dummynet.

This fixes NAT of dummynet delayed packets, and also reduces processing
overhead (because we only do state/rule lookup for each dummynet packet
once, rather than twice).

MFC after: 3 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Oct 28 2021, 8:51 AM
Closed by commit rGe5c4987e3fc1: pf: fix dummynet + NAT (authored by kp). · Explain Why
This revision was automatically updated to reflect the committed changes.