diff options
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r-- | etc/inc/interfaces.inc | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index de95433..2d16927 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -103,18 +103,30 @@ function interface_netgraph_needed($interface = "wan") { break; } } - if ($found == false && !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) { + 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; + } + } else { + $realif = get_real_interface($interface); + if (is_array($config['ppps']['ppp']) && count($config['ppps']['ppp'])) { + foreach ($config['ppps']['ppp'] as $pppid => $ppp) { + if ($realif == $ppp['if']) { + $found = true; + break; + } + } + } + } } if ($found == false) { |