Skip to content

Commit

Permalink
Only apply state tracking to pass rules
Browse files Browse the repository at this point in the history
State tracking only applies to pass rules. This was broken with the
refactor of 3e28d71.
  • Loading branch information
marcos-ng committed Jun 4, 2024
1 parent de9a354 commit 91628a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/etc/inc/filter.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3574,8 +3574,9 @@ function filter_generate_user_rule($rule, & $extralabels = null) {
}

/* State Tracking Options */
$rule_tracks_state = true;
$rule_tracks_state = false;
if ($type == "pass") {
$rule_tracks_state = true;
if (empty($rule['statetype'])) {
// Default to 'keep state'; works with TCP, UDP, and ICMP.
$aline['flags'] .= "keep state ";
Expand Down

0 comments on commit 91628a2

Please sign in to comment.