Revision 25b71fd4
Added by Scott Ullrich over 19 years ago
usr/local/www/firewall_nat.php | ||
---|---|---|
37 | 37 |
$config['nat']['rule'] = array(); |
38 | 38 |
|
39 | 39 |
$a_nat = &$config['nat']['rule']; |
40 |
//nat_rules_sort(); |
|
41 | 40 |
|
42 | 41 |
if ($_POST) { |
43 | 42 |
|
... | ... | |
71 | 70 |
/* delete selected rules */ |
72 | 71 |
if (is_array($_POST['rule']) && count($_POST['rule'])) { |
73 | 72 |
foreach ($_POST['rule'] as $rulei) { |
73 |
$target = $rule['target']; |
|
74 |
$helpers = exec("/bin/ps auwx | grep pftpx | grep {$target} | grep -v grep | cut -d\" \" -f5"); |
|
75 |
if(!$helpers) { |
|
76 |
/* install a pftpx helper, do not set a rule */ |
|
77 |
mwexec("/bin/kill {$helpers}"); |
|
78 |
} |
|
74 | 79 |
unset($a_nat[$rulei]); |
75 | 80 |
} |
76 | 81 |
write_config(); |
Also available in: Unified diff
MFC 7282
Stop FTP helper for NAT redirects upon deletion of rule.