freebsd-dev/sys/netpfil/pf
Kristof Provost e5c4987e3f pf: fix dummynet + NAT
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")
Differential Revision:	https://reviews.freebsd.org/D32665
2021-10-28 10:41:17 +02:00
..
if_pflog.c pf: Split pfi_kif into a user and kernel space structure 2021-01-05 23:35:37 +01:00
if_pfsync.c pf: fix some cc --analyze warnings 2021-10-19 11:59:11 +00:00
in4_cksum.c SPDX: license IDs for some ISC-related files. 2017-12-08 15:57:29 +00:00
pf_altq.h pf: qid and pqid can be uint16_t 2021-09-10 17:07:57 +02:00
pf_if.c pf: switch kif counters to pf_counter_u64 2021-07-25 10:22:17 +02:00
pf_ioctl.c pf: fix some cc --analyze warnings 2021-10-19 11:59:11 +00:00
pf_lb.c pf: selecting pf_map_addr is not an error 2021-10-16 09:32:15 +02:00
pf_mtag.h pf: qid and pqid can be uint16_t 2021-09-10 17:07:57 +02:00
pf_norm.c pf: fix some cc --analyze warnings 2021-10-19 11:59:11 +00:00
pf_nv.c pf: Introduce pf_nvbool() 2021-10-13 12:01:09 +02:00
pf_nv.h pf: Introduce pf_nvbool() 2021-10-13 12:01:09 +02:00
pf_osfp.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
pf_ruleset.c pf: match keyword support 2021-07-17 12:01:08 +02:00
pf_syncookies.c pf: hook up adaptive mode configuration 2021-09-29 15:11:54 +02:00
pf_table.c pf: Remove unneeded NULL check 2021-07-08 10:32:33 +02:00
pf.c pf: fix dummynet + NAT 2021-10-28 10:41:17 +02:00
pf.h pf: import pf_set_protostate() from OpenBSD 2021-09-01 12:02:19 +02:00