freebsd-src/sys/netpfil/ipfw
Karim Fodil-Lemelin 62b1faa3b7 ipfw: Skip to the start of the loop when following a keep-state rule
When a packet matches an existing dynamic rule for a keep-state rule,
the matching engine advances the "instruction pointer" to the action
portion of the rule skipping over the match conditions.  However, the
code was merely breaking out of the switch statement rather than doing
a continue, so the remainder of the loop body after the switch was
still executed.  If the first action opcode contains an F_NOT but not
an F_OR (such as an "untag" action), then match is toggled to 0, and
the code exits the inner loop via a break which aborts processing of
the actions.

To fix, just use a continue instead of a break.

PR:		276732
Reviewed by:	jhb, ae
MFC after:	2 weeks
2024-02-15 17:57:51 -08:00
..
nat64 sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
nptv6 sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
pmod sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
test sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
dn_aqm.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
dn_aqm_codel.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
dn_aqm_codel.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
dn_aqm_pie.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
dn_aqm_pie.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
dn_heap.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
dn_heap.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
dn_sched.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
dn_sched_fifo.c sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
dn_sched_fq_codel.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
dn_sched_fq_codel.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
dn_sched_fq_codel_helper.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
dn_sched_fq_pie.c sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
dn_sched_prio.c sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
dn_sched_qfq.c sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
dn_sched_rr.c sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
dn_sched_wf2q.c sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
dummynet.txt sys: Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:54:58 -06:00
ip_dn_glue.c dummynet: add simple gilbert-elliott channel model 2023-12-17 13:20:45 +01:00
ip_dn_io.c dummynet: add simple gilbert-elliott channel model 2023-12-17 13:20:45 +01:00
ip_dn_private.h dummynet: add simple gilbert-elliott channel model 2023-12-17 13:20:45 +01:00
ip_dummynet.c ipfw(4): Fix a typo in a source code comment 2023-12-27 09:38:43 +01:00
ip_fw2.c ipfw: Skip to the start of the loop when following a keep-state rule 2024-02-15 17:57:51 -08:00
ip_fw_bpf.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
ip_fw_dynamic.c netpfil: Fix two typos in source code comments 2024-01-20 17:30:57 +01:00
ip_fw_eaction.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
ip_fw_iface.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ip_fw_log.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ip_fw_nat.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
ip_fw_pfil.c ipfw: Add sysctl flag CTLFLAG_TUN to loader tunables 2023-09-25 18:10:47 +08:00
ip_fw_private.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ip_fw_sockopt.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ip_fw_table.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ip_fw_table.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ip_fw_table_algo.c ipfw: fix copy&paste bug for number:array tables 2023-11-14 07:37:04 +03:00
ip_fw_table_value.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00