summaryrefslogtreecommitdiffstats
path: root/etc/rc.linkup
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2014-11-27 12:07:00 +0100
committerErmal LUÇI <eri@pfsense.org>2014-11-27 12:08:19 +0100
commitda145569d2e6bf6451b6a55219116625691a0e2c (patch)
treea3fb29e2f30afbd8406d3d35ed78014fb568c16e /etc/rc.linkup
parent23c5cf732a9ebbb70cc80030c6fdf925429fcd70 (diff)
downloadpfsense-da145569d2e6bf6451b6a55219116625691a0e2c.zip
pfsense-da145569d2e6bf6451b6a55219116625691a0e2c.tar.gz
Handle recovering of ppp types as pppoe/l2tp/pp2p when the parent comes up. It should solve the issues present before on pppoe not recovering on link loss especially when connected directly to modem.
Diffstat (limited to 'etc/rc.linkup')
-rwxr-xr-xetc/rc.linkup18
1 files changed, 17 insertions, 1 deletions
diff --git a/etc/rc.linkup b/etc/rc.linkup
index 373f7a1..fa44d4e 100755
--- a/etc/rc.linkup
+++ b/etc/rc.linkup
@@ -123,9 +123,25 @@ if (!platform_booting()) {
log_error("Ignoring link event for ovpn interface");
return;
}
- $interface = convert_real_interface_to_friendly_interface_name($realiface, true);
+ $interface = convert_real_interface_to_friendly_interface_name($realiface);
if (!empty($interface))
handle_argument_group($interface, $action);
+ if ($action == 'start') {
+ /* Check if there is any child on this one as ppp types and trigger them */
+ if (is_array($config['ppps']['ppp'])) {
+ foreach ($config['ppps']['ppp'] as $pppidx => $ppp) {
+ if ($ppp['type'] == 'ppp')
+ continue;
+ $ports = explode(',', $ppp['ports']);
+ foreach ($ports as $pid => $parent_if) {
+ $tmpiface = get_real_interface($parent_if);
+ $tmpiface = convert_real_interface_to_friendly_interface_name($realiface);
+ if (!empty($tmpiface))
+ interface_configure($tmpiface, true, true);
+ }
+ }
+ }
+ }
}
}
OpenPOWER on IntegriCloud