summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorstilez <stilez@users.noreply.github.com>2016-12-27 01:31:14 +0000
committerRenato Botelho <renato@netgate.com>2016-12-30 09:54:03 -0200
commitf2aeaff938eb45d5b183f29e67aea42bbef87d3b (patch)
tree33aaa8fb0e1723a80fe60c4a5cc8b847b9559da4 /src
parentab2822c82cd5741e8f352f7812fe90e477c14fa5 (diff)
downloadpfsense-f2aeaff938eb45d5b183f29e67aea42bbef87d3b.zip
pfsense-f2aeaff938eb45d5b183f29e67aea42bbef87d3b.tar.gz
Alternate fix for jim-p's point that seems to resolve everything neatly
@jim-p commented on the PR that: > This change is unwarranted. The protocol default should remain TCP, it is set that way on purpose (otherwise people get confused by the lack of port options being visible). It's also not relevant to the other changes being made on this PR. An alternate fix for jim-p's point. this only affects creating new rules and I take the point. I found this a much better fix (AFAICS). It seems to resolve all issues neatly. Proposed fix: leave "any" at the top of the list as that's the logical place people almost always look for it if they want it, _but set the default proto to tcp for new rules_ so that ports and other expected items are displayed by default too. After all, the default protocol is only relevant for showing tcp and ports fields, when a new blank rule is created (obvious: if the rule exists it would display the protocol in the existing rule). @jim-p can you try this as a fix, and see if it would be acceptable for resolving your point? (cherry picked from commit 8afd8c0409a9ed246a244e7a1dbdcb2ad627434b)
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/firewall_rules_edit.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php
index a7eeee6..7a03550 100644
--- a/src/usr/local/www/firewall_rules_edit.php
+++ b/src/usr/local/www/firewall_rules_edit.php
@@ -328,6 +328,7 @@ if (isset($id) && $a_filter[$id]) {
$pconfig['interface'] = $_GET['if'];
}
$pconfig['type'] = "pass";
+ $pconfig['proto'] = "tcp"; // ensures port fields visible and default=tcp, for a new rule
$pconfig['src'] = "any";
$pconfig['dst'] = "any";
}
OpenPOWER on IntegriCloud