From 7d9d6f6a98ee89e224494005cdac41bfc631ff24 Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 2 Feb 2011 21:37:17 +0000 Subject: Correctly grab the hostname from config for filterdns. --- etc/inc/captiveportal.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'etc/inc') diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index 3d4b61a..353463f 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -1077,10 +1077,10 @@ function setup_dnsfilter_entries() { $cp_filterdns_conf = ""; if (is_array($config['captiveportal']['allowedhostname'])) { foreach ($config['captiveportal']['allowedhostname'] as $hostnameent) { - $cp_filterdns_conf .= "ipfw $hostnameent 3 '/etc/rc.captiveportal_configure'\n"; - $cp_filterdns_conf .= "ipfw $hostnameent 4 '/etc/rc.captiveportal_configure'\n"; - $cp_filterdns_conf .= "ipfw $hostnameent 7 '/etc/rc.captiveportal_configure'\n"; - $cp_filterdns_conf .= "ipfw $hostnameent 8 '/etc/rc.captiveportal_configure'\n"; + $cp_filterdns_conf .= "ipfw {$hostnameent['hostname']} 3 '/etc/rc.captiveportal_configure'\n"; + $cp_filterdns_conf .= "ipfw {$hostnameent['hostname']} 4 '/etc/rc.captiveportal_configure'\n"; + $cp_filterdns_conf .= "ipfw {$hostnameent['hostname']} 7 '/etc/rc.captiveportal_configure'\n"; + $cp_filterdns_conf .= "ipfw {$hostnameent['hostname']} 8 '/etc/rc.captiveportal_configure'\n"; } } file_put_contents($cp_filterdns_filename, $cp_filterdns_conf); -- cgit v1.1