Bug #1243 » pppoe.patch
etc/inc/filter.inc | ||
---|---|---|
775 | 775 |
$oic['virtual'] = true; |
776 | 776 |
$FilterIflist['l2tp'] = $oic; |
777 | 777 |
} |
778 |
if($config['pppoe']['mode'] == "server") { |
|
779 |
$oic = array(); |
|
780 |
$oic['if'] = 'pppoe'; |
|
781 |
$oic['descr'] = 'pppoe'; |
|
782 |
$oic['ip'] = $config['pppoe']['localip']; |
|
783 |
$oic['sa'] = $config['pppoe']['remoteip']; |
|
784 |
$oic['mode'] = $config['pppoe']['mode']; |
|
785 |
$oic['virtual'] = true; |
|
786 |
if($config['pppoe']['pppoe_subnet'] <> "") |
|
787 |
$oic['sn'] = $config['pppoe']['pppoe_subnet']; |
|
788 |
else |
|
789 |
$oic['sn'] = "32"; |
|
790 |
$FilterIflist['pppoe'] = $oic; |
|
791 |
} |
|
778 | ||
779 |
if ($config['pppoes']['pppoe']) |
|
780 |
foreach($config['pppoes']['pppoe'] as $pppoe) |
|
781 |
if ($pppoe['mode'] == "server") { |
|
782 | ||
783 |
$oic = array(); |
|
784 |
$oic['if'] = 'pppoe'; |
|
785 |
$oic['descr'] = 'pppoe'; |
|
786 |
$oic['ip'] = $pppoe['localip']; |
|
787 |
$oic['sa'] = $pppoe['remoteip']; |
|
788 |
$oic['mode'] = $pppoe['mode']; |
|
789 |
$oic['virtual'] = true; |
|
790 |
if($pppoe['pppoe_subnet'] <> "") |
|
791 |
$oic['sn'] = $pppoe['pppoe_subnet']; |
|
792 |
else |
|
793 |
$oic['sn'] = "32"; |
|
794 |
$FilterIflist['pppoe'] = $oic; |
|
795 |
//file_put_contents("/tmp/debug", $FilterIflist['pppoe']); |
|
796 |
} |
|
797 | ||
792 | 798 |
/* add ipsec interfaces */ |
793 | 799 |
if(isset($config['ipsec']['enable']) || isset($config['ipsec']['mobileclients']['enable'])) { |
794 | 800 |
$oic = array(); |
... | ... | |
1304 | 1310 |
$tonathosts .= "{$FilterIflist['pptp']['sa']}/{$pptp_subnet} "; |
1305 | 1311 |
} |
1306 | 1312 |
} |
1313 | ||
1307 | 1314 |
/* PPPoE subnet */ |
1308 |
if(isset($FilterIflist['pppoe']) && $FilterIflist['pppoe']['mode'] == "server") { |
|
1315 |
if ($config['pppoes']['pppoe']) |
|
1316 |
foreach($config['pppoes']['pppoe'] as $pppoe) |
|
1317 |
if ($pppoe['mode'] == "server") |
|
1318 |
$server = true; |
|
1319 | ||
1320 |
if(isset($FilterIflist['pppoe']) && $server) { |
|
1309 | 1321 |
$pppoe_subnet = $FilterIflist['pppoe']['sn']; |
1310 | 1322 |
if(is_private_ip($FilterIflist['pppoe']['sa']) && !empty($pppoe_subnet)) { |
1311 | 1323 |
$numberofnathosts++; |
1312 | 1324 |
$tonathosts .= "{$FilterIflist['pppoe']['sa']}/{$pppoe_subnet} "; |
1313 | 1325 |
} |
1314 | 1326 |
} |
1327 | ||
1315 | 1328 |
/* L2TP subnet */ |
1316 | 1329 |
if(isset($FilterIflist['l2tp']) && $FilterIflist['l2tp']['mode'] == "server") { |
1317 | 1330 |
$l2tp_subnet = $FilterIflist['l2tp']['sn']; |
usr/local/www/firewall_nat_1to1_edit.php | ||
---|---|---|
284 | 284 |
if(have_ruleint_access("pptp")) |
285 | 285 |
$interfaces['pptp'] = "PPTP VPN"; |
286 | 286 | |
287 |
if ($config['pppoe']['mode'] == "server") |
|
288 |
if(have_ruleint_access("pppoe")) |
|
289 |
$interfaces['pppoe'] = "PPPoE VPN"; |
|
287 |
if ($config['pppoes']['pppoe']) |
|
288 |
foreach($config['pppoes']['pppoe'] as $pppoe) |
|
289 |
if ($pppoe['mode'] == "server") |
|
290 |
if(have_ruleint_access("pppoe")) |
|
291 |
$interfaces['pppoe'] = "PPPoE VPN"; |
|
290 | 292 | |
291 | 293 |
/* add ipsec interfaces */ |
292 | 294 |
if (isset($config['ipsec']['enable']) || isset($config['ipsec']['mobileclients']['enable'])) |
usr/local/www/firewall_nat_edit.php | ||
---|---|---|
478 | 478 |
if(have_ruleint_access("pptp")) |
479 | 479 |
$interfaces['pptp'] = "PPTP VPN"; |
480 | 480 | |
481 |
if ($config['pppoe']['mode'] == "server") |
|
482 |
if(have_ruleint_access("pppoe")) |
|
483 |
$interfaces['pppoe'] = "PPPoE VPN"; |
|
481 | ||
482 |
if ($config['pppoes']['pppoe']) |
|
483 |
foreach($config['pppoes']['pppoe'] as $pppoe) |
|
484 |
if ($pppoe['mode'] == "server") |
|
485 |
if(have_ruleint_access("pppoe")) |
|
486 |
$interfaces['pppoe'] = "PPPoE VPN"; |
|
484 | 487 | |
485 | 488 |
/* add ipsec interfaces */ |
486 | 489 |
if (isset($config['ipsec']['enable']) || isset($config['ipsec']['mobileclients']['enable'])) |
usr/local/www/firewall_nat_out_edit.php | ||
---|---|---|
407 | 407 |
if(have_ruleint_access("pptp")) |
408 | 408 |
$interfaces['pptp'] = "PPTP VPN"; |
409 | 409 | |
410 |
if ($config['pppoe']['mode'] == "server") |
|
411 |
if(have_ruleint_access("pppoe")) |
|
412 |
$interfaces['pppoe'] = "PPPoE VPN"; |
|
410 |
if ($config['pppoes']['pppoe']) |
|
411 |
foreach($config['pppoes']['pppoe'] as $pppoe) |
|
412 |
if ($pppoe['mode'] == "server") |
|
413 |
if(have_ruleint_access("pppoe")) |
|
414 |
$interfaces['pppoe'] = "PPPoE VPN"; |
|
413 | 415 | |
414 | 416 |
/* add ipsec interfaces */ |
415 | 417 |
if (isset($config['ipsec']['enable']) || isset($config['ipsec']['mobileclients']['enable'])) |
usr/local/www/firewall_rules_edit.php | ||
---|---|---|
682 | 682 |
if ($config['pptpd']['mode'] == "server") |
683 | 683 |
if(have_ruleint_access("pptp")) |
684 | 684 |
$interfaces['pptp'] = "PPTP VPN"; |
685 |
|
|
686 |
if ($config['pppoe']['mode'] == "server") |
|
687 |
if(have_ruleint_access("pppoe")) |
|
688 |
$interfaces['pppoe'] = "PPPoE VPN"; |
|
685 | ||
686 |
if ($config['pppoes']['pppoe']) |
|
687 |
foreach($config['pppoes']['pppoe'] as $pppoe) |
|
688 |
if ($pppoe['mode'] == "server") |
|
689 |
if(have_ruleint_access("pppoe")) |
|
690 |
$interfaces['pppoe'] = "PPPoE VPN"; |
|
691 | ||
689 | 692 |
/* add ipsec interfaces */ |
690 | 693 |
if (isset($config['ipsec']['enable']) || isset($config['ipsec']['mobileclients']['enable'])) |
691 | 694 |
if(have_ruleint_access("enc0")) |