From d6a0379d291f5e98500776618559343f40254e40 Mon Sep 17 00:00:00 2001 From: Ermal Date: Thu, 22 Jul 2010 23:16:24 +0000 Subject: Add a subnet option to allowed ip addresses on CP. --- usr/local/www/services_captiveportal_ip.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'usr/local/www/services_captiveportal_ip.php') diff --git a/usr/local/www/services_captiveportal_ip.php b/usr/local/www/services_captiveportal_ip.php index 29acb1c..1979519 100755 --- a/usr/local/www/services_captiveportal_ip.php +++ b/usr/local/www/services_captiveportal_ip.php @@ -59,10 +59,16 @@ if ($_GET['act'] == "del") { $ipent = $a_allowedips[$_GET['id']]; if (isset($config['captiveportal']['enable'])) { + if (!empty($ipent['sn'])) + $ipent['ip'] .= "/{$ipent['sn']}"; mwexec("/sbin/ipfw table 3 delete " . $ipent['ip']); mwexec("/sbin/ipfw table 4 delete " . $ipent['ip']); mwexec("/sbin/ipfw table 5 delete " . $ipent['ip']); mwexec("/sbin/ipfw table 6 delete " . $ipent['ip']); + mwexec("/sbin/ipfw table 7 delete " . $ipent['ip']); + mwexec("/sbin/ipfw table 8 delete " . $ipent['ip']); + mwexec("/sbin/ipfw table 9 delete " . $ipent['ip']); + mwexec("/sbin/ipfw table 10 delete " . $ipent['ip']); } unset($a_allowedips[$_GET['id']]); -- cgit v1.1 From 23b517ab6033db36a08b3f22f530122ec98aabd9 Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Wed, 28 Jul 2010 03:18:23 -0400 Subject: fix several cosmetic issues. add an icon type for the "both" direction, fix icons for other directions --- usr/local/www/services_captiveportal_ip.php | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'usr/local/www/services_captiveportal_ip.php') diff --git a/usr/local/www/services_captiveportal_ip.php b/usr/local/www/services_captiveportal_ip.php index 1979519..171f583 100755 --- a/usr/local/www/services_captiveportal_ip.php +++ b/usr/local/www/services_captiveportal_ip.php @@ -115,13 +115,23 @@ include("head.inc"); - "; + "; + } + if($ip['dir'] == "both") { + echo " "; + } + echo strtolower($ip['ip']); + if($ip['sn'] != "32" && is_numeric($ip['sn'])) { + $sn = $ip['sn']; + echo "/$sn"; + } + if($ip['dir'] == "from") { + echo " any"; + } + ?> - - any"; - ?>   @@ -158,6 +168,10 @@ include("head.inc"); x.x.x.x any    All connections from the IP address are allowed + +      + All connections to and from the IP address are allowed +   -- cgit v1.1