summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2010-11-10 22:03:07 -0700
committerErik Fonnesbeck <efonnes@gmail.com>2010-11-10 22:43:08 -0700
commit88bc276013552268ebef7058cd7b58c89de67125 (patch)
tree5f496839e6dd01a9ece86526e869ac446568c114 /etc
parentea57ccb86b5c75246dabb8306c35b997cb4ede9d (diff)
downloadpfsense-88bc276013552268ebef7058cd7b58c89de67125.zip
pfsense-88bc276013552268ebef7058cd7b58c89de67125.tar.gz
Fix filter_rules_sort's compare function to know about floating rules so it won't change their order.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/util.inc16
1 files changed, 16 insertions, 0 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index 63b76da..2be567a 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -566,6 +566,22 @@ function get_configured_ip_aliases_list() {
}
+/* comparison function for sorting by the order in which interfaces are normally created */
+function compare_interface_friendly_names($a, $b) {
+ if ($a == $b)
+ return 0;
+ else if ($a == 'wan')
+ return -1;
+ else if ($b == 'wan')
+ return 1;
+ else if ($a == 'lan')
+ return -1;
+ else if ($b == 'lan')
+ return 1;
+
+ return strnatcmp($a, $b);
+}
+
/* return the configured interfaces list. */
function get_configured_interface_list($only_opt = false, $withdisabled = false) {
global $config;
OpenPOWER on IntegriCloud