From 7c0db67577b5ccba64aa4ea20248b3a12f9571c6 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Thu, 22 Sep 2022 17:12:54 +0200 Subject: [PATCH] Firewall/Rules - support tos/dscp matching. validation issue in https://github.com/opnsense/core/commit/a002251146709a34eebf294bff076a3329253698 for https://github.com/opnsense/core/issues/6045 --- src/www/firewall_rules_edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/www/firewall_rules_edit.php b/src/www/firewall_rules_edit.php index 670f237ea..939bc184b 100644 --- a/src/www/firewall_rules_edit.php +++ b/src/www/firewall_rules_edit.php @@ -452,7 +452,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { $input_errors[] = gettext('Priority match must be an integer between 0 and 7.'); } - if (!empty($pconfig['tos']) && !in_array($pconfig['tos'], get_tos_values())) { + if (!empty($pconfig['tos']) && !isset(get_tos_values()[$pconfig['tos']])) { $input_errors[] = gettext('Match TOS/DSCP value invalid.'); }