summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_routes_edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www/system_routes_edit.php')
-rwxr-xr-xusr/local/www/system_routes_edit.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/usr/local/www/system_routes_edit.php b/usr/local/www/system_routes_edit.php
index 28c9edd..e83b88a 100755
--- a/usr/local/www/system_routes_edit.php
+++ b/usr/local/www/system_routes_edit.php
@@ -36,6 +36,18 @@
##|*MATCH=system_routes_edit.php*
##|-PRIV
+function staticroutes_sort() {
+ global $g, $config;
+
+ if (!is_array($config['staticroutes']['route']))
+ return;
+
+ function staticroutecmp($a, $b) {
+ return strcmp($a['network'], $b['network']);
+ }
+
+ usort($config['staticroutes']['route'], "staticroutecmp");
+}
require("guiconfig.inc");
@@ -112,6 +124,7 @@ if ($_POST) {
$route['gateway'] = $_POST['gateway'];
$route['descr'] = $_POST['descr'];
+ staticroutes_sort();
if (isset($id) && $a_routes[$id])
$a_routes[$id] = $route;
else
OpenPOWER on IntegriCloud