diff options
author | jim-p <jimp@pfsense.org> | 2011-02-10 11:16:13 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-02-10 11:16:13 -0500 |
commit | 8c5df70558fa0b21bacd543c0e33275da5a9b908 (patch) | |
tree | 3fa4d988e4b80eaeb1303acd146675adfb29ba90 /usr/local/www/firewall_nat_out.php | |
parent | 93c2c1e620aa71b9ffd29deb0aeeda3028bb413a (diff) | |
download | pfsense-8c5df70558fa0b21bacd543c0e33275da5a9b908.zip pfsense-8c5df70558fa0b21bacd543c0e33275da5a9b908.tar.gz |
Also fix easyrule and auto->manual nat switch code. Ticket #1243
Diffstat (limited to 'usr/local/www/firewall_nat_out.php')
-rwxr-xr-x | usr/local/www/firewall_nat_out.php | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/usr/local/www/firewall_nat_out.php b/usr/local/www/firewall_nat_out.php index 85c4550..0a8af47 100755 --- a/usr/local/www/firewall_nat_out.php +++ b/usr/local/www/firewall_nat_out.php @@ -145,22 +145,24 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") { } } /* PPPoE subnet */ - if($config['pppoe']['mode'] == "server") { - if (is_ipaddr($config['pppoe']['localip'])) { - if($config['pppoe']['pppoe_subnet'] <> "") - $ossubnet = $config['pppoe']['pppoe_subnet']; - else - $ossubnet = "32"; - $osn = gen_subnet($config['pppoe']['localip'], $ossubnet); - $natent = array(); - $natent['source']['network'] = "{$osn}/{$ossubnet}"; - $natent['sourceport'] = ""; - $natent['descr'] = gettext("Auto created rule for PPPoE server"); - $natent['target'] = ""; - $natent['interface'] = $if2; - $natent['destination']['any'] = true; - $natent['natport'] = ""; - $a_out[] = $natent; + if (is_pppoe_server_enabled() && have_ruleint_access("pppoe")) { + foreach ($config['pppoes']['pppoe'] as $pppoes) { + if (($pppoes['mode'] == "server") && is_ipaddr($pppoes['localip'])) { + if($pppoes['pppoe_subnet'] <> "") + $ossubnet = $pppoes['pppoe_subnet']; + else + $ossubnet = "32"; + $osn = gen_subnet($pppoes['localip'], $ossubnet); + $natent = array(); + $natent['source']['network'] = "{$osn}/{$ossubnet}"; + $natent['sourceport'] = ""; + $natent['descr'] = gettext("Auto created rule for PPPoE server"); + $natent['target'] = ""; + $natent['interface'] = $if2; + $natent['destination']['any'] = true; + $natent['natport'] = ""; + $a_out[] = $natent; + } } } /* L2TP subnet */ |