summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_nat_1to1_edit.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-12-22 01:14:22 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-12-22 01:14:22 +0000
commitcd860b6201bf6d577c58850d8ac2627528710e01 (patch)
tree1163cdbeab501a8f827ca1ba66cddb9007e68918 /usr/local/www/firewall_nat_1to1_edit.php
parent0da3b8e4067ba840c464dcd0732708f00869c7cd (diff)
downloadpfsense-cd860b6201bf6d577c58850d8ac2627528710e01.zip
pfsense-cd860b6201bf6d577c58850d8ac2627528710e01.tar.gz
* Remove trailing space
* Kill off old process when changing IP address (record edit)
Diffstat (limited to 'usr/local/www/firewall_nat_1to1_edit.php')
-rwxr-xr-xusr/local/www/firewall_nat_1to1_edit.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr/local/www/firewall_nat_1to1_edit.php b/usr/local/www/firewall_nat_1to1_edit.php
index e3ca0e6..47d3e26 100755
--- a/usr/local/www/firewall_nat_1to1_edit.php
+++ b/usr/local/www/firewall_nat_1to1_edit.php
@@ -117,6 +117,12 @@ if ($_POST) {
if (!$input_errors) {
$natent = array();
+
+ if($a_1to1[$id]['external'] != $_POST['external'] or $a_1to1[$id]['internal'] != $_POST['internal']) {
+ $helpers = `/bin/ps awux | grep "p 21 {$a_1to1[$id]['internal']} {$a_1to1[$id]['external']}" | grep -v grep | awk '{ print $2 }'`;
+ if($helpers)
+ exec("kill $helpers");
+ }
$natent['external'] = $_POST['external'];
$natent['internal'] = $_POST['internal'];
$natent['subnet'] = $_POST['subnet'];
@@ -132,7 +138,7 @@ if ($_POST) {
touch($d_natconfdirty_path);
write_config();
-
+
header("Location: firewall_nat_1to1.php");
exit;
}
OpenPOWER on IntegriCloud