summaryrefslogtreecommitdiffstats
path: root/etc/inc/interfaces.inc
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2014-11-28 12:12:57 +0100
committerErmal LUÇI <eri@pfsense.org>2014-11-28 12:13:13 +0100
commita9163efee9171e7245861ad8a98f09b8ee3dee74 (patch)
treed4a5d4e1cceb02b5766c6715e7896190ba57dd4b /etc/inc/interfaces.inc
parent4dbc18db6ef08f9bb1ac696aed3a3ba785e616c0 (diff)
downloadpfsense-a9163efee9171e7245861ad8a98f09b8ee3dee74.zip
pfsense-a9163efee9171e7245861ad8a98f09b8ee3dee74.tar.gz
Cleanup some code and use function for easier management
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r--etc/inc/interfaces.inc28
1 files changed, 3 insertions, 25 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 066d8da..9130719 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -139,35 +139,13 @@ function interface_netgraph_needed($interface = "wan") {
break;
}
}
- if ($found == false) {
- if (!empty($config['interfaces'][$interface])) {
- switch ($config['interfaces'][$interface]['ipaddr']) {
- case "ppp":
- case "pppoe":
- case "l2tp":
- case "pptp":
- $found = true;
- break;
- default:
- $found = false;
- break;
- }
- }
- }
+ if ($found == false)
+ $found = interface_isppp_type($interface);
+
if ($found == false) {
$realif = get_real_interface($interface);
if (is_array($config['ppps']['ppp']) && count($config['ppps']['ppp'])) {
foreach ($config['ppps']['ppp'] as $pppid => $ppp) {
-
-/* This if block doesn't do anything. It can be deleted.
-PPP interfaces are found above in the previous if ($found == false) block.
-This block of code is only entered for OPTx interfaces that are configured for PPPoE modem access, so $realif != $ppp['if']
-
- if ($realif == $ppp['if']) {
- $found = true;
- break;
- }
-*/
$ports = explode(',',$ppp['ports']);
foreach($ports as $pid => $port){
$port = get_real_interface($port);
OpenPOWER on IntegriCloud