summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-03-24 16:25:41 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-03-24 16:26:16 -0300
commitdae77fe374ebaf1f97d2835ef0f52daff3b26be9 (patch)
treea764c415991305923c7b751d3409db6e683d3a0a /etc
parente26e5e256fdcd86c6ac48894825ea7c6851b39a4 (diff)
downloadpfsense-dae77fe374ebaf1f97d2835ef0f52daff3b26be9.zip
pfsense-dae77fe374ebaf1f97d2835ef0f52daff3b26be9.tar.gz
Fix deletion of ipfw rules and pipes for passthru mac, it fixes #3538
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/captiveportal.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc
index 1837798..7972ac3 100644
--- a/etc/inc/captiveportal.inc
+++ b/etc/inc/captiveportal.inc
@@ -1478,7 +1478,7 @@ function captiveportal_get_dn_passthru_ruleno($value) {
if (file_exists("{$g['vardb_path']}/captiveportaldn.rules")) {
$rules = unserialize(file_get_contents("{$g['vardb_path']}/captiveportaldn.rules"));
unset($output);
- $_gb = exec("/sbin/ipfw -x {$cpzone} show | /usr/bin/grep {$value} | /usr/bin/grep -v grep | /usr/bin/cut -d \" \" -f 5 | /usr/bin/head -n 1", $output);
+ $_gb = exec("/sbin/ipfw -x {$cpzone} show | /usr/bin/grep {$value} | /usr/bin/grep -v grep | /usr/bin/awk '{print $5}' | /usr/bin/head -n 1", $output);
$ruleno = intval($output[0]);
if (!$rules[$ruleno])
$ruleno = NULL;
@@ -1566,7 +1566,7 @@ function captiveportal_get_ipfw_passthru_ruleno($value) {
if (file_exists("{$g['vardb_path']}/captiveportal_{$cpzone}.rules")) {
$rules = unserialize(file_get_contents("{$g['vardb_path']}/captiveportal_{$cpzone}.rules"));
unset($output);
- $_gb = exec("/sbin/ipfw -x {$cpzone} show | /usr/bin/grep {$value} | /usr/bin/grep -v grep | /usr/bin/cut -d \" \" -f 5 | /usr/bin/head -n 1", $output);
+ $_gb = exec("/sbin/ipfw -x {$cpzone} show | /usr/bin/grep {$value} | /usr/bin/grep -v grep | /usr/bin/awk '{print $1}' | /usr/bin/head -n 1", $output);
$ruleno = intval($output[0]);
if (!$rules[$ruleno])
$ruleno = NULL;
OpenPOWER on IntegriCloud