summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/firewall_rules_edit.php
diff options
context:
space:
mode:
authorstilez <stilez@users.noreply.github.com>2016-12-27 01:31:14 +0000
committerGitHub <noreply@github.com>2016-12-27 01:31:14 +0000
commit8afd8c0409a9ed246a244e7a1dbdcb2ad627434b (patch)
tree9da81b9e4b5c7ece403fd6504d5c6f0f7b6a584c /src/usr/local/www/firewall_rules_edit.php
parent675c9e59db5e41bc6cf922a07fa262bfc5656f1c (diff)
downloadpfsense-8afd8c0409a9ed246a244e7a1dbdcb2ad627434b.zip
pfsense-8afd8c0409a9ed246a244e7a1dbdcb2ad627434b.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?
Diffstat (limited to 'src/usr/local/www/firewall_rules_edit.php')
-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 e6f296a..79b3fb0 100644
--- a/src/usr/local/www/firewall_rules_edit.php
+++ b/src/usr/local/www/firewall_rules_edit.php
@@ -296,6 +296,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