mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Fix deletion of ipfw rules and pipes for passthru mac, it fixes #3538
This commit is contained in:
parent
e26e5e256f
commit
dae77fe374
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user