From 74194bf7bb8c8c5783c7a48dfc5f81d4ba5feca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=E7i?= Date: Fri, 14 Aug 2009 10:06:09 +0000 Subject: Catch up with allowed ip using ipfw tables. This makes allowed ips be configured without reloading the whole other ones. --- usr/local/www/services_captiveportal_ip_edit.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'usr/local/www/services_captiveportal_ip_edit.php') diff --git a/usr/local/www/services_captiveportal_ip_edit.php b/usr/local/www/services_captiveportal_ip_edit.php index 0810077..1ae6f36 100755 --- a/usr/local/www/services_captiveportal_ip_edit.php +++ b/usr/local/www/services_captiveportal_ip_edit.php @@ -103,7 +103,12 @@ if ($_POST) { write_config(); - mark_subsystem_dirty('allowedips'); + if (isset($config['captiveportal']['enable'])) { + if ($ip['dir'] == "from") + mwexec("/sbin/ipfw table 1 add " . $ip['ip']); + else + mwexec("/sbin/ipfw table 2 add " . $ip['ip']); + } header("Location: services_captiveportal_ip.php"); exit; -- cgit v1.1