diff options
author | Ermal LUÇI <eri@pfsense.org> | 2014-11-28 12:12:57 +0100 |
---|---|---|
committer | Ermal LUÇI <eri@pfsense.org> | 2014-11-28 12:13:13 +0100 |
commit | a9163efee9171e7245861ad8a98f09b8ee3dee74 (patch) | |
tree | d4a5d4e1cceb02b5766c6715e7896190ba57dd4b /etc/inc/interfaces.inc | |
parent | 4dbc18db6ef08f9bb1ac696aed3a3ba785e616c0 (diff) | |
download | pfsense-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.inc | 28 |
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); |