mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Ensure that we only add a state type on pass, and that we only add flags to a TCP reject rule if they were not added previously. Fixes #3050
This commit is contained in:
parent
d17c7b79f1
commit
5015ec4cd0
@ -2293,7 +2293,8 @@ function filter_generate_user_rule($rule) {
|
||||
} else {
|
||||
$aline['flags'] = "flags S/SA ";
|
||||
}
|
||||
|
||||
}
|
||||
if (($rule['protocol'] == "tcp") && ($type == "pass")) {
|
||||
/*
|
||||
* # keep state
|
||||
* works with TCP, UDP, and ICMP.
|
||||
@ -2369,7 +2370,7 @@ function filter_generate_user_rule($rule) {
|
||||
$aline['flags'] .= " ) ";
|
||||
}
|
||||
}
|
||||
if($type == "reject" && $rule['protocol'] == "tcp") {
|
||||
if($type == "reject" && $rule['protocol'] == "tcp" && (strpos($aline['flags'], 'flags') === false)) {
|
||||
/* special reject packet */
|
||||
$aline['flags'] .= "flags S/SA ";
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user